Skip to content

v1.91.330.0 fix(review): packet reviewers read callers, callees and tests beyond the hunks (GSTA-167 hotfix) - #3636

Merged
capy-ai[bot] merged 3 commits into
mainfrom
gsta-167-review-reads
Oct 30, 2026
Merged

capy-ai[bot] merged 3 commits into
mainfrom
gsta-167-review-reads

Conversation

@garrytan

@garrytan garrytan commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3636,
  "head": "b134b51fa5a3dd409d3ac0ba789bfc84015fac08",
  "version": "1.91.328.0",
  "base": "main",
  "gate": {
    "remote_gate": {
      "pass": 19557,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "3c0727ed595e487a6640483e1d691bb9217e8be4",
  "product_patch_id": "0a7b629ac27dbe206f503ecc1c159c5fe90158df",
  "gstack_version": "1.91.329.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 19,
    "rules": "55726fab80631072",
    "base": "de53aef03fbd0811d51cb111c86f8c7ecaf7e57e",
    "registry": "de53aef03fbd0811d51cb111c86f8c7ecaf7e57e",
    "gate_scan": {
      "tagged": 0,
      "head": "b134b51fa5a3dd409d3ac0ba789bfc84015fac08"
    },
    "reasons": [
      "runtime=19<=50"
    ]
  },
  "pregate": "requires-remote cleared @3c0727ed595e (1 checks, current for b134b51fa5a3)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41002771392",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/41002775022",
    "pregate.json/remote_gate: remote-gate tree=3c0727ed595e tests=19557"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, capy/, CONTRIBUTING.md, AGENTS.md and the ship sections carrying the packet brief"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 2,
    "fixed": 0,
    "scope": "frozen",
    "est_input_tokens": 13447,
    "dispatches": {
      "specialist": 1
    }
  }
}

Hotfix for GSTA-167 / GST-134. Reviews run on gstack 1.91.326.0 up to this hotfix's version are not no-loss: #3621's packet brief limited reviewers to 2 extra line ranges, and a preregistered replay (crew drive handoffs/GSTA-167/noloss2-results.md) found packet reviewers caught 11 of 30 recorded blockers; 7 blockers that need context outside the diff hunks were caught by no arm at any severity.

What changed

Every /ship reviewer packet now has the reviewer confirm or rule out a suspected defect from its callers, callees, tests and contracts (at most 8 reads in 2 turns), instead of at most 2 more ranges around the hunks

Every /ship reviewer packet now has the reviewer confirm or rule out a suspected defect from its callers, callees, tests and contracts (at most 8 reads in 2 turns), instead of at most 2 more ranges around the hunks.

Text before/after

Before (READ_BUDGET, main): "Everything you need is in this packet. You may read at most 2 more named line ranges, each at most 200 lines of a file in this diff (code around a hunk, a caller the diff changed), both in one turn as parallel calls. No whole-repository search, no git commands, no other packets, no transcript, no web."

After: "The packet is your starting context: the diff, checklists and contract. Before reporting, confirm or rule out each suspected defect by reading what it depends on outside the hunks: the callers and callees of changed functions, the tests that cover them, and the config/contracts they read. Use grep and the read tool freely for that, batching reads into parallel calls; at most 8 reads, in at most 2 turns. Never stop at the hunk when the defect would show elsewhere. Do not rerun git diff (the diff is below); no other packets, no transcript, no web."

Verification

A round-3 replay with a control arm (the pre-#3621 reviewers in the same harness) is running to measure non-inferiority; /ship stays suspended for Captains until it passes.

Tests

New wording test failed first; review 460/0, ship 728/0, guards 68/0; docs regenerate clean (default and codex).

Open in Capy

Why

The GSTA-167 no-loss check asked whether #3621's packet reviewers still find what the old reviewers found, and a preregistered replay (crew drive handoffs/GSTA-167/noloss2-results.md) says they don't. Packet reviewers caught 11 of 30 recorded blockers, and 7 blockers that need context outside the diff hunks were caught by no arm. With this change, each reviewer checks a suspected defect against the code it depends on before it reports it or lets it go. Reviews run on gstack 1.91.326.0 up to this fix are not no-loss.

Blast radius

The rule is one string, READ_BUDGET in lib/review-prompts.ts, which every specialist, Red Team, adversarial, outside-voice and fix-check packet carries. The packet brief (packetBrief) feeds the generated review-army and adversarial sections through their resolvers. The coverage audit keeps its own budget at lib/review-packet.ts:284, which this PR does not touch. This /ship built its own review packets from this branch and confirmed the new rule in every packet by grep. test/review-packet.test.ts (42 pass) holds the packets, generated sections, Capy skill and policy to the same text.

Approvals

No approvals recorded for branch gsta-167-review-reads.

Summary

This is a hotfix for GSTA-167 / GST-134. #3621 limited packet reviewers to 2 extra line ranges, and the GSTA-167 replay showed that cost blockers. Reviewers now confirm or rule out each suspected defect from what it depends on outside the hunks, within a bound of at most 8 reads in 2 turns. The Capy reviewer paragraph and docs/review-policy.md say the same, and the CHANGELOG entry sits under [Unreleased] for the train's stamp.

Test Coverage

[+] lib/review-prompts.ts READ_BUDGET: [★★] testing/adversarial/batched/red-team/fix-check packets carry it; [★★★] audit packet excludes it and keeps its own budget; [★★★] clause content (8 reads, 2 turns, callers/callees/tests/contracts); [GAP] outside-voice packet not asserted. packetBrief: [★★★] Turns 2 and 3 wording + byte-equal to ship sections. [★★] .tmpl->generated test-coverage.md equality; [★★] Capy SKILL.md + review-policy.md wording; [★★] size-ledger entry via skill size guard. [→EVAL] reviewer behavior under the new read rule (no_claim; informational). COVERAGE 11/12 (92%) value 11/12 (92%). Proposed: extend a build test to assert P.READ_BUDGET in the outside-voice packet. Value: protects=outside-voice packet gets the read rule; fails_when=it is built without common()'s budget; why_new=no build test asserts it for outside-voice; seam=none; no_claim=a model follows the rule.

Tests: no new test files (the existing test/review-packet.test.ts is extended)
Coverage: 92% value-weighted (92% including 0 weakly covered paths)
Test value: 0 tests written, 0 rejected by the authoring gate, 0 existing tests extended in this /ship, 0 paths weakly covered.
Proposed test: extend a build test to assert P.READ_BUDGET in the outside-voice packet (protects: the outside-voice packet gets the read rule; fails_when: it is built without the shared budget).
Tests ran: remote_gate 19557

Pre-Landing Review

No blocking issues found. Pass 1 (light depth): one batched specialist (testing, maintainability, security, performance, state machines, red team) reported no findings. The adversarial pass reported 0 critical and 2 informational. The outside voice (openai/gpt-6.1-sol subagent, cross-family) reported no findings. All reviewers read this branch's packets, so they ran under the relaxed rule.
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=2 fixed=0 scope=frozen dispatches=1 est_input_tokens=13447
Gate edits: none detected (7 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: clean (openai/gpt-6.1-sol).

Review notes

  • lib/review-prompts.ts:77 (adversarial, informational): under --token-cap, gstack-ship-budget projects dispatch cost from per-role means recorded under the old 2-range rule, so a capped /ship can underestimate a reviewer batch until new means accumulate. Nothing breaks without a cap. A possible follow-up is to reset the per-role calibration when READ_BUDGET changes.
  • lib/review-prompts.ts:77 (adversarial, informational): "Use grep and the read tool freely" sits beside "at most 8 reads", and the rule doesn't say whether a grep counts as a read or bound the size of each read. Left as written because the round-3 replay's arm measures this exact wording. A later wording pass can say whether grep counts and bound each read.

Exploratory QA

Smoke: gstack-review-packet build from this checkout wrote the batched, adversarial, outside-voice and coverage-audit packets, and each carries the new rule ("at most 8 reads, in at most 2 turns"). The audit packet keeps its own budget. No browser surface.

Design Review

No frontend files changed, so design review was skipped.

Eval Results

Prompt text changed (the reviewer read rule). No paid eval ran in this /ship. The round-3 no-loss replay (control arm C against relaxed arm A') is the measurement for this change, and the merge train's paid gate runs at stamp.

Greptile Review

No Greptile comments.

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 checks were bound, so there was nothing to run.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. The docs already match the new reviewer read rule; no doc edits were needed.

Scope: branch gsta-167-review-reads at ec0010b against 9184ffd (1 commit, 9 files; nothing staged, unstaged or untracked). The change replaces the reviewer packet read budget (2 ranges around the hunks, one extra turn) with a read rule: confirm or rule out each suspected defect from callers, callees, covering tests and config/contracts, at most 8 reads in at most 2 turns. Audited the policy, the Capy skill paragraph, the authored and generated ship sections that carry the packet brief, and the docs that mention reviewer packets.

Documentation health:

  • docs/review-policy.md: current. The Reviewer packets section states the new read rule, the GSTA-167 reason, the audit exception and "at most four turns".
  • capy/skill/gstack/SKILL.md: current. The /ship reviewers paragraph says at most four turns, with up to two turns of at most 8 reads.
  • ship/sections/test-coverage.md.tmpl and ship/sections/test-coverage.md: current, carry the new brief.
  • ship/sections/review-army.md and ship/sections/adversarial.md: current, rendered from packetBrief through their resolvers.
  • docs/ship-budget.md, docs/troubleshooting.md, ship/sections/budget-handoff.md.tmpl, ship/sections/plan-completion.md.tmpl: current, with no read counts that depend on the change.
  • README.md, AGENTS.md, CONTRIBUTING.md, ARCHITECTURE.md: not affected.

Coverage debt: none new. READ_BUDGET and the packet brief have reference coverage (docs/review-policy.md, capy/skill/gstack/SKILL.md, ship sections) and explanation coverage (the GSTA-167 reason in docs/review-policy.md). They are internal reviewer contracts, so no how-to or tutorial is expected.

Diagram drift: none. No ARCHITECTURE or other diagram mentions reviewer packets.

Test plan

  • Remote pregate (gstack-pregate --stage tests --remote, Ubicloud, tree 3c0727ed595e at b134b51): 19557 tests, 0 failed, $0.06
  • bun run typecheck: 0 errors; bun run typecheck:test: no new diagnostics
  • bun run gen:skill-docs: fresh (no diff)
  • bun test test/parity-suite.test.ts: 2 pass; test/review-packet.test.ts: 42 pass; skill size guard and module-size ratchet: 8 pass
  • Local pregate stage 1 (regen, secrets, strays, literals, timing, guards): pass

🤖 Generated with gstack /ship on Capy

…lers, callees, tests, contracts; at most 8 reads in 2 turns (GSTA-167)

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

trunk-io Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits October 30, 2026 04:16
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>
@github-actions github-actions Bot changed the title fix(review): packet reviewers read callers, callees and tests beyond the hunks (GSTA-167 hotfix) v1.91.330.0 fix(review): packet reviewers read callers, callees and tests beyond the hunks (GSTA-167 hotfix) Oct 30, 2026
@capy-ai
capy-ai Bot merged commit ce3a093 into main Oct 30, 2026
62 checks passed
capy-ai Bot added a commit that referenced this pull request Oct 30, 2026
…s round 3) (#3638)

* revert(review): restore pre-#3621 reviewer briefs (GSTA-167 no-loss round 3)

Reverts the reviewer-packet parts of 5358a3b (#3621, v1.91.326.0) and
ce3a093 (#3636, v1.91.330.0). No-loss round 3
(handoffs/GSTA-167/noloss3-results.md) found the packet reviewers caught 10 of
the 19 blockers the dcd62c3 reviewers find.

Every non-stamp file is back to dcd62c3's bytes; the later main commits
959c8a6, 9184ffd and de53aef touch none of these files and are kept. Stamp
files (VERSION, package.json, agents-digest) stay at main; CHANGELOG gains an
[Unreleased] entry.

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

* test: keep the reverted reviewer-packet files gone and unreferenced (GSTA-167)

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

* docs(changelog): name the reviewer-packet guard test

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

* fix: pre-landing review fixes

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

* chore: stamp 1.91.331.0

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>
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