copy: RFS-6-C70 to C74, Plan 6 Task 13's copy gaps (rootfs plan 6)
Paul approved all five unchanged on 2026-10-31: carlos help lists carlos console after carlos run (C70); C21's reason for a hangup (C71), for an interruption with no Detail (C72) and for an end code this CLI does not know (C73, the code); and the line when carlos itself gets SIGTERM, SIGHUP or an outside SIGINT after a session started (C74, the host and the signal's name; exit stays 128+n). Deck rows, copy-approved.json, rootfsCopyIDs and rootfsCopyBuilt gain all five. The root envelope is re-pinned in overlay rootfs-apps-6 (seal unchanged, 977d75ba).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 files changed,
+75
−11
approved_rootfs_copy_test.go+5 −0docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md+9 −2interactive_cli.go+35 −6interactive_cli_test.go+24 −2internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv+1 −1main.go+1 −0
Intent
Attributed to this commit: 39.7 g CO₂e (5,142,113 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on rootfs-apps-6-interactive, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/approved_rootfs_copy_test.go b/approved_rootfs_copy_test.go| index f0c147691..dc7fc870a 100644 |
| --- a/approved_rootfs_copy_test.go |
| +++ b/approved_rootfs_copy_test.go |
| @@ -143,6 +143,7 @@ var rootfsCopyIDs = []string{ |
| "RFS-6-C65", |
| // Plan 6's copy gaps, approved by Paul 2026-10-31 |
| "RFS-6-C66", "RFS-6-C67", "RFS-6-C68", "RFS-6-C69", |
| + "RFS-6-C70", "RFS-6-C71", "RFS-6-C72", "RFS-6-C73", "RFS-6-C74", |
| } |
| // rootfsCopyStruck is every id the deck marks struck, pinned, so a row can |
| @@ -272,6 +273,10 @@ var rootfsCopyBuilt = []string{ |
| // (internal/console/apiinstanceimport.go) and a replaced session's |
| // reason (internal/host/interactive.go) |
| "RFS-6-C66", "RFS-6-C67", "RFS-6-C68", "RFS-6-C69", |
| + // Plan 6 Task 13's copy gaps (approved 2026-10-31): carlos help's console |
| + // line (main.go), C21's three reasons and the signal line |
| + // (interactive_cli.go) |
| + "RFS-6-C70", "RFS-6-C71", "RFS-6-C72", "RFS-6-C73", "RFS-6-C74", |
| // Plan 6 Task 13: carlos run -it and carlos console (run.go, |
| // interactive_cli.go, interactive_term_other.go); RFS-6-C27 is Task 10's |
| "RFS-6-C01", "RFS-6-C02", "RFS-6-C03", "RFS-6-C04", "RFS-6-C05", "RFS-6-C06", "RFS-6-C07", "RFS-6-C08", |
diff --git a/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md b/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md| index 882dd657b..100d14a96 100644 |
| --- a/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md |
| +++ b/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md |
| @@ -14,6 +14,8 @@ Added 2026-10-30 by the Plan 6 preflight: RFS-6-C47, revised to keep `--egress-a |
| Added 2026-10-31: RFS-6-C66 to C69, the copy gaps Plan 6 Tasks 4, 9 and 12 left. Paul approved all four unchanged in his copy review on 2026-10-31. RFS-6-C66 supersedes the first line of the approved `zdd.apps-set.usage` and `GAP-2`; those records now hold its text and say so. The gate's inventory (`rootfsCopyIDs`) and built list (`rootfsCopyBuilt`) gained all four in the same commit. |
| +Added 2026-10-31: RFS-6-C70 to C74, the copy gaps Plan 6 Task 13 left (Astra's P2 4 and the concerns of its report): the console line of carlos help, three reasons for RFS-6-C21 and the line for a signal after a session started. Paul approved all five unchanged in his copy review on 2026-10-31. The gate's inventory (`rootfsCopyIDs`) and built list (`rootfsCopyBuilt`) gained all five in the same commit. |
| + |
| The rules: |
| - A row is `pending` until Paul approves it in the copy review. His edits are |
| @@ -542,6 +544,11 @@ From the plan: Every string is human text the plan introduces. Existing approved |
| | RFS-6-C67 | apps_swap.go (appsSetInteractiveNotFound: `carlos apps set <app> --interactive` when the console answers 404 with no JSON error; added 2026-10-31, the Task 4 report's concern 3) | not found: either %s is not an app in this account, or this console predates --interactive (update the console, then run this again) | approved | |
| | RFS-6-C68 | internal/console/apiinstanceimport.go (handleAPIImportAbort: an import's abort while an interactive session is open, provision.ErrInteractiveOpen, HTTP 409, beside the open-run refusal; added 2026-10-31) | An interactive session is open on %s. Wait for it to end, then abort. | approved | |
| | RFS-6-C69 | internal/host/interactive.go (`carlos logs` reason, sessionEndWords, interactive.EndReplaced; added 2026-10-31) | a newer session on the same instance replaced it | approved | |
| +| RFS-6-C70 | main.go (a fragment: the console line of carlos help's usage, after the run line; added 2026-10-31, approved unchanged by Paul in his copy review 2026-10-31) | console open the console process your app's manifest declares, on one instance, in a terminal session | approved | |
| +| RFS-6-C71 | interactive_cli.go (sessionExit: RFS-6-C21's reason for EndHangup; added 2026-10-31, approved unchanged by Paul in his copy review 2026-10-31) | your connection to the console closed | approved | |
| +| RFS-6-C72 | interactive_cli.go (sessionExit: RFS-6-C21's reason for an interrupted End with no Detail; added 2026-10-31, approved unchanged by Paul in his copy review 2026-10-31) | the box ended it without saying why | approved | |
| +| RFS-6-C73 | interactive_cli.go (sessionExit: RFS-6-C21's reason for an end code this CLI does not know, the code; added 2026-10-31, approved unchanged by Paul in his copy review 2026-10-31) | the box gave a reason this version of carlos does not know (%s) | approved | |
| +| RFS-6-C74 | interactive_cli.go (session: carlos got SIGTERM, SIGHUP or an outside SIGINT after the session started; the host, then the signal's name; exit 128+n; added 2026-10-31, approved unchanged by Paul in his copy review 2026-10-31) | %s: the session ended because carlos received %s | approved | |
| ## Conflicts |
| @@ -578,5 +585,5 @@ the earlier counts had not followed Plans 1 and 4's later rows. |
| - Plan 3: 33 live, 2 struck, 35 rows |
| - Plan 4: 144 live, 2 struck, 146 rows |
| - Plan 5: 44 live, 0 struck, 44 rows |
| -- Plan 6: 69 live, 0 struck, 69 rows (RFS-6-C47 revised and RFS-6-C65 added and approved on 2026-10-30; RFS-6-C66 to C69 added and approved on 2026-10-31) |
| -- Total: 401 live, 4 struck, 405 rows |
| +- Plan 6: 74 live, 0 struck, 74 rows (RFS-6-C47 revised and RFS-6-C65 added and approved on 2026-10-30; RFS-6-C66 to C74 added and approved on 2026-10-31) |
| +- Total: 406 live, 4 struck, 410 rows |
diff --git a/interactive_cli.go b/interactive_cli.go| index 15a1cc953..0f2f314e2 100644 |
| --- a/interactive_cli.go |
| +++ b/interactive_cli.go |
| @@ -75,6 +75,15 @@ const ( |
| // RFS-6-C69, the reason carlos logs gives for a replaced session, is |
| // RFS-6-C21's reason here too. |
| sessionReplacedWords = "a newer session on the same instance replaced it" |
| + // RFS-6-C71 to C73, RFS-6-C21's reason for a hangup, for an |
| + // interruption with no Detail, and for an end code this CLI does not |
| + // know (the code). |
| + sessionHangupWords = "your connection to the console closed" |
| + sessionNoReasonWords = "the box ended it without saying why" |
| + sessionUnknownWords = "the box gave a reason this version of carlos does not know (%s)" |
| + // RFS-6-C74: carlos itself got a signal after the session started. The |
| + // host, then the signal's name. |
| + sessionSignalMsg = "%s: the session ended because carlos received %s" |
| ) |
| // sessionDialTimeout bounds the dial: the upgrade, or the door's refusal. |
| @@ -322,7 +331,7 @@ func (s *session) run(ctx context.Context) int { |
| if !started { |
| return s.finish(130, fmt.Sprintf(sessionCancelledMsg, s.host)) |
| } |
| - return s.finish(signalExit(sig), "") |
| + return s.finish(signalExit(sig), fmt.Sprintf(sessionSignalMsg, s.host, signalName(sig))) |
| case p := <-panics: |
| panic(p) |
| case <-ctx.Done(): |
| @@ -455,6 +464,19 @@ func (s *session) finish(code int, line string) int { |
| return code |
| } |
| +// signalName is a signal as a shell names it: SIGTERM, SIGHUP, SIGINT. |
| +func signalName(sig os.Signal) string { |
| + switch sig { |
| + case syscall.SIGTERM: |
| + return "SIGTERM" |
| + case syscall.SIGHUP: |
| + return "SIGHUP" |
| + case os.Interrupt: |
| + return "SIGINT" |
| + } |
| + return sig.String() |
| +} |
| + |
| // signalExit is the shell's code for a process a signal ended. |
| func signalExit(sig os.Signal) int { |
| if n, ok := sig.(syscall.Signal); ok { |
| @@ -494,11 +516,18 @@ func sessionExit(host, app string, e interactive.End) (int, string) { |
| case interactive.EndRefused: |
| return sessionRefusal(host, app, e) |
| } |
| - // Interrupted, with its reason, and any end this CLI does not know, |
| - // with its code. |
| - why := e.Detail |
| - if why == "" { |
| - why = e.Reason |
| + // A hangup, an interruption with its reason or C72, and any end this |
| + // CLI does not know, with its code (C73). |
| + var why string |
| + switch { |
| + case e.Reason == interactive.EndHangup: |
| + why = sessionHangupWords |
| + case e.Reason == interactive.EndInterrupted && e.Detail != "": |
| + why = e.Detail |
| + case e.Reason == interactive.EndInterrupted: |
| + why = sessionNoReasonWords |
| + default: |
| + why = fmt.Sprintf(sessionUnknownWords, e.Reason) |
| } |
| return 125, fmt.Sprintf(sessionInterruptedMsg, host, why) |
| } |
diff --git a/interactive_cli_test.go b/interactive_cli_test.go| index 49f6d189f..44d9d85c2 100644 |
| --- a/interactive_cli_test.go |
| +++ b/interactive_cli_test.go |
| @@ -423,6 +423,10 @@ func TestSessionExitCodes(t *testing.T) { |
| {interactive.End{Reason: interactive.EndInterrupted, Detail: "the instance was restarted"}, 125, h + ": the session was interrupted: the instance was restarted"}, |
| {interactive.End{Reason: interactive.EndReplaced}, 125, h + ": the session was interrupted: a newer session on the same instance replaced it"}, |
| {interactive.End{Reason: interactive.EndLost}, 125, h + ": the connection to its box dropped, so the session was closed"}, |
| + // RFS-6-C71 to C73 as C21's reason. |
| + {interactive.End{Reason: interactive.EndHangup}, 125, h + ": the session was interrupted: your connection to the console closed"}, |
| + {interactive.End{Reason: interactive.EndInterrupted}, 125, h + ": the session was interrupted: the box ended it without saying why"}, |
| + {interactive.End{Reason: "evicted", Detail: "x"}, 125, h + ": the session was interrupted: the box gave a reason this version of carlos does not know (evicted)"}, |
| {interactive.End{Reason: interactive.EndCancelled}, 130, h + ": the session was cancelled before it started"}, |
| {interactive.End{Reason: interactive.EndExpired}, 3, h + ": no box opened the session within 60 seconds. its box may be running an older release, or may not reach the console"}, |
| {interactive.End{Reason: interactive.EndRefused, Refused: runs.RefusedFlat}, 3, h + ": the box is not on the nested layout yet, so it cannot open a session"}, |
| @@ -484,17 +488,23 @@ func TestSessionRestoresTheTerminalOnEveryExit(t *testing.T) { |
| t.Errorf("the CLI waited %s on a silent console", d) |
| } |
| }}, |
| - {name: "SIGTERM", code: 128 + int(syscall.SIGTERM), door: func(t *testing.T, r *sessionRig, ws *websocket.Conn) { |
| + {name: "SIGTERM", code: 128 + int(syscall.SIGTERM), last: ixCLIHost + ": the session ended because carlos received SIGTERM\n", door: func(t *testing.T, r *sessionRig, ws *websocket.Conn) { |
| r.sig <- syscall.SIGTERM |
| // The CLI closes the connection. |
| if _, _, err := nextFrame(ws); err == nil { |
| t.Error("the connection stayed open after SIGTERM") |
| } |
| }}, |
| - {name: "SIGHUP", code: 128 + int(syscall.SIGHUP), door: func(t *testing.T, r *sessionRig, ws *websocket.Conn) { |
| + {name: "SIGHUP", code: 128 + int(syscall.SIGHUP), last: ixCLIHost + ": the session ended because carlos received SIGHUP\n", door: func(t *testing.T, r *sessionRig, ws *websocket.Conn) { |
| r.sig <- syscall.SIGHUP |
| nextFrame(ws) |
| }}, |
| + // RFS-6-C74 for a SIGINT from outside (raw mode sends Ctrl-C as a |
| + // byte, so this one came from kill). |
| + {name: "outside SIGINT", code: 128 + int(syscall.SIGINT), last: ixCLIHost + ": the session ended because carlos received SIGINT\n", door: func(t *testing.T, r *sessionRig, ws *websocket.Conn) { |
| + r.sig <- os.Interrupt |
| + nextFrame(ws) |
| + }}, |
| } { |
| t.Run(tc.name, func(t *testing.T) { |
| r := newRig(t) |
| @@ -909,3 +919,15 @@ func TestSessionEndsOnAFailedWrite(t *testing.T) { |
| }) |
| } |
| } |
| + |
| +// TestHelpListsConsole: carlos help lists carlos console (RFS-6-C70) right |
| +// after carlos run. |
| +func TestHelpListsConsole(t *testing.T) { |
| + var b strings.Builder |
| + usage(&b) |
| + want := " run run one of your app's commands against one instance, as that instance\n" + |
| + " console open the console process your app's manifest declares, on one instance, in a terminal session\n" |
| + if !strings.Contains(b.String(), want) { |
| + t.Fatalf("carlos help lacks the console line after run:\n%s", b.String()) |
| + } |
| +} |
diff --git a/internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv b/internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv| index 0260e2f9c..3eabe2b2c 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv |
| @@ -138,7 +138,7 @@ internal/activator/cmdunit.go cmdUnit.Poll legacy accepted-legacy accepted-legac |
| internal/activator/rootfs_service.go Service.rootfsTick legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: per activator tick, lists residents (Registry.ResidentInstances through the DueStore), and for each rootfs entry kills generations whose replica reports a lost lease with no watch installed, stops an exited rootfs process (StopExited), and supervises; then drops forgotten residents and reserves proactive starts (residentJob) for resident-shaped, unheld rows within the start ceiling after the locked admission;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.10: when the tick kills a lost-lease resident's generations it also starts stopRootfsWorkersAtLoss(e) beside them; superviseRootfsLocked (a no-op in Group A) is now the worker supervision; the same 15 read sites, no read added; stops more, starts nothing new on its own;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: the no-signal fallback also covers a hibernating rootfs entry with a one-shot unit that may run (oneShotHoldsLocked); it latches ownerKilled and runs each one-shot kill func (KillOneShot to root's existing /stop) with go off a.mu, beside a resident's killResidentGens and stopRootfsWorkersAtLoss as before; new site +whole:Route is e.route.Rootfs(); stops more, starts nothing registry:Host@1842,registry:Host@2071,registry:Host@2427,whole:Route@113,whole:Route@1200,whole:Route@1795,whole:Route@1824,whole:Route@1993,whole:Route@2024,whole:Route@2106,whole:Route@2271,whole:Route@2320,whole:Route@2465,whole:Route@397,whole:Route@803,whole:Route@824 de44f5578a049a224f06a302863752c3a4ff53767478a54d08e373db018efe82 |
| @remove internal/instancectl/cmd.go Server.handleCmdStatus |
| @removed internal/instancectl/cmd.go Server.handleCmdStatus H3 census-ruling-rootfs-apps-6;absent;basis=rootfs Plan 6 Task 6: moved whole to Server.oneShotStatus (role-aware; see its claim), not deleted: no check, refusal or validation is lost |
| -@coverage . f1f5e77164e82e841c1e24274d24425a0f028b848d187e66d2e4a709ff65d21b |
| +@coverage . cd9148f8eb3f72053f0d0e22f3a58638024830a5dea7682ba42646fa094dc7a3 |
| @coverage internal/activator 72f34fc88388e97bbd0d84d0256f409ca6931af0b6127ebb7895b01a02f2e73d |
| @coverage internal/appconfig cac8d8ef7538a456d034801c95ce6508a4983e5516b3bbbd302bec0fbafdd479 |
| @coverage internal/host 5fa4abbdabdf0d6816ab3e589fd563fe9291b5921fe529cb2383adf0497937b1 |
diff --git a/main.go b/main.go| index 115dcfd93..c3c6bf369 100644 |
| --- a/main.go |
| +++ b/main.go |
| @@ -264,6 +264,7 @@ Your apps — ship and run software on a CARLOS deployment |
| db read a copy of an instance's database, restored from its |
| replica: pull (save it) | query (one read-only query) |
| run run one of your app's commands against one instance, as that instance |
| + console open the console process your app's manifest declares, on one instance, in a terminal session |
| schedule recurring or one-shot work per app: ls | set | rm | run |
| store object storage: create | status | apply | approvals | approve | decline | grant | rotate |
| relay the platform STUN/TURN relay: serve (what the unit runs) |