Skip to content

A cut lands, tags, publishes and reaches main with no hand step - #519

Merged
afflom merged 19 commits into
release/v0.4from
claude/project-thread-4uua0b
Nov 15, 2026
Merged

afflom merged 19 commits into
release/v0.4from
claude/project-thread-4uua0b

Conversation

@afflom

@afflom afflom commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Requested by Alex · project thread

Follow-up to #517. It removes the remaining human gates from a release (SPEC.md §9.4).

A cut lands itself. After regenerate.yml (which now outputs the delivered head), cut.yml gets three new jobs:

  • gate and gate-more wait for the dispatched gate on that head. That is two waits of 340 minutes, because a job may run at most six hours. The wait is .github/scripts/await-gate.sh, and it accepts only a run that release-gate.sh accepts as the full gate.
  • land merges the pull request with --match-head-commit. It refuses if the head or the line moved, so the merge's tree is always the verified tree.
  • cut.yml then calls tag.yml, which now also has workflow_call, because the workflow token's merge starts no push run.

tag.yml first asks release-gate.sh. An equal-tree merge is accepted on the cut head's run with no wait. It keeps its push trigger for hand merges.

Any stop leaves the pull request open, and merging it by hand releases as before.

The line contains main. main is merged into release/v0.4 (90caf0b), so tag.yml carries the line to main unattended. It merges only when origin/main is an ancestor of the tagged head, and leaves the pull request for a person otherwise.

  • Only README.md conflicted. The line's README stays whole, because RP-11 pins its 496 count where main's says 457.
  • Main's logo header, tagline and link bar are added on top of it.

Empty delivery. A cut whose regeneration writes nothing now still gets ci.yml dispatched.

Checked locally:

  • conformance_rp_01, rp_07, rp_11, rp_14, rp_18
  • validate-model, validate-spec-links, cargo fmt --check
  • actionlint (only pre-existing SC2086 info notes), bash -n and shellcheck on the scripts
  • await-gate.sh against the live API: passed on a known full run, pending on a commit with no run

🤖 Generated with Claude Code

https://claude.ai/code/session_013Asa3MAztfvN671cYrybev

afflom and others added 11 commits October 25, 2026 18:41
main receives the v0.4.0 line: release/v0.4 at 93fbe7d, the tag commit

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
main receives the v0.4.0 line at its tag (e0b74b8).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
The README is reorganized for a reader arriving cold: a centered header
with the logo, the one-line value proposition, the document links and the
state badges, then Quickstart (container, binary, source, the §29 literal),
How LexLean works (pipeline plus the command table with what each command
may claim), Why LexLean, When to use LexLean, the capability register
table, the examples, the gate, the evidence rules, the documented
deviations, the layout and the license.

The gate-relevant content is unchanged: the capability table keeps its
exact header, its three cells, its `build` level cell and its 35 rows, so
every one of the 457 registered IDs is still claimed exactly once by the
row that owns it, and the register-size and honesty-level sentences are
still stated.

No dash is used as punctuation anywhere in the prose, and no list uses a
hyphen marker; hyphens remain only where they are part of an identifier, a
path, a command or a table separator, because those are machine-checked
tokens.

assets/lexlean-logo.svg is new: a QED tombstone with a check mark beside a
monospace wordmark, in the repository's own purple, legible on light and
dark renderings. SPEC.md §7 lists it, so the added file has the defined
role §7 requires.
docs: restyle the README and add the repository logo
docs: simplify the README and use an ASCII logo
docs: use the enclosed LexLean logo image and tighten the README
…e on an empty delivery

tag.yml merged the line into main with `gh pr merge --auto`, which merges at
once (main requires no checks) even when main holds commits the line lacks.
It now merges only when origin/main is an ancestor of the tagged head, and
otherwise leaves the pull request for a person.

deliver-regenerated.sh dispatched ci.yml only after pushing a patch; a cut
whose regeneration writes nothing was left with no gate run, since the
workflow-token push of the version commit starts none. It now dispatches
for a caller-named branch either way. SPEC.md §9.4 says both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MAztfvN671cYrybev
Brings main's README restyle (PRs #329-#331), the logo assets, and the
SPEC.md layout entry for assets/ into the line, so the automated release
can land the line on main. README.md conflicted: the line's README is
kept whole (its capability table, counts, and honesty-level text are
pinned by RP-11), with main's logo header, tagline, and link bar added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MAztfvN671cYrybev
@afflom afflom changed the title Land a cut on main only when the line contains main; gate an empty delivery Releases reach main unattended: line contains main, tag.yml guard, gate on empty delivery Nov 13, 2026
cut.yml now carries a cut to its release: after regenerate.yml delivers
and dispatches the gate (and returns the delivered head as `head`), the
jobs `gate` and `gate-more` wait for that ci.yml run (two waits of 340
minutes, each within the six-hour job limit), and accept it only when
release-gate.sh finds it the whole gate with every job passed. `land`
merges the pull request with a merge commit at exactly that head
(--match-head-commit) and only while the line has not moved since the
cut, so the merge's tree is the verified head's. A merge made with the
workflow token starts no run, so cut.yml calls tag.yml (now also a
reusable workflow, inputs commit and line) on the merge.

tag.yml accepts a commit's tree as verified when release-gate.sh finds
the run release.yml will attach (the commit's, or its equal-tree second
parent's), before waiting for a push run; a call has no push run and
stops when there is no such evidence. Its push trigger still tags a
person's merge. Its concurrency moves to the job, keyed by line.

Anything that stops the landing leaves the pull request open, and a
person's merge releases as before. SPEC.md §9.4, AGENTS.md and the
changelog say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MAztfvN671cYrybev
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MAztfvN671cYrybev
@afflom afflom changed the title Releases reach main unattended: line contains main, tag.yml guard, gate on empty delivery A cut lands, tags, publishes and reaches main with no hand step Nov 13, 2026
bump-version renamed the only ## Unreleased heading to ## X.Y.Z and required
exactly one, so the cut after it refused until someone restored the heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MAztfvN671cYrybev

@afflom afflom left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bounded independent source review at feac64a; existing owner retains implementation and qualification.

P1 — Bind the main-forward merge to the tagged commit (.github/workflows/tag.yml:141–145). After checkout of tagged COMMIT C, release LINE can advance to D while the gate waits. The ancestry check examines C, but the merge names the live LINE PR without --match-head-commit C. It can forward D although this workflow neither tagged nor qualified D; dispatching CI on LINE immediately beforehand does not await it. Bind the forward head to COMMIT and refuse movement, preserving the actual merged-tree guarantee.

P2 — Enforce the checked release base when landing (.github/workflows/cut.yml:214–219). The separate ancestry check can pass at base B, then a nonconflicting landing advance the base to R before the merge. --match-head-commit binds only H; H merged into R can differ from the qualified tree. A later tag guard stops publication only after that merge has landed; the workflow-token merge does not itself start push CI. Enforce the checked base as well as the head, or prevent/reject that concurrent base change before committing the merge.

These are concrete conditional concurrency paths, not observed CI failures. Credit retained: await-gate requires release-gate's full acceptance, the regenerated head is propagated, and the last commit preserves the next Unreleased heading. No producer, test or gate repeated. Please disposition these two bindings before automatic landing; pending CI is not final acceptance.

cut.yml's land job merged through the API with --match-head-commit, which
binds the head but not the base: a line that advanced between the check and
the merge gave a tree the gate never saw. It now makes the merge on the
checked line head and pushes it with a lease on that head. tag.yml's merge of
the line into main is bound to the tagged commit with --match-head-commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MAztfvN671cYrybev

afflom commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Both bindings are fixed in 8287848.

  • P1: tag.yml merges the line into main with --match-head-commit "$COMMIT". If the line moved past the tagged commit, the merge is refused and left for a person.
  • P2: land no longer merges through the API. It fetches the line head B and requires B to be an ancestor of the verified head H. It then merges H onto B locally, checks that the merge's tree equals H's, and pushes with --force-with-lease=refs/heads/<line>:B. If the line advances after the check, the push is refused, so the line only ever receives H's tree.
  • I checked the lease against a scratch remote: the push lands when the line holds still and is refused after a concurrent push.
  • SPEC.md §9.4 now says this.

Generated by Claude Code

@afflom afflom left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent delta review credits both fixes in6863807910: tag now binds the release head to COMMIT, and cut constructs the B→H merge locally, checks equality with H's verified tree, then pushes with an explicit B lease before publishing its outputs. The original two findings are resolved at source level. The scratch-remote result remains owner evidence; I did not repeat it.

P2 — Apply the same checked-base protection to the main-forward step (tag.yml:141–147). This still checks origin/main ancestry separately before gh pr merge. Head matching freezes COMMIT, but another release line's tag workflow can advance main after that check; concurrency is per release line. A nonconflicting server merge can then put a combined, unchecked tree on main. Reuse the cut's checked-base lease and resulting-tree equality approach for this destination as well, refusing a moved main. This is the analogous remaining concurrent-update path, not an observed failure or a request for another gate/framework.

Full exact resulting-head qualification and actual merged-tree acceptance remain pending. Existing owner retains the correction and landing.

main takes changes only through a pull request, so the lease that binds the
cut's landing cannot be used; GitHub's merge binds the head, not the base.
The main-forward step is now its own job in one concurrency group across all
lines, and the merge it makes is checked to have the examined main as first
parent and the tagged commit's tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MAztfvN671cYrybev

afflom commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Main-forward P2 is addressed in cbaaa5c, but not with the same mechanism. main's ruleset requires a pull request, so a push to it with a lease is refused, and GitHub's merge API can bind only the head, not the base. Instead:

  • Serialized: the main-forward step is its own job, main, in tag.yml. Its concurrency group tag-main is shared across all lines, so another line's tag run can't advance main between the check and the merge.
  • Checked: the ancestry check takes main at B, and the merge stays bound with --match-head-commit COMMIT.
  • Verified after: the resulting merge must have B as its first parent and COMMIT's tree as its tree. Otherwise the job fails, names the merge, and says to revert it by a pull request.

One gap remains. A person merging into main by hand during that window is detected afterwards, not prevented. By policy, main only receives lines.


Generated by Claude Code

@afflom afflom mentioned this pull request Nov 13, 2026

@afflom afflom left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bounded delta review credits the shared tag-main concurrency group and resulting first-parent/tree check: the concrete competing tag-job race is resolved for participating jobs. COMMIT remains bound. The explicitly disclosed manual/outside-group race is detected after mutation; this is not an atomic guarantee against all writers. Keep that scope honest and retain the existing owner/ruleset constraints.

P2 — Restore merge permission on the extracted main job (tag.yml:146–149,185–187). This new job declares contents: read and uses github.token, but invokes gh pr merge. The merge requires repository contents write permission; pull-requests: write alone does not provide it. The previous combined job had contents write. Its failed merge currently becomes warning/exit0, leaving a manual step despite the unattended-release contract. Restore contents: write for this job while preserving shared concurrency, COMMIT binding and postmerge checks.

This is a source-level permission finding, not an observed workflow failure. Repro43500579528 passed; full43500579708 remains pending. No scratch remote, completed checks, logs or producers were repeated.

afflom commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Fixed in d0d58d2: the main job now has contents: write, and its concurrency group, the COMMIT binding and the post-merge checks are unchanged. The cut.yml call to tag.yml already grants contents: write. The scope note stands: a writer outside the tag-main group is caught after the merge, not prevented.


Generated by Claude Code

@afflom afflom left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remaining permission finding5897968819 is resolved at d0d58d2. The complete child delta changes only main-job contents permission from read to write, with an explanatory comment. Shared tag-main serialization, COMMIT binding, first-parent/tree checks and the full release-gate contract are unchanged.

This completes the bounded source corrections requested in our release/main-forward reviews. Retain the documented scope: participating tag jobs are serialized; an outside writer is detected after merging, not prevented atomically. No runtime or ruleset experiment was repeated. Current resulting-head full CI/repro and actual merged-tree equality are still required before recording delivery; canceled older-head jobs cannot supply that acceptance. Existing owner retains qualification and landing.

afflom commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

The red build and non-Lean tests checks on a415210 and cbaaa5c are not failures of this PR's code. Each was a run on an old head that a newer push cancelled. The aggregate step then failed on PART_RESULT: cancelled, and no test failed. The gate that counts is the run on the current head, d0d58d2 (43506507276), which is still in progress.


Generated by Claude Code

The repository was renamed UOR-Foundation/lexlean, so GITHUB_REPOSITORY no
longer equals the literal UOR-Foundation/LexLean and every Intel construction
job refused its own run as a foreign repository. GitHub names repositories
case-insensitively; the check now does too, and a test pins both spellings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MAztfvN671cYrybev

afflom commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

The Intel construction job failed with Intel host tests: foreign repository. The repository was renamed to UOR-Foundation/lexlean, so GITHUB_REPOSITORY no longer equals the literal UOR-Foundation/LexLean that intel_host_tests.py compares against. That breaks the gate of every pull request on the line, not only this one.

7f69921 makes the comparison case-insensitive and adds a test for both spellings and for a foreign name. The new test fails against the old check.

The workflows' if: github.repository == '...' conditions are unaffected, because Actions expressions compare strings case-insensitively.


Generated by Claude Code

afflom pushed a commit that referenced this pull request Nov 14, 2026
Review of #543 (two P1s):

- A conflict takes the next line's side only in what a writer or
  `cargo metadata` writes: the projections, CONFORMANCE.md, ERRORS.md, the
  locks, `expected/` oracles, the golden files and the packages under
  `tests/production-export/*/packages/`. An export's `roots.json` and a
  measured row of `tests/stack-bounds.json` are authored writer inputs, so
  their conflict is listed and opens a draft.
- An older forward pull request is closed, with its branch, only when the
  branch holds no commit beyond the next line and the pushed head but the
  bot's merge and the regeneration delivered on it, and only once the new
  pull request is open. Any other is left open and linked from the new one.

`forward.yml` also takes a `workflow_call` with the line, since a merge made
with the workflow token (#519's `land`) starts no push run, and its
concurrency moves to the merge job so a newer push never cancels a caller's
run. SPEC.md §9.4, CHANGELOG.md and the RP-14 case follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
@afflom
afflom merged commit 11fe3d8 into release/v0.4 Nov 15, 2026
71 checks passed
@afflom
afflom deleted the claude/project-thread-4uua0b branch November 15, 2026 00:20

afflom commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

Postlanding audit: proposal b1cb0's exact CI43593987920 attempt1 is now complete: all70 jobs and772 step summaries successful, including all four Intel lanes, Intel construction/aggregate, same-run honesty and Atlas join; exact reproducibility43593987917 also passed. That completed evidence is retained without rerunning it.

Actual merge11fe3d8 has parents acc0f39+b1cb0, but tree c210dff8 differs from the reviewed head's f499109e across eight paths: ci-plan, ci.yml, CHANGELOG, SPEC, VERIFICATION, repository.rs, canonical_json.rs and snapshot.rs. Actual CI43657667742 is pending with no materialized jobs; actual reproducibility passed. Thus the proposal success does not establish actual merged-tree equality or full acceptance of the landed composition.

Existing owner retains composition/gate disposition; inherited #535 policy conflict and stopped #431 scope remain. No stopped runtime/source adoption, retrospective approval, rerun or duplicate producer is requested. Latest fully accepted actual remains f885.

afflom pushed a commit that referenced this pull request Nov 15, 2026
Carries #519 (a cut lands, tags, publishes and reaches main with no
hand step). SPEC.md §9.4 keeps both the forward-merge paragraph and
#519's cutting paragraph; AGENTS.md keeps #519's cut text and the
forward.yml sentence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
afflom pushed a commit that referenced this pull request Nov 15, 2026
Brings in #431, #535, #519 and #518's merge. No conflicts. #507 already
carried #518's change and its regenerated outputs (d954d7b), so the
combined 1.2 identity is unchanged; #431 only widens the snapshot nesting
the canonical writer accepts and does not change any written bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
humuhumu33 added a commit that referenced this pull request Nov 15, 2026
…#535, #536) into the arrays branch

The generated outputs that both sides rewrote take release/v0.4's copy, or
are removed where the line no longer has them; regenerate.yml rewrites the
whole set from this tree.

Lean moves to 4.32.2 with #518, so the array authority follows the other Lean
rows: LEAN-ARRAY-4-32-1 becomes LEAN-ARRAY-4-32-2, cited at f3b06c705e6c.
The three files its statement rests on (src/include/lean/lean.h,
src/Init/Prelude.lean, src/Init/Data/Array/Set.lean) are byte-identical at
f054605aea4b and f3b06c705e6c, so the statement carries over unchanged.

runtime-1.2/library.toml keeps the line's toolchain and the branch's Arrays
module. LANGUAGE_1_2_SEMANTICS_ID is the merged tree's, as RP-10 recomputes it.
CHANGELOG and VERIFICATION keep both sides' entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants