Repository navigation
v1.94.23.0 fix(pregate): strays matches only documented scratch names; literals ignores a named literal the branch only adds (GST-1211) - #3944
Merged
Conversation
…als ignores a named literal the branch only adds (GST-1211) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…l has one, so a delete-plus-edit keeps the edited site's old value (GST-1211 review) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
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.
Fixes two
gstack-pregatepreflight false positives that stopped /ship on real gbrain-evals work (gbrain-evals#321, GBRA-240). Both were reproduced on main with synthetic fixtures. The outside branch was read as text only.What changed
strays: the scratch-name pattern inlib/pregate/checks/strays.tsmatched three prefixes the docs never listed:temp,debug-andprobe. Soprobe.pyandtemporal-graph-shipped.test.tsfailed preflight. Main's owntest/temp-dirs.test.tsandtemplate-context-parity.test.tswould have tripped it too. The pattern now matches only the documented names:zz-*,tmp*andscratch*, plus the editor leftovers the code already caught (*.orig,*.rej,*.swp,*.swo,*.bak,*.tmp,*~,.DS_Store,Thumbs.db). docs/pregate.md and docs/troubleshooting.md now list the leftovers as well.literals:callLiteralsInkept only the last value under each name. So a newlimit: 300written after an existinglimit: 10looked like 10 changing to 300, and every test that mentioned 10 got flagged. The check now keeps every value under a name, and it reports a change only when a value disappears while the name still has a value. A literal the branch only adds isn't a change. A real edit still fails. So do two cases the last-value check could miss: one of two equal values changing, and one site being deleted while another is edited.Reproduction (failing tests first)
Three new tests in
test/pregate-selection.test.tsall fail on main bf2bcf1 and pass with this change. The fourth case, delete-plus-edit, came from review and fails without the review fix. The controls still fail preflight:zz-notes.md,tmp-x.ts,scratch.pyandutil.js.origas scratch names; an existinglimit: 10edited to 20 attest/query.test.js:4; and an exportedMAXgoing from 3 to 4.Review
Specialist, red team and adversarial reviewers (Opus 5.5) and the GPT-6.1 Sol outside voice reviewed the change, then a scoped fix-check reviewed the fix and came back clean. All four reviewers found the same P2, and it's fixed: values removed past the number of added values were dropped, so a delete-plus-edit could hide the edited site's old value. Open notes, none at the blocking floor:
debug-*,probe*andtemp*files no longer count as strays. That's intended, because they aren't documented scratch names.Tests
test/pregate-selection.test.tsandtest/pregate-user-policy.test.ts: 70 pass. Typecheck is clean. The full free suite ran on the lane machine because this toucheslib/pregate/*. It had 269 failures in 38 setup, install, CSO and host-render files, and no pregate file failed. The same 38 files also fail on this machine at main bf2bcf1, with the same total of 269 failures (I compared counts, not individual test names). The runner also noticed shards writing under the real ~/.gstack/projects, which is an environment problem. CI is the clean full run: Free Tests run 41637651623 passed at this head.Security read
No network calls, environment reads, permission changes, workflow edits or new dependencies.