rootfs-apps-6-interactive
Rootfs Plan 6: interactive sessions, carlos run -it and carlos console
A member can type into a live terminal on one instance (carlos run -it --app shop --instance shop.example.com -- bin/rails console, or carlos console for the manifest's declared console process). Sessions are off until the app allows them (carlos apps set --interactive on|off).
The CLI opens a WebSocket to the console, which reserves the session in its hub, admits it on the instance record and writes a grant signed with the release key. The owning box verifies the grant, dials the console's box door, and the console splices the two legs. On the box the agent allocates a pty and starts a one-shot carlos-instance-tty@ unit (or its rootfs twin) through the control service; the trampoline receives the pty over its stdin socket and runs the command on it as the controlling terminal. Every instance template hides /dev/pts. The session joins the instance's writer lifecycle: at lease loss tty and cmd holds are killed and proven gone beside workers (root accepts kill=1 for rootfs one-shot roles); a release is refused while a session start is in flight.
Also: carlos run on rootfs rows (Task 7a, without --version, #431), and carlos run on fleet boxes over the box door (Task 16, Paul's ruling R7). Sessions and refusals of authenticated callers are audited (interactive-refused rows; 429s and unauthenticated refusals get rate-limited journal lines only). Docs: ### carlos console.
Copy RFS-6-C58..C75 approved by Paul. Reviews: per-task Astra reviews with fix rounds (Tasks 2-13); Task 15 Steps 1-2 witnessed on the arm64 root runner under real systemd; whole-branch Astra R1 NOT READY (P1 grant expiry at pickup, fixed), R2 READY. Census approved by Astra on #280. Spec docs/superpowers/specs/2026-10-24-rootfs-apps-design.md rev 5 (§5.10, C9); plan docs/superpowers/plans/ 2026-10-24-rootfs-apps-6-interactive.md. Not released; the first release with this must be v0.33.1 or later. Task 15 Step 3 (dev-box checklist) runs after the dev roll.
🤖 Generated with Claude Code
Discussions
- No discussions on this branch yet.
Tasks 18/19 done
- Task 1: Preflight and copy rows Done
- Task 2: `internal/interactive`, the shared vocabulary Done
- Task 3: The record marker and reconcile's hook Done
- Task 4: The per-app setting (`carlos apps set --interactive on|off`) Done
- Task 5: The tty role's names, the templates, `/dev/pts` hidden, the probe check Done
Activity
- claude agent, operated by paul@keymail.dev pushed 87e841020 console tests: every interactive hub check waits on the hub's change, never a timer or a read at once (rootfs plan 6)
- claude agent, operated by paul@keymail.dev pushed d2ad4bcf8 review: Plan 6 whole-branch R2 findings (READY)
- claude agent, operated by paul@keymail.dev pushed 3db30f448 console tests: a refused admission's hub check waits for the reservation's release (rootfs plan 6 task 10)
- task updated: Whole-branch review
- task updated: Census verdict on #280
- claude agent, operated by paul@keymail.dev pushed 8f656c94e review: Plan 6 whole-branch R1 findings and the R2 brief
- claude agent, operated by paul@keymail.dev pushed 45736122e console: a fleet run is picked only within its grant's window; the gate journals a refused service (rootfs plan 6, branch review R1)
- claude agent, operated by paul@keymail.dev pushed 3e60617e5 review brief: rootfs apps Plan 6 whole branch and census, round 1
- claude agent, operated by paul@keymail.dev pushed 098df29cb census: re-propose rootfs-apps-6 after merging origin/main 6f1f6ca6
- claude agent, operated by paul@keymail.dev pushed 48336f063 Merge origin/main (6f1f6ca6) into rootfs-apps-6-interactive
- task updated: Task 16: `carlos run` on fleet boxes over the box door (Paul's ruling R7)
- claude agent, operated by paul@keymail.dev pushed 85ddb518c console: the session hub's per-host map is sessionByHost (TestRemoteFactsOneAccessor's byHost rule)
- claude agent, operated by paul@keymail.dev pushed d9d2b0350 carlos run: reach fleet boxes over the box-dials-the-console door (rootfs plan 6, ruling R7)
- claude agent, operated by paul@keymail.dev pushed 136e7e292 console: journal, not audit, the throttled and unplaced session attempts (rootfs plan 6)
- claude agent, operated by paul@keymail.dev pushed 6ace84d6a witness: an interactive session is inside its instance (rootfs plan 6)
- task updated: Task 13: The CLI, `carlos run -it` and `carlos console`
- claude agent, operated by paul@keymail.dev pushed 6bbe8cd1f copy: RFS-6-C75, the line for a terminal a session could not restore (rootfs plan 6)
- claude agent, operated by paul@keymail.dev pushed 571046c56 console: audit refused interactive-session attempts (rootfs plan 6)
- claude agent, operated by paul@keymail.dev pushed 04b064439 cli: the stdin reader cannot block past its stop (rootfs plan 6 task 13 fix round 2)
- claude agent, operated by paul@keymail.dev pushed 0fb16932f copy: RFS-6-C70 to C74, Plan 6 Task 13's copy gaps (rootfs plan 6)
- claude agent, operated by paul@keymail.dev pushed 51d03d8a8 cli: a session's restore, stdin reader, output and refusal reads are bounded (rootfs plan 6 task 13 fix round 1)
- task updated: Task 14: Docs
- claude agent, operated by paul@keymail.dev pushed cbd939d34 docs: interactive sessions (rootfs plan 6)
- task updated: Task 15: Production-wired witnesses for C9, and the dev-box checklist
- claude agent, operated by paul@keymail.dev pushed d1ec4dbe6 census: the CLI session's units (rootfs plan 6 task 13)
- claude agent, operated by paul@keymail.dev pushed b087cc3f6 cli: carlos run -it and carlos console (rootfs plan 6)
- claude agent, operated by paul@keymail.dev pushed b7a67601c interactive: a refusal before the upgrade keeps its status and body (rootfs plan 6 task 13)
- task updated: Task 12: The box's session worker
- claude agent, operated by paul@keymail.dev pushed 149394892 census: RunCmd's claim says 0 matches 0; re-pin handleAPIImportAbort for C68 (rootfs plan 6 task 12 fix round 2)
- claude agent, operated by paul@keymail.dev pushed a3e1028df agent: a failed launch waits for the settle proof; lifetime 0 matches 0 (rootfs plan 6 task 12 fix round 2)