Repository navigation
v1.94.13.0 fix(review): bare --base reads origin/<base> in review and ship bins; diff-scope matches auth as a word (GST-1036, GST-1065) - #3906
Merged
Conversation
… diff-scope matches auth as a word (GST-1036, GST-1065) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…h; author* is not (review fix, GST-1065) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…e auth paths (granted fix round, GST-1065) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ST-1036, GST-1065) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
7 tasks done
…mote-qualified base (GST-1065, GST-1036) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ked bases); fringe case stays an open note 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
GST-1036: a bare
--base mainreads origin/main, not a stale local main. Every review and ship bin that takes--basenow resolves it through the resolver gstack-gate-diff already used,resolveBaseinlib/gate-diff/git.ts. Two small helpers sit beside it:baseNote(the lag note gate-diff already printed, now shared) andbaseArg(resolve the base, then print<bin>: <note>on stderr when the bin read another ref than the name).gstack-review-plan:collectLiveresolves throughresolveBase. The plan printsREVIEW_BASE: <ref> <sha12>,--jsoncarriesbase, and a lagging local base is named on stderr. The BASE_CONTAINS_HEAD check and the policy read use the same ref.gstack-banned-terms,gstack-prose-lint --base,gstack-docs-candidate snapshot --base,gstack-design-detect.ts scan --changedandgstack-pr-shots --base(resolveCommit) now read origin's base.origin/main,upstream/main) still readsrefs/remotes/<base>first, as on main. With no remote-tracking twin, the local branch still stands. One fringe case from main stays (see the open notes).GST-1065:
gstack-diff-scopeno longer treats authorship files as auth. The*auth*glob matchedauthor-spec.mdand raised a docs bundle to gate class. Paths are now split the waylib/review-risk.tstokens()splits them (camelCase, then non-alphanumerics). The match fails safe: any token containingauthraises the class unless the whole token is one ofauthor,authors,authored,authoring,authorship,authority,authorities,coauthororcoauthors. Soauth.ts,/auth/,authn,auth0,basicauth,useAuth.ts,nextauthmiddleware.ts,noauthrequired.ts,reauthn.ts,unauthenticated.tsandoauth2client.pyraise it, andauthor-spec.md,AUTHORS,authority.tsandcoauthors.tsdo not.docs/review-policy.md names the
REVIEW_BASE:line and the new auth wording.Why
GST-1036: #3882 planned a docs diff at full depth against a stale local main, about $1–2 extra on that PR. On main 14d7414 the review-plan diff itself was already origin-based (GST-883). Five sibling bins still merged against the local main and reported lines the branch only inherited, and review-plan never said which base it used. GST-1065: a docs bundle got four full readers, part of about 8M tokens (gstack-evals#158).
Blast radius
This touches merge-check classification, because
SCOPE_AUTHfeeds review depth. Docs about authors and authority no longer plan as gate class. Some names the old case-sensitive glob missed now raiseSCOPE_AUTH(useAuth.ts,OAuthClient.ts,Authorize.tsx,AUTH_KEYS.md), which means more review, never less. The five bins now print a lag note on stderr when the local base differs from origin's. Security read: no network calls, secrets, permissions, workflows, install scripts or dependencies change.Approvals
Source: gstack-approvals record for capy/bare-base-reads-originbase (display only; not an approval citation).
Documentation
Scope: Read-only re-audit of attempt 1 (gsta202-docs-a1). I covered the diff 14d7414..HEAD (15 files, including 4399e40), plus committed, staged and unstaged state (the tree was clean). I also read the docs that mention the touched bins: docs/review-policy.md, docs/ship-policy.md, docs/skills.md, CLAUDE.md, CONTRIBUTING.md and ARCHITECTURE.md.
Result: Both corrections hold. The REVIEW_BASE line and --json base field in docs/review-policy.md match bin/gstack-review-plan. The SCOPE_AUTH row matches the token logic in bin/gstack-diff-scope. The other docs I checked refer to origin/ consistently, and none describes the old stale-local-base behavior, so nothing else needed edits. No files were edited.
Debt: None blocking. One optional wording nit: the auth row could say authorization still counts as auth. The installed gstack is 4 revisions behind latest.
Failing first
test/stale-local-base.test.tsand one case intest/gstack-design-detect.test.ts. On main 14d7414: 6 fail, 1 pass. After the fix: 7 pass.test/diff-scope.test.tspath tables. On main: 8 of 20 fail (4 false positives, and 4 camelCase or upper-case names the case-sensitive glob missed). After: 20 pass. The granted round added 5 mid-word names, which fail at bfcc898 and pass at 712f5de.Pre-Landing Review
The first pass ran at full depth (gate class) with 4 readers: a batched specialist, the red team, native adversarial and an outside voice (openai/gpt-6.1-sol).
auth0,basicauthandnextauth(specialist, INFORMATIONAL).unauthenticated,reauthentication,deauthorize,oauth2client,HTTPAuthorization) no longer setSCOPE_AUTH(outside voice and native adversarial, Medium, blocking). The grant named*oauth*. The arm usesoauth*on purpose, because*oauth*matchedcoauthors.ts, a GST-1065 negative control. A trailingoauthis still covered by*auth.nextauthmiddleware.ts,reauthn.tsandnoauthrequired.tsnow raise (they failed at 4399e40). The same round added a guard soresolveBasewould not re-qualifyorigin/maintoorigin/origin/main. Its fix-check showed the guard returned null for a stacked base likealice/basewhen a remote namedaliceexists, so 9417c7d reverts it to main's behavior. The revert had its own fix-check under grant a-ba8597fc3f14.gstack-ship-release finishroutes that doc as behavior. All three fix-checks after the auth fixes found nothing.Open notes, not fixed:
gstack-pr-shots --base mainresolves to the origin tip, not the merge base. If origin has moved and touched the same file, the before image shows upstream's newer text (native adversarial, Low).gstack-docs-candidate snapshot --base <branch>by hand uses a two-dot diff against a moved origin tip. /ship passes a sha, so it isn't affected (native adversarial, Low).lib/review-risk.tsAUTH_PATH_TOKENSstill needs an exact token, so glued names setSCOPE_AUTHwithout the targeted auth risk class. That file is pinned under the no-loss rule (fix-check, INFORMATIONAL). So the fail-safe reaches reviewer scoping (SCOPE_AUTH) but not that risk class fornextauthmiddleware.ts,noauthrequired.tsorbasicauth.go(p5 fix-check, INFORMATIONAL).--base origin/mainwithrefs/remotes/origin/mainmissing andrefs/remotes/origin/origin/mainpresent resolves toorigin/origin/mainthrough the origin twin lookup. The guard that fixed it regressed stacked bases and was reverted (Captain option A, pre-existing).gstack-diff-scope's bash_resolve_basecopy falls through the same way in that fringe case (p5 fix-check, INFORMATIONAL).resolveBasefinds nothing,baseArg,collectLiveandresolveCommitpass the raw name to git, which can readrefs/tags/origin/main(p5 fix-check, INFORMATIONAL).Documentation exception: accepted by GStack Minder (Captain) 2026-11-02 via option A on #3906, relayed by the parent thread: round-3 SCOPE_AUTH wording in docs/review-policy.md, the changelog fragment and the diff-scope comment, reviewed by fix-check p5, no third audit
Gate edits: none detected (gate scan tagged=0).
REVIEW_LOOP: passes=1 blocking_found=3 deferred=0 noted=0 fixed=0 scope=frozen unrecorded=3 ledgers_read=4 fix_checks=3. The three blockers come from the voices' ledger rows, and the summary can't pair them with a row: their text has no path:line it reads. Two are the mid-word auth gap, fixed at 712f5de. The third is the pr-shots note above, which the parser labeled CRITICAL although the reviewer marked it Low.