Skip to content

Hash manifests no longer keep excluded results files in review, and the data-file scan cap can be raised (HARN-64) - #4643

Merged
capy-ai[bot] merged 5 commits into
mainfrom
review-scan-cap-and-hash-manifests
Nov 22, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
review-scan-cap-and-hash-manifests

Conversation

@garrytan

@garrytan garrytan commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

A results PR whose pins.sha256 lists its data files now gets review_exclude_paths instead of a refused 13.3 MB review, and hash-manifest lines no longer read as money, auth or data for review depth.
Why: harness-evals #538 kept all 2,140 excluded result files in review because the name scan timed out on a 2,140-path manifest and would have counted that manifest as code anyway.
Nothing to do; GSTACK_REVIEW_CONSUMER_SCAN_CAP is a new optional override.

What changed
  • Name scan (lib/review-exclude.ts): git grep -F -o with thousands of strings grew with the string count (2,140 paths: 176 s, past git's 120 s bound, so every candidate was kept as consumer-scan-unavailable). It now lists hit files with git grep -F -l --no-color, reads them (worktree files directly, blobs through one git cat-file --batch), and checks each path with a substring test. A file whose every non-blank line is a hex digest and a path (as sha256sum writes) names nothing; any other line makes it a consumer again.
  • Risk classes (lib/review-risk.ts): the same manifest rule skips the money, security, data and eval line checks. Path checks still run, and the secret line check still reads manifest lines. The manifest path may only hold letters, digits and . / _ - + @ ~, so no assignment, call or quoted string fits.
  • Consumer-scan cap (lib/review-collect.ts, bin/gstack-review-plan): GSTACK_REVIEW_CONSUMER_SCAN_CAP raises the 2,000-file cap through the same bounded parser as the other review-plan limits. A tripped cap prints a CONSUMER_SCAN: skipped: line that names both remedies, raising the cap or moving the data into its own PR. The cap is read from the environment, so a raised cap must also be set where a finished review is checked again (docs/review-policy.md).
  • Docs: docs/ship-policy.md (review_exclude_paths name scan) and docs/review-policy.md (consumer scan). Changelog fragment added.
Why

harness-evals #538 at 2072d985 (303,971 files): the plan took 163 s before and 48 s after, with active excluded 2140 kept 0. Risk classes went from money, security, data and eval to security, data and eval, so the depth stays full.

Blast radius

Only the review-depth and review-exclusion planning that /ship and the merge checks read. A manifest with any non-digest line is read exactly as before. With color.grep=always set in git config, the scan still reads plain file names (new test).

Tests
  • CI: free-tests.yml run 44972050629 at 4277b6a (green, 1,736 test files). macOS named regressions from that run and windows-smoke run 44971605277 at the same head.
  • Review-depth check with no paid run: the risk rules change was repinned under replay HARN-64. Planning the last 460 main commits of gstack, harness-evals and gstack-evals with the old and the new rules gave the same class and risk classes on all 460, including the 13 commits that touch a hash manifest.
  • Failing-first: on main, the manifest risk case and two exclusion cases fail; the new color.grep=always case failed before the --no-color fix and passes after.
Agent notes

Agent notes

Lane GSTA-757 for HARN-64. The cause was the exclusion's name scan, not CONSUMER_SCAN_CAP.

Documentation audit (Step 14.5):

Status: current. The docs already match the change, and no edits were needed.

Scope: the committed range from dd61103 to 4277b6a (11 files, no staged, unstaged or new files): the consumer-scan cap override in lib/review-collect.ts and bin/gstack-review-plan, the git grep -l name scan and hash-manifest skip in lib/review-exclude.ts, the HASH_MANIFEST_LINE risk exemption in lib/review-risk.ts, plus tests and fixtures. I inventoried the docs tree and grepped every doc for consumer-scan, cap and manifest references.

Documentation health:

  • docs/review-policy.md: current (the branch already documents GSTACK_REVIEW_CONSUMER_SCAN_CAP, the CONSUMER_SCAN: skipped: line and the warning that carry and the merge queue need the same cap)
  • docs/ship-policy.md: current (the branch already documents the hash/pin manifest rule and the git grep -F -l scan)
  • Other docs: no stale references found

Coverage debt: the risk-class table in docs/review-policy.md doesn't say that a hash or pin manifest's lines skip the money, security and data classes but still count for secret; ship-policy.md covers it. GSTACK_REVIEW_CONSUMER_SCAN_CAP has reference coverage only, with no troubleshooting entry for the CONSUMER_SCAN: line. No diagram drift.

Pre-Landing Review: 2 issues — 1 auto-fixed, 1 asked (0 fixed, 1 skipped), 0 deferred, 0 noted. Step 11: second-model review found 1 blocker (git grep -l lost --no-color), fixed in 4277b6a under the scoped fix-check below; native adversarial: 3 low notes.
REVIEW_LOOP: passes=1 blocking_found=1 deferred=0 noted=4 fixed=2 scope=frozen fix_checks=2 dispatches=4
Review-loop exception: accepted by Captain GStack Minder (GSTA-36) 2026-11-22 via GSTA-757 relay to the /ship subagent; approval a-8603906745b2: one scoped fix-check for the second-model blocker (git grep -l lost --no-color) after round 2 (fix-check at 4277b6a, 0 findings)
Gate edits: none detected (4 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

Review notes (below the merge floor, not fixed):

  • docs/review-policy.md:423: the queue refuses a lighter receipt with QUEUE_RECEIPT_DEPTH_RAISED, not RECEIPT_CARRY_REFUSED.
  • bin/gstack-review-plan:320: CONSUMER_SCAN: could name the cap when the scan failed (a reader says the plan exits first on a scan error; untraced).
  • lib/review-exclude.ts:434: the includes loop has no deadline of its own.
  • lib/review-exclude.ts:435: a manifest that CI checks with sha256sum -c lets the files it pins leave the review diffs (intended for results receipts).
  • lib/review-risk.ts:234: a checksum file pinning an auth binary loses its security line class; path and secret checks still run (skipped).

Issue links: harness-evals #538 is in another repository, so no gstack Refs line is written.

Approved: yes (record r-cc72dcf257b1). The full approval record stays private.
Plan: exempt: bug fix HARN-64 under the GSTA-36 brief
Plan check: exempt bug fix

Open in Capy

{
  "schema_version": 1,
  "pr": 4643,
  "head": "4277b6a2fc6e0c763ea624446665cc7a40144d8a",
  "version": "1.102.2.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1736,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 44972050629,
      "attempt": 1,
      "tree": "d2131c16e0836528599ed61b5fb7f14c35055994"
    }
  ],
  "calls": 39,
  "session_kind": "unattended",
  "run": "ship-4643",
  "head_tree": "d2131c16e0836528599ed61b5fb7f14c35055994",
  "product_patch_id": "ae67661971f0bb597d96451a44a49f4981695a76",
  "gstack_version": "1.102.2.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 92,
    "rules": "85b3923b1a978e41",
    "base": "d8abe59096b6205b84fa80162083c702f6ff4703",
    "registry": "d8abe59096b6205b84fa80162083c702f6ff4703",
    "gate_scan": {
      "tagged": 0,
      "head": "4277b6a2fc6e0c763ea624446665cc7a40144d8a"
    },
    "reasons": [
      "gate-class",
      "runtime=92"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @d2131c16e083 (8 checks, current for 4277b6a2fc6e)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44972050629/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44971605277/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=d2131c16e083 tests=38724 skipped=89 runs=44972050629/1 profiles=ci-reuse/free-tests heads=4277b6a2fc6e verified=2026-11-22T01:42:49.044Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/ and README.md for the dd611038..4277b6a2 range (review-policy.md and ship-policy.md already current)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 4,
    "fixed": 2,
    "scope": "frozen",
    "fix_checks": 2,
    "rounds": 1,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "review_loop_exception": {
    "accepted_by": "Captain GStack Minder (GSTA-36)",
    "date": "2026-11-22",
    "via": "GSTA-757 relay to the /ship subagent; approval a-8603906745b2",
    "reason": "one scoped fix-check for the second-model blocker (git grep -l lost --no-color) after round 2",
    "fix_check": {
      "head": "4277b6a2fc6e0c763ea624446665cc7a40144d8a",
      "findings": 0,
      "files": [
        "lib/review-exclude.ts",
        "test/review-exclude-pin-manifest.test.ts"
      ]
    }
  },
  "gate_dispositions": []
}

garrytan and others added 2 commits November 21, 2026 23:52
…eview, and the consumer-scan cap can be raised (HARN-64)

The exclusion's name scan used git grep -o with every candidate path, which ran past its
120 s bound on harness-evals #538 (2,140 paths in one pins.sha256), so every file stayed in
review. It now lists hit files with git grep -l and reads each one, and a file whose lines are
all digests and paths names nothing. Those manifest lines also no longer set money, security,
data or eval risk; secret lines still count. GSTACK_REVIEW_CONSUMER_SCAN_CAP raises the
2,000-file consumer-scan cap, and a tripped cap prints a CONSUMER_SCAN line naming both fixes.

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

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

# Conflicts:
#	bin/gstack-review-plan
@trunk-io

trunk-io Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

Planning 460 recent main commits across gstack, harness-evals and gstack-evals with the old
and new rules gives the same class and risk classes on all 460 (replay HARN-64).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan and others added 2 commits November 22, 2026 00:55
… a finished review is checked again (HARN-64)

Review-Finding: p1/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…p output (HARN-64)

Review-Finding: p1/outside-voice#1 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 8d0e827 into main Nov 22, 2026
75 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