Repository navigation
A green CI run now counts for your branch when only main moved under it (GST-3567) - #4728
Merged
capy-ai[bot] merged 7 commits intoNov 23, 2026
Merged
Conversation
…ST-3567) A pull_request run tests the branch merged onto main as main was when it started. When main had moved past the branch fork point, accept refused that run as tree_mismatch, so on a busy repo the lane merged main and reran CI without end. The run now counts for the head when its merge commit is the head merged onto a commit of the base and the pull request own changes in it are byte-identical to the head own diff. Lane carries and pregate clear --run take the rule through one helper (onlyBaseMoved); land merged-tree CI does not. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…two tests are tighter (GST-3567) Exploratory check on #4722's real run 45089670503: comparing whole files refused it, because main and the branch both edited docs/pregate.md and docs/troubleshooting.md in different places. The rule now uses ownLinesSame, the same own-lines comparison a base-only merge of a reviewed head meets, and lives in lib/pregate/run-check.ts. The red-run test checks the exit status, and a new test drives clear --run through the forwarded rule. Review-Finding: p1/specialist-batched#1 reader=testing Review-Finding: lib/pregate/run-check.ts:70:functional-contract reader=qa Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…t has fetched (GST-3567) Review-Finding: p2/outside-voice#1 reader=outside-voice Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…e check (GST-3567) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…nly when its run does not count (GST-3567) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/ship's final CI check (
gstack-ship-release accept) now accepts a green pull request run that tested your branch merged onto a newer main, when main changed none of your lines.Why: before, it refused that run and you had to merge main and rerun CI, which never settles on a busy repo (harness-evals #576, gstack #4722).
Nothing to do. Repos with a land step still re-check the merged tree; repos with
land: nullget no merged-tree check.What changed
Details
onlyBaseMovedinlib/pregate/run-check.tscounts a pull request run for your head when GitHub's merge commit is a commit on main plus your pushed head, and your own added and removed lines in that merge are byte-identical to your head's at the same places. It usesownLinesSame, the rule a base-only merge of a reviewed head already meets. Main may change other files, or other parts of your files, but none of your lines and none next to one.origin/main, the check fetches main once before it refuses.accept,gstack-evidence record-ci,gstack-ci-carry, andgstack-pregate's own reuse,--from-runandclear --run. Land's merged-tree CI (lib/land-merged-ci.ts) never does.base_moved=<main commit>. A refusal keeps its old line and adds aCARRY_DIAGNOSIS:line that says why.Why
Details
GitHub tests a pull request by merging it onto main as main was when the run started. Once main moved past your fork point, that merge's tree was not your head's tree, so
acceptrefused the run withtree_mismatch. The only way out was to merge main and run CI again, and on a busy repo main moves again before that run finishes.Blast radius
Details
Only checks that reuse a CI run change, and they now accept one more case. Landing is unchanged: a repo with a land step checks the tree that lands with
land.merged_ci, so a change that only passed on the older merge is still caught there. A repo whoselandisnull, such as harness-evals, gets no merged-tree check before landing, just as before this change.Tests
Details
test/ship-accept-base-moved.test.tsrebuilds harness-evals #576's run 45058890128: a pull request run at the head that tested a merge with a newer main.accepttakes the test result and its final check from that run, with nothing run locally. A main edit to another part of the branch's own file (gstack #4722's run 45089670503) still counts, and a main commit newer than the checkout'sorigin/mainis fetched, then counts. These refuse: an edited merge, a main edit next to the branch's line, a merge of an earlier commit, a red run, a base commit not on main, andverifyRunwithout the opt-in, which is land's path.test/pregate-carry-gate.test.tscoversclear --run. On this PR's own final head,bin/gstack-ci-carry findfrom this branch counted pull request run 45104696756 withbase_moved=dd1b610a3a52.Issues
Refs #4722
Agent notes
Lane GSTA-817 for GStack Minder (GST-3567).
Documentation audit (Step 14.5, docs-a2-gsta817):
Status: updated. One factual fix in CONTRIBUTING.md; the branch's own docs already cover the change.
Scope: 12 committed files against base ccd80de (no staged, unstaged or new files): the rule that a green pull_request run carries when only main moved (GST-3567),
CARRY_DIAGNOSIS:output and thebase_moved=receipt field.Documentation health:
CARRY_DIAGNOSIS:says its run does not count.Coverage debt: none. The new behavior has a reference (pregate.md), an explanation (ship-policy.md) and a how-to (troubleshooting.md, CONTRIBUTING.md). Diagram drift: none.
Approvals
Approved: yes (record r-b3fa65954f9d). The full approval record stays private.
Plan: exempt: bug fix that blocks other crews; the brief needs no plan approval
Plan check: exempt bug fix
Ruled note: lib/run-evidence.ts:410:functional-contract at 6dd30ce ruled by GSTA-36 (relayed from GSTA-36:2026-11-23T03:03:35Z) at 2026-11-23T03:03:36.178Z: explicit --from-run takes the same base-moved rule as the lane carry, by design (approval a-7fa4ac613255)
Review notes (below the floor, not fixed): the flaky-exception clear path (
lib/pregate/flaky-exception.ts:155) does not take the rule, so it refuses a base-moved run it could count; a refused run can cost extra git work; the base fetch writes no egress receipt and also runs under--simulate; and ", even after fetching it" also shows when the fetch failed or already ran in this process.The final carry at 4d209f6 used workflow_dispatch run 45106024858 of the head's own tree, because the installed gstack (1.102.2.0) predates this fix and refused pull request run 45104696756 with tree_mismatch; this branch's code counts that same run.