Skip to content

Results PRs with large agent transcripts can be reviewed again (GST-3273) - #4574

Merged
capy-ai[bot] merged 2 commits into
mainfrom
gate-tagged-data-allowlist
Nov 20, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
gate-tagged-data-allowlist

Conversation

@garrytan

@garrytan garrytan commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Results PRs that commit captured agent sessions no longer stop at the 2 MB review limit: a data file kept in review only because a session quotes a lint pragma, an env check or a --no-verify push now reaches readers as those lines with context.
Why: harness-evals#494 (25 transcripts, 11.3 MB) could not be reviewed at all. Only a strict set of files is cut, so anything in doubt still goes to readers whole.
Nothing to do: the gate review still runs, and the change follows the review policy you already have.

What is cut, and what stays whole

A gate-tagged file is cut to its tagged lines only when all of these hold:

  1. It is a .jsonl, .ndjson, .csv, .tsv or .log file, or a .json under a docs, results or reports tree. A review_content_patterns declaration alone never qualifies a file.
  2. No gate floor covers its path (test, CI, config, snapshot or golden), and it was not renamed.
  3. It is kept for no other reason.
  4. Every tag instance is one added line's own tag: the multi-line empty-catch rule finds nothing, and the untagged lines, scanned together, tag nothing.

The review plan and the record /ship writes before merge compute this from the same input, so they build the same selection. Tests cover each case that stays whole: code with the same words, a snapshot, a multi-line catch alone, a multi-line catch next to a one-line tag, a declared .out session, a declared .patch under test/, a .jsonl under test/, and a code file renamed to .jsonl.

Also fixed
  • REVIEW_DIFF_TOO_LARGE now names the largest files (files= and the fix text), and a name holding a space, a comma or a colon is quoted rather than cut at the first space.
  • The gate scan stored a path holding a space with the tab git appends after such names, so the tagged file matched nothing and was dropped from review without being read. The tab is now stripped.
Evidence
Agent notes

Replaces #4556, which was closed after five reviews because every tag-matching inference was beaten by files that mixed tag instances. This is the allowlist rebuild GStack Minder asked for, carrying over the #494 test, the agreement tests, the largest-files fix and the replay script. No grants apply to this PR. The two local 5 s timeouts (review-dispatch "an output event edited to look refused…", review-plan-targeted-delta "the #225 shape") reproduce on main locally.

/ship record (head 1571ea5, run ship-1571ea5)

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=5 fixed=0 scope=frozen dispatches=4

Pre-Landing Review: 5 issues — 0 auto-fixed, 0 asked, 0 deferred, 5 noted. None blocks: no test fails, nothing breaks in production, no data or secret is lost. Review plan: class=gate depth=full, one full pass (specialists testing/security/state-machines, Red Team, native adversarial, second-model review on openai/gpt-6.1-sol, targeted gate reader). Second-model review: clean. Targeted reader: no findings. Quality score 9.5/10.

Gate edits: none detected (2 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

The one tagged hunk is the new test file's fixture strings (lint pragmas, env checks, --no-verify, it.skip quoted as test data); it relaxes no gate.

Open non-blocking notes, left for a follow-up (this run changes no code):

  • One security finding (two readers), details recorded privately.
  • A file kept only for a credential line that also carries a line-rule tag (e.g. under a test floor) is listed under the gate-tagged heading instead of the credential heading (lib/review-secret-excerpt.ts:185). The credential line is still shown; only the heading and counts are off.
  • The harness-evals#494 size figures disagree: docs/ship-policy.md:1634 says "11.4 MB whole", lib/review-secret-excerpt.ts:13 and test/review-gate-excerpt.test.ts:62 say "12.3 MB". A recount from the raw data: the 25 transcripts' diff (git diff --text merge-base..refs/pr/494) is 11,320,357 bytes, so the doc's figure is roughly right but a little high; 12,257,762 bytes is main's whole-reader refusal on browse: Bun.spawn pipe hangs on WSL even with successful compile + HTTP proxy intercepts localhost #494, not the 25 files. Left unedited; the Captain decides whether it blocks.
  • The argument-size bound (lib/review-exclude.ts:482) still counts cut gate-data files, so a PR with very many cut transcripts could stop on REVIEW_EXCLUDE_KEEP_TOO_LARGE. This errs toward refusing and keeps the bound safe if a cut falls back to whole.

Test coverage (audit only, no tests written): 11 of 14 changed paths covered at two or three stars. Gaps: renamedPaths returning null on a git failure; a long line whose credential only the scanner finds; the "(N gate-tagged)" count on REVIEW_EXCLUDE_EXCERPT.

Exploratory QA: pass, 2 probes. A gate scan on an owned fixture lists results/run a.jsonl (a path with a space) under its real name with RH-13; bun test test/review-gate-excerpt.test.ts 9 pass, 0 fail.

Documentation:

Scope: diff a529769..1571ea5 on gate-tagged-data-allowlist (12 files; clean working tree), covering the gate-tagged data excerpt rule (GST-3273), the over-limit files= naming, and space-safe gate-tagged paths.

Result: docs current. docs/ship-policy.md adds the Gate-tagged data excerpts section, which matches lib/review-exclude.ts (allowlisted extensions, results-tree JSON, floor and rename exclusions, single-line tag rule). docs/review-policy.md cross-links it. docs/troubleshooting.md explains the files= field and its quoting. The changelog.d fragment covers the user-visible change. No edits were made (read-only audit).

Debt: the ship-policy text names docs, results and reports trees, but the RESULTS_TREE regex also matches wiki/. This is a minor omission.

Tests:

  • bun test test/review-gate-excerpt.test.ts: 9 pass, 0 fail (local, exploratory QA)
  • bun run test: carried from CI run 44815601290 (free-tests.yml, workflow_dispatch at 1571ea5, tree e598d3520398): tests_ran=1720 files
  • Requires-remote lanes cleared at this tree: free-tests.yml/macos-named-regressions (run 44815601290), windows-smoke.yml/windows-smoke (run 44809545000)

Approvals

No approvals recorded for branch gate-tagged-data-allowlist.
Plan: exempt: bug fix with failing-first tests (7 of the 9 new tests fail on main a529769); bug fixes skip plan review (R65)

{
  "schema_version": 1,
  "pr": 4574,
  "head": "1571ea555cef8f8d7df95c53285b4b43d756e726",
  "version": "1.102.0.0",
  "base": "main",
  "gate": {
    "bun run test": {
      "pass": 1720,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "bun_run_test",
      "run": 44815601290,
      "attempt": 1,
      "tree": "e598d3520398a9a02240350c63ea4a43b3a9e9b9"
    }
  ],
  "calls": 21,
  "session_kind": "unattended",
  "run": "ship-1571ea5",
  "head_tree": "e598d3520398a9a02240350c63ea4a43b3a9e9b9",
  "product_patch_id": "f77e751bd9b67aeaae9595e95ad1af088a5c9084",
  "gstack_version": "1.102.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 233,
    "rules": "3e7e9d5d0a0d8879",
    "base": "29bff55dd8a14b32ff282d5a37097e3a53e3250a",
    "registry": "29bff55dd8a14b32ff282d5a37097e3a53e3250a",
    "gate_scan": {
      "tagged": 3,
      "head": "1571ea555cef8f8d7df95c53285b4b43d756e726"
    },
    "reasons": [
      "gate-class",
      "runtime=233"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @e598d3520398 (8 checks, current for 1571ea555cef)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44815601290/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44809545000/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=e598d3520398 tests=38531 skipped=88 runs=44815601290/1 profiles=ci-reuse/free-tests heads=1571ea555cef verified=2026-11-20T21:04:53.980Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CLAUDE.md, AGENTS.md, CONTRIBUTING.md, changelog.d/ (read-only audit of a529769..1571ea5)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 5,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "gate_dispositions": [],
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "23eb808423669ba0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "f77e751bd9b67aeaae9595e95ad1af088a5c9084",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}

Open in Capy

garrytan and others added 2 commits November 20, 2026 19:48
…agged lines (GST-3273)

A gate-tagged .jsonl, .ndjson, .csv, .tsv or .log file, or a .json under a results tree, that is off every gate floor, not renamed, kept for no other reason, and whose every tag is one added line's own tag goes to readers as its tagged lines in context. Anything else stays whole. The plan and the receipt compute this from the same input. REVIEW_DIFF_TOO_LARGE names the largest files, and the gate scan no longer drops a path that holds a space.

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>
@trunk-io

trunk-io Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@capy-ai
capy-ai Bot merged commit ad65f62 into main Nov 20, 2026
84 checks passed
@capy-ai

capy-ai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Follow-up landed in #4592: REVIEW_DIFF_TOO_LARGE now quotes a file or folder name that holds a newline or another control character, so the message stays on one line. The two harness-evals#494 figures are corrected: 11.3 MB (11,320,357 bytes) for the 25 transcripts in docs/ship-policy.md, and 12.26 MB for main's whole reader diff in lib/review-secret-excerpt.ts and its test.

@garrytan garrytan mentioned this pull request Nov 21, 2026
capy-ai Bot added a commit that referenced this pull request Nov 21, 2026
- Habits from nine teams, written into gstack. (#4585)
- Three more habits from teams that run evals. (#4602)
- The /ship conductor trial plan gives its real-problem judge one more attempt on fresh labels after it missed its agreement bar twice, and stops the trial incomplete if it misses again (GST-3003). (#4611)
- The /ship conductor trial plan now stops a trial only at the final remote-gate refusal, gives both arms the same note that the brief overrides team rules, and counts every report the no-gstack arm returns (GST-3003). (#4609)
- The /ship conductor trial plan now ends a trial at the remote gate when its case base isn't main, gives the no-gstack arm a test runner, and audits every trial for exposure to the plan (GST-3003). (#4605)
- The /ship conductor trial plan now runs an uncounted pilot in every arm before its counted trials and takes one planned look at half the cases (GST-3003). (#4587)
- gstack's own use on Capy can be counted, and is kept out of real-use numbers. (#4576)
- Free Tests shards finish closer together. (#4578)
- The weekly test-time recording can land again on its own. (#4581)
- The job-log tree.json step's recommended sleep is long enough for real runners. (#4589)
- Pull requests no longer wait on the Trunk flaky-test upload, and the quick tier's flaky passes now reach Trunk. (#4579)
- Windows Setup E2E finishes sooner on install changes. (#4575)
- Skills no longer stop on Codex when they clean up temp files. (#4612)
- /review on Codex with OpenAI models no longer holds back a review that ran its adversarial pass. (#4622)
- Crew threads on Capy now check in at 500M own tokens, standing threads rotate at 250M and any subagent past 50M gets a look, half the old lines, because Capy's token counts read about half what they did before 2026-11-15. (#4582)
- gstack no longer offers to add a `## Skill routing` section to your project's CLAUDE.md. (#4629)
- The README and docs no longer say gstack makes your agent fix more bugs. (#4598)
- `/eval-plan` now writes eval plans that waste less money. (#4591)
- /cso checks every folder above a source file before it looks at the file, so it never looks through a symlinked folder. (#4592)
- Plan reviews no longer read a /design-review audit summary as the branch's design doc. (#4623)
- Node's built-in test files now run with `node --test` in repos that use vitest or jest. (#4626)
- A quarantined test that the runner skipped now fails the run instead of passing it. (#4590)
- A flaky free test is fixed: the spawnSync overflow check no longer fails about once an hour on CI. (#4613)
- Free Tests runs its shards on 16-core runners. (#4600)
- /office-hours asks for ground truth first. (#4468)
- Every startup session ends with a dated test. (#4468)
- /plan-tune's dream cycle now logs each send of your typed answers to Anthropic. (#4621)
- Landing a ready PR no longer depends on a hand-copied gate decision, and the ready note, release PR and squash message say the right thing. (#4596)
- /ship no longer asks for a fresh review because of a stacked parent that main already had. (#4580)
- Results PRs with large captured agent sessions can be reviewed. (#4574)
- /ship no longer stalls on review notes a reviewer already cleared, counts review rounds the way the review policy reads them, and keeps security findings out of the PR body. (#4595)
- /ship's review readers are now told never to stop processes they didn't start. (#4607)
- /ship's review no longer stops when Capy's own drive sync database grows past 100 MB. (#4606)
- /ship's preflight now honors your repository's time limit for rerunning CI-skipped tests, and tells you when a fresh worktree needs its packages installed. (#4608)
- The slowest free test file is now six files. (#4588)
- Step 11.5 keeps a reviewed head current across base-only merges. (#4577)
- On a Capy install, only the owner's opt-in sends telemetry. (#4597)
- New page: working across agent systems. (#4583)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant