Repository navigation
Make the ship queue fetch the latest main before it checks a pull request (GST-2232) - #4256
Merged
Merged
Conversation
…T-2232) ready read origin/<base> as the clone last fetched it, so a lane a few landings behind measured the PR from an older merge base and refused a good receipt with a false RECEIPT_INVALID field=review_exclude. ready now fetches the base first and refuses QUEUE_BASE_UNFETCHED when it cannot; the stamp path of land refuses the same way instead of ignoring a failed fetch. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…GST-2232) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ath uses the new refusal (GST-2232) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
What changed
gstack-ship-queue readynow fetchesorigin/<base>before it reads the base policy or checks any field of the PR's /ship receipt. Before this, it used whatever copy of the base the lane's clone last fetched. If that copy was a few landings old, ready measured the PR from an older merge base, counted excluded files that belong to PRs that had already landed, and refused a good receipt with a falseRECEIPT_INVALID field=review_exclude. That stopped gbrain #8991, whose clone held origin/master at d253ec0f while the real master was 310da193.readyrefuses with a new code,QUEUE_BASE_UNFETCHED, and compares nothing. The stamp path oflandused to ignore a failed fetch and keep going; it now refuses with the same code.land --pin(direct merges) already fetched and refused.Why
This unblocks the gbrain merge queue (GBRA-108): lanes were being sent to rerun /ship's review for receipts that were correct.
Blast radius
readymakes one extragit fetchof the base branch per run. The new refusal only fires when that fetch fails, and in that case ready would otherwise have compared the receipt against a ref it couldn't refresh. The train paths are unchanged, because train ready already fetched.Tests
RECEIPT_INVALID … source=origin/main@<stale tip>; after it, the receipt binds. The same test checks that an unreachable origin refuses withQUEUE_BASE_UNFETCHED. The second test checks that a base which moved under the exclusion leaves the selection unchanged; it fails if the selection is changed to a two-dot diff.Review notes
Below the blocking floor; recorded here and not fixed in this PR. Review ran once at 620f102 (specialists, red team, adversarial and an outside voice); none of these would fail a test, break production or lose data under this repo's
merge: directpolicy.lib/ship-queue-land.ts:344: the stamp path oflandfetches with a baregit fetch -q origin <base>, which leavesorigin/<base>stale in a single-branch or narrowed-refspec clone, andland()loads its policy before that fetch. Not reachable here: undermerge: direct,land()refuses at line 330 before it fetches. A follow-up could use the same explicit refspec asready.bin/gstack-ship-queue:200: the CLI picks the train or plainreadyroute from the policy beforereadyfetches, so a repo whose train setting changed since its last fetch could take the wrong route. This repo has no train block.readyruns in one clone can race on theorigin/<base>ref lock and reportQUEUE_BASE_UNFETCHED; a rerun clears it.readyfetchesoriginand ignoresctx.remote, matching the rest ofready().Exploratory QA
Pass. Two smoke probes against an isolated fixture: a stale
origin/mainis refreshed to the remote tip byready, and an unreachable origin refuses withQUEUE_BASE_UNFETCHED(exit 3) and leaves the ref untouched.Documentation
Status: current. The release docs match the code at 620f102, and no edits were needed.
Scope: 3 commits from a5bcbc4 across 10 files: lib/ship-queue.ts, lib/ship-queue-land.ts, lib/result-codes-release.ts, bin/gstack-doctor-components.sh, scripts/lib/windows-curation.ts, two tests, docs/ship-policy.md, docs/troubleshooting.md and a changelog.d fragment. Nothing is staged, unstaged or untracked.
Documentation health:
Coverage debt: none. QUEUE_BASE_UNFETCHED has a reference entry and a fix entry. Diagram drift: none.
Approvals
No approvals recorded for branch ready-fetches-base-before-receipt-check.
Plan: exempt: bug fix
Plan check: exempt bug fix
Agent notes
GST-2232, lane GSTA-476. Docs: docs/ship-policy.md (ready's receipt checks and the review_exclude digest), and a new docs/troubleshooting.md#queue-base-unfetched anchor. Changelog fragment changelog.d/ship-queue-ready-fetches-base-gst-2232.md is marked important: blocker. Rebased onto #4235 (a5bcbc4), which owned lib/ship-queue.ts; GSTA-475's files (lib/ship-receipt.ts, review-plan) are untouched.
Pre-Landing Review: 2 issues — 0 auto-fixed, 1 asked (0 fixed, 1 skipped), 0 deferred, 1 noted
Gate edits: none detected (2 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=0 scope=frozen ledgers_read=3 dispatches=2 est_input_tokens=11013
Agent notes