Repository navigation
Review keeps a file that a branch swaps from our own code to upstream bytes (GST-3298) - #4690
Merged
Merged
Conversation
… bytes (GST-3298) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…the merge-base check never fails verify A fetch that fails now marks the good cached pin instead of leaving it as if nothing happened, so the review plan and every later offline step keep that pin's files until a fetch succeeds; gstack-vendored-verify --offline still answers from the good pin. The merge-base pin check in gstack-vendored-verify reports an error as VENDORED_BASE: unavailable instead of exiting nonzero. Review-Finding: p1/outside-voice#1 reader=outside-voice Review-Finding: p1/outside-voice#2 reader=outside-voice Review-Finding: p1/red-team#1 reader=red-team 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>
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.
A branch that replaces your own file, or drops a local patch, so the file now matches an upstream copy byte for byte no longer leaves review: a changed file counts as vendored only if it was already vendored and verified at the merge base, or is new on the branch.
This closes the gap the second-model review of #4665 found, so readers always see your own lines leave. Nothing to do for repos without
review_vendored, which is every repo today.What changed
The second-model review of #4665 found that a branch could swap a file it owned for the upstream's bytes, list it in the vendored manifest, and have review skip the change. Now a changed vendored file is left out of review only when the merge base already pinned it and its copy there matched the upstream too. Otherwise review keeps it as your code and says why.
lib/review-vendored.ts,vendoredSelection): a head manifest entry the merge base already has is checked at the merge base too. If the base manifests did not pin it, or its base copy does not verify, it stays in review withREVIEW_VENDORED_KEPT: mismatched <path> (...)naming why. New files and re-pins of files that were already vendored are unchanged.gstack-vendored-verifyalso checks the merge base's pins for the files a branch changes or deletes and printsVENDORED_BASE: checked=N verified=M. That line never fails the run, and when the check itself errors it printsVENDORED_BASE: unavailable (...)and the head verdict stands.gstack-vendored-verify --offlinestill answers from them, while review keeps that pin's files until a fetch succeeds, so the review plan and the later offline check /ship runs before landing pick the same files.docs/vendored-code.md; changelog fragment.Why
"A file the branch swaps from our own code to upstream bytes leaves review" was a finding the second-model review of #4665 raised. Now that removal of your own code always reaches the readers.
Blast radius
Only repos whose base policy sets
review_vendoredsee any change, and none do today. For everyone else the plan is byte for byte what it was, and the selection only ever keeps more files in review than before (read invendoredSelection; covered by the "without review_vendored nothing changes" test and the no-loss replay fixture for repos without the key).Pre-Landing Review
The full review panel ran on this change, plus one fix round. The second-model reviewer found two problems in the first version, both fixed with tests that failed before the fix. First, after a failed fetch the review plan and the later offline check /ship runs before landing could pick different files. Second, the merge-base check in
gstack-vendored-verifycould fail the run when it errored. Six smaller notes stay open below the bar for a fix: a large re-pin whose base copies don't verify now keeps every file and can refuse to plan, and five wording or diagnostics points in the plan and verify output. Two further findings from the security reader: security finding, details recorded privately.Exploratory QA
Two smoke probes on a local fixture (a base that owns
up/lib/tests/a.py, a branch that swaps it for upstream bytes and adds a new vendored file), run on the final code: the plan keeps the swapped file as code and leaves the new verified file out of review, andgstack-vendored-verify --base mainpasses with exit 0. Status: pass.Scope Drift
Scope Check: CLEAN. The change closes the ruled findings from #4665 and the two blockers its own review found, nothing else.
Documentation
Status: current. The docs already match the branch, so nothing was edited.
Scope: base 9cfbbb9 to head 8ae5503 on
vendored-modified-files-stay-ours: 3 commits, 7 files, nothing staged, unstaged or untracked. Docs reviewed:docs/vendored-code.md,docs/troubleshooting.md(the vendored upstream files section),docs/ship-policy.md(thereview_vendoredrow), plus the changelog fragment and the changed code inbin/gstack-vendored-verify,lib/review-vendored.tsandlib/review-exclude.ts.Documentation health
docs/vendored-code.md: current. This branch already updated it to explain that review keeps a file when a branch swaps your own code for upstream bytes, what theVENDORED_BASE:line means, and that a failed fetch keeps earlier good cache answers.docs/troubleshooting.md: current. TheVENDORED_FETCH_FAILEDentry is still accurate.docs/ship-policy.md: current. Thereview_vendoredrow is high-level and still true.Coverage debt: two minor gaps, nothing critical. Troubleshooting has no entry explaining the new
REVIEW_VENDORED_KEPTdetails ("replaces our own code" and "the latest fetch failed"). TheVENDORED_BASE:output line is documented only indocs/vendored-code.md. Diagram drift: none.Tests
bun run typecheck: exit 0.bun test test/review-exclude-vendored.test.ts test/review-vendored.test.ts test/module-size-ratchet.test.ts: 40 pass, 0 fail.Agent notes
Refs GST-3298
GST-3298 PR 3, ordered by the Captain (GStack Minder, GSTA-36) after #4665's ruled notes (findings lib/review-vendored.ts:319, :201, :207, :330 and lib/review-exclude.ts:524, :592). Failing first on main: 5 of the new or changed cases fail (swap and local patch, failed fetch keeps cache, verify base pins, refusal wording, disclosure wording); the branch-ref test fails when the
update-ref -dline is removed. The review fix round (e7a1522) added two tests that failed before the fix. Trial merge with #4681 (shares lib/review-exclude.ts) at 2e00715: clean, typecheck clean. /ship ran in a lane subagent; its receipt follows.Noted review findings (not fixed, below the blocking floor): lib/review-vendored.ts:354 (large re-pin can refuse to plan when base copies don't verify), lib/review-vendored.ts:196 (good cached pin outlives a deleted upstream for verify --offline), lib/review-vendored.ts:369 (new keep reason shows as verdict mismatched), lib/review-vendored.ts:370 (base pins in the plan's pin rows), bin/gstack-vendored-verify:100 (VENDORED_BASE gives no cause; second fetch), lib/review-exclude.ts:581 (--json hint misses kept merge-base copies).
Approvals
No approvals recorded for branch vendored-modified-files-stay-ours.
Plan: exempt: bug fix closing the ruled review findings of #4665, with failing-first tests
Plan check: exempt bug fix
REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=8 fixed=3 scope=frozen ledgers_read=3 dispatches=8
Gate edits: 3 listed, 3 read, 0 findings (patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)