Repository navigation
On Capy, /ship hands its pull request edits and comments to Capy's PR tool, always naming the right repository (GST-3183) - #4518
Merged
Conversation
…ST-3183) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…se branch and draft state Review-Finding: p1/specialist-batched#1 reader=specialist-batched Review-Finding: p1/specialist-batched#3 reader=specialist-batched Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…never lands in another's file Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s to, so one repo's PR body never lands on another's gstack-ship-receipt stub, stop, claim and carry now read the repository with gh repo view when --repo is not passed and put repo= (and host= off github.com) on every HOST_PUBLISH line; when it cannot be resolved they refuse and hand nothing off. gstack-post adds host= and the current branch as a new PR's head. handOff refuses a hand-off without a repository. GST-3183 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…eading as a refused secret gstack-post now exits 3 with a message, and gstack-ship-receipt reports the write as failed, when the private hand-off file for the host's PR tool cannot be written. Before, the error escaped as exit 1, which callers read as a HIGH finding refused. Adds tests for that path, for pr-create on a detached HEAD, and for gstack-greptile-early open when gstack-post hands the draft off. Review-Finding: p1/red-team#6 reader=red-team Review-Finding: p1/specialist-batched#1 reader=testing Review-Finding: p1/specialist-batched#2 reader=testing Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…o a fork checkout's hand-off reaches the upstream PR On GitHub the hand-off's repo= and host= now come from gh repo view --json nameWithOwner,url, which follows gh repo set-default and GH_REPO like the gh write it replaces, instead of the origin remote. When gh cannot resolve the repository gstack-post refuses with exit 3 and hands nothing off. GST-3183 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 tasks done
capy-ai Bot
added a commit
that referenced
this pull request
Nov 19, 2026
… reading reviewers' scope lists as findings (GST-3201) (#4527) Pre-commit /verify now fails a check that times out and runs its checks on one time budget; a reviewer's scope-list bullets no longer need an owner ruling to clear; stack tests fail when git can't list a PR's tests. Why: each let a result read clean with nothing proving it, or block on nothing (#4518, #4519). Goal: gates never pass on missing evidence. Nothing to do; `gstack-checks quick --timeout` is now one budget the checks share (540 s default). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/outside-voice#1 reader=outside-voice Review-Finding: p1/outside-voice#2 reader=outside-voice
Merged
capy-ai Bot
added a commit
that referenced
this pull request
Nov 19, 2026
- `gstack-artifact validate` no longer passes a run.json that gstack-autoplan never wrote. (#4494) - /ship's changed-number check no longer stops on tests that only share a word with the change (#4478). (#4496) - On Capy, /ship no longer edits or comments on pull requests as you. (#4518) - The destructive-command check stops asking about scratch deletes and catches the real damage it used to miss. (#4513) - The destructive-command check reads commands more carefully, closing gaps found after the last release. (#4525) - The Codex readiness check and the second-model review now pick the same model for a custom Codex provider (GST-3089). (#4491) - gstack's Codex hooks work when your Codex folder's path has a `(`, `&` or other shell character in it. (#4528) - Uninstalling gstack keeps your own Codex hooks trusted. (#4528) - Codex hook setup matches Codex more closely. (#4528) - On Windows, setup copies the Claude Code hook code that gstack's Codex hooks import (#4528) - /review's checklist on Codex reads shell commands more carefully. (#4528) - On Codex, gstack now suggests the right skill for a prompt and stops destructive commands before they run. (#4512) - On Codex, /review is now held once when it tries to finish without its adversarial pass or its report, as it already is on Claude Code. (#4522) - On Codex, gstack's skill suggestion now names the skill the way Codex lists it. (#4523) - On Codex, gstack's suggested prompts and docs now name skills the way Codex lists them. (#4524) - /review on Codex with gpt-6.1-sol is no longer held back for a second-model pass it already ran. (#4526) - On Codex, office-hours, plan-design-review and gstack-upgrade work again when you name them. (#4510) - gstack knows when Codex is running unattended. (#4510) - Codex reviewers start with a clean context. (#4510) - Docs no longer say Codex has no hook support. (#4510) - A command whose output was cut off no longer counts as a finished read. (#4492) - A folder marked as published data can no longer hide source code or agent files from /ship's review. (#4516) - Correction to the on-by-default helper hooks entry: the hook still routes only to /review, /qa and /verify, so skills you've installed yourself aren't suggested yet. With gstack's skills it routes 14 of 60 real bug reports (was 17), and long prompts are no longer skipped. (#4505) - /sync-gbrain's read check now works when the first page in your code source is over 64 KB. (#4497) - Free-suite CI no longer fails before any test runs when Ubuntu's package mirror is slow. (#4530) - Syncing a second repo no longer makes the first one ask for /sync-gbrain again. (#4532) - gstack's helper hooks are now on by default in Claude Code, OpenClaw and Hermes, and the prompt-routing hook fires on real bug reports. (#4503) - `gstack-pregate clear --receipt` accepts a remote gate run from before a merged release when the release only regenerated a declared release output. (#4483) - The second-model review now keeps the reviewer's own result, and reports a used-up budget as a budget stop. (#4515) - When the reviewer wrote its review to the result file it was asked for, Codex then replaced that file with its short closing message ("Done, I wrote the review"), so the review was thrown away and reported as missing its markers. (#4515) - When the provider refuses the call with HTTP 402 Payment Required (usually a metering proxy that hit its allowance, or an account out of credits or quota), gstack used to record only "exit 1". (#4515) - The pre-commit /verify check now fails a check that times out, and its checks share one time budget (GST-3201). (#4527) - /ship's review collector no longer reads a reviewer's own scope list or list of passed checks as findings (GST-3201). (#4527) - Merge-queue stack tests fail when git cannot list a PR's added test files (GST-3201). (#4527) - /ship can now review results PRs that publish raw session data. (#4511) - /ship's review pass works when the checkout you ship isn't the project's default checkout. (#4507) - A second review round no longer reports done when nothing was reviewed. (#4520) - The prompt-routing hook now suggests skills you install yourself, and no longer sends ordinary bug reports to /qa (GST-3123). (#4506) - gstack's script runner and merge-queue checks now also refuse cut-off output. (#4502) - A failed second-model review reports the cause that actually stopped it, and the runner never deletes its own prompt. (#4519) - `gstack-ship-queue ready` now fills in the trial merges and the second-model trail read instead of printing lines to fill. (#4529) - Five small ship-tool fixes. (#4529) - A ruling the owner gives while a `/ship` run is open can be relayed. (#4529) - /ship no longer kills a working test run as stalled when the test command starts its workers in their own session. (#4533) - /ship no longer stops a review because the state-machine reader started its reply the way its instructions say. (#4504) - When Claude Code runs /verify right before a commit, it now gets a quick check instead of the full fix loop (GST-3150). (#4508) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Capy, /ship's PR body edits, comments and new PRs no longer go out through
ghunder the machine owner's GitHub account.Each write runs its checks, saves the exact text to a private file and prints a
HOST_PUBLISH:line that names the repository (and host, off github.com) it belongs to, so Capy's PR tool sends it to the same placeghwould have.Nothing changes outside Capy (
GSTACK_CAPYunset).Why
During an unattended /ship on garrytan/gbrain-evals#523 (gstack 1.101.0.0), the command that records /ship's review rounds in the PR body ran
gh pr edit, so another system's PR body was edited as garrytan even though the brief said to publish only through the PR tool. The rule is that GitHub writes from Capy go only through Capy's PR tools.A first version (#4517) handed the writes off but left the repository out when
--repowasn't passed, and /ship's own Step 9 call never passes it. Capy's PR tool would then fall back to the thread's main repository, so in a thread with several repositories or a fork, one PR's body could replace another repository's.What changed
lib/host-publish.ts(new):hostPublishes()is true underGSTACK_CAPY=1.handOff()writes each part to its own private folder<state root>/publish/<op>-<target>-<random>/<part>.md(folder 0700, file 0600) and returns oneHOST_PUBLISH:line naming the files, the destination and the host tool to use. It refuses a hand-off without an owner/name repository, so no caller can print a partial line.gh pr edit. They read the destination withgh repo view [--repo] --json nameWithOwner,url, the same resolutiongh pr edituses, and putrepo=(andhost=when it isn't github.com) on the line. When that read fails they refuse and hand nothing off.gstack-post: every write op (pr-body,pr-title,pr-comment,issue-comment,reply,pr-create,issue-create) runs its plain-title, plain-body, security and secret checks as before, then hands off with the repository and host gh would have written to (read withgh repo view, so a fork checkout's upstream is honoured), a reply's comment id, and a new PR's base, head (the current branch when--headis missing, asgh pr createwould infer) and draft state. A HIGH finding still refuses with no file written.gstack-greptile-early opensays the draft went to the host tool instead of "did not print the new PR URL".repo=the line names;docs/troubleshooting.md#host-publishexplains the line.Blast radius
Only runs with
GSTACK_CAPY=1change; the--body <file>paths and every non-Capy path are byte-identical (the existing round-recording and gstack-post suites pass unchanged). Reads through gh (pr view,repo view,apiGETs) are unchanged, plus onegh repo viewread per round-recording hand-off.Documentation
Status: current. Read-only audit of base f13dbb0..c6fc158 (6 commits, 15 files, clean working tree) found every changed doc accurate; nothing needed editing.
Scope: the Capy host-publish hand-off (GST-3183). It covers
lib/host-publish.ts,gstack-post,gstack-ship-receiptstub/stop/claim/carry, the greptile-early hand-off exit, the shipcapy-prandpr-bodysections and their templates, the newdocs/troubleshooting.md#host-publishentry and the changelog fragment. Related docs read:docs/capy-install.md,docs/designs/GSTACK_ON_CAPY.md,docs/ship-policy.md,docs/writing-prs.md.Documentation health
docs/troubleshooting.md: current. The host-publish entry matches the HOST_PUBLISH line format, the folder layout and file modes, how the repo and host are resolved, and the refusal when the repo can't be resolved.ship/sections/capy-pr.md(.tmpl): current.ship/sections/pr-body.md(.tmpl): current.changelog.d/capy-ship-writes-through-host-pr-tool.md: current (reviewed only).docs/capy-install.md,docs/designs/GSTACK_ON_CAPY.md,docs/ship-policy.md,docs/writing-prs.md: current. Nothing in them contradicts the change.Coverage debt
HOST_PUBLISH:hand-off: has reference and how-to coverage (troubleshooting), plus mentions in the ship section. It isn't mentioned in the Capy install or design docs, which is a common gap.gstack-greptile-earlyexit 3 on a hand-off: covered only by its error text, which is a common gap./document-generatecan fill these later.Diagram drift: none.
Agent notes
Agent notes
Open notes (GStack Minder's rulings: ship as disclosed notes, no third fix round; both fixes lead the follow-up batch).
gstack-poston Capy names the bare local branch ashead=(lib/gstack-post.ts:845), whilegh pr createwould have pushed to the fork and sentowner:branch, so the hand-off can name an upstream branch that doesn't exist or is the wrong one. Raised as blocking by the second-model reader at c6fc158. Fix: resolve the head's owner and sendowner:branch(or refuse without--head owner:branch) when the head repo differs fromrepo=.GH_REPOset to another repository,gh repo view(no argument) still answers the checkout's repository whilegh pr view/gh pr editfollowGH_REPO(checked against gh 2.103.3), so both hand-off paths can name a differentrepo=than the write they replace. Found by the second-family decision-trail read. Fix: passGH_REPO(or--repo) togh repo viewinpostBodyandgstack-post, with a test that setsGH_REPO.test/capy-host-publish.test.ts:0:scope-list-line); GStack Minder ruled it not a finding. Fix: the review-dispatch collector should not parse scope-list bullets as findings.Ruled note: lib/gstack-post.ts:845:fork-head at c6fc158 ruled by Captain GStack Minder (GSTA-36) at 2026-11-19T11:00:03.322Z: fork pr-create via gstack-post names the bare local branch as head=; Capy crews open PRs with their own tool; owner-prefixed head fix leads the follow-up batch (approval a-f69330b78aa2)
Ruled note: test/capy-host-publish.test.ts:0:scope-list-line at c6fc158 ruled by Captain GStack Minder (GSTA-36) at 2026-11-19T11:25:02.296Z: parser misread of the native reader's scope notes ('- a HIGH finding still refused;'), not a finding; the collector bug goes to review-dispatch's owner (approval a-4e6d4d77dff4)
Plan: exempt: bug fix (R65)
Lessons.
Tests.
test/capy-host-publish.test.tsputs a recordingghshim on PATH and parses eachHOST_PUBLISH:line into its destination fields, asserting the whole destination object for receiptstub(with and without--repo),stop,claim,carry(on a GitHub Enterprise host) and all sevengstack-postwrite ops, plus: a two-repository fixture where the main repository differs from the PR's, a fork checkout where gh resolves the upstream repository and origin is the fork, a GitHub Enterprise host onstubandgstack-post, a new PR's inferred head, a refusal when the repository can't be resolved, a refusal in both commands when the repository can't be resolved, and a negative control showing the shim recordsgh pr commentwhenGSTACK_CAPYis unset. At #4517's head content (a3f4de0, carried here as e7c2ef1) 7 of 10 cases fail; at the fix all 10 pass.Round-recording commands.
gstack-ship-receiptstub,stop,claimandcarrywith--prshare onepostBody, which hands off on Capy.claimcan't read its marker back before the host publishes, so on Capy it trusts its own write; a double claim is still caught by the nexthistoryread.Fork fix. /ship's second-model reader found that gstack-post took
repo=from origin while gh's write followsgh repo set-defaultandGH_REPO; c6fc158 resolves it throughgh repo view(its two new tests fail at d8fe752).Carried from #4517. Commits 6e93604, e436151 and a3f4de0 are cherry-picked onto main f13dbb0 unchanged (9b96a63, 6b58851, e7c2ef1); 0fa1f3b adds the destination fix.
gh write inventory (/ship, review and ship-queue paths)
Fixed here (can run under GSTACK_CAPY=1):
postBody(gh pr edit), used bystub,stop,claimandcarry(which had its owngh pr edit)gh pr comment,gh issue comment,gh api --method=POSTreply,gh pr edittitle/body,gh pr create,gh issue create) and thegh api --method=PATCHfallback. Reached from /ship Step 5 (early draft PR), Step 6.5 (Greptile draft and trigger comment, lib/greptile-early.ts), Step 19 (body and title) and the stop comment.gh pr ready(prose): now names the host's PR tool on Capy.Left as is, with reason:
pr comment) and :579 (pr close), crew/lib/ship-queue-train-land.ts:226 (pr edit --add-label), lib/ship-queue-land.ts:309 (pr createfor a drift repair): all run insidegstack-ship-queue land/ wave and train landing, the merge action kept out of scope (and gstack itself ismerge: direct, so the wave and train paths don't run here). Worth a follow-up if a Capy Captain lands a wave or train repo.pr merge): the land merge, out of scope.gh workflow run): CI dispatches that post no text, and Capy has no tool for them.pr createfor the release PR): release path, not /ship.gh issue create, prose): only on the interactive "assign a GitHub issue" answer in a collaborative repo; Capy has no GitHub issue tool, and editing the shared preamble regenerates every skill.Known unrelated failure. #4517's free-suite (10) at 6e93604 (job 135468206031) was test/first-use.test.ts:152: lib/first-use.ts:116 lists user drive folders in
readdirSyncorder, which is filesystem-dependent, and the test expects alphabetical order. It passes locally and isn't touched here.Size ledger: test/size-ledger/ship/capy-ship-writes-through-host-pr-tool.json (+276 bytes, the prose lines).