Found in review of #31: a Worker's first session on acp in a new seat starts outside its repository #63
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/gascitypacks!63
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/gascitypacks-7ws"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Part 2 of
mol-worker-workhas a new step 5: after the Worker is on the bead's branch, it readsAGENTS.mdandCLAUDE.mdat the worktree's root, whichever exist, and follows them. Project setup becomes step 6.Why
gc's ACP runtime runs no
pre_start, so a seat's first session starts in the plain directory gc made under the city's checkout, before Part 2 makes the worktree. Claude Code reads its start-time context there, not the rig's. Later sessions of the seat start in the worktree and are fine. Nothing carries anAGENTS.mdorCLAUDE.mdyet, so nothing was missed, but it would be from the day a rig adds one.Scope
This is the bead's second way out. The first, making the worktree before the session starts from the acp provider's
acp_command, is the city'scity.toml(gascity-root), not this repository. It would also cover the rig's.claude/settings, which the new step cannot: they are read at session start only. The README says so. If the user wants that too, it is a bead for the city.Size
The step text was within about 100 characters of the 28000 that
tests/formula.shallows agc bd showof it, so three sentences of Part 2 that only explained are shortened or cut (the GNU check's "passes silently" line, the halt's "who takes it from there", the reason for the Rex label). No instruction is removed. It now stands at about 27960.Checks
tests/formula.shpasses, run underenv -i: this checkout predates thegc --citypin in the test, so in a Worker's env gc compiles the city's cached roles pack and not the checkout's. New assertions: Part 2 names both files, after the branch checkout and before project setup.gc lint .passes; the changelog checker finds nothing; the note is the fragment.changelog/worker-reads-repo-instructions.md.Bead: gascitypacks-7ws
Review of
449832d330for gascitypacks-7ws. Checks of the head: success.Verdict
pass
Findings
CLAUDE.md/AGENTS.mdin every directory from the working directory up to/, not only up to the git root. A rig's Worker worktree is.gc/worktrees/<rig>/worker/...inside the city's checkout, and gascity-root has carried anAGENTS.mdsince gascity-root#37 (today). So every session of a rig's Worker reads the city'sAGENTS.md, the first session and the later ones alike: its quality gatesgc --city "$(pwd)" config show --validate,scripts/check-pins.shandscripts/check-live-city.shdon't fit a rig's worktree. The new step 5 has the Worker read the repository's own files, but it doesn't tell the Worker to set aside the instructions that came from the city's checkout. When a repository has neither file, as gascitypacks has none today, the city's instructions are all the Worker has. This PR doesn't cause it, and it doesn't block the PR: the bead's premise ("no rig ... and not the city itself carries a CLAUDE.md or an AGENTS.md") stopped holding today. It is worth a bead of its own: either a sentence in step 5 ("instructions read from the city's checkout above are not this repository's") or a different place for the seats. Note that the step has about 40 characters to spare under the 28000 limit.Verified
### Fixed, and a README paragraph says why.claude/settings stay out of reach. No new shell logic, and norm.mainhas noREVIEW.md,AGENTS.mdorCLAUDE.md. I read the README frommain.origin/main(be97be3, which is three merges ahead of the branch point). The merge is clean, and the forge reportsmergeable. None of those merges touchedroles/formulas/mol-worker-work.toml, andgrepfinds no other reference to the old numbering of Part 2's steps.env -i(0 city variables), with a throwawayHOMEfor gc:bash tests/formula.sh(which includes the 28000-character size limit) andbash tests/reviewer.shpass,gc lint .reports 2 packs ok,go vet ./...,go test ./...andgo test -race ./...pass, and so do all 11 script tests of thescriptsjob.mikluko/changelogv2.1.0 (the commitv2names now) and ran it with-fragments=.changelog -base=main:valid=true, no findings.