Skip to content

Tell /ship review readers never to kill processes they didn't start (GST-3360) - #4607

Merged
capy-ai[bot] merged 2 commits into
mainfrom
review-readers-never-kill-other-processes
Nov 21, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
review-readers-never-kill-other-processes

Conversation

@garrytan

@garrytan garrytan commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

/ship's review readers are now told, in every brief, never to stop or signal a process they didn't start: no pkill, killall or kill by name.
Why: a reader on a machine shared by several /ship runs ran pkill -x sleep and ended other runs' processes.
Nothing to do: the rule rides in the workspace paragraph that closes every dispatched brief.

What changed
  • lib/review-brief.ts: a PROCESS_RULE sentence inside the workspace paragraph. Both review-pass dispatch sites call withWorkspace, so every blocking and audit brief now carries it.
  • test/review-brief-process-rule.test.ts: fails on main, passes here.
  • docs/review-policy.md: the reader-brief contract now mentions the rule.
  • A changelog.d fragment.
Why

A reader on a shared machine ran pkill -x sleep and ended processes that other review runs had started. Readers dispatched on Capy run no Claude Code hooks, so the brief is where the rule can hold today.

Blast radius

Only the text of dispatched reader briefs changes. Brief hashes are computed after rendering and checked against the file on disk, so briefs already in flight stay valid (read in bin/gstack-review-dispatch). The full free suite passed in CI run 44897535257 at this head.

Pre-Landing Review

No issues found at the blocking floor. A second reader raised four low notes, listed below and not fixed here.

Review notes

Below the blocking floor; recorded here and not fixed in this PR.

  • lib/review-brief.ts:229: the rule is an instruction only. No hook or sandbox enforces it, so a reader that ignores its brief could still run pkill.
  • lib/review-brief.ts:229: a team rule asks for a no-loss replay before reviewer-prompt changes merge. Whether it applies to this process-safety sentence is the owner's call.
  • lib/review-pass.ts:213: reader prompts built outside withWorkspace, such as outside-voice runs from skill templates, don't get the rule.
  • test/review-brief-process-rule.test.ts:8: the test's regex pins the rule's exact wording.
Documentation

Status: updated — one factual line added to the reader-brief contract.

Scope: base baef51f..25ddb23 (1 commit, 3 files: lib/review-brief.ts, test/review-brief-process-rule.test.ts, changelog.d/review-readers-never-kill-other-processes.md); no staged, unstaged or new files. Searched top-level docs and docs/ for the brief's workspace paragraph contract.

Documentation health:

  • docs/review-policy.md — Updated: verbatim-dispatch item 7 now says the workspace paragraph tells readers never to stop or signal a process they did not start (PROCESS_RULE, GST-3360).
  • changelog.d/review-readers-never-kill-other-processes.md — Current: matches the code.
  • README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md, ARCHITECTURE.md — Current: no reference to the brief's paragraph text.

Coverage debt: PROCESS_RULE (new export) now has reference coverage in docs/review-policy.md; it is internal, so no how-to or tutorial is needed.

Diagram drift: none; no diagram names the touched module.

Tests
  • Targeted: 8 files (test/review-brief-process-rule.test.ts plus the review-brief consumers): 171 tests passed
  • Full free suite: CI run 44897535257 at 9561be0, 1730 files, green
  • Failing-first: test/review-brief-process-rule.test.ts fails on a worktree at origin/main (0 pass, 1 fail)
Agent notes

Refs GST-3360, HARN-120. Relayed from HARN-1 (2026-11-21).

Approvals

No approvals recorded for branch review-readers-never-kill-other-processes.
Plan: exempt: bug fix (--kind fix); failing-first test test/review-brief-process-rule.test.ts fails on main, passes at head
Plan check: exempt bug fix

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=4 fixed=0 scope=frozen dispatches=1
Gate edits: none detected (1 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Evals: the selector picked 110 paid behavioral probes through lib/review-brief.ts dependents; none were run (no paid runs on this PR).

{
  "schema_version": 1,
  "pr": 4607,
  "head": "9561be0a0a56436bc07c0fab5792a7873f581457",
  "version": "1.102.1.0",
  "base": "main",
  "gate": {
    "targeted": {
      "pass": 171,
      "fail": 0,
      "skip": 0
    },
    "full": {
      "pass": 1730,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "full",
      "run": 44897535257,
      "attempt": 1,
      "tree": "c84c372333d152d50ccf62a1054589b93ed3f86b"
    }
  ],
  "calls": 27,
  "session_kind": "unattended",
  "run": "ship-4607-20261121a",
  "head_tree": "c84c372333d152d50ccf62a1054589b93ed3f86b",
  "product_patch_id": "73ab5c4d458234809b3b769333229087e4d20a5c",
  "gstack_version": "1.102.1.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 11,
    "rules": "85b3923b1a978e41",
    "base": "baef51fe0ec9b0f4e7103c874d94eb2c304d7100",
    "registry": "baef51fe0ec9b0f4e7103c874d94eb2c304d7100",
    "gate_scan": {
      "tagged": 0,
      "head": "9561be0a0a56436bc07c0fab5792a7873f581457"
    },
    "reasons": [
      "runtime=11"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @c84c372333d1 (8 checks, current for 9561be0a0a56)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44897535257/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=c84c372333d1 tests=38666 skipped=88 runs=44897535257/1 profiles=ci-reuse/free-tests heads=9561be0a0a56 verified=2026-11-21T11:14:18.140Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md, ARCHITECTURE.md"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 4,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "dispatches": {
      "specialist": 1
    }
  },
  "gate_dispositions": []
}

Open in Capy

…GST-3360)

Every dispatched brief's workspace paragraph now says other runs share the machine: no pkill, killall, kill by name or pattern, and no kill of a process the reader's own command did not start. A red-team reader had run pkill -x sleep on a shared machine (HARN-120).

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

trunk-io Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

…y didn't start (GST-3360)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit cbe37f2 into main Nov 21, 2026
75 checks passed
@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