Skip to content

captain docs: the lane sleeps while /ship runs; READY duty owners (GST-1573) - #4055

Merged
capy-ai[bot] merged 3 commits into
mainfrom
capy/gst-1573-lane-sleeps-during-ship
Nov 6, 2026
Merged

capy-ai[bot] merged 3 commits into
mainfrom
capy/gst-1573-lane-sleeps-during-ship

Conversation

@garrytan

@garrytan garrytan commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 4055,
  "head": "b19fc0917de01ac2cabced90d342134ba96381f1",
  "version": "1.96.0.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1601,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 42170325004,
      "attempt": 1,
      "tree": "dda86f6e4afb68e4be895be6eeea57febd860e6b"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "dda86f6e4afb68e4be895be6eeea57febd860e6b",
  "product_patch_id": "2c2ff30ce1e052969829dfc6b9a305147708a9b9",
  "gstack_version": "1.96.0.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 42,
    "rules": "70895942bb8a8ee2",
    "base": "8d712d63ddb883379c371f9c0752854eba97eeb0",
    "registry": "8d712d63ddb883379c371f9c0752854eba97eeb0",
    "gate_scan": {
      "tagged": 0,
      "head": "b19fc0917de01ac2cabced90d342134ba96381f1"
    },
    "reasons": [
      "runtime=42"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "pass @dda86f6e4afb (7 checks, current for b19fc0917de0)",
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "AGENTS.md, CLAUDE.md, CONTRIBUTING.md, README.md, docs/, captain/templates/, capy/skill/gstack/ (159 docs; 4 changed files)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 2,
    "deferred": 0,
    "noted": 4,
    "fixed": 1,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 3,
    "unrecorded": 1,
    "ledgers_read": 4,
    "dispatches": {
      "specialist": 1,
      "red-team": 1
    }
  }
}

What changed

The Capy skill's /ship-subagent bullet now says the lane sleeps while /ship runs, then subscribes, reads the PR once, stops the subagent and runs ready itself

The Capy skill's /ship-subagent bullet now says the lane sleeps while /ship runs, then subscribes, reads the PR once, stops the subagent and runs ready itself.

Before/after as text: The Capy skill's /ship-subagent bullet now says the lane sleeps while /ship runs, then subscribes, reads the PR once, stops the subagent and runs ready itself
--- Before · capy/skill/gstack/SKILL.md § Plan, approve, ship at 8d712d6 · source text
+++ After · capy/skill/gstack/SKILL.md § Plan, approve, ship on this branch · source text
@@ ⋯ 3 unchanged ⋯ @@
 - **Plan first.** Run `/autoplan` on new functionality right after the install check. The lean run (the Capy default) is one reviewer over plan and draft code; `--full` adds every phase.
 - **ELI5, then the word.** Send the plan and gate to the person, or the Captain, in plain language: `gstack-owner-brief render --captain --out <run dir> --captain-name "<Captain name>"`, its choices as lettered lines in the ask format (`docs/captain.md`) and "do it" taking every recommendation at full scope. Build only after their word is answered into the run and it reports `APPROVED`; then `gstack-approvals import --autoplan <run dir> --by "<owner>"`.
 - **/ship before ready.** Run /ship at the final pushed head before a PR is called ready; `SHIP_RECEIPT: pr=<n> head=<head>` must name that head, and a later push needs a new /ship. The review inside /ship, like the autoplan, is sized to the change.
+- **Sleep while /ship runs, then stop it.** After dispatching /ship the parent ends its turn with no PR watch until /ship completes (a re-READY drops a held watch first). On that wake it subscribes to the PR (renewed on expiry, cancelled at merge or close), reads its checks and comments once, stops the subagent, runs `gstack-ship-queue ready` and owns the PR thereafter: slot stamp, re-READY, receipt carry (`docs/captain.md`, the lane's /ship sequence). A stopped /ship subagent woken by a check, review or merge notice, not its parent, reports what woke it, its pin and the PR head (`gh pr view <n> --json headRefOid --jq .headRefOid`) in one line and ends the turn without acting, even if the head moved. A message from its parent is an instruction it carries out.
-- **Stop a finished /ship subagent.** When a /ship subagent opens its PR, the parent subscribes to that PR with Capy's subscribe tool and keeps that one subscription until the PR merges or closes, re-subscribing if the watch expires, then cancels it. Once the subscription is in place and READY arrives, the parent stops the subagent and owns the PR from then on, slot stamp, re-READY and receipt carry included. A stopped /ship subagent woken by a check, review or merge notice, not by its parent, reports one line naming what woke it, its pin and the PR head (`gh pr view <n> --json headRefOid --jq .headRefOid`) and ends the turn without acting, whether or not the head moved. A message from its parent is an instruction it carries out.
 - **No merge without the owner's word.** A thread never merges on its own; under a Captain the controller merges on a recorded standing approval, and a thread with no Captain asks the person.
 
 Exempt from the plan step: read-only work, the daily flaky pass's repairs, slot stamps, CHANGELOG-only resolves, cap re-pins under a written grant, S1 emergencies (a broken install or upgrade, a red main, a security bug) and fixes from an already-diagnosed, audited problem list. Other bug fixes skip plan review (`--kind fix`, R65) but carry a repro on current main or a failing test written first; features get the lean run (`--kind feature`).

The same sequence is written out in docs/captain.md (the lane's /ship sequence, with a table naming who owns each READY duty) and in step 3 of captain/templates/brief.md.

Why

A lane stayed awake beside its /ship subagent, and no doc said whether /ship or the lane owned each READY step, so train build refused pins with QUEUE_NOT_READY for a step nobody ran (seen twice on 2026-10-28). Now the lane dispatches /ship and goes to sleep. It wakes once when /ship completes, catches up on the PR's checks and comments, and runs gstack-ship-queue ready itself. Every READY duty has one named owner.

Blast radius

This is prose only: two docs, one template and the Capy skill. No code, gate or test changed. The one thing a reader can trip on is the context budget for the Capy skill. CI showed the first version of the bullet over its ceiling (Free Tests run 42169300422, 5372 > 5315 tokens). The trimmed bullet passes test/context-budget-ratchet.test.ts locally and in Free Tests run 42170325004 at b19fc09 (script ran).

Approvals

No approvals recorded for branch capy/gst-1573-lane-sleeps-during-ship.

Summary

A lane used to stay awake while its /ship subagent ran, with no written split of the READY steps between them. Now it sleeps through /ship, does one catch-up read and owns ready, the decision-trail audit and the Attention section. /ship owns the receipt and the pregate record. A SHIP_PAUSED: base-red completion takes step 8 instead, and the docs say what to do with it. The tradeoff: a red check that lands while /ship runs waits for /ship to finish instead of being fixed in parallel.

Test Coverage

No application code paths changed: the diff is docs and prose only (captain/templates/brief.md, capy/skill/gstack/SKILL.md, docs/captain.md, one changelog.d fragment). No test asserts the removed wording.
Tests: 1726 → 1726 (+0)
Tests ran: free 1601 (files, carried from Free Tests run 42170325004/1 at tree dda86f6e4afb)

Pre-Landing Review

Pass 1 (batched specialist: testing, security, state-machines, red-team; plus the Step 7 coverage audit) found two informational notes. CI then failed test/context-budget-ratchet.test.ts on the Capy skill bullet (CRITICAL, core). It was fixed in b19fc09 by tightening the bullet without dropping a duty. Pass 2 was a scoped pass: red-team found nothing, the fix-check found two informational notes, the native adversarial reader found four non-blocking notes, and the outside voice (openai/gpt-6.1-sol) found no findings and recommended approval.

  • [AUTO-FIXED] capy/skill/gstack/SKILL.md:58 — the bullet grew the skill past the eagerPerInvocation.capy/skill/gstack ceiling (5372 > 5315 tokens). The bullet was reworded under the ceiling and the fixture was left alone (b19fc09).

Noted, below the blocking floor (not looped, per the crew's floor rule):

REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=4 fixed=1 scope=frozen unrecorded=1 ledgers_read=4 fix_checks=1 dispatches=2

Gate edits: none detected (GATE_SCAN tagged=0 at b19fc09)

Outside review: openai/gpt-6.1-sol (host subagent), completed, no findings: "approve because the deferred PR-watch handoff preserves fail-closed READY admission".

Review notes

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

  • INFORMATIONAL docs/captain.md:327 A non-READY /ship completion (SHIP_PAUSED: base-red, budget STOP, failure) leaves the PR unwatched; brief.md and the Capy skill bullet do not mention base-red.
  • INFORMATIONAL docs/captain.md:280 Step-ownership header ('steps 3 to 8 run inside /ship') contradicts step 8's lane-owned base-red wait and resume.
  • INFORMATIONAL docs/captain.md:321 Fresh-machine fallback (copy pregate.json) may not carry remote clearances held in the /ship machine's state root; unverified.
  • INFORMATIONAL docs/captain.md:331 Accepted tradeoff: notices during a re-READY /ship go unread until the completion wake's single read; documented.

Exploratory QA

Not applicable: no runtime surface changed.

Design Review

No frontend files changed — design review skipped.

Eval Results

No prompt-related files changed — evals skipped.

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.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. The lane-sleeps-during-/ship docs change is consistent across every affected doc, so no edits were needed.

Scope: committed diff 8d712d6..b19fc09 (4 files, all docs); nothing staged, unstaged or untracked. Repo-wide searches for the retired 'stop a finished /ship subagent' and 'subscribe as soon as the subagent opens the PR' wording found no stale copies. capy/skill/gstack/captain.md, runaway-stopper and docs/skills.md agree with the new sequence.

Documentation health:

  • docs/captain.md: current (the lane's /ship sequence and the new READY duty owner table)
  • captain/templates/brief.md: current (step 3 matches captain.md)
  • capy/skill/gstack/SKILL.md: current ('Sleep while /ship runs, then stop it' matches captain.md)
  • changelog.d/capy-gst-1573-lane-sleeps-during-ship.md: current (matches the diff; left to the parent)

Coverage debt: none. The change is process prose with no new commands, flags or code. Diagram drift: none, because no changed doc has a diagram.

Test plan

  • bun run test (free lane): carried from Free Tests run 42170325004/1 at tree dda86f6e4afb, 1601 files.
  • gstack-pregate --allow-repo-commands: PREGATE pass tree=dda86f6e4afb head=b19fc0917de0 checks=7.
  • Focused: context-budget-ratchet, captain-skill, capy-skill-wrapper, launch-env-echo-ratchet, ship-driver, gstack-capy-install, skill-md-size-guard: 144 pass, 0 fail.

🤖 Generated with Claude Code

Open in Capy

…T-1573)

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

trunk-io Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits November 6, 2026 05:35
…te, base-red and catch-up read (GST-1573)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Trim the Capy skill's 'Sleep while /ship runs' bullet back under the eagerPerInvocation.capy/skill/gstack context-budget ceiling (5372 > 5315 tok failed test/context-budget-ratchet.test.ts in Free Tests run 42169300422).

Review-Finding: capy/skill/gstack/SKILL.md:58:testing reader=core
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 45c849c into main Nov 6, 2026
43 checks passed
capy-ai Bot added a commit that referenced this pull request Nov 6, 2026
…628) (#4075)

* review collect: a rating verb denies a severity like "is" does (GST-1628)

A reader closing sentence such as "None of these rises to CRITICAL." (gstack-evals#247) or "Nothing reaches the CRITICAL floor." (#4055) collected as CRITICAL because the denial grammar only knew copulas. Rating verbs now deny in closingSummary and summaryCandidate; a regression corpus of 12 captured reader outputs pins 16 real CRITICALs and both phantoms.

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

* fix: pre-landing review fixes

A rating verb no longer denies a severity it takes as its object ("Neither fix clears the P0."): "the <label>" rates only with a floor noun after it, and clear is no rating verb. The floor nouns apply only after a rating verb and end at a word boundary, so "no CRITICAL barrier" keeps its label and the pre-GST-1628 denial branch is unchanged.

Review-Finding: v1/adversarial-native#1 reader=adversarial-native
Review-Finding: v1/outside-voice#1 reader=outside-voice
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