feat(acq): add a neutral interactive-shell verb — acq shell NAME - #399
Conversation
There was a problem hiding this comment.
Thanks for adding the neutral acq shell NAME surface. The implementation shape looks sound from static review, but I found a couple of issues that should be fixed before merge.
Findings:
-
Low: durable code/test text uses bare tracker references. New comments and test names include bare
#383references, for exampleacq.backends/msb.sh:3696,acq.backends/msb.sh:3714,acq.backends/sbx.sh:495, andtest/bats/30-dispatch-routing.bats:30,:35,:40,:47. RepoAGENTS.mdrequires durable code comments/docs to avoid bare issue/PR references and instead use self-contained prose or ADR references. Please remove/rephrase those bare tracker references. -
Low:
docs/howto/msb.md:191still documents the old/non-neutral interactive-shell path:acq run <name>and rawmsb exec -it <name> -- bash. That conflicts with the newacq shell <name>verb and with the implementation, which uses an agent-user login shell with PTY, workspace cwd, sane$SHELL, and optionalSSH_AUTH_SOCK. Please update the table to match the new neutral verb and the actual raw equivalent.
Verification run during review:
git diff origin/main...HEAD --checkpassed.bash -n acq acq.backends/sbx.sh acq.backends/msb.shpassed.shellcheck --severity=warning acq acq.backends/sbx.sh acq.backends/msb.shpassed../scripts/test-acq-bats test/bats/30-dispatch-routing.batspassed: 29/29../scripts/test-acq-batspassed: 354/354.
Earlier note: Bats initially could not run because vendored submodules were not initialized in this worktree. After initializing test/vendor/bats-core, test/vendor/bats-support, and test/vendor/bats-assert, the focused and full offline suites passed.
4b26e3f to
b476566
Compare
`acq run NAME` always relaunches the recorded agent and `acq exec` is non-interactive, so an interactive human shell was the one daily-driver moment that still required the raw backend CLI (sbx exec -it <name> bash) — backend-specific muscle memory that breaks the day a team switches backends (#383). - sbx: acq shell NAME -> `sbx exec -it NAME bash` (sbx allocates the PTY; exec hands it the terminal directly). - msb: routes through _acq_msb_shell_exec, extracted from the two identical shell launches _acq_msb_attach already carried — agent user, PTY, workspace cwd, sane $SHELL, and SSH_AUTH_SOCK injection (when the host agent is forwarded) come free, and attach loses its duplication. A raw `msb exec` shell gets none of that. Deliberately minimal per the issue: no attach-time heals on shell entry (acq run remains the heal point), no -it on acq exec. Per-verb --help added; the three how-to docs updated (the sbx "stays raw" note now lists only `sbx rm --all`). Verified: 4 new dispatch tests (red first), full offline suite 354/354, and a live E2E — a scripted PTY drove `acq shell` into a real sbx v0.39.0 sandbox and got a command result computed guest-side as the agent user. Fixes #383
- Strip bare issue references from the new code comments and test names per AGENTS.md "Durable References" (self-contained prose; tracker numbers stay in commit messages and PR descriptions only). - docs/howto/msb.md: the Common Commands table's interactive-shell row now shows the neutral `acq shell <name>` (the sbx table and the attach example were updated in the feature commit; this row was missed).
b476566 to
04b1a07
Compare
|
Both fixed in |
Fixes #383.
acq run NAMEalways relaunches the recorded agent andacq execis non-interactive, so an interactive human shell was the one daily-driver moment that still required the raw backend CLI (sbx exec -it <name> bash). This adds the neutral verb:acq shell NAME→sbx exec -it NAME bash(sbx allocates the PTY)._acq_msb_shell_exechelper extracted from the two identical shell launches_acq_msb_attachalready carried — so the verb gets the agent user, PTY, workspace cwd, sane$SHELL, andSSH_AUTH_SOCKinjection (when the host agent is forwarded) for free, and the attach path loses its duplication. A rawmsb execshell gets none of that.Scope note: deliberately minimal per the issue — no attach-time heals on shell entry in v1 (
acq runremains the heal point), and no-itonacq exec. Per-verb--help(per the repo's per-verb help convention) and the three how-to docs are updated; the sbx how-to's "stays raw" note now lists onlysbx rm --all.Verified: 4 new dispatch tests (red first), full offline suite green (354/354 serially), and a live E2E — a scripted PTY drove
acq shellinto a real sbx v0.39.0 sandbox and gotSHELL-E2E-42 from agentcomputed guest-side.AI-assisted (Claude Code [claude-fable-5]).