carlos / platform Public

census: RunCmd's claim says 0 matches 0; re-pin handleAPIImportAbort for C68 (rootfs plan 6 task 12 fix round 2)

Service.RunCmd's claim in the rootfs-apps-6 overlay now says a session
is refused only on a lifetime mismatch, 0 matching 0. The record-write
census re-pins handleAPIImportAbort after ecb0f086's C68 answer, class
and kinds unchanged. Overlay seal 3b892312.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 149394892f4ec8a54f556bbf1fe4276f1ac18ba9 parent a3e1028
4 files changed, +10 −5
  • docs/superpowers/notes/census-proposal-rootfs-apps-6.md +2 −2
  • internal/provision/rootfs_apps_6_census_test.go +5 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv +2 −2

Intent

Human

<task-notification> <task-id>ae96b54b0de505047</task-id> <tool-use-id>toolu_019kSjjTjC2ZnT6DAV9iUJPz</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/ae96b54b0de505047.output</output-file> <status>completed</status> <summary>Agent "Plan 6 Task 12 fix round 2" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE_WITH_CONCERNS Commit: `a3e1028d` on `rootfs-apps-6-interactive`, not pushed. Git printed the expected `packed-refs.lock` error, but the commit is in. `.superpowers` is gitignored, so the new "Fix round 2" section in `task-12-report.md` is on disk only, not in the commit. Tests: the touched host tests passed once, and once more under `-race` (including the linux e2e). The touched activator tests passed once with `TMPDIR=/tmp/k`. 8 mutations, all killed. The darwin/arm64, windows/amd64 and linux/arm64 builds pass. One test outside this round fails: `TestPlan9B8RecordWriteCensus` rejects `handleAPIImportAbort`, which the copy commit `ecb0f086` changed (C68). This round touches no console file. New overlay seal: `2fdc6168d50c8230f8973511c3b44d2056b4a3b027a86ac4326978241193207c` (was `87f29ffd`). `make census-card` is clean after the re-propose. No approval requested. What changed: - **The settle wait:** when `RunCmd` errors, `serve` now waits for `AfterSettled` before it ends, logs or classifies the session. Only the worker's shutdown escapes; that gives End interrupted with `StopShutdown`. The launch-error test fake now calls the callback, either at once or later when the test releases it. - **Lifetime 0:** `sessionIncarnationLocked` now refuses only a mismatch. 0 matching 0 starts; 0 vs 1 (either way round) and 1 vs 2 are refused. The checks at admission and before the start are unchanged. - **The worker side:** it compares the record's lifetime with the row's and passes the record's value, so a record with no lifetime launches with 0, and only on a row that is also 0. Concerns: 1. A third claim changed besides the two you named. `type CmdSpec`'s `Incarnation` comment said 0 is refused, and the census hashes comments, so fixing the comment changed the unit. Its claim gains a "comment only" sentence. The other carried claims are unchanged, apart from the two you named. 2. `Service.RunCmd`'s claim still says "0 (unknown) is refused", which is now wrong. I carried it over unchanged as you asked, since its body didn't change; the next change to that claim should drop the clause. 3. The record-write census failure above needs `handleAPIImportAbort`'s reviewed digest updated.</result> <usage><subagent_tokens>145599</subagent_tokens><tool_uses>55</tool_uses><duration_ms>769931</duration_ms></usage> </task-notification>

Attributed to this commit: 36.8 g CO₂e (4,760,105 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/docs/superpowers/notes/census-proposal-rootfs-apps-6.md b/docs/superpowers/notes/census-proposal-rootfs-apps-6.md
index 491ca6918..01dbce7bc 100644
--- a/docs/superpowers/notes/census-proposal-rootfs-apps-6.md
+++ b/docs/superpowers/notes/census-proposal-rootfs-apps-6.md
@@ -30,7 +30,7 @@ Ruling `census-ruling-rootfs-apps-6`. The independent reviewer approves or rejec
| `internal/provision/reconcile.go` `Reconcile` | body | unchanged (178) | rootfs Plan 6 Task 3: in the per-record loop, beside the RunSeen call, calls cfg.InteractiveSeen(rec) when the hook is set and the in-scope record carries an interactive-session marker (rec.Interactive != nil), once per record per pass, before the pass acts on it; the hook is the box worker's non-blocking note (Task 12). Same record keys and literal; no read added (registry read sites unchanged, 178); nothing written by the call |
| `internal/provision/seed.go` `SeedAbortBecause` | body | unchanged (1) | rootfs Plan 6 Task 9 (carried from Task 3's review): after the open-run refusal, an import's abort is also refused while the record carries a session marker (rec.Interactive), with an InteractiveOpenError; a --from seed's abort is unchanged; it only refuses more, no read added |
| `internal/activator/backend_rootfs.go` `ExecBackend.startRootfsCmd` | sites | +registry:Host, -whole:Route | rootfs Plan 6 Task 7a: takes a rootfsCmdLaunch, a declared process or an operator's argv, exactly one or refused before anything is laid out; the launch file names the process or cmd, never an argv; CmdRootfs names the image with the process or with the argv in the request body, which root validates against the staged image itself (instancectl, unchanged); new site +registry:Host is that refusal's message; Plan 6 Task 8 (PF-1): takes the role, cmd or tty, and oneShotSinks; refused before anything is laid out unless the role is a one-shot whose I/O matches (a terminal for tty alone), and for tty unless the control channel has the session verbs (TTYControl, else ErrNoTTY); prepare(rt, role); for tty the session pty and its handoff socket on the agent own logs path (openTTY, TTYSocketName) take the place of the two stream listeners; the launch file is the role one (launch.tty.json for tty: schema 2, process console or cmd, never an argv, env alone through rootfsLaunchEnv); a tty starts through TTYControl.TTYRootfs (POST /tty runtime=rootfs; root Task 6 handler validates the staged image and the process or argv itself), a cmd through CmdRootfs as before; the same refusal and may-have-begun handling; -whole:Route is b.tier(rt) read once |
-| `internal/activator/cmd.go` `Service.RunCmd` | sites | +registry:Host, +whole:Route ×2 | rootfs Plan 6 Task 7a: AfterSettled honoured on every path (called before return on each path that starts no unit, else by the settle that proves the unit gone); a rootfs run is refused as a lost lease (CmdStoppedError StopLeaseLost) when its entry is not under the lease watch (residentWatchedLocked), and, off a.mu, when the replica's in-memory SafeUntil leaves less than oneShotStartLead (oneShotHeadroom); new sites are e.route.Rootfs() and a log line; adds refusals only Task 9 (PF-17): a session (spec.TTY) takes the entry's tty slot and a run its cmd slot (holdSlot), the hold carrying its role (newCmdHold); each is refused only for its own role (holdBusyLocked: ErrCmdBusy or ErrTTYBusy), so a run and a session coexist; a release command (a.releaseOps) refuses a run only, since the session's tty unit is its own; no read added, read sites unchanged Task 12 fix round 1 (Astra P1, incarnation binding): a session (spec.TTY) is refused with ErrCmdIncarnation, under a.mu, at admission (before the hold is attached, so nothing of it runs) and again at the last check before the start, unless the awake entry's row lifetime (e.route.Incarnation) equals spec.Incarnation, the lifetime the box's grant authorized; 0 (unknown) is refused; a run is not checked; refuses more, starts nothing new, no read added beyond the in-memory e.route field (sessionIncarnationLocked) |
+| `internal/activator/cmd.go` `Service.RunCmd` | sites | +registry:Host, +whole:Route ×2 | rootfs Plan 6 Task 7a: AfterSettled honoured on every path (called before return on each path that starts no unit, else by the settle that proves the unit gone); a rootfs run is refused as a lost lease (CmdStoppedError StopLeaseLost) when its entry is not under the lease watch (residentWatchedLocked), and, off a.mu, when the replica's in-memory SafeUntil leaves less than oneShotStartLead (oneShotHeadroom); new sites are e.route.Rootfs() and a log line; adds refusals only Task 9 (PF-17): a session (spec.TTY) takes the entry's tty slot and a run its cmd slot (holdSlot), the hold carrying its role (newCmdHold); each is refused only for its own role (holdBusyLocked: ErrCmdBusy or ErrTTYBusy), so a run and a session coexist; a release command (a.releaseOps) refuses a run only, since the session's tty unit is its own; no read added, read sites unchanged Task 12 fix round 1 (Astra P1, incarnation binding): a session (spec.TTY) is refused with ErrCmdIncarnation, under a.mu, at admission (before the hold is attached, so nothing of it runs) and again at the last check before the start, unless the awake entry's row lifetime (e.route.Incarnation) equals spec.Incarnation, the lifetime the box's grant authorized; Task 12 fix round 2 (revised ruling): only a mismatch refuses, and 0 matches 0 (a record and row with no lifetime fields); a run is not checked; refuses more, starts nothing new, no read added beyond the in-memory e.route field (sessionIncarnationLocked) |
| `internal/activator/cmdunit.go` `ExecBackend.StartCmd` | sites | +registry:Host, +whole:Route ×2 | rootfs Plan 6 Task 7a: after the layout and run-directory checks, a rootfs row returns startRootfsRun (backend_rootfs.go) before nestedGate; the binary path is byte-identical (TestBinaryStartCmdLaunchGolden); new site +whole:Route is rt.Rootfs(); Plan 6 Task 8: a session (spec.TTY): checkCmdLaunch refuses before anything is listened on or written a launch shape (errCmdLaunchShape: process and argv both or neither, a process other than console, a run naming a process, a session with a run directory or streams, an id that is not one path element) and a process on a binary row (errBinaryProcess); then the session verbs (TTYControl) or ErrNoTTY; on a binary row the same nested gate, live link or staged build, launch environment and replica gate as a run; prepare(rt, RoleTTY); the pty and its handoff socket (openTTY) in place of the two streams; launch.tty.json with argv [live link, args...] and childEnv(ttyVars); then TTYControl.TTY, or TTYExe naming the staged build (POST /tty; root Task 6 handler validates it); the run path is unchanged (TestBinaryStartCmdLaunchGolden); new sites are rt to checkCmdLaunch and rt.Host in its error |
| `internal/activator/cmdunit.go` `cmdUnit.Poll` | sites | +registry:Host ×4, +registry:Runtime, +whole:Route ×5 | rootfs Plan 6 Task 8 (PF-7): role-aware: a cmd unit polls as before (CmdStatusRootfs on a rootfs row, CmdStatus on a binary one); a tty unit polls through TTYControl, TTYStatusRootfs on a rootfs row and TTYStatus on a binary one, or ErrNoTTY without the session verbs; any other role is refused; all status reads over the control socket, no decision; the new sites are the error text (rt.Host), the tty arm runtime check (rt.Runtime) and the route passed |
| `internal/activator/rootfs_service.go` `Service.rootfsTick` | sites | +whole:Route | 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 |
@@ -112,6 +112,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/interactive/interactive.go:type Open`: reads +file:Open; written legacy, accepted-legacy, frozen
- reads `internal/activator/cmdunit.go:cmdUnit.StopAndSettle`: +registry:Host, +whole:Route; keeps legacy, task accepted-legacy
-Seal: `1379d066c8dd2335d95d5f6e9c7bce65ff57f00b2b287a308d9b3f47911ae5e7` → `2fdc6168d50c8230f8973511c3b44d2056b4a3b027a86ac4326978241193207c`.
+Seal: `1379d066c8dd2335d95d5f6e9c7bce65ff57f00b2b287a308d9b3f47911ae5e7` → `3b892312ed4cc4067fc57e30cdd53398a6e9654428b76f3003ab8b8b55ccc98b`.
Overlay: `internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/rootfs_apps_6_census_test.go b/internal/provision/rootfs_apps_6_census_test.go
index bc73b97df..483d8a375 100644
--- a/internal/provision/rootfs_apps_6_census_test.go
+++ b/internal/provision/rootfs_apps_6_census_test.go
@@ -63,6 +63,10 @@ package provision
// to the sweep (an endPending row-only entry, in memory) when its
// write's outcome is unknown or the row check fails. The same one
// SetRecordInteractive; re-pinned.
+// - Copy gaps (ecb0f086, C68): handleAPIImportAbort answers 409 with the
+// C68 words when SeedAbort refuses because an interactive session is
+// open (provision.ErrInteractiveOpen), beside the open-run case. The
+// same one SetRecordSeed write, same class; re-pinned.
func rootfsApps6WriteCensusInventory() []censusEntry {
entries := append([]censusEntry(nil), fleetPublicRoutesWriteCensusInventory()...)
replacements := []censusEntry{
@@ -71,6 +75,7 @@ func rootfsApps6WriteCensusInventory() []censusEntry {
{"internal/console/server.go", "NewServer", "key-site", "lit:instances", "fdbd52b5b193ae308aa24b1506b3ea91869b65f549a0d10115a521b868509f6f"},
{"internal/instanceexec/exit.go", "parseExitArgs", "key-site", "lit:instances", "be3a7828e292b4977c42f21d8283fc9d185505ced9ffdf2543267a88bc8033a9"},
{"internal/host/runexec.go", "runsWorker.finish", "record-writer", "key:SetRecordRun", "f586bc77d175652d19bed1e7cceb7ecad523f7a1125bc798c19109e0a4f55ee2"},
+ {"internal/console/apiinstanceimport.go", "Server.handleAPIImportAbort", "record-writer", "key:SetRecordSeed", "2f8ff7416ac0508b33bb9791ae314c144e6d26bdc7773e859b1f04c7d9b3d2d0"},
}
for _, r := range replacements {
found := false
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 1dd1c2464..24ccc59e7 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -43,4 +43,4 @@ plan14-root-reads-region-ha-dead-holder-backoff.tsv 8f6a1865b0abcea9d4fb68232cc2
plan14-root-reads-managed-fleets-1c-451.tsv af326671321edda76c7e6217a47892605a9e3b886fa880ad6d049c2f28f63873
plan14-root-reads-fleet-public-routes.tsv bca6ef741a96b72767b1747789cd01b3111d61b68548cbe368258c31f3d53a2e
plan14-root-reads-fleet-routes-followups.tsv 1379d066c8dd2335d95d5f6e9c7bce65ff57f00b2b287a308d9b3f47911ae5e7
-plan14-root-reads-rootfs-apps-6.tsv 2fdc6168d50c8230f8973511c3b44d2056b4a3b027a86ac4326978241193207c
+plan14-root-reads-rootfs-apps-6.tsv 3b892312ed4cc4067fc57e30cdd53398a6e9654428b76f3003ab8b8b55ccc98b
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 211600ab3..2a50eb76d 100644
--- a/internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv
+++ b/internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv
@@ -55,7 +55,7 @@
@legacy 7fa09e38ea17338b467b1cc6ca5e557d2ed77bb0f6477083d17e33484393f8b4 internal/interactive/interactive.go type Open legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: enters scope unchanged with package interactive (Task 2); the Open frame's declaration; file:Open is the type's name; reads nothing file:Open@5 ad72d02e636f55e4c1d4b62129780432b5b949672042ec59d4cb7dbfbc027a3b
@legacy 42df81763fd67911e0e9dc84bca80d45f90fdc374fda09040eff0e07627f8bc0 internal/activator/cmdunit.go cmdUnit.StopAndSettle legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): asks instance control to stop the unit, then waits; the agent keeps the lease until this is proven; no root decision;rev3=census-ruling-rootfs-apps-2;basis=the stop goes through stopRole with the row instead of Control.Stop with its host, so one Host site goes; for a rootfs row that is the rootfs stop verb's request (StopRootfs) over the same control socket; the proof (stop, cgroup empty, streams drained) is unchanged; no file read added;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 8 (PF-7): stops and proves the unit own role (stopRole and waitRoleCgroupEmpty with u.role, cmd or tty), never a hard-coded cmd; a unit of no one-shot role is refused; after the proof it drains the two streams, or closes the session handoff and master; new sites are the refusal text (rt.Host) and the route registry:Host@216,whole:Route@218,whole:Route@365,whole:Route@517 68abc85a8850ee4e740e177636b40026b5cea4fb3545d2995ccbab6ff05bd0dc
@legacy 80d2897553e3f5a31e55ecabdf1da017c7a6f5fbe2adde5a643c0c1a1887a8e1 internal/activator/backend_rootfs.go ExecBackend.startRootfsCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R1 [pf R0.1, R1.4]: new; the agent's first caller of root's existing CmdRootfs (POST /cmd to root's control socket, unchanged). In order: rootfsGates; refuses a partial staged identity (version, path, digest); rootfsControl; prepare(rt, RoleCmd) (the instance's own directories); two stream listeners on the agent's own log sockets (logSocketNamed); the schema-2 launch file for RoleCmd with env alone (writeRootfsLaunchFor, the same writer and the same root reader as the web start's RoleRun file, rootfsLaunchEnv: never the agent's own environment); the caller's exec gate (runExecGate); then CmdRootfs(host, the row's tier memory.max, StagedImage{staged path, version, digest, process}), process being a declared process name root checks against the staged manifest. ErrStagedImage and ErrStartRefused are refusals with no unit; any other error returns a unit to stop and settle. Root validates the staged image and the process itself (instancectl, unchanged); registry:Host sites are log lines, socket and unit names;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: takes a rootfsCmdLaunch, a declared process or an operator's argv, exactly one or refused before anything is laid out; the launch file names the process or cmd, never an argv; CmdRootfs names the image with the process or with the argv in the request body, which root validates against the staged image itself (instancectl, unchanged); new site +registry:Host is that refusal's message; Plan 6 Task 8 (PF-1): takes the role, cmd or tty, and oneShotSinks; refused before anything is laid out unless the role is a one-shot whose I/O matches (a terminal for tty alone), and for tty unless the control channel has the session verbs (TTYControl, else ErrNoTTY); prepare(rt, role); for tty the session pty and its handoff socket on the agent own logs path (openTTY, TTYSocketName) take the place of the two stream listeners; the launch file is the role one (launch.tty.json for tty: schema 2, process console or cmd, never an argv, env alone through rootfsLaunchEnv); a tty starts through TTYControl.TTYRootfs (POST /tty runtime=rootfs; root Task 6 handler validates the staged image and the process or argv itself), a cmd through CmdRootfs as before; the same refusal and may-have-begun handling; -whole:Route is b.tier(rt) read once registry:Host@1135,registry:Host@1299,registry:Host@1428,registry:Host@1645,registry:Host@2062,registry:Host@2211,registry:Host@2274,registry:Host@2542,registry:Host@2870,registry:Host@2996,registry:Host@3094,registry:Host@320,registry:Host@490,registry:Host@685,registry:Host@963,whole:Route@1351,whole:Route@2089,whole:Route@2935,whole:Route@2939,whole:Route@3161,whole:Route@3165,whole:Route@780 9a8131053dfff1c24d5a222612df56c09d2c105234b9a471773243ba88aabfec
-@legacy bcbb2ab3880cdb8dd08adc67e18b28162861e95cc4689f49a2bbaaa77709003a internal/activator/cmd.go Service.RunCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): admits one run against an awake entry under the agent's own lease, fence and swap checks; it starts nothing itself and root validates what it later names;rev3=census-ruling-edge-request-records;basis=passes nil for begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: a carlos run is refused with ErrCmdBusy while a release record of the host is open (a.releaseOps[rt.Host], in-memory), as a run already in flight refuses it; new site +registry:Host (that map lookup); adds a refusal only;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: AfterSettled honoured on every path (called before return on each path that starts no unit, else by the settle that proves the unit gone); a rootfs run is refused as a lost lease (CmdStoppedError StopLeaseLost) when its entry is not under the lease watch (residentWatchedLocked), and, off a.mu, when the replica's in-memory SafeUntil leaves less than oneShotStartLead (oneShotHeadroom); new sites are e.route.Rootfs() and a log line; adds refusals only Task 9 (PF-17): a session (spec.TTY) takes the entry's tty slot and a run its cmd slot (holdSlot), the hold carrying its role (newCmdHold); each is refused only for its own role (holdBusyLocked: ErrCmdBusy or ErrTTYBusy), so a run and a session coexist; a release command (a.releaseOps) refuses a run only, since the session's tty unit is its own; no read added, read sites unchanged Task 12 fix round 1 (Astra P1, incarnation binding): a session (spec.TTY) is refused with ErrCmdIncarnation, under a.mu, at admission (before the hold is attached, so nothing of it runs) and again at the last check before the start, unless the awake entry's row lifetime (e.route.Incarnation) equals spec.Incarnation, the lifetime the box's grant authorized; 0 (unknown) is refused; a run is not checked; refuses more, starts nothing new, no read added beyond the in-memory e.route field (sessionIncarnationLocked) file:Prepare@2688,file:Prepare@2722,registry:Host@1502,registry:Host@2098,registry:Host@7900,registry:Host@9136,registry:Kind@437,whole:Route@683,whole:Route@8304,whole:Route@869,whole:Route@8768,whole:Route@9301 9881ba68b16772b93517153df1501af9314de89d7f0fca24788793ef1b29cf76
+@legacy 4712a5206898739c37f64f3f79e98023972f81ab099d5bec48858e3f4d1926f0 internal/activator/cmd.go Service.RunCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): admits one run against an awake entry under the agent's own lease, fence and swap checks; it starts nothing itself and root validates what it later names;rev3=census-ruling-edge-request-records;basis=passes nil for begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: a carlos run is refused with ErrCmdBusy while a release record of the host is open (a.releaseOps[rt.Host], in-memory), as a run already in flight refuses it; new site +registry:Host (that map lookup); adds a refusal only;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: AfterSettled honoured on every path (called before return on each path that starts no unit, else by the settle that proves the unit gone); a rootfs run is refused as a lost lease (CmdStoppedError StopLeaseLost) when its entry is not under the lease watch (residentWatchedLocked), and, off a.mu, when the replica's in-memory SafeUntil leaves less than oneShotStartLead (oneShotHeadroom); new sites are e.route.Rootfs() and a log line; adds refusals only Task 9 (PF-17): a session (spec.TTY) takes the entry's tty slot and a run its cmd slot (holdSlot), the hold carrying its role (newCmdHold); each is refused only for its own role (holdBusyLocked: ErrCmdBusy or ErrTTYBusy), so a run and a session coexist; a release command (a.releaseOps) refuses a run only, since the session's tty unit is its own; no read added, read sites unchanged Task 12 fix round 1 (Astra P1, incarnation binding): a session (spec.TTY) is refused with ErrCmdIncarnation, under a.mu, at admission (before the hold is attached, so nothing of it runs) and again at the last check before the start, unless the awake entry's row lifetime (e.route.Incarnation) equals spec.Incarnation, the lifetime the box's grant authorized; Task 12 fix round 2 (revised ruling): only a mismatch refuses, and 0 matches 0 (a record and row with no lifetime fields); a run is not checked; refuses more, starts nothing new, no read added beyond the in-memory e.route field (sessionIncarnationLocked) file:Prepare@2688,file:Prepare@2722,registry:Host@1502,registry:Host@2098,registry:Host@7900,registry:Host@9136,registry:Kind@437,whole:Route@683,whole:Route@8304,whole:Route@869,whole:Route@8768,whole:Route@9301 9881ba68b16772b93517153df1501af9314de89d7f0fca24788793ef1b29cf76
@legacy 5c73de37a228f96b04da6efbce918888c7278380fb41acc6f337b28129c1c65f internal/activator/cmdunit.go ExecBackend.StartCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): writes launch.cmd.json in the instance's own directory and asks instance control to start the cmd unit; root validates the staged executable it names (refuseStagedExe) and decides the start;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: after the layout and run-directory checks, a rootfs row returns startRootfsRun (backend_rootfs.go) before nestedGate; the binary path is byte-identical (TestBinaryStartCmdLaunchGolden); new site +whole:Route is rt.Rootfs(); Plan 6 Task 8: a session (spec.TTY): checkCmdLaunch refuses before anything is listened on or written a launch shape (errCmdLaunchShape: process and argv both or neither, a process other than console, a run naming a process, a session with a run directory or streams, an id that is not one path element) and a process on a binary row (errBinaryProcess); then the session verbs (TTYControl) or ErrNoTTY; on a binary row the same nested gate, live link or staged build, launch environment and replica gate as a run; prepare(rt, RoleTTY); the pty and its handoff socket (openTTY) in place of the two streams; launch.tty.json with argv [live link, args...] and childEnv(ttyVars); then TTYControl.TTY, or TTYExe naming the staged build (POST /tty; root Task 6 handler validates it); the run path is unchanged (TestBinaryStartCmdLaunchGolden); new sites are rt to checkCmdLaunch and rt.Host in its error registry:Host@1092,registry:Host@1201,registry:Host@1972,registry:Host@2176,registry:Host@218,registry:Host@2404,registry:Host@2597,registry:Host@2671,registry:Host@2745,registry:Host@2819,registry:Host@3203,registry:Host@3336,registry:Host@3372,registry:Host@367,registry:Host@473,registry:Host@685,registry:Host@983,whole:Route@130,whole:Route@1788,whole:Route@1895,whole:Route@2220,whole:Route@2313,whole:Route@2489,whole:Route@298,whole:Route@3137,whole:Route@3141,whole:Route@3423,whole:Route@3427,whole:Route@414,whole:Route@755,whole:Route@792 c6e6aff9afe40d2bed118208c3efc69ee1dc2b2ca9566919f76d3ad13a03fb58
@legacy 1c353f4e60f0651b29fc9f3f265ebe5269ce639109112a63b5e8f2ff63989b16 internal/activator/cmdunit.go cmdUnit.Poll legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): a status read over the control socket; no decision;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=a rootfs row's (Runtime) command is polled through RootfsControl.CmdStatusRootfs, a binary row's through CmdStatus as before; both are status reads over the control socket; the new kind is registry:Runtime, one site; no decision;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 8 (PF-7): role-aware: a cmd unit polls as before (CmdStatusRootfs on a rootfs row, CmdStatus on a binary one); a tty unit polls through TTYControl, TTYStatusRootfs on a rootfs row and TTYStatus on a binary one, or ErrNoTTY without the session verbs; any other role is refused; all status reads over the control socket, no decision; the new sites are the error text (rt.Host), the tty arm runtime check (rt.Runtime) and the route passed registry:Host@279,registry:Host@334,registry:Host@392,registry:Host@541,registry:Host@643,registry:Host@692,registry:Host@792,registry:Runtime@126,registry:Runtime@566,whole:Route@128,whole:Route@281,whole:Route@336,whole:Route@394,whole:Route@543,whole:Route@568,whole:Route@645,whole:Route@694,whole:Route@794 ccbe6c0392bb15a847b1d00cf20b3ae146e96c41a5389e188659a464aa3c2877
@legacy 9cf38b9e2187459c195b34026f96a71b7bf7883f4d7219e66562c9f446fbbdc3 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
@@ -114,7 +114,7 @@ internal/interactive/interactive.go Open.Normalized legacy accepted-legacy accep
internal/interactive/interactive.go type Open legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: enters scope unchanged with package interactive (Task 2); the Open frame's declaration; file:Open is the type's name; reads nothing file:Open@5 ad72d02e636f55e4c1d4b62129780432b5b949672042ec59d4cb7dbfbc027a3b
internal/activator/cmdunit.go cmdUnit.StopAndSettle legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): asks instance control to stop the unit, then waits; the agent keeps the lease until this is proven; no root decision;rev3=census-ruling-rootfs-apps-2;basis=the stop goes through stopRole with the row instead of Control.Stop with its host, so one Host site goes; for a rootfs row that is the rootfs stop verb's request (StopRootfs) over the same control socket; the proof (stop, cgroup empty, streams drained) is unchanged; no file read added;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 8 (PF-7): stops and proves the unit own role (stopRole and waitRoleCgroupEmpty with u.role, cmd or tty), never a hard-coded cmd; a unit of no one-shot role is refused; after the proof it drains the two streams, or closes the session handoff and master; new sites are the refusal text (rt.Host) and the route registry:Host@216,whole:Route@218,whole:Route@365,whole:Route@517 68abc85a8850ee4e740e177636b40026b5cea4fb3545d2995ccbab6ff05bd0dc
internal/activator/backend_rootfs.go ExecBackend.startRootfsCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R1 [pf R0.1, R1.4]: new; the agent's first caller of root's existing CmdRootfs (POST /cmd to root's control socket, unchanged). In order: rootfsGates; refuses a partial staged identity (version, path, digest); rootfsControl; prepare(rt, RoleCmd) (the instance's own directories); two stream listeners on the agent's own log sockets (logSocketNamed); the schema-2 launch file for RoleCmd with env alone (writeRootfsLaunchFor, the same writer and the same root reader as the web start's RoleRun file, rootfsLaunchEnv: never the agent's own environment); the caller's exec gate (runExecGate); then CmdRootfs(host, the row's tier memory.max, StagedImage{staged path, version, digest, process}), process being a declared process name root checks against the staged manifest. ErrStagedImage and ErrStartRefused are refusals with no unit; any other error returns a unit to stop and settle. Root validates the staged image and the process itself (instancectl, unchanged); registry:Host sites are log lines, socket and unit names;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: takes a rootfsCmdLaunch, a declared process or an operator's argv, exactly one or refused before anything is laid out; the launch file names the process or cmd, never an argv; CmdRootfs names the image with the process or with the argv in the request body, which root validates against the staged image itself (instancectl, unchanged); new site +registry:Host is that refusal's message; Plan 6 Task 8 (PF-1): takes the role, cmd or tty, and oneShotSinks; refused before anything is laid out unless the role is a one-shot whose I/O matches (a terminal for tty alone), and for tty unless the control channel has the session verbs (TTYControl, else ErrNoTTY); prepare(rt, role); for tty the session pty and its handoff socket on the agent own logs path (openTTY, TTYSocketName) take the place of the two stream listeners; the launch file is the role one (launch.tty.json for tty: schema 2, process console or cmd, never an argv, env alone through rootfsLaunchEnv); a tty starts through TTYControl.TTYRootfs (POST /tty runtime=rootfs; root Task 6 handler validates the staged image and the process or argv itself), a cmd through CmdRootfs as before; the same refusal and may-have-begun handling; -whole:Route is b.tier(rt) read once registry:Host@1135,registry:Host@1299,registry:Host@1428,registry:Host@1645,registry:Host@2062,registry:Host@2211,registry:Host@2274,registry:Host@2542,registry:Host@2870,registry:Host@2996,registry:Host@3094,registry:Host@320,registry:Host@490,registry:Host@685,registry:Host@963,whole:Route@1351,whole:Route@2089,whole:Route@2935,whole:Route@2939,whole:Route@3161,whole:Route@3165,whole:Route@780 9a8131053dfff1c24d5a222612df56c09d2c105234b9a471773243ba88aabfec
-internal/activator/cmd.go Service.RunCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): admits one run against an awake entry under the agent's own lease, fence and swap checks; it starts nothing itself and root validates what it later names;rev3=census-ruling-edge-request-records;basis=passes nil for begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: a carlos run is refused with ErrCmdBusy while a release record of the host is open (a.releaseOps[rt.Host], in-memory), as a run already in flight refuses it; new site +registry:Host (that map lookup); adds a refusal only;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: AfterSettled honoured on every path (called before return on each path that starts no unit, else by the settle that proves the unit gone); a rootfs run is refused as a lost lease (CmdStoppedError StopLeaseLost) when its entry is not under the lease watch (residentWatchedLocked), and, off a.mu, when the replica's in-memory SafeUntil leaves less than oneShotStartLead (oneShotHeadroom); new sites are e.route.Rootfs() and a log line; adds refusals only Task 9 (PF-17): a session (spec.TTY) takes the entry's tty slot and a run its cmd slot (holdSlot), the hold carrying its role (newCmdHold); each is refused only for its own role (holdBusyLocked: ErrCmdBusy or ErrTTYBusy), so a run and a session coexist; a release command (a.releaseOps) refuses a run only, since the session's tty unit is its own; no read added, read sites unchanged Task 12 fix round 1 (Astra P1, incarnation binding): a session (spec.TTY) is refused with ErrCmdIncarnation, under a.mu, at admission (before the hold is attached, so nothing of it runs) and again at the last check before the start, unless the awake entry's row lifetime (e.route.Incarnation) equals spec.Incarnation, the lifetime the box's grant authorized; 0 (unknown) is refused; a run is not checked; refuses more, starts nothing new, no read added beyond the in-memory e.route field (sessionIncarnationLocked) file:Prepare@2688,file:Prepare@2722,registry:Host@1502,registry:Host@2098,registry:Host@7900,registry:Host@9136,registry:Kind@437,whole:Route@683,whole:Route@8304,whole:Route@869,whole:Route@8768,whole:Route@9301 9881ba68b16772b93517153df1501af9314de89d7f0fca24788793ef1b29cf76
+internal/activator/cmd.go Service.RunCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): admits one run against an awake entry under the agent's own lease, fence and swap checks; it starts nothing itself and root validates what it later names;rev3=census-ruling-edge-request-records;basis=passes nil for begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: a carlos run is refused with ErrCmdBusy while a release record of the host is open (a.releaseOps[rt.Host], in-memory), as a run already in flight refuses it; new site +registry:Host (that map lookup); adds a refusal only;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: AfterSettled honoured on every path (called before return on each path that starts no unit, else by the settle that proves the unit gone); a rootfs run is refused as a lost lease (CmdStoppedError StopLeaseLost) when its entry is not under the lease watch (residentWatchedLocked), and, off a.mu, when the replica's in-memory SafeUntil leaves less than oneShotStartLead (oneShotHeadroom); new sites are e.route.Rootfs() and a log line; adds refusals only Task 9 (PF-17): a session (spec.TTY) takes the entry's tty slot and a run its cmd slot (holdSlot), the hold carrying its role (newCmdHold); each is refused only for its own role (holdBusyLocked: ErrCmdBusy or ErrTTYBusy), so a run and a session coexist; a release command (a.releaseOps) refuses a run only, since the session's tty unit is its own; no read added, read sites unchanged Task 12 fix round 1 (Astra P1, incarnation binding): a session (spec.TTY) is refused with ErrCmdIncarnation, under a.mu, at admission (before the hold is attached, so nothing of it runs) and again at the last check before the start, unless the awake entry's row lifetime (e.route.Incarnation) equals spec.Incarnation, the lifetime the box's grant authorized; Task 12 fix round 2 (revised ruling): only a mismatch refuses, and 0 matches 0 (a record and row with no lifetime fields); a run is not checked; refuses more, starts nothing new, no read added beyond the in-memory e.route field (sessionIncarnationLocked) file:Prepare@2688,file:Prepare@2722,registry:Host@1502,registry:Host@2098,registry:Host@7900,registry:Host@9136,registry:Kind@437,whole:Route@683,whole:Route@8304,whole:Route@869,whole:Route@8768,whole:Route@9301 9881ba68b16772b93517153df1501af9314de89d7f0fca24788793ef1b29cf76
internal/activator/cmdunit.go ExecBackend.StartCmd legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): writes launch.cmd.json in the instance's own directory and asks instance control to start the cmd unit; root validates the staged executable it names (refuseStagedExe) and decides the start;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: after the layout and run-directory checks, a rootfs row returns startRootfsRun (backend_rootfs.go) before nestedGate; the binary path is byte-identical (TestBinaryStartCmdLaunchGolden); new site +whole:Route is rt.Rootfs(); Plan 6 Task 8: a session (spec.TTY): checkCmdLaunch refuses before anything is listened on or written a launch shape (errCmdLaunchShape: process and argv both or neither, a process other than console, a run naming a process, a session with a run directory or streams, an id that is not one path element) and a process on a binary row (errBinaryProcess); then the session verbs (TTYControl) or ErrNoTTY; on a binary row the same nested gate, live link or staged build, launch environment and replica gate as a run; prepare(rt, RoleTTY); the pty and its handoff socket (openTTY) in place of the two streams; launch.tty.json with argv [live link, args...] and childEnv(ttyVars); then TTYControl.TTY, or TTYExe naming the staged build (POST /tty; root Task 6 handler validates it); the run path is unchanged (TestBinaryStartCmdLaunchGolden); new sites are rt to checkCmdLaunch and rt.Host in its error registry:Host@1092,registry:Host@1201,registry:Host@1972,registry:Host@2176,registry:Host@218,registry:Host@2404,registry:Host@2597,registry:Host@2671,registry:Host@2745,registry:Host@2819,registry:Host@3203,registry:Host@3336,registry:Host@3372,registry:Host@367,registry:Host@473,registry:Host@685,registry:Host@983,whole:Route@130,whole:Route@1788,whole:Route@1895,whole:Route@2220,whole:Route@2313,whole:Route@2489,whole:Route@298,whole:Route@3137,whole:Route@3141,whole:Route@3423,whole:Route@3427,whole:Route@414,whole:Route@755,whole:Route@792 c6e6aff9afe40d2bed118208c3efc69ee1dc2b2ca9566919f76d3ad13a03fb58
internal/activator/cmdunit.go cmdUnit.Poll legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): a status read over the control socket; no decision;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=a rootfs row's (Runtime) command is polled through RootfsControl.CmdStatusRootfs, a binary row's through CmdStatus as before; both are status reads over the control socket; the new kind is registry:Runtime, one site; no decision;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 8 (PF-7): role-aware: a cmd unit polls as before (CmdStatusRootfs on a rootfs row, CmdStatus on a binary one); a tty unit polls through TTYControl, TTYStatusRootfs on a rootfs row and TTYStatus on a binary one, or ErrNoTTY without the session verbs; any other role is refused; all status reads over the control socket, no decision; the new sites are the error text (rt.Host), the tty arm runtime check (rt.Runtime) and the route passed registry:Host@279,registry:Host@334,registry:Host@392,registry:Host@541,registry:Host@643,registry:Host@692,registry:Host@792,registry:Runtime@126,registry:Runtime@566,whole:Route@128,whole:Route@281,whole:Route@336,whole:Route@394,whole:Route@543,whole:Route@568,whole:Route@645,whole:Route@694,whole:Route@794 ccbe6c0392bb15a847b1d00cf20b3ae146e96c41a5389e188659a464aa3c2877
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