Skip to content

Stop the focused-test tag from keeping run data in review (GST-2006) - #4195

Merged
capy-ai[bot] merged 2 commits into
mainfrom
stop-focused-test-tag-keeping-run-data
Nov 9, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
stop-focused-test-tag-keeping-run-data

Conversation

@garrytan

@garrytan garrytan commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

The gate scan's focused-or-skipped-test check (RH-1) now skips data and log files, so a model reply that says "don't fit (the gap never drops below one space)" in a committed results .jsonl no longer keeps that whole file in the reviewers' diff under review_exclude_paths.

On harness-evals#333 at a229e25 the gate scan tagged docs/benchmarks/2026-11-06-qm-s1-edition/main/turns.jsonl as RH-1, review-exclude re-kept it as gate-tagged, and the reader's diff went back to 5,120,181 bytes against the 2 MB ceiling (REVIEW_DIFF_TOO_LARGE).

What changed

Before: RH-1 matched skip and focus idioms in every file that was not prose or generated, so English "fit (" in run data tagged the file and kept it in review.

After: RH-1 skips .json, .jsonl, .ndjson, .csv, .tsv, .log and .out files unless they were renamed from another kind of file. Every other file, in a test folder or not, keeps RH-1, and every other gate tag still reads data files.

No image: this is a gate-scan rule with no visible surface. The two smoke probes under Exploratory QA show the before/after behavior as command output.

Why

"/ship stopped with REVIEW_DIFF_TOO_LARGE" on a results PR whose run data was already excluded from review, because a model reply in that data said "fit (". Results PRs now keep their run data out of the reviewers' diff, while a skipped or focused test in code under the same excluded path is still tagged and kept.

Blast radius

The change touches only RH-1 inside tagHunk (lib/gate-diff/tags.ts) and passes the old path of a rename from lib/gate-diff/index.ts; review-exclude and the other tags are unchanged. It is safe because the rule now fails toward tagging. Only the seven data and log extensions lose RH-1, which the new tests and two smoke runs of gstack-gate-diff on throwaway repositories confirm (script ran).

Summary

A results PR with a 5 MB transcript hit the reviewers' 2 MB ceiling even though the transcript sat under review_exclude_paths, because RH-1 read English "fit (" as a focused test. RH-1 now skips data and logs. Review then found that the first version, an allowlist of code extensions, also dropped RH-1 from an HTML browser suite, unlisted languages such as Crystal, and a test-folder file renamed to data, so the rule became a short denylist of data and log formats with a bypass test written first.

Test Coverage

All new code paths have test coverage: test/gate-diff.test.ts "RH-1 reads only files a test runner can execute (GST-2006)" (6 tests, including the review bypass case, red at 7dda9ea and green at 76c3f84) and test/review-exclude.test.ts "the gate scan keeps code but not run data under a pattern (GST-2006)".
Tests ran: free 1650 (files, carried from CI run 42579796201/1 at tree 3165c7df1daf)

Pre-Landing Review

Pass 1 (full panel: batched testing/security/state-machines specialist, Red Team, native adversarial, outside voice openai/gpt-6.1-sol, targeted gate reader) found five blocking reports of two bypasses, all fixed in 76c3f84: an HTML browser suite with describe.skip outside a test path lost RH-1, and a test-floor file with an unlisted extension renamed to data with its declarations removed lost RH-1. Pass 2 on the fix range found only notes. One informational finding was skipped by design: extensionless run output and test-folder report formats (xml, yaml, html) still carry RH-1; exempting them would reopen the HTML bypass.
Gate edits: 3 listed, 3 read, 0 findings — 0 kept, 0 restored, 0 open
Outside review: openai/gpt-6.1-sol, completed (2 findings, both fixed).

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL lib/gate-diff/tags.ts:262 RH-12/13/14/16 still match quoted shell/lint text inside run data, so a big transcript can still be gate-tagged and kept
  • INFORMATIONAL lib/gate-diff/tags.ts:37 a results file renamed from .md or .txt to .jsonl regains RH-1 through the rename clause
  • INFORMATIONAL lib/gate-diff/tags.ts:35 Postman/Newman collection .json files run embedded JS tests; a pm.test.skip added there no longer carries RH-1

Exploratory QA

Functional smoke on gstack-gate-diff in two owned throwaway repositories: a test file and an extensionless script with focus markers tag RH-1 while results/turns.jsonl with #333's replies tags nothing; a test renamed to .jsonl that drops its declaration still tags RH-1. Both passed at 7dda9ea and again at 76c3f84 after the review fix. Verdict: pass, 2 of 12 smoke probes used.

Scope Drift

Scope Check: CLEAN

Plan Completion

Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). Fix: add "Plan: " to the PR body, or run /autoplan.

Verification Results

No plan-specific checks (bug fix, plan exempt). Automatic QA: both smoke probes passed; none failed, blocked or went unrun.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. No documentation edits were needed.

Scope: branch stop-focused-test-tag-keeping-run-data against base b5c690c (head 76c3f84): 2 commits and 6 files (lib/gate-diff/tags.ts, lib/gate-diff/index.ts, two test files, the design doc and a changelog.d fragment). The candidate has no staged, unstaged or new files.

Documentation health:

  • docs/designs/HONEST_WORK_GATE_INTEGRITY.md: current. The branch's RH-1 row matches the new data-file exemption in lib/gate-diff/tags.ts, including the rename rule.
  • docs/ship-policy.md: current. The generic gate-tagged keep reason stays accurate.
  • docs/review-policy.md: current. It doesn't describe RH-1.
  • changelog.d/stop-focused-test-tag-keeping-run-data.md: read only, and it matches the code.
  • AGENTS.md, CLAUDE.md, README.md and CONTRIBUTING.md: not affected. No other doc mentions RH-1.

Coverage debt: none. The change is internal to the gate scan, and its one public rule is documented in the design doc's RH-1 row. Diagram drift: none.

Test plan

  • bun run test: carried from CI run 42579796201/1 at tree 3165c7df1daf (1650 files, green)
  • bun test test/gate-diff.test.ts: all 40 tests green at 76c3f84
  • bun test test/review-exclude.test.ts -t GST-2006: green at 76c3f84
  • bun run typecheck: exit 0 at 76c3f84

🤖 Generated with Claude Code

Agent notes

Refs GST-2006

Approvals

No approvals recorded for branch stop-focused-test-tag-keeping-run-data.
Plan: exempt: bug fix

REVIEW_LOOP: passes=2 blocking_found=5 deferred=0 noted=2 fixed=5 scope=frozen ledgers_read=5 dispatches=4
Gate edits: 3 listed, 3 read, 0 findings — 0 kept, 0 restored, 0 open

{
  "schema_version": 1,
  "pr": 4195,
  "head": "76c3f846408ff1544cde96ae3fe64b2e714523a2",
  "version": "1.98.0.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1650,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 42579796201,
      "attempt": 1,
      "tree": "3165c7df1daf68588211b57cb91fc159b4d3b3ac"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "3165c7df1daf68588211b57cb91fc159b4d3b3ac",
  "product_patch_id": "fe5078ea7f5af04f491aab6fd194c42fbdbd2d4f",
  "gstack_version": "1.98.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 26,
    "rules": "66e5174161eecc2c",
    "base": "68b1d056a4fcf300ca2b61a1406940c5dd336916",
    "registry": "68b1d056a4fcf300ca2b61a1406940c5dd336916",
    "gate_scan": {
      "tagged": 5,
      "head": "76c3f846408ff1544cde96ae3fe64b2e714523a2"
    },
    "reasons": [
      "gate-class",
      "runtime=26"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @3165c7df1daf (8 checks, current for 76c3f846408f)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/42579796201/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=3165c7df1daf tests=36742 skipped=69 runs=42579796201/1 profiles=ci-reuse/free-tests heads=76c3f846408f verified=2026-11-09T07:40:59.301Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CLAUDE.md, AGENTS.md, CONTRIBUTING.md against b5c690ce (RH-1 row in docs/designs/HONEST_WORK_GATE_INTEGRITY.md)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 5,
    "deferred": 0,
    "noted": 2,
    "fixed": 5,
    "scope": "frozen",
    "rounds": 2,
    "ledgers_read": 5,
    "dispatches": {
      "specialist": 2,
      "red-team": 2
    }
  },
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "8811fd300bf305f0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "fe5078ea7f5af04f491aab6fd194c42fbdbd2d4f",
    "status": "done",
    "findings": 1,
    "raised_by": "targeted"
  }
}

Open in Capy

RH-1's skip, focus and removed-declaration checks now read only files a test runner can execute: source files by extension, extensionless scripts, test-folder or project-glob files that are not data, and files renamed from one of those. English like "don't fit (" in a results .jsonl no longer tags the file and keeps it in the reviewers' diff under review_exclude_paths (harness-evals#333).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

Review found that the code-extension allowlist dropped RH-1 from an HTML browser suite, unlisted languages, and a test-floor file renamed to data. RH-1 now skips only .json, .jsonl, .ndjson, .csv, .tsv, .log and .out files that were not renamed from another kind of file.

Review-Finding: p1v/outside-voice#1 reader=outside-voice
Review-Finding: p1v/outside-voice#2 reader=outside-voice
Review-Finding: p1v/targeted#1 reader=targeted
Review-Finding: p1v/adversarial-native#2.1 reader=adversarial-native
Review-Finding: p1v/adversarial-native#2.2 reader=adversarial-native
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot marked this pull request as ready for review November 9, 2026 07:45
@capy-ai
capy-ai Bot merged commit 350d419 into main Nov 9, 2026
80 checks passed
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