Repository navigation
Conversation
…ST-3183) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
…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>
Contributor
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 now runs its checks, saves the exact text to a private file and prints a
HOST_PUBLISH:line, so the agent publishes it with Capy's own PR tool.Nothing changes outside Capy (
GSTACK_CAPYunset).Why
During an unattended /ship on garrytan/gbrain-evals#523 (gstack 1.101.0.0),
gstack-ship-receipt stubrecorded its review rounds by runninggh 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.What changed
lib/host-publish.ts(new):hostPublishes()is true underGSTACK_CAPY=1;handOff()writes each part to<state root>/publish/<op>-<target>.<part>.md(mode 0600) and returns oneHOST_PUBLISH:line naming the files and the host tool to use.gh pr edit(details in Agent notes).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 instead of calling gh. 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".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.Agent notes
Agent notes
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.Tests.
test/capy-host-publish.test.tsputs a recordingghshim on PATH and asserts zero write calls underGSTACK_CAPY=1for receiptstub,stop,claim,carryand all sevengstack-postwrite ops, plus a negative control showing the shim recordsgh pr commentwhenGSTACK_CAPYis unset. On main (12bd33b) the stub, stop/claim, carry and gstack-post cases fail with recordedpr edit/POSTED:writes.gh write inventory (/ship, review and ship-queue paths)
Fixed here (can run under GSTACK_CAPY=1):
postBody(gh pr edit), used bystub(:1165),stop(:1123),claim(:1142) andcarry(:976, 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 :677-678 (gh api --method=PATCHfallback); hand-off at :840. Reached from /ship Step 5 (early draft PR), Step 6.5 (Greptile draft and trigger comment, lib/greptile-early.ts:198/208), 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 the brief keeps 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.Size ledger: test/size-ledger/ship/capy-ship-writes-through-host-pr-tool.json (+251 bytes, the two prose lines).