Repository navigation
Conversation
… auth, bare base in diff-scope and receipt depth (GST-911, GST-884, failing first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…y; session data files are not auth; diff-scope and the receipt depth read origin/<base> by full ref name (GST-911, GST-884) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…-padded character references; the security class reads a file's changed SVG lines joined (GST-911 review pass 1) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… SVG (GST-911 review pass 2, failing first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…g its value, so a stray quote cannot hide an external href (GST-911 review pass 2) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…d): image-set(), image(), element() keep it code (GST-911 Step 11, failing first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…nd no function but url(#id), which closes image-set(), image(), element() and every other CSS load (GST-911 Step 11) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
…unclosed style tags are refused in linear time, and every drawing verdict holds at 1 MB and 8 MB (GST-911, failing first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ts and reading CDATA, so no hidden </style> ends it early and unclosed style tags refuse in linear time (GST-911) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 tasks done
Contributor
|
Frozen in wave |
garrytan
added a commit
that referenced
this pull request
Nov 2, 2026
… red-team CRITICAL) SVG_REFUSED's url() entry backtracked quadratically on url( followed by a long whitespace run (80k spaces: 820 ms; 1 MB: over 230 s), and svgDrawing runs in collectLive and in collectCommit, which ship-queue ready, train build and land call with no timeout. The rewritten entry refuses exactly what #3838's pattern refused. Repin lib/review-depth.ts under no-loss replay GST-911-redos (verdict identity: 60,000 seeded strings, the edges and every SVG blob in history, zero differences). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
capy-ai Bot
added a commit
that referenced
this pull request
Nov 2, 2026
* fix(retro): keep retro history in the state root, shared across worktrees (#3749) /retro saved snapshots under .context/retros inside the working tree, so a run in a linked worktree saw none of the main checkout's history, reported "First retro recorded", and wrote a snapshot that git worktree remove deletes. gstack-retro-metrics --history [--next <date>] now resolves the history directory as <state root>/projects/<slug>/retros (the slug is keyed on the git common dir, so every worktree shares it), moves any legacy .context/retros from this worktree and the main checkout into it, lists prior snapshots and prints the next snapshot path. Step 12/13 and the gbrain prior-retros query use it. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(gate-diff): read a bare base as origin/<base> in gate-diff and diff-scope (#3650) gstack-gate-diff and gstack-diff-scope resolved a bare base such as main to the local branch whenever it shared history with HEAD. A local main that is behind origin/main (a linked worktree, or a Capy clone, where local main never moves) then set the merge base, so /ship's gate scan and specialist scope also read commits already upstream. Both now prefer origin/<base> when it resolves, the base /ship fetches and merges against. Fixes #3650 Co-authored-by: exGeni <[email protected]> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(retro): make history migration safe against symlinks and concurrent runs (#3749 review) Review pass 1 findings: a .context/retros that resolves outside its worktree (or to the shared history itself) is left alone, so migration can no longer delete the history it points at; moves are no-clobber with retry; a copy identical to any same-date snapshot collapses; RETRO_FILE is reserved as {} so overlapping runs in two worktrees never share a path; --next must be a YYYY-MM-DD date; a missing option value no longer loops forever. Step 12 names RETRO_HISTORY_ERROR instead of reading it as a stale helper. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): fragment for the #3749 retro history fix Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes (diff-scope reads slash-named bases through origin too) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(retro): trim Step 12/13 prose back under the parity skeleton cap Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: Step 11 review fixes (a fork branch, a colliding tag or another remote never replaces the base) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(retro): keep today="<today>" in Step 12 so the judge excerpt keeps both date inputs Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): describe the fork, tag and remote guards (#3650) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(retro): compare #3749 history paths with forward slashes so the Windows shard passes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(review): review-plan and gate-diff plan the same with a stale local main or a shadowing tag (GST-883, failing first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review): gate-diff and review-plan resolve a branch base to origin/<base> by full ref name; review-plan scans the merge base its own diff used (GST-883) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): GST-883 fragment Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(review-risk): hostile-input time bounds for every risk pattern; the R51 rm and rmSync rules fail (GST-898) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review-risk): the R51 rm and rmSync rules run in linear time (GST-898) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(review-packets-removed): repin lib/review-risk.ts on the GST-898 verdict-identity replay Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review-risk): padding cannot push recursive: true out of the rmSync window; repin on the GST-898 no-loss replay Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): GST-898 fragment wording Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(review): planner misreads: SVG chart as runtime, session data as auth, bare base in diff-scope and receipt depth (GST-911, GST-884, failing first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review): a drawing-only SVG is data and a scripted one is security; session data files are not auth; diff-scope and the receipt depth read origin/<base> by full ref name (GST-911, GST-884) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review): the SVG drawing check refuses CSS escapes and reads zero-padded character references; the security class reads a file's changed SVG lines joined (GST-911 review pass 1) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(review): a stray quote cannot hide an external href in a drawing SVG (GST-911 review pass 2, failing first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review): the SVG drawing check reads every name= without consuming its value, so a stray quote cannot hide an external href (GST-911 review pass 2) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(review): CSS in a drawing SVG holds only declarations and url(#id): image-set(), image(), element() keep it code (GST-911 Step 11, failing first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review): a drawing SVG's CSS holds declarations only, no @ rule and no function but url(#id), which closes image-set(), image(), element() and every other CSS load (GST-911 Step 11) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(review): a style element's CSS is read past comments and CDATA, unclosed style tags are refused in linear time, and every drawing verdict holds at 1 MB and 8 MB (GST-911, failing first) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review): walk a style element's CSS with indexOf, dropping comments and reading CDATA, so no hidden </style> ends it early and unclosed style tags refuse in linear time (GST-911) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(review-policy): the linear-time claim covers R51's rm and rmSync rules (GST-898) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(review-policy): state the rmSync padding rule exactly (GST-898) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(review-depth): linear url() refusal in svgDrawing (wave review-2, red-team CRITICAL) SVG_REFUSED's url() entry backtracked quadratically on url( followed by a long whitespace run (80k spaces: 820 ms; 1 MB: over 230 s), and svgDrawing runs in collectLive and in collectCommit, which ship-queue ready, train build and land call with no timeout. The rewritten entry refuses exactly what #3838's pattern refused. Repin lib/review-depth.ts under no-loss replay GST-911-redos (verdict identity: 60,000 seeded strings, the edges and every SVG blob in history, zero differences). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes (wave review-2, pass 1) - bin/gstack-diff-scope: _resolve_base takes a related local <base> before another remote's twin, the order resolveBase uses, so the two tools pick the same base for a bare name when origin/<base> is unrelated. - lib/review-depth.ts: a drawing's DOCTYPE names no document but W3C's SVG DTD; SYSTEM and other PUBLIC identifiers keep the SVG code. Repin lib/review-depth.ts under no-loss replay GST-911-redos (the DOCTYPE change only keeps more SVGs code, so it drops no reviewer). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: freeze the exported SVG_REFUSED list (wave review-2, Step 11) Exported only so test/review-risk-redos.test.ts can reach the url() entry; a frozen readonly copy keeps any importer from changing verdicts while DEPTH_RULES still reports the original rules. Repin lib/review-depth.ts under no-loss replay GST-911-redos (no pattern changed). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Revert "fix: freeze the exported SVG_REFUSED list (wave review-2, Step 11)" The fix-check (wave review-2) showed Object.freeze is shallow: each RegExp can still be changed in place, so the freeze did not close adversarial-native#1, and it moved the tree past the one the Step 11 voices reviewed. The finding ships as an open note (its reviewer rated it Low, not blocking; no production caller mutates the list). Restores the lib/review-depth.ts pin under no-loss replay GST-911-redos. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): wave review-2 entry for the integrator fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(review-policy): a drawing's DOCTYPE names no outside document (wave review-2 docs audit) 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: exGeni <[email protected]>
Contributor
|
Landed in wave #3848 as v1.92.76.0 (3d99c22), merged from this PR's pin 26d71ad. Integrator changes touching this PR's files: 61cd215 (merge of #3838, resolved by hand: docs/review-policy.md, lib/review-depth.ts, lib/review-risk.ts, test/review-packets-removed.test.ts), b3d0eb8, 86d0414, 170b32a, 0d5f01b, b306a49. |
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
/ship's review planner misread three things in a results write-up (gstack-evals#132), and the combination sent a docs PR to the full five-reader panel:
@rule and no function except a same-fileurl(#id); a style element is read to its real closing tag, with comments dropped and CDATA read as CSS, in linear time), everyhrefa same-file#reference or an inline raster image, and no event handler or entity declaration. The file is read after character references are decoded. An SVG that can run script (ascriptorforeignObjectelement, an event handler, or ajavascript:URL) stays code and now gets the security class.recovered-sessions.jsonlno longer setsSCOPE_AUTH. Session code and session config still do.main(GST-884).gstack-diff-scopeand the receipt depth now resolveorigin/<base>by its full ref name, so a stale local branch or a tag namedmainororigin/maincan't stand in for it. The review-plan/gate-diff half of this is in fix: a stale local main no longer makes /ship review a change at full gate depth #3826 (GST-883), which already rewrites that resolution.Before: gate/full, 621 runtime lines, 5 dispatches, auth targeted. After: docs/light, runtime 0. Repro:
~/.capy/work/gst911/repro.shon this branch and on main f5cb6ec.Why
A results PR that adds a chart and a JSONL file should get one light review, not the full panel. Each misread raised the depth on its own, and together they cost a five-reader review on a docs change.
Blast radius
Review planning only (
lib/review-depth.ts,lib/review-risk.ts,lib/review-collect.ts,bin/gstack-diff-scope,bin/gstack-review-plan,lib/ship-preflight.ts,lib/ship-receipt-depth.ts). No network calls, secrets, permissions, workflows or dependencies. The no-loss replay over the last 100 first-parent main commits (to f5cb6ec) changed 0 commits in depth, class, risk classes, targeted classes orSCOPE_AUTH(7 true before, 7 after). None of those commits touches an SVG, so the SVG rule is proven on fixtures:test/review-planner-misreads.test.tsholds 44 tests, including verdicts at 1 MB and 8 MB (the collector's read cap), and every SVG that can load or run something stays code. The rule fails closed, so a chart that usesrgb()in CSS now plans as code (more review, never less).Approvals
Pre-Landing Review
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=8 fixed=4 scope=frozen fix_checks=3 dispatches=4
2 CRITICALs were found and fixed, so
blocking_found=0undercounts.Review-loop exception: accepted by GStack Minder 2026-11-02 via GSTA-36 decision on #3838: after the last granted fix, further floor findings ship as open notes in the PR body (fix-check at 26d71ad, 3 findings)
Gate edits: none detected (GATE_SCAN tagged=0 at d8227c1 against origin/main).
href. Fixed in 4b3abea (failing first: 10af2e1). A fix-check under GStack Minder's grant was clean (2 INFORMATIONAL notes).image-set()loading an outside image. That's fixed in 0f61362 (failing first: 25563a8) with a CSS allowlist: declarations only, plusurl(#id).</style>hidden in a comment or CDATA can't end it early, and a run of unclosed<styletags is refused in linear time (480 KB: 5.7 ms, was 15.9 s). Fixed in 26d71ad (failing first: 6ad88b7). Every verdict was checked at 1, 2, 4 and 8 million characters. The fix-check and the Step 11 rebind on 46d369af raised the notes below; none was fixed.Deferred findings
rules=hashes don't cover inline regexes insvgDrawing,decodeCharRefsandmatchRisk's line join (Step 11, adversarial-native#4).Review notes (open, shipped under the round cap)
These came from the last fix-check and the Step 11 rebind on the final tree (46d369af). The last grant allowed no further fix.
<is decoded, so<style><!-- … --></style>drops real CSS as a comment, and/* </style> */ends the element early. Walking the raw text and decoding only the collected CSS would close both.<!-->,--!>and a comment in<title><style>end or skip differently under an HTML parser, so CSS the walker drops can still load there. Checking each comment body with the CSS rule too would close it.</a:style>ends a<style>. This was already true before the walker.<style/>now refuses the drawing. This fails closed.cursor,mask) aren't checked against the CSS allowlist. It's unverified whether a browser fetches through them.rgb(),hsl()andtransformfunctions in CSS now send a chart to code. This fails closed.javascript:with part of it on an unchanged line loses the security class, but the file still stays code.{
"schema_version": 1,
"pr": 3838,
"head": "0f61362c1e4603062e0c5db3c8f1625001b622f8",
"version": "1.92.56.0",
"base": "main",
"session_kind": "unattended",
"head_tree": "aee847a68d0a75c68cd71cee42a47392d21c183d",
"product_patch_id": "c89ab954d63fa3e75071397c10fbae8023fc8163",
"gstack_version": "1.92.52.0",
"review_depth": {
"depth": "full",
"class": "gate",
"runtime_lines": 201,
"rules": "97c1e5fe49607f73",
"base": "f5cb6ec1eb3ea25b579e022dfd735d7b452f6bb5",
"registry": "f5cb6ec1eb3ea25b579e022dfd735d7b452f6bb5",
"gate_scan": {
"tagged": 0,
"head": "0f61362c1e4603062e0c5db3c8f1625001b622f8"
},
"reasons": [
"gate-class",
"runtime=201"
],
"risk": []
},
"pregate": "requires-remote cleared @aee847a68d0a (1 checks, current for 0f61362)",
"requires_remote": [
"free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41392537248",
"windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/41392541686",
"pregate.json/remote_gate: remote-gate tree=aee847a68d0a tests=8399"
],
"issues": {
"fixes": [],
"refs": [],
"flakes": []
},
"docs": {
"status": "current",
"scope": "docs/, changelog.d/, README.md (read-only audit gst911-docs-a)"
},
"review_loop": {
"passes": 2,
"blocking_found": 0,
"deferred": 0,
"noted": 5,
"fixed": 4,
"scope": "frozen",
"fix_checks": 2,
"rounds": 4,
"dispatches": {
"specialist": 2,
"red-team": 2
}
},
"review_loop_exception": {
"accepted_by": "GStack Minder",
"date": "2026-11-02",
"via": "GSTA-249 thread",
"reason": "after the last granted fix, further floor findings ship as open notes in the PR body",
"fix_check": {
"head": "0f61362c1e4603062e0c5db3c8f1625001b622f8",
"findings": 1,
"files": [
"lib/review-depth.ts"
]
}
}
}