Repository navigation
Merge each push to a release line forward (forward.yml) - #543
Conversation
forward.yml merges every push to release/vX.Y into release/vX.(Y+1), when that line exists, on forward/vXY-to-vX(Y+1)-<head8>, and opens the pull request. Conflicts in generated projections and locks take the next line's side and regenerate.yml, called with the branch named, writes them again and dispatches the gate. While the line has no spec/, its SPEC.md and register changes are carried into the next line's modules by `cargo xtask spec port --merged --register`. Any other conflict is committed as the next line's side and the pull request is a draft naming the paths. A newer push cancels the run and closes the older forward pull request. SPEC.md §9.4, RP-14, AGENTS.md, CHANGELOG.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
afflom
left a comment
There was a problem hiding this comment.
P1 — Narrow generated-conflict classification in .github/scripts/forward-merge.sh:64. tests/production-export/* includes authored export requests such as bootstrap/roots.json. When both lines change those inputs, the script silently takes the next line's version and can mark the result clean/ready. Regeneration consumes those requests; it cannot reconstruct the ones discarded. Preserve authored-input conflicts as draft work and classify actual generated outputs narrowly. The retained#532 missing-root repair provides a concrete example of why this input matters.
P1 — Preserve unique work before superseding branches (script:154). The prefix-only loop closes older forward PRs with --delete-branch even when a draft contains manual conflict repairs not merged into the next line. The replacement starts from the next line plus the new source push, so it does not carry those repairs. The loop also runs when replacement PR creation failed. Keep owner-edited/unmerged branches and evidence until their unique changes have been carried or explicitly dispositioned; a newer source SHA alone is insufficient.
Source credit: explicit pushed SHA, merge-commit construction, unresolved-path draft reporting, reuse of the existing regeneration workflow and no auto-merge remain. The real merge path is untested per the body; source-string checks are not end-to-end evidence. Reconcile the existing#519 control owner and required#468 factory integration, and retain#541's STOP hold. No script, test, writer or CI action was run. Receipt pr543-forward-source-review/receipt.json; its repository-spelling finding is excluded because Actions expression string equality is case-insensitive.
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
|
Both P1s are fixed in c3cb736.
I also changed two things this raised:
The PR body explains how this fits #519 and #468. It also records one end-to-end run of the real merge path, done in a separate clone against a local origin. That run produced the same Generated by Claude Code |
Takes #535's Intel rules of SPEC.md §9.4 and its changelog entry beside the forward-merge text; the RP-14 sentence keeps both the push triggers of ci.yml and reproducibility.yml and the forward merge's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
afflom
left a comment
There was a problem hiding this comment.
Bounded source follow-up at b1fcf7c: both original P1 repairs are credited. The classifier now preserves authored roots.json/stack-bounds conflicts for manual resolution, ordinary unique manual commits keep their older PR open, and replacement-PR creation failure clears the closure list. No producer or completed gate was repeated.
Remaining P2 — .github/scripts/forward-merge.sh:185–187: deletion is not bound to the old head inspected at lines148–155. An owner can push a manual repair after that fetch/classification and before replacement creation/closure; gh pr close --delete-branch then deletes the moved branch although its new commit was never inspected or carried. Preserve a branch whose head moved, and bind any deletion to the inspected SHA (an expected-head lease), retaining the PR when preservation fails.
The workflow_call path addresses token-triggered landings, with caller integration still belonging to #519. Moving concurrency onto the merge job avoids canceling the caller, but prior regeneration can continue because distinct merge SHAs have different regenerate concurrency groups. Coordinate the existing producers and their output disposition; this is not evidence that a second identical-input run is needed or that cross-run acceptance is valid. #468 remains required.
The local clone/stubbed-gh account remains owner-reported evidence; the new RP-14 string assertions do not cover concurrent head movement. This is source review, not final-head acceptance. #541's stopped #431 dependency remains held.
The head each candidate had when the run read it is recorded, and its branch is deleted with --force-with-lease to that head, so a push since then refuses the delete. The older pull request is closed only after the delete succeeded; one whose branch moved or whose delete failed stays open with its branch and is named on the new pull request. SPEC.md §9.4 says so and RP-14 asserts the lease. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
|
Fixed the P2 in 3dadb24.
Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
afflom
left a comment
There was a problem hiding this comment.
Source follow-up at 2c39d3b: the inspected-head deletion P2 is resolved. The script carries the fetched SHA into an explicit deletion lease, leaves the branch/PR when deletion fails, and closes the older PR only after successful deletion. Both earlier authored-input/manual-work repairs remain credited; no new blocker found in this three-file delta.
No completed check or producer was repeated. RP-14's string assertions and owner-reported checks are not a concurrent behavioral run or final-head acceptance. #519 caller integration, scheduling of producers across distinct forward heads, #468 model integration, and #541's stopped #431 dependency remain separate obligations.
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
left a comment
There was a problem hiding this comment.
Bounded integration follow-up at03d67: the six incoming release-control source blobs match the already-reviewed #519 control source. The forward workflow/script and prior authored-input, manual-work and deletion-lease repairs remain unchanged. No new source blocker found in this delta; no completed checks were repeated.
Concrete remaining integration: the carried cut.yml still has no post-land call to forward.yml. Its workflow-token landing does not emit the push event that would invoke forwarding, so accepting workflow_call alone does not deliver the automatic cut-to-next-line path. #519 has now landed; the existing cut/forward owner should wire that caller in the coordinated change, or explicitly track the remaining delivery slice before claiming that path complete. Preserve exact-head gate/actual-tree checks and the existing regeneration owner.
Final-head CI/repro remain incomplete at this review. Distinct-head producer coordination, #468 model-controlled routing and #541's stopped #431 dependency are unchanged; no stopped source/runtime adoption or new producer is admitted.
|
The cut.yml caller is tracked and will land as its own change once #543 merges. The plan is a Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Asa3M8ULnzEQwLLngyBBX
|
Merged after the gate on 1f4edb6 went all-green: CI 43807856651 and repro 43807856588. The merge commit's tree equals the gated head tree. Generated by Claude Code |
afflom
left a comment
There was a problem hiding this comment.
External landing 0541025 has the same tree as reviewed 1f4edb6 and plan-checked synthetic c2823e1: tree 9132e02d, with actual parents dfc179 + 1f4. CI 43807856651 attempt 1 completed 71 successful jobs / 831 successful steps, with three Intel jobs skipped; repro 43807856588 passed one job / seven steps. This credits the selected gate and actual-tree equality, not full-platform acceptance.
The first actual forward run 43830530487 failed in merge job 133174514776: after conflict reporting, Git refused to create .git/index.lock at 08:24:57Z and exited 128. Regeneration was skipped. The retained log establishes this immediate blocker, but not the lock's owner, whether it was stale, or the underlying cause.
The existing #405/forward owner retains the next step: establish the index lifecycle and any concurrent Git writer before deciding how to continue. No automatic retry, lock removal or competing forward operation is requested. The cut-caller slice, #468 integration, #541/#431/old TC-03 STOP and all #316 boundaries remain unchanged.
Receipt: /workspace/work/pr543-0541-actual-forward-review-20261116.json; SHA256 800ba8617109a58c809ad39e5e320ab04c9355cf8c7815571d02af1153c2b712.
…arrays branch PF-26 and the arrays both move the language-1.2 identity from the 0.4.3 base; the combined tree's ID, b78cb38d…, replaces each side's in the constant, the locks and the records, and the register is 499 IDs: PF-26 joined the line as its 498th, SM-39 is the 499th. A conflicted generated projection takes the line's side, and one only this branch named is dropped, for regeneration to write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
afflom
left a comment
There was a problem hiding this comment.
The new actual v0.4 push2e1ff2f5 repeats the forward-delivery failure: run43871322204/job133312966008 reaches merge conflicts, then fails at13:01:08Z with .git/index.lock already present and exit128. Regeneration is skipped. This is a second preserved occurrence after0541/run43830530487, not a successful forward landing.
One concrete place for the existing forward owner to inspect is .github/scripts/forward-merge.sh: the conflict loop consumes git diff --name-only --diff-filter=U through process substitution while running index-writing git checkout/git rm. That is a source-level overlap candidate, not a proven diagnosis—the log does not identify the lock holder or failing command. Establish that lifecycle and serialize any overlapping index access in the existing lane; do not blindly remove the lock or repeat the writer. Keep the required merge history and #431/oldTC03/#541 STOP disposition separate.
New log preserved once at /workspace/work/pr493-forward-job133312966008-20261116.log, SHA256 b40a0a7f94a626816f3e947bdbbf121c55e93b6fa9a4802435c637adc31f3597. No cleanup, execution, retry or competing patch was performed.
This adds
forward.yml, which carries each push to a release line into the next line automatically (SPEC.md §9.4). On a push torelease/vX.Y, whenrelease/vX.(Y+1)exists and doesn't already contain the pushed commit,.github/scripts/forward-merge.shdoes the following:forward/vXY-to-vX(Y+1)-<head8>from the next line's head and merges the pushed head into it with a merge commit.SPEC.md, the five projectedmodel/files, CONFORMANCE.md, ERRORS.md,Cargo.lock,lexlean.lock,expected/oracles,tests/golden/*.txt, andtests/production-export/*/packages/. Regeneration writes those files again. Authored writer inputs are listed as conflicts like any other file. Examples are an export'sroots.jsonand a measured row oftests/stack-bounds.json.spec/directory, three-way merges its SPEC.md andmodel/ids.tomlchanges and carries them into the next line's modules withcargo xtask spec port --merged … --register ….regenerate/<name>.regenerate.ymlwithbranchset to the forward branch, sodelivercommits the regenerated tree there and dispatchesci.yml.If the workflow token isn't allowed to open PRs, the job summary shows a compare link instead, as
cut.ymldoes. A newer push to the line cancels a merge job still in progress. Its concurrency group isforward-<line>, set on the job, so a newer push never cancels a caller's run. The older forward PR is closed and its branch deleted only if both of these hold:Any other older forward PR stays open and is linked from the new one.
The change also updates SPEC.md §9.4 and the RP-14 case, which now checks the trigger, the concurrency setting, the call to regenerate and the key steps of the script. AGENTS.md and CHANGELOG.md are updated to match.
How this fits #519 and #468
forward/branch and a PR into the next line, and that PR goes through the ordinary gate. It runs alongside A cut lands, tags, publishes and reaches main with no hand step #519'stag.ymlon the samerelease/**push, and the two share no state.landmerges with the workflow token, and that merge starts no push run. So forward.yml also acceptsworkflow_callwith alineinput, the same way A cut lands, tags, publishes and reaches main with no hand step #519 gavetag.ymlone.cut.ymlwould add one job afterland(uses: ./.github/workflows/forward.yml,with: line: release/vX.Y). That job belongs to A cut lands, tags, publishes and reaches main with no hand step #519's lane and is not added here.regenerate.yml, called once on the merge commit, withdelivercommitting to the forward branch. No second writer set runs.End-to-end run of the real merge path
I ran the script unchanged in a separate clone against a local bare origin, with
ghstubbed, so nothing reached GitHub and the shared clone's origin was never touched.Setup
release/v0.4was set to0a9891ea, the real v0.4 head.release/v0.5was set to the v0.5 head6c36829plus Forward-merge release/v0.4 (0a9891ea) into release/v0.5 #541'sspec port --registerchange.forward/v04-to-v05-aaaaaaaaheld only a bot merge commit.forward/v04-to-v05-bbbbbbbbheld that merge plus a hand-authored commit on top.Result: exit 0,
clean=trueforward/v04-to-v05-0a9891ea, with parents52f1ed67and0a9891eaand the bot's identity.cargo xtask spec port --merged … --register …reportedwrote 2 module(s) and regenerated SPEC.md and the model files.spec/,SPEC.mdandmodel/are byte-identical to the hand-made forward merge on Forward-merge release/v0.4 (0a9891ea) into release/v0.5 #541's branch.--delete-branchafter the PR opened. feat(release): synthesize production release closure and section 30 evidence #12, the branch with the hand commit, was left open and named in the new PR's body.What the gate has to catch: the only tree differences from #541 are its CHANGELOG entry and #541's hand resolution of #498. Git merged #498's
sha2dependency intocrates/lexlean/{Cargo.toml,build.rs}with no textual conflict, but v0.5 forbids that dependency (SL-05). The workflow cannot see a semantic conflict like this. It would open that PR ready, the gate would fail onSL-05, and the PR would need a hand repair before landing. So a ready forward PR is a candidate, not an acceptance.Before this goes ready
spec port --registerexists on release/v0.5 only after Forward-merge release/v0.4 (0a9891ea) into release/v0.5 #541 lands. Until then, a v0.4 push that changes SPEC.md ormodel/ids.tomlhas its port refused and opens a draft.cargo fmt --checkis clean. Disk is too tight here to buildrepo-conformance, so CI on this head is the compile and test check.Generated by Claude Code