carlos / platform Public

activator: AfterSettled runs after the proof and Stop does not wait for it; a lease kill's hold on its entry is bounded by KillOneShot's budgets (rootfs plan 6 task 7a fix round 2)

Astra re-review P2 1 and 2: back to the asynchronous contract. A settle
ends its attempt once the proof is in; onProven and AfterSettled run
after that, in the settle's goroutine, and no Stop waits for them.
CmdSpec.AfterSettled says so: once, after the proof, never under a lock,
and it must not call Stop or Shutdown. The tests wait for the callback
explicitly; a blocking callback holds up neither Stop.

P2 3: a lease stop's count is held until KillOneShot returns, which
ExecBackend bounds by its own budgets whatever its caller's context:
oneShotKillControlBound (DeadlineControl, now a var a test can shrink)
for root's kill, then roleEmptyBound for the proof. A test hangs the
control service and the cgroup and sees each return within its budget,
and the entry's count drop, with no timer clearing it.

Census overlay rootfs-apps-6 re-proposed (seal a56c8ee8).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev ba3d96cc23d7efaba4ae6d7f87f4f6e466f0267e parent e026fdc
10 files changed, +219 −45
  • docs/superpowers/notes/census-proposal-rootfs-apps-6.md +2 −2
  • internal/activator/backend_rootfs.go +12 −4
  • internal/activator/cmd.go +16 −7
  • internal/activator/cmd_test.go +40 −15
  • internal/activator/cmdunit.go +14 −9
  • internal/activator/control.go +2 −2
  • internal/activator/rootfs_cmd_lease_test.go +125 −0
  • internal/activator/rootfs_cmd_test.go +2 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv +5 −5

Intent

Human

<task-notification> <task-id>bkths8reu</task-id> <tool-use-id>toolu_014KAXUk5pFY1GPdefxHf9b9</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/bkths8reu.output</output-file> <status>completed</status> <summary>Background command "Run Astra re-review of #471 Task 7 fix" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>a0308ee47834a46cd</task-id> <tool-use-id>toolu_01YYirApoipGbpwWxspvwxN2</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/a0308ee47834a46cd.output</output-file> <status>completed</status> <summary>Agent "#471 Task 8: Action Cable sample" 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:** abf58111 on design-tunnel-websockets-471 (not pushed) **Result:** The handshake gave `101 Switching Protocols` with `Sec-WebSocket-Protocol: actioncable-v1-json`, followed by a frame holding `{"type":"welcome"}`, and the `grep -c 'id="done"'` printed 1. Both ran against an amd64 build, not arm64 (see concern 1). I also ran the worker inside the container: submitting the form with its token produced the broadcast `{id:1, done:1, total:1}` on PingsChannel. The Rails sample tests in `internal/docsite` pass. **Concerns:** 1. **Step 1 was not run.** This machine is x86_64, has only podman (no docker), and has no arm64 emulator registered, which would need root to add. So I could not do the arm64 build or `carlos ship --check`, which runs arm64 containers and turns amd64 images away. Step 2 ran against an amd64 build of the same files, using the brief's run command and flags (loopback only), with podman in place of docker. Step 1 still needs an arm64-capable host. 2. **I edited `examples/rails-shop/v2.patch`, which is not in the brief's file list.** It quotes the old "Jobs done" line, so it would no longer have applied after the page change. I updated that one line to match the new page, and `git apply --check` now passes. No visible words change. 3. **The browser side was not tested.** There is no browser here, so I have not seen the script update the counts in a real page or confirmed the submit stays on the page. Cleanup is done: the container is stopped and gone, the images I built or pulled are removed, scratch files are deleted, and nothing is listening on port 3000. No `shop-ws.tar` was ever written because step 1 didn't run. The full report, with the command outputs, is appended to `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-tunnel-websockets-471/.superpowers/sdd/2026-10-30-tunnel-websockets/task-8-report.md`.</result> <usage><subagent_tokens>80130</subagent_tokens><tool_uses>29</tool_uses><duration_ms>320385</duration_ms></usage> </task-notification>

Attributed to this commit: 11.6 g CO₂e (1,359,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 37ae9c1b5..ad4674f98 100644
--- a/docs/superpowers/notes/census-proposal-rootfs-apps-6.md
+++ b/docs/superpowers/notes/census-proposal-rootfs-apps-6.md
@@ -8,7 +8,7 @@ Ruling `census-ruling-rootfs-apps-6`. The independent reviewer approves or rejec
| `internal/activator/activator.go` `Service.installProcLocked` | body | unchanged (1) | rootfs Plan 6 Task 7a (Call A1, Astra R1 P1-1): the lease watch is installed for every rootfs row (e.route.Rootfs()), not only a resident, so a hibernating rootfs row's run or session is reached at the lease's loss; the same one read of the entry's route; installs nothing else |
| `internal/activator/activator.go` `type Service` | body | unchanged (0) | rootfs Plan 6 Task 7a fix round 1: one field, drainBudget (time.Duration), which New copies from residentDrainBudget and a rootfs entry's lease watch reads in its place, so a test's change of the package var never races a watch goroutine; declaration only, reads nothing |
| `internal/activator/backend_rootfs.go` `ExecBackend.StartRelease` | body | unchanged (2) | rootfs Plan 6 Task 7a: passes rootfsCmdLaunch{Process: release.ProcessRelease} to startRootfsCmd in place of the bare process name; its /cmd request and launch.cmd.json are byte-identical to before (TestStartReleaseIsUnchanged, goldens written from 3fd3c3a4); no read added |
-| `internal/activator/cmdunit.go` `type CmdSpec` | body | unchanged (1) | rootfs Plan 6 Task 7a: declaration only: gains AfterSettled, a callback field the caller sets (the box's run pass removes the run's directory in it), called once when no unit of the run can be running; reads nothing |
+| `internal/activator/cmdunit.go` `type CmdSpec` | body | unchanged (1) | rootfs Plan 6 Task 7a: declaration only: gains AfterSettled, a callback field the caller sets (the box's run pass removes the run's directory in it), called once when no unit of the run can be running; reads nothing; fix round 2: comment only: AfterSettled is called once, after the proof, never while a lock is held, in the settle's goroutine without the stop waiting for it, and must not call Stop or Shutdown |
| `internal/activator/rootfs_service.go` `Service.residentLeaseLost` | body | unchanged (2) | rootfs Plan 6 Task 7a (Call A1): residentLeaseLostLocked also returns one kill func per one-shot unit that may run; each runs off a.mu in the same WaitGroup as stopRootfsWorkersAtLoss and killResidentGens, which still run only for a resident (gens non-nil); the kills go to root's existing /stop through KillOneShot; no read added |
| `internal/host/runexec.go` `runsWorker.execute` | body | unchanged (2) | rootfs Plan 6 Task 7a (INV-2): sets CmdSpec.AfterSettled to remove the run's directory (runs.RemoveRunDir under the instance's own directory, as cleanUp did) once the activator has proven no unit of the run runs; finish and cleanUp take removeDir, true only on the incarnation refusal before RunCmd; the directory goes later or at the same point, never earlier; no read added |
| `internal/host/units/carlos-instance-cmd@.service` `external` | body | unchanged (1) | rootfs Plan 6 Task 5: the same one namespace-block line, TemporaryFileSystem=/dev/pts:ro, as carlos-instance@.service; nothing else |
@@ -81,6 +81,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/instancectl/cmd.go:Server.oneShotStatus`: reads +file:Query ×3; written legacy, accepted-legacy, frozen
- new `internal/instanceexec/tty_linux.go:receivePTY`: reads +file:Fstat; written legacy, accepted-legacy, frozen
-Seal: `1379d066c8dd2335d95d5f6e9c7bce65ff57f00b2b287a308d9b3f47911ae5e7` → `92667fa6f8aabb3261f962c8105f08abef20ba8590eae9c7fb889ce6d3eae8d5`.
+Seal: `1379d066c8dd2335d95d5f6e9c7bce65ff57f00b2b287a308d9b3f47911ae5e7` → `a56c8ee8a732dac41ad40926f6f28ebfc0f1ec1a2980069f4dac9b3a4db01db1`.
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/activator/backend_rootfs.go b/internal/activator/backend_rootfs.go
index 224669f16..2efe7d0eb 100644
--- a/internal/activator/backend_rootfs.go
+++ b/internal/activator/backend_rootfs.go
@@ -322,15 +322,23 @@ var (
_ oneShotKiller = (*SplitBackend)(nil)
)
+// oneShotKillControlBound is how long KillOneShot waits for root's kill
+// (StopRootfs with kill) whatever its caller's context says:
+// DeadlineControl. A var so a test can shrink it (fix round 2: the bound a
+// lease stop's count is held for).
+var oneShotKillControlBound = instancectl.DeadlineControl
+
// errOneShotKillBinary: a binary row holds no resident lease and its
// commands are not killed at a loss (its stop's own settle decides).
var errOneShotKillBinary = errors.New("activator: a binary row's command has no lease kill")
// KillOneShot implements oneShotKiller, for a rootfs row only: root kills
// the rootfs unit of role outright (StopRootfs with kill: SIGKILL, stop,
-// its cgroup proven empty, then its files), on DeadlineControl, then the
-// agent reads that unit's cgroup until it is empty or roleEmptyBound
-// passes. Neither bound is the caller's to cut short. nil is the proof.
+// its cgroup proven empty, then its files), on oneShotKillControlBound
+// (DeadlineControl, 30 s), then the agent reads that unit's cgroup until
+// it is empty or roleEmptyBound (20 s) passes. Neither bound is the
+// caller's to cut short or to lengthen: a control service that hangs, or a
+// cgroup that never empties, still returns within them. nil is the proof.
func (b *ExecBackend) KillOneShot(ctx context.Context, rt registry.Route, role instancectl.Role) error {
if !rt.Rootfs() {
return fmt.Errorf("%s: %w", rt.Host, errOneShotKillBinary)
@@ -343,7 +351,7 @@ func (b *ExecBackend) KillOneShot(ctx context.Context, rt registry.Route, role i
return fmt.Errorf("%s: %w", rt.Host, err)
}
unit := instancectl.RootfsUnitName(role, rt.Host)
- sctx, cancel := context.WithTimeout(context.WithoutCancel(ctx), instancectl.DeadlineControl)
+ sctx, cancel := context.WithTimeout(context.WithoutCancel(ctx), oneShotKillControlBound)
err = rc.StopRootfs(sctx, rt.Host, role, 0, "", true)
cancel()
if err != nil {
diff --git a/internal/activator/cmd.go b/internal/activator/cmd.go
index 06bda4c7e..c12b8252d 100644
--- a/internal/activator/cmd.go
+++ b/internal/activator/cmd.go
@@ -195,7 +195,10 @@ func (h *cmdHold) stop(ctx context.Context, reason string) error {
// settle is one attempt: the unit's StopAndSettle, unbounded by any
// caller's context (StopAndSettle bounds itself), so a caller that gives
-// up waiting never cuts a settle short.
+// up waiting never cuts a settle short. The attempt ends (at.done) once
+// the proof is in; onProven and AfterSettled run after that, in this
+// goroutine, and no stop waits for them (fix round 2: proof and the
+// callback's completion are different states, CmdSpec.AfterSettled).
func (h *cmdHold) settle(at *cmdSettle) {
err := h.unit.StopAndSettle(context.Background())
h.mu.Lock()
@@ -205,17 +208,13 @@ func (h *cmdHold) settle(at *cmdSettle) {
}
h.settling, h.lastTry = nil, h.now()
h.mu.Unlock()
- // A settle that proves the unit gone runs onProven and AfterSettled
- // before it ends the attempt, so a stop that returns nil returns with
- // both done (Plan 6 Task 7a fix round 1: the callback's completion is
- // part of the stop's contract).
+ close(at.done)
if err == nil {
if h.onProven != nil {
h.onProven()
}
h.settled()
}
- close(at.done)
}
// retrySettle starts one settle attempt in the background, for the sweep
@@ -441,7 +440,17 @@ func oneShotHoldsLocked(e *actEntry) bool {
// lease held) and takes no new run or release command (cmdBusyLocked).
// finishStop is the only release of an entry that held a run, so no other
// entry, and no other command of the unit, can exist on this box until the
-// kill has returned. The caller holds a.mu.
+// kill has returned.
+//
+// How long the count can stay up is the backend's to bound: a func returns
+// once its KillOneShot calls have returned (at most two) and its waits on
+// the start and the hold's stop, which end on cmdStopBound. KillOneShot is
+// called synchronously, and ExecBackend.KillOneShot bounds itself whatever
+// its caller's context says: oneShotKillControlBound (DeadlineControl,
+// 30 s) for root's kill, then roleEmptyBound (20 s) for the cgroup proof
+// (fix round 2). A backend that never returned would keep e pending; the
+// count is never dropped on a timer, which would let a late kill reach the
+// next command. The caller holds a.mu.
func (a *Service) stopOneShotsAtLeaseLocked(e *actEntry, rt registry.Route, kill bool) []func() {
if !rt.Rootfs() {
return nil
diff --git a/internal/activator/cmd_test.go b/internal/activator/cmd_test.go
index d4e42caab..2a1d01430 100644
--- a/internal/activator/cmd_test.go
+++ b/internal/activator/cmd_test.go
@@ -833,9 +833,9 @@ func TestRunCmdAfterSettledRunsOnceOnEveryPath(t *testing.T) {
if err := h.Stop(context.Background()); err != nil {
t.Fatal(err)
}
- if r.n.Load() != 1 {
- t.Fatalf("AfterSettled ran %d times after a proven Stop, want once", r.n.Load())
- }
+ // AfterSettled runs after the proof, in the settle's goroutine,
+ // and Stop does not wait for it (fix round 2): wait for it.
+ settledOnce(t, r, "AfterSettled after a proven Stop")
if err := h.Stop(context.Background()); err != nil {
t.Fatal(err)
}
@@ -850,25 +850,50 @@ func TestRunCmdAfterSettledRunsOnceOnEveryPath(t *testing.T) {
}
}
-// Fix round 1 (Astra P2): AfterSettled's completion is part of the proving
-// stop's contract: a Stop that proves the unit gone returns only once the
-// callback has returned, so the caller's files are gone by then.
-func TestAProvingStopReturnsAfterAfterSettled(t *testing.T) {
+// Fix round 2 (Astra P2s 1 and 2): Stop returns once termination is
+// proven and does not wait for AfterSettled, which runs once, after the
+// proof. A callback that blocks holds up neither the Stop that proved the
+// unit gone nor a second Stop, and still runs exactly once.
+func TestABlockingAfterSettledDoesNotBlockStop(t *testing.T) {
t.Parallel()
a, _, _ := testCmdActivator(t, Config{})
- var done atomic.Bool
+ entered, release := make(chan struct{}), make(chan struct{})
+ var calls atomic.Int32
+ var opened sync.Once
+ letGo := func() { opened.Do(func() { close(release) }) }
+ t.Cleanup(letGo)
h, err := a.RunCmd(context.Background(), testRoute("c.example.com"), CmdSpec{RunID: "run_a", AfterSettled: func() {
- time.Sleep(100 * time.Millisecond)
- done.Store(true)
+ calls.Add(1)
+ close(entered)
+ <-release
}})
if err != nil {
t.Fatal(err)
}
- defer h.Release()
- if err := h.Stop(context.Background()); err != nil {
- t.Fatal(err)
+ stopped := make(chan error, 2)
+ go func() {
+ stopped <- h.Stop(context.Background())
+ stopped <- h.Stop(context.Background())
+ }()
+ for i := 0; i < 2; i++ {
+ select {
+ case err := <-stopped:
+ if err != nil {
+ t.Fatalf("Stop %d: %v", i+1, err)
+ }
+ case <-time.After(5 * time.Second):
+ t.Fatalf("Stop %d waited for a blocked AfterSettled", i+1)
+ }
+ }
+ select {
+ case <-entered:
+ case <-time.After(5 * time.Second):
+ t.Fatal("AfterSettled never ran after the proof")
}
- if !done.Load() {
- t.Fatal("Stop returned before AfterSettled had")
+ letGo()
+ h.Release()
+ time.Sleep(20 * time.Millisecond)
+ if n := calls.Load(); n != 1 {
+ t.Fatalf("AfterSettled ran %d times, want once", n)
}
}
diff --git a/internal/activator/cmdunit.go b/internal/activator/cmdunit.go
index 6487043c7..283eefb32 100644
--- a/internal/activator/cmdunit.go
+++ b/internal/activator/cmdunit.go
@@ -52,16 +52,21 @@ type CmdSpec struct {
// last check is that old by then. An error ends the run before launch,
// as Prepare's does.
Recheck func(ctx context.Context) error
- // AfterSettled, when set, is called exactly once, never with a.mu
- // held, when no unit of this run can be running (rootfs apps Plan 6
- // Task 7a, INV-2): the caller's files (CARLOS_RUN_DIR) go then, never
- // before. RunCmd calls it before it returns on every path that starts
- // no unit (each refusal, an abandon, a start that returned no unit);
- // otherwise the settle that first proves the unit gone calls it (the
+ // AfterSettled, when set, is called exactly once, after the proof that
+ // no unit of this run can be running, and never while a lock is held
+ // (rootfs apps Plan 6 Task 7a, INV-2): the caller's files
+ // (CARLOS_RUN_DIR) go then, never before. RunCmd calls it before it
+ // returns on every path that starts no unit (each refusal, an abandon,
+ // a start that returned no unit). Otherwise the settle that first
+ // proves the unit gone calls it, after that proof is published (the
// run's own Stop, the instance's stop, a swap's interruption, the
- // sweep's retry, the lease-loss stop). It is never called while the
- // proof is missing: an agent that exits first leaves the files to the
- // next agent's boot pass, which runs after the startup sweep.
+ // sweep's retry, the lease-loss stop), in the settle's own goroutine:
+ // a Stop returns once termination is proven and does not wait for it
+ // (fix round 2). It is never called while the proof is missing: an
+ // agent that exits first leaves the files to the next agent's boot
+ // pass, which runs after the startup sweep. It must not call the run's
+ // Stop or the Service's Shutdown: a stop or shutdown may be waiting on
+ // the run it is called for.
AfterSettled func()
// serving is the serving generation's staged build, set by RunCmd at its
diff --git a/internal/activator/control.go b/internal/activator/control.go
index 3e929f59d..47bdef97a 100644
--- a/internal/activator/control.go
+++ b/internal/activator/control.go
@@ -66,8 +66,8 @@ var _ SizeControl = (*instancectl.Client)(nil)
type RootfsControl interface {
StartRootfs(ctx context.Context, host string, gen uint64, memoryMax int64, img instancectl.StagedImage) (string, error)
StartRootfsWorker(ctx context.Context, host, name string, memoryMax int64, img instancectl.StagedImage) (string, error)
- // StopRootfs stops one rootfs unit; kill (a generation only) kills it
- // outright, as GenControl.StopGen's does.
+ // StopRootfs stops one rootfs unit; kill (a generation, or a one-shot
+ // cmd or tty unit) kills it outright, as GenControl.StopGen's does.
StopRootfs(ctx context.Context, host string, role instancectl.Role, gen uint64, worker string, kill bool) error
CmdRootfs(ctx context.Context, host string, memoryMax int64, img instancectl.StagedImage) (string, error)
// CmdStatusRootfs long-polls the rootfs cmd unit, as CmdStatus does the
diff --git a/internal/activator/rootfs_cmd_lease_test.go b/internal/activator/rootfs_cmd_lease_test.go
index d6ab2b2bc..29a8494bb 100644
--- a/internal/activator/rootfs_cmd_lease_test.go
+++ b/internal/activator/rootfs_cmd_lease_test.go
@@ -73,6 +73,8 @@ type runLeaseBackend struct {
startGate chan struct{}
startEntered chan struct{}
cmdStarts int
+ // killVia, when set, is the kill itself: a real ExecBackend's.
+ killVia oneShotKiller
}
func (b *runLeaseBackend) StartCmd(_ context.Context, _ registry.Route, spec CmdSpec) (CmdUnit, error) {
@@ -100,6 +102,9 @@ func (b *runLeaseBackend) KillOneShot(_ context.Context, rt registry.Route, role
}
// Recorded when the kill reaches root, after any delay.
b.record(fmt.Sprintf("killoneshot:%s", role))
+ if b.killVia != nil {
+ return b.killVia.KillOneShot(context.Background(), rt, role)
+ }
return nil
}
@@ -267,6 +272,8 @@ func TestResidentLeaseLossKillsAnAttachedRun(t *testing.T) {
t.Fatalf("events %v: the lease was given back before the run's hold was proven", ev)
}
run.Release()
+ waitFor(t, "AfterSettled after the proof", func() bool { return settled.Load() >= 1 })
+ time.Sleep(20 * time.Millisecond)
if n := settled.Load(); n != 1 {
t.Fatalf("AfterSettled ran %d times, want once", n)
}
@@ -762,3 +769,121 @@ func TestAnOutstandingLeaseStopKeepsTheUnitFree(t *testing.T) {
}
run.Release()
}
+
+// hangingRootfsCtl is fakeControl whose rootfs stop (root's kill) never
+// answers: it returns only when its context ends.
+type hangingRootfsCtl struct {
+ *fakeControl
+ mu sync.Mutex
+ asked int
+}
+
+func (c *hangingRootfsCtl) StopRootfs(ctx context.Context, _ string, _ instancectl.Role, _ uint64, _ string, _ bool) error {
+ c.mu.Lock()
+ c.asked++
+ c.mu.Unlock()
+ <-ctx.Done()
+ return ctx.Err()
+}
+
+func (c *hangingRootfsCtl) askedCount() int {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ return c.asked
+}
+
+// Fix round 2 (Astra P2 3): how long a lease stop's count can hold an
+// entry is ExecBackend.KillOneShot's own budgets, whatever its caller's
+// context: root's kill on oneShotKillControlBound, then the cgroup proof
+// on roleEmptyBound (shortened here to 200 ms each). A control service
+// that never answers, and a cgroup that never empties, each end in an
+// error within its budget; and a lease stop whose kill goes through that
+// backend returns, so the entry's count drops back, without any timer
+// clearing it.
+func TestALeaseKillIsBoundedByKillOneShotsBudgets(t *testing.T) {
+ oldC, oldE := oneShotKillControlBound, roleEmptyBound
+ oneShotKillControlBound, roleEmptyBound = 200*time.Millisecond, 200*time.Millisecond
+ t.Cleanup(func() { oneShotKillControlBound, roleEmptyBound = oldC, oldE })
+ const slack = 2 * time.Second
+
+ t.Run("the control service hangs", func(t *testing.T) {
+ eb, ctl := newRootfsBackend(t)
+ hang := &hangingRootfsCtl{fakeControl: ctl}
+ eb.Control = hang
+ began := time.Now()
+ err := eb.KillOneShot(context.Background(), rootfsRoute(eb), instancectl.RoleCmd)
+ took := time.Since(began)
+ if err == nil || hang.askedCount() != 1 {
+ t.Fatalf("KillOneShot = %v with root asked %d times; want an error after one ask", err, hang.askedCount())
+ }
+ if took < oneShotKillControlBound || took > oneShotKillControlBound+slack {
+ t.Fatalf("KillOneShot returned after %s; want its control budget, %s", took, oneShotKillControlBound)
+ }
+ })
+ t.Run("the cgroup never empties", func(t *testing.T) {
+ eb, _ := newRootfsBackend(t)
+ eb.ObservePoll = 20 * time.Millisecond
+ eb.CgroupEvents = func(string, string) (bool, bool, error) { return true, true, nil }
+ began := time.Now()
+ err := eb.KillOneShot(context.Background(), rootfsRoute(eb), instancectl.RoleCmd)
+ took := time.Since(began)
+ if err == nil {
+ t.Fatal("KillOneShot proved a unit gone whose cgroup is populated")
+ }
+ if took < roleEmptyBound || took > roleEmptyBound+slack {
+ t.Fatalf("KillOneShot returned after %s; want its proof budget, %s", took, roleEmptyBound)
+ }
+ })
+ t.Run("the lease stop's count drops", func(t *testing.T) {
+ host := "shop.example.com"
+ a, b, clk := runLeaseService(t)
+ eb, ctl := newRootfsBackend(t)
+ hang := &hangingRootfsCtl{fakeControl: ctl}
+ eb.Control = hang
+ b.killVia = eb
+ rep := ownedRepUntil(b, func() time.Time { return time.Now().Add(time.Hour) })
+ run, err := a.RunCmd(context.Background(), rootfsGateRoute(host), CmdSpec{RunID: "run_a"})
+ if err != nil {
+ t.Fatalf("RunCmd: %v", err)
+ }
+ a.mu.Lock()
+ e := a.entries[host]
+ a.mu.Unlock()
+ counted := make(chan int, 1)
+ b.omu.Lock()
+ b.onOneShot = func() { // off a.mu: the count while the kill is on its way
+ a.mu.Lock()
+ n := e.leaseStops
+ a.mu.Unlock()
+ select {
+ case counted <- n:
+ default:
+ }
+ }
+ b.omu.Unlock()
+ lostAt := time.Now()
+ rep.Load().lose(errors.New("renew: the lock was taken"))
+ select {
+ case n := <-counted:
+ if n != 1 {
+ t.Fatalf("the entry counted %d lease stops while the kill was on its way, want 1", n)
+ }
+ case <-time.After(5 * time.Second):
+ t.Fatal("no kill was issued at the loss")
+ }
+ waitFor(t, "the count to drop once the hung kill returned", func() bool {
+ a.mu.Lock()
+ defer a.mu.Unlock()
+ return e.leaseStops == 0
+ })
+ if took := time.Since(lostAt); took < oneShotKillControlBound || took > oneShotKillControlBound+slack {
+ t.Fatalf("the count dropped %s after the loss; want KillOneShot's control budget, %s", took, oneShotKillControlBound)
+ }
+ if hang.askedCount() != 1 {
+ t.Fatalf("root was asked to kill %d times, want once", hang.askedCount())
+ }
+ run.Release()
+ a.Bounce(host)
+ finishStopOf(t, a, clk, host)
+ })
+}
diff --git a/internal/activator/rootfs_cmd_test.go b/internal/activator/rootfs_cmd_test.go
index e80ef42ee..0eeb24702 100644
--- a/internal/activator/rootfs_cmd_test.go
+++ b/internal/activator/rootfs_cmd_test.go
@@ -479,6 +479,8 @@ func TestRootfsRunPollsAndStopsTheRootfsUnit(t *testing.T) {
t.Fatal("the stop finished without closing the replica")
}
run.Release()
+ waitFor(t, "AfterSettled after the proof", func() bool { return settled.Load() >= 1 })
+ time.Sleep(20 * time.Millisecond)
if n := settled.Load(); n != 1 {
t.Fatalf("AfterSettled ran %d times, want once after the proof", n)
}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 944eb77b4..3657ee726 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 92667fa6f8aabb3261f962c8105f08abef20ba8590eae9c7fb889ce6d3eae8d5
+plan14-root-reads-rootfs-apps-6.tsv a56c8ee8a732dac41ad40926f6f28ebfc0f1ec1a2980069f4dac9b3a4db01db1
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 0fdd06e65..20a9e95c4 100644
--- a/internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv
+++ b/internal/provision/testdata/plan14-root-reads-rootfs-apps-6.tsv
@@ -5,7 +5,7 @@
@legacy 55df17ea73134f602af4b4aa2280eb646c1a311b9d5a13aedecd59d0cdbabf95 internal/activator/activator.go Service.finishStop legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with a run's settle checked before replication closes, which keeps the stop pending until the run is proven stopped; read sites unchanged, offsets moved;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: an HA entry (its replica is an HA one, haEntryRep) now releases through releaseHAClean (a new unit on this card) instead of e.rep.Close; when that answers errHostSliceUnproven the stop is kept pending (keepPendingLocked) with the lease held and renewing, and the sweep finishes it once proven; a non-HA entry is unchanged; the same five sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: a forgotten entry's stop is noted for its resident (noteResidentStopLocked: crash or lost lease backs off, any other stop restarts on the next tick) and its ownerDone channel is closed; no read added;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: while the host has a release command's record (a.releaseOps[e.host], running or not proven stopped), replication and the lease stay and the stop is kept pending (keepPendingLocked) until the record's proof; the same five read sites, no read added; only holds a release back;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.20: while a rootfs worker may run or is a stray (rootfsWorkersLiveLocked, in-memory, read under a.mu), replication and the lease stay and the stop is kept pending (keepPendingLocked) until the workers are proven stopped; the same five read sites, no read added; only holds a release back;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1 (Astra P1): beside the worker check, under the same lock, a stop with a lease stop of its commands outstanding (e.leaseStops) is kept pending, the replica and lease held, and the sweep finishes it once they have returned; the entry is never released while a kill captured for it may still reach its unit; the same five read sites, no read added registry:Socket@4054,registry:Socket@4159,whole:Route@4004,whole:Route@4056,whole:Route@4161 c565cc2dc400f420ac39130adcd32659f04d3330d8d8551f2f48afd76a696369
@legacy 1f6bcc9cf0f66285a303c9d14a8ac511b721f7941c0fe45c18eeaf5ec7c42662 internal/activator/activator.go Service.installProcLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: the one place a process, its generation and the lease replica are installed on an entry; a resident is put under its lease watch (watchResidentLeaseLocked) at that moment; reads only the entry's route;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1, Astra R1 P1-1): the lease watch is installed for every rootfs row (e.route.Rootfs()), not only a resident, so a hibernating rootfs row's run or session is reached at the lease's loss; the same one read of the entry's route; installs nothing else whole:Route@144 cacc399eb6e09be70d3a2ad1774800fb6a252590cebd62dd0e9f369e97275f81
@legacy a3fb62ce1d8e3c0003ac3404e257da6a6069b7761f4327cb559844ae0ac4fcbc internal/activator/backend_rootfs.go ExecBackend.StartRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R1: new; startRootfsCmd naming release.ProcessRelease, both streams through one capped line writer (releaseOutput, runs.MaxOutputBytes) into the caller's writer; no read of its own;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: passes rootfsCmdLaunch{Process: release.ProcessRelease} to startRootfsCmd in place of the bare process name; its /cmd request and launch.cmd.json are byte-identical to before (TestStartReleaseIsUnchanged, goldens written from 3fd3c3a4); no read added registry:Host@182,whole:Route@247 9dd1cb5cf2b170f59e5e46a121a665bd0ca4d6c9698aab63804880848b5ee9ee
-@legacy a743ccbd44c9d21980323e3e2ccdaf87d2b602a5408bca7d5a882c1d5d453fe3 internal/activator/cmdunit.go type CmdSpec legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): declaration only; Prepare is a callback field, not a prepared statement;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: declaration only: gains AfterSettled, a callback field the caller sets (the box's run pass removes the run's directory in it), called once when no unit of the run can be running; reads nothing file:Prepare@487 f3c596b537f466e707f4974aa06065fb08bebb4a89749c8d6138810c9aa0a5b2
+@legacy 67ea214ccd9b2426bd932e51731c91150bc64c06f91f206626debff80380e2ac internal/activator/cmdunit.go type CmdSpec legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): declaration only; Prepare is a callback field, not a prepared statement;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: declaration only: gains AfterSettled, a callback field the caller sets (the box's run pass removes the run's directory in it), called once when no unit of the run can be running; reads nothing; fix round 2: comment only: AfterSettled is called once, after the proof, never while a lock is held, in the settle's goroutine without the stop waiting for it, and must not call Stop or Shutdown file:Prepare@487 fd1be4eb629ee39702adf64830621833c53f2658007125475eb94a69ae0b5cba
@legacy 2d9c727dee13d2655dcd898f0f5aecaa20902fa217ea6cf20a3ecce21e657388 internal/activator/rootfs_service.go Service.residentLeaseLost legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8 (C7): a resident's lost lease marks it and then kills its generations off a.mu (killResidentGens);rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.10: a resident's lost lease stops its workers (stopRootfsWorkersAtLoss, proven gone) in parallel with killResidentGens; rt is taken under the lock and passed to killResidentGens in place of e.route (the same route); site +whole:Route (that local rt); no file read;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1): residentLeaseLostLocked also returns one kill func per one-shot unit that may run; each runs off a.mu in the same WaitGroup as stopRootfsWorkersAtLoss and killResidentGens, which still run only for a resident (gens non-nil); the kills go to root's existing /stop through KillOneShot; no read added whole:Route@137,whole:Route@394 64ce2f74e65941ea2a731518c773cb9b27456f2db298c69ed4e02de375b1777f
@legacy 6d257f47ef6aac75f3139d8e0ea689774fb9bd3bfca50c0f321573a483ded5e9 internal/host/runexec.go runsWorker.execute legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): runs one picked run to its result in the bucket; every root action goes through instance control;rev3=PROPOSED-325;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=emits the run's start and end as member log events through the agent's EventSink; reads unchanged;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (INV-2): sets CmdSpec.AfterSettled to remove the run's directory (runs.RemoveRunDir under the instance's own directory, as cleanUp did) once the activator has proven no unit of the run runs; finish and cleanUp take removeDir, true only on the incarnation refusal before RunCmd; the directory goes later or at the same point, never earlier; no read added file:Prepare@1905,whole:Route@2916 43bd160066b4d3e7aef00e3891001bc5ffa9a40f597cb6e5cc7215eae2814df9
@legacy ee96c9cf9e4e6b0dea8325a3eaf0053773b3a20d3940afe881a0db8aa71b2d23 internal/host/units/carlos-instance-cmd@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the cmd unit template (applied by PID 1 as root; its process runs as carlos): extends the J4 seed pattern to the run role. The template equals the seed template outside named lines, and the template-equality test pins that. Root lays out a staged executable validated by the same refuseStagedExe the seed and generation paths use, then starts this unit, which runs as carlos with the instance's own reach. No new trust of registry, /data or agent-asserted content beyond the seed path;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 5: the same one namespace-block line, TemporaryFileSystem=/dev/pts:ro, as carlos-instance@.service; nothing else file:external@0 925113f4c51c091f0da65c2c67c5902aa35ab37abbe6491ca935820517e8149d
@@ -20,7 +20,7 @@
@legacy eaf433e09f4fce09c3df3357d5811657d4db19eb29eccd96df40666f382fb49d internal/instanceexec/probe.go productionProbeEnv legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-rootfs-apps-2;basis=the binary probe's env gains boxAddrs (instancectl.BoxAddrsPath, /opt/carlos/box-addrs), which boxAddrClosed (a decision row) reads inside the probe unit, and mmapWX (realMmapWX, an anonymous mapping); the same one direct site;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 5 (PF-8): the binary probe env sets devPts=/dev/pts and openPtmx (open /dev/ptmx O_RDWR|O_NOCTTY and close at once), the fields the rootfs probe env already set; read by the new pts-private line inside the probe unit (as carlos, in the namespace); fix round 1: also reads its own environment, CARLOS_PROBE_PTS_PRIVATE (exactly "1" enforces pts-private; otherwise the line is reported unverified), which the probe unit sets; the same direct site, no new root read data-literal@67 9de3096aec14bb54d72ee47eceb866cc2b6b80fcda8206cf9a4d5476f0f0d177
@legacy 7282b3718ce918bbd9d7e4dce31a4737bca6eddb45048749c502c8261c740cf8 internal/layout/plan.go NestedPlatformNames legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline;basis=root-input (J4, as main's moves units); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, called only from the agent's offline sealer and source retire (IsNestedPlatformName): a fixed list of names, reads nothing;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 5: the fixed role list gains RoleTTY, so launch.tty.json is one more fixed platform name; still reads nothing data-literal@84 faf3813dcb08f2e153a45b53f4461899327775c298419fc7fe817e80110119d0
@legacy 438a9858d01281800b89923ab2c4bf47bba5c3eab23e07fe43af9a5e3a9ae755 internal/provision/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its reconcile loops: each listed record is observed through the box's lifetime judge (ObserveWith: the record, then its host incarnation slot) before the shape, channel and scope checks, a stale record is left out and an unjudgeable one protected; the removal phase observes a row's own record key when the pass holds none for it under that key, and deletes a held row whose record is gone or stale through DeleteIfHold; a nil judge (claims on) is main's body; registry read sites unchanged, offsets moved; fix round 1: the removal phase observes a row's own key only under an account the listing trusts, so a retired or unmaterialised account's row keeps record gone, and the pass arms its own context with the judge; Task 7: under a judge an existing provisioned row of the record's own app and account follows the existing-row rules (heldByVanishedPredecessor and retireHeldPredecessor's DeleteIfHold first, the record then minted on the same pass; the hold; installRowLifetime), each a separate write under the host's hold lock; registry read sites unchanged, offsets moved;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the pass reads its apps' policy objects (control/app-policy/<sqid>/<app>.json in the bucket) through the agent's PolicyCache, each verified with ReleasePub by apppolicy.VerifyKey (ed25519 over the policy's own domain line, bound to the account and app, unexpired, not future-dated; anything else is no policy), and carries the columns into its rows. New kinds registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each, all the assignment of a fresh row's columns (nr) from policies.cols; plus one whole:Route site, the existing row handed to policies.forRow. Other read sites unchanged, offsets moved; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos, from its reconcile loops: after the scan, hands the in-scope records to cfg.Lifetimes (the box's lifetime index): Merge after a failed read or partial listing, Replace after a complete one, nothing on a dry run or with no index; the scan, judge and removal phases unchanged; the same 166 sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 2 and 5 (D5, spec §5.0): a seeded record over a row with a runtime is skipped and logged; a row with a runtime (or a new record with one) takes no seed; runtime and a rootfs row's hibernation are never converged from a record (a mismatch is logged; a record claiming a runtime its row lacks is not applied); reads Runtime of the record and the row; the box writes less; fix wave 1 (ceea6353, whole-branch P1-2): before minting a row for a record with no runtime and no row (both mint paths), the pass reads the app's kind marker once per app per pass (release.ReadAppKindMarker: one GET of the create-only kind.json from the release store s, through freshStore, validated by readAppKindMarker); a rootfs marker leaves the record unmaterialized and logged (an older console stripped its runtime), and a marker that cannot be read defers the mint this pass; a refusal before minting only, registry read sites unchanged, the box writes less; fix wave 2 (whole-branch r2 P1): the kind-marker read and its refusal apply only to a socket-backed instance record (DerivesPaths), so a static or upstream-backed record of a rootfs app, which carries no runtime by design, is minted as before with no read; fewer reads, registry read sites unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: the forward phase on the hub (FleetOwners set): the scan keeps the fleet-placed records it skips and counts records per host; a trash-only marker prefetch; disputed (failed-GET) hosts; armed, a host an in-scope and a fleet record both name is given neither, its journal waits and the removal phase keeps its row (+registry:Account, +registry:App, +registry:Host x2: the collision guard, its log line and report mark); the instance loop leaves a forward host; retirable excludes forward rows. Same record keys; writes only the registry (PutForward, DeleteForward); no bucket write.;rev3=census-ruling-rootfs-apps-6;basis=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 registry:Account@36233,registry:Account@37498,registry:Account@55577,registry:Account@55623,registry:Account@56467,registry:Account@56844,registry:Account@57070,registry:Account@57137,registry:Account@57183,registry:Account@57276,registry:Account@57318,registry:Account@57966,registry:Account@58224,registry:Account@58764,registry:Account@58812,registry:Account@59185,registry:Account@59231,registry:Account@59476,registry:Account@59901,registry:Account@60389,registry:Account@61125,registry:Account@61318,registry:Account@61664,registry:Account@62229,registry:App@36206,registry:App@37471,registry:App@55597,registry:App@55635,registry:App@56479,registry:App@56856,registry:App@57082,registry:App@57157,registry:App@57195,registry:App@57296,registry:App@57978,registry:App@58236,registry:App@58776,registry:App@58824,registry:App@59205,registry:App@59243,registry:App@59488,registry:App@59913,registry:App@60401,registry:App@61137,registry:App@61330,registry:App@61676,registry:App@62241,registry:ClaimOwnership@36820,registry:DBPath@45677,registry:DBPath@45692,registry:DBPath@45938,registry:DBPath@46541,registry:DBPath@46554,registry:EgressAllow@35319,registry:Gate@42022,registry:Gate@42162,registry:Gate@42449,registry:Hibernate@40694,registry:Hibernate@40892,registry:Hibernate@40957,registry:Hibernate@41296,registry:Hibernate@41647,registry:Hibernate@41957,registry:HoldOp@60870,registry:HoldOp@60961,registry:HoldOp@61096,registry:HoldOp@61472,registry:Host@26327,registry:Host@55556,registry:Host@56443,registry:Host@56820,registry:Host@56984,registry:Host@57090,registry:Host@57986,registry:Host@58192,registry:Host@59068,registry:Host@59340,registry:Host@59455,registry:Host@59778,registry:Host@59875,registry:Host@60266,registry:Host@60363,registry:Host@60577,registry:Host@60952,registry:Host@61087,registry:Host@61291,registry:Host@61364,registry:Host@61463,registry:Host@61638,registry:Host@61713,registry:Host@61799,registry:Host@62206,registry:Kind@36962,registry:Kind@37225,registry:Kind@45595,registry:Kind@45608,registry:Kind@45718,registry:Kind@45731,registry:Kind@46452,registry:Kind@46463,registry:Kind@54680,registry:Kind@60568,registry:Kind@61078,registry:Kind@61454,registry:Kind@61629,registry:Kind@61790,registry:PolicyExpiresAt@35344,registry:Pool@54766,registry:Provisioned@36182,registry:Provisioned@37447,registry:Provisioned@54725,registry:RateLimit@42535,registry:RateLimit@42686,registry:RateLimit@42973,registry:Region@54755,registry:Replication@41381,registry:Replication@41508,registry:Runtime@28984,registry:Runtime@29162,registry:Runtime@31367,registry:Runtime@40061,registry:Runtime@40115,registry:Runtime@40319,registry:Seed@44075,registry:SeedSource@43558,registry:Size@35335,registry:Socket@45643,registry:Socket@45658,registry:Socket@45955,registry:Socket@46511,registry:Socket@46524,registry:Unit@45561,registry:Unit@45574,registry:Unit@46478,registry:Unit@46489,whole:ClaimOwnership@36823,whole:ClaimOwnership@36840,whole:Route@26309,whole:Route@26320,whole:Route@26338,whole:Route@27619,whole:Route@29479,whole:Route@29486,whole:Route@29526,whole:Route@29887,whole:Route@30225,whole:Route@30672,whole:Route@30723,whole:Route@30760,whole:Route@32432,whole:Route@32641,whole:Route@32980,whole:Route@32989,whole:Route@33035,whole:Route@35268,whole:Route@35827,whole:Route@36298,whole:Route@36308,whole:Route@36665,whole:Route@36672,whole:Route@36740,whole:Route@37063,whole:Route@38096,whole:Route@41047,whole:Route@45787,whole:Route@47373,whole:Route@47418,whole:Route@47428,whole:Route@48298,whole:Route@49325,whole:Route@54791,whole:Route@54939,whole:Route@56036,whole:Route@56395,whole:Route@56777,whole:Route@61551,whole:Route@62136,whole:Route@62186 be1b699f14a2f8d6935d959dee168bdf6fb556cd78da458f5ba8a1c0e8512a17
-@legacy 9445b2cd43f346e302fb258e6dbaab84278b049edd9ac5d90cd452e2a7df3176 internal/activator/backend_rootfs.go ExecBackend.KillOneShot legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1), new: a rootfs row only (else errOneShotKillBinary) and a one-shot role only (cmd or tty): StopRootfs(host, role, 0, no worker, kill) to root's existing /stop on DeadlineControl, then waitRoleCgroupEmpty (unitEvents on the role's rootfs unit) on roleEmptyBound; nil is the proof; the registry:Host sites are log and error text and the host passed to root, which names the unit from its own validated host registry:Host@1027,registry:Host@154,registry:Host@279,registry:Host@374,registry:Host@433,registry:Host@563,registry:Host@661,registry:Host@720,registry:Host@958,whole:Route@881 46947416ed240d9e94383816308df5fcd6181a8fe7b0df166bc0cba4768b6836
+@legacy 432e0850cbdf6796ff4582bada35e5617292317b50f822fb18896cd64819f35e internal/activator/backend_rootfs.go ExecBackend.KillOneShot legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1), new: a rootfs row only (else errOneShotKillBinary) and a one-shot role only (cmd or tty): StopRootfs(host, role, 0, no worker, kill) to root's existing /stop on DeadlineControl, then waitRoleCgroupEmpty (unitEvents on the role's rootfs unit) on roleEmptyBound; nil is the proof; the registry:Host sites are log and error text and the host passed to root, which names the unit from its own validated host; fix round 2: root's kill waits on oneShotKillControlBound, a package var equal to DeadlineControl (30 s) so a test can shrink it, in place of the constant; the same budgets, the same reads registry:Host@1023,registry:Host@154,registry:Host@279,registry:Host@374,registry:Host@433,registry:Host@559,registry:Host@657,registry:Host@716,registry:Host@954,whole:Route@877 8168e9fc15e050df81837e7a66e6d20feed7df36639d119f14824c8be3bcbad5
@legacy f3315ebf8463f7ed07168e6eb6b6395ca72b89d38a2398681e4470882cac93d5 internal/activator/backend_rootfs.go ExecBackend.startRootfsRun legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a, new: StartCmd's rootfs arm: refuses a run with no serving image (errNoCmdExe) or a partial one (errPartialStagedIdentity), both marked, and one with no launch environment (errNoGenEnv); asks replicaKeyGate; composes rootfsCmdVars over the generation's launch environment and the row's dbPath; then startRootfsCmd with the operator's argv exactly as given; root validates the image by digest and runs the argv inside the instance's namespace; the registry:Host sites are error text registry:Host@192,registry:Host@450,registry:Host@587,whole:Route@773,whole:Route@874,whole:Route@902,whole:Route@969 28ac40abb07e2561c7b8bf0e75d79645d2b20dfb8f5a05cfe33cb0b0ba350da5
@legacy c6d7609e34806d3c51e249713109f3bb9bae3c0645d4b6bf9f8190e48f9ce88b internal/activator/backend_unit.go SplitBackend.KillOneShot legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a, new: forwards KillOneShot by pick(rt), as KillGen does; a half without it refuses (errOneShotKillBinary); reads only the route registry:Host@219,whole:Route@123,whole:Route@286 59823fbe5e35c5b54e0843a681ad59f684bd28e3a8315c1571198b3e5c43d3ee
@legacy d6543d9dad5ac1da40d0cbaaa7cfefb37f8c0b473c902957dc27420a61371899 internal/activator/cmd.go Service.killOneShot legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a, new: the backend's KillOneShot (oneShotKiller) for one run, bounded by DeadlineControl plus roleEmptyBound, logged either way; the registry:Host sites are log lines registry:Host@240,registry:Host@549,registry:Host@680,whole:Route@398 3eb9bb7269c2a5fc8d4c798d884d92f7fa32eddbde588a3c9ad2d741211b869b
@@ -40,7 +40,7 @@ internal/activator/activator.go Service.finishStop legacy accepted-legacy accept
internal/activator/activator.go Service.installProcLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: the one place a process, its generation and the lease replica are installed on an entry; a resident is put under its lease watch (watchResidentLeaseLocked) at that moment; reads only the entry's route;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1, Astra R1 P1-1): the lease watch is installed for every rootfs row (e.route.Rootfs()), not only a resident, so a hibernating rootfs row's run or session is reached at the lease's loss; the same one read of the entry's route; installs nothing else whole:Route@144 cacc399eb6e09be70d3a2ad1774800fb6a252590cebd62dd0e9f369e97275f81
internal/activator/activator.go type Service authority B,C,D,F,J4 rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1: one field, drainBudget (time.Duration), which New copies from residentDrainBudget and a rootfs entry's lease watch reads in its place, so a test's change of the package var never races a watch goroutine; declaration only, reads nothing c8b46a426344dcd145128985398b1540c760a7001b86f7ce0e93d465d0d026f3
internal/activator/backend_rootfs.go ExecBackend.StartRelease legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R1: new; startRootfsCmd naming release.ProcessRelease, both streams through one capped line writer (releaseOutput, runs.MaxOutputBytes) into the caller's writer; no read of its own;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: passes rootfsCmdLaunch{Process: release.ProcessRelease} to startRootfsCmd in place of the bare process name; its /cmd request and launch.cmd.json are byte-identical to before (TestStartReleaseIsUnchanged, goldens written from 3fd3c3a4); no read added registry:Host@182,whole:Route@247 9dd1cb5cf2b170f59e5e46a121a665bd0ca4d6c9698aab63804880848b5ee9ee
-internal/activator/cmdunit.go type CmdSpec legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): declaration only; Prepare is a callback field, not a prepared statement;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: declaration only: gains AfterSettled, a callback field the caller sets (the box's run pass removes the run's directory in it), called once when no unit of the run can be running; reads nothing file:Prepare@487 f3c596b537f466e707f4974aa06065fb08bebb4a89749c8d6138810c9aa0a5b2
+internal/activator/cmdunit.go type CmdSpec legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): declaration only; Prepare is a callback field, not a prepared statement;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a: declaration only: gains AfterSettled, a callback field the caller sets (the box's run pass removes the run's directory in it), called once when no unit of the run can be running; reads nothing; fix round 2: comment only: AfterSettled is called once, after the proof, never while a lock is held, in the settle's goroutine without the stop waiting for it, and must not call Stop or Shutdown file:Prepare@487 fd1be4eb629ee39702adf64830621833c53f2658007125475eb94a69ae0b5cba
internal/activator/rootfs_service.go Service.residentLeaseLost legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8 (C7): a resident's lost lease marks it and then kills its generations off a.mu (killResidentGens);rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.10: a resident's lost lease stops its workers (stopRootfsWorkersAtLoss, proven gone) in parallel with killResidentGens; rt is taken under the lock and passed to killResidentGens in place of e.route (the same route); site +whole:Route (that local rt); no file read;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1): residentLeaseLostLocked also returns one kill func per one-shot unit that may run; each runs off a.mu in the same WaitGroup as stopRootfsWorkersAtLoss and killResidentGens, which still run only for a resident (gens non-nil); the kills go to root's existing /stop through KillOneShot; no read added whole:Route@137,whole:Route@394 64ce2f74e65941ea2a731518c773cb9b27456f2db298c69ed4e02de375b1777f
internal/host/runexec.go runsWorker.execute legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): runs one picked run to its result in the bucket; every root action goes through instance control;rev3=PROPOSED-325;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=emits the run's start and end as member log events through the agent's EventSink; reads unchanged;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (INV-2): sets CmdSpec.AfterSettled to remove the run's directory (runs.RemoveRunDir under the instance's own directory, as cleanUp did) once the activator has proven no unit of the run runs; finish and cleanUp take removeDir, true only on the incarnation refusal before RunCmd; the directory goes later or at the same point, never earlier; no read added file:Prepare@1905,whole:Route@2916 43bd160066b4d3e7aef00e3891001bc5ffa9a40f597cb6e5cc7215eae2814df9
internal/host/units/carlos-instance-cmd@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the cmd unit template (applied by PID 1 as root; its process runs as carlos): extends the J4 seed pattern to the run role. The template equals the seed template outside named lines, and the template-equality test pins that. Root lays out a staged executable validated by the same refuseStagedExe the seed and generation paths use, then starts this unit, which runs as carlos with the instance's own reach. No new trust of registry, /data or agent-asserted content beyond the seed path;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 5: the same one namespace-block line, TemporaryFileSystem=/dev/pts:ro, as carlos-instance@.service; nothing else file:external@0 925113f4c51c091f0da65c2c67c5902aa35ab37abbe6491ca935820517e8149d
@@ -55,7 +55,7 @@ internal/instancectl/server.go type Server legacy accepted-legacy accepted-legac
internal/instanceexec/probe.go productionProbeEnv legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-rootfs-apps-2;basis=the binary probe's env gains boxAddrs (instancectl.BoxAddrsPath, /opt/carlos/box-addrs), which boxAddrClosed (a decision row) reads inside the probe unit, and mmapWX (realMmapWX, an anonymous mapping); the same one direct site;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 5 (PF-8): the binary probe env sets devPts=/dev/pts and openPtmx (open /dev/ptmx O_RDWR|O_NOCTTY and close at once), the fields the rootfs probe env already set; read by the new pts-private line inside the probe unit (as carlos, in the namespace); fix round 1: also reads its own environment, CARLOS_PROBE_PTS_PRIVATE (exactly "1" enforces pts-private; otherwise the line is reported unverified), which the probe unit sets; the same direct site, no new root read data-literal@67 9de3096aec14bb54d72ee47eceb866cc2b6b80fcda8206cf9a4d5476f0f0d177
internal/layout/plan.go NestedPlatformNames legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline;basis=root-input (J4, as main's moves units); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new, called only from the agent's offline sealer and source retire (IsNestedPlatformName): a fixed list of names, reads nothing;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 5: the fixed role list gains RoleTTY, so launch.tty.json is one more fixed platform name; still reads nothing data-literal@84 faf3813dcb08f2e153a45b53f4461899327775c298419fc7fe817e80110119d0
internal/provision/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its reconcile loops: each listed record is observed through the box's lifetime judge (ObserveWith: the record, then its host incarnation slot) before the shape, channel and scope checks, a stale record is left out and an unjudgeable one protected; the removal phase observes a row's own record key when the pass holds none for it under that key, and deletes a held row whose record is gone or stale through DeleteIfHold; a nil judge (claims on) is main's body; registry read sites unchanged, offsets moved; fix round 1: the removal phase observes a row's own key only under an account the listing trusts, so a retired or unmaterialised account's row keeps record gone, and the pass arms its own context with the judge; Task 7: under a judge an existing provisioned row of the record's own app and account follows the existing-row rules (heldByVanishedPredecessor and retireHeldPredecessor's DeleteIfHold first, the record then minted on the same pass; the hold; installRowLifetime), each a separate write under the host's hold lock; registry read sites unchanged, offsets moved;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#328/#329 plan 1 Task 7: the pass reads its apps' policy objects (control/app-policy/<sqid>/<app>.json in the bucket) through the agent's PolicyCache, each verified with ReleasePub by apppolicy.VerifyKey (ed25519 over the policy's own domain line, bound to the account and app, unexpired, not future-dated; anything else is no policy), and carries the columns into its rows. New kinds registry:EgressAllow, registry:Size and registry:PolicyExpiresAt, one site each, all the assignment of a fresh row's columns (nr) from policies.cols; plus one whole:Route site, the existing row handed to policies.forRow. Other read sites unchanged, offsets moved; the agent's own pass, no root decision;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos, from its reconcile loops: after the scan, hands the in-scope records to cfg.Lifetimes (the box's lifetime index): Merge after a failed read or partial listing, Replace after a complete one, nothing on a dry run or with no index; the scan, judge and removal phases unchanged; the same 166 sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 2 and 5 (D5, spec §5.0): a seeded record over a row with a runtime is skipped and logged; a row with a runtime (or a new record with one) takes no seed; runtime and a rootfs row's hibernation are never converged from a record (a mismatch is logged; a record claiming a runtime its row lacks is not applied); reads Runtime of the record and the row; the box writes less; fix wave 1 (ceea6353, whole-branch P1-2): before minting a row for a record with no runtime and no row (both mint paths), the pass reads the app's kind marker once per app per pass (release.ReadAppKindMarker: one GET of the create-only kind.json from the release store s, through freshStore, validated by readAppKindMarker); a rootfs marker leaves the record unmaterialized and logged (an older console stripped its runtime), and a marker that cannot be read defers the mint this pass; a refusal before minting only, registry read sites unchanged, the box writes less; fix wave 2 (whole-branch r2 P1): the kind-marker read and its refusal apply only to a socket-backed instance record (DerivesPaths), so a static or upstream-backed record of a rootfs app, which carries no runtime by design, is minted as before with no read; fewer reads, registry read sites unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 10: the forward phase on the hub (FleetOwners set): the scan keeps the fleet-placed records it skips and counts records per host; a trash-only marker prefetch; disputed (failed-GET) hosts; armed, a host an in-scope and a fleet record both name is given neither, its journal waits and the removal phase keeps its row (+registry:Account, +registry:App, +registry:Host x2: the collision guard, its log line and report mark); the instance loop leaves a forward host; retirable excludes forward rows. Same record keys; writes only the registry (PutForward, DeleteForward); no bucket write.;rev3=census-ruling-rootfs-apps-6;basis=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 registry:Account@36233,registry:Account@37498,registry:Account@55577,registry:Account@55623,registry:Account@56467,registry:Account@56844,registry:Account@57070,registry:Account@57137,registry:Account@57183,registry:Account@57276,registry:Account@57318,registry:Account@57966,registry:Account@58224,registry:Account@58764,registry:Account@58812,registry:Account@59185,registry:Account@59231,registry:Account@59476,registry:Account@59901,registry:Account@60389,registry:Account@61125,registry:Account@61318,registry:Account@61664,registry:Account@62229,registry:App@36206,registry:App@37471,registry:App@55597,registry:App@55635,registry:App@56479,registry:App@56856,registry:App@57082,registry:App@57157,registry:App@57195,registry:App@57296,registry:App@57978,registry:App@58236,registry:App@58776,registry:App@58824,registry:App@59205,registry:App@59243,registry:App@59488,registry:App@59913,registry:App@60401,registry:App@61137,registry:App@61330,registry:App@61676,registry:App@62241,registry:ClaimOwnership@36820,registry:DBPath@45677,registry:DBPath@45692,registry:DBPath@45938,registry:DBPath@46541,registry:DBPath@46554,registry:EgressAllow@35319,registry:Gate@42022,registry:Gate@42162,registry:Gate@42449,registry:Hibernate@40694,registry:Hibernate@40892,registry:Hibernate@40957,registry:Hibernate@41296,registry:Hibernate@41647,registry:Hibernate@41957,registry:HoldOp@60870,registry:HoldOp@60961,registry:HoldOp@61096,registry:HoldOp@61472,registry:Host@26327,registry:Host@55556,registry:Host@56443,registry:Host@56820,registry:Host@56984,registry:Host@57090,registry:Host@57986,registry:Host@58192,registry:Host@59068,registry:Host@59340,registry:Host@59455,registry:Host@59778,registry:Host@59875,registry:Host@60266,registry:Host@60363,registry:Host@60577,registry:Host@60952,registry:Host@61087,registry:Host@61291,registry:Host@61364,registry:Host@61463,registry:Host@61638,registry:Host@61713,registry:Host@61799,registry:Host@62206,registry:Kind@36962,registry:Kind@37225,registry:Kind@45595,registry:Kind@45608,registry:Kind@45718,registry:Kind@45731,registry:Kind@46452,registry:Kind@46463,registry:Kind@54680,registry:Kind@60568,registry:Kind@61078,registry:Kind@61454,registry:Kind@61629,registry:Kind@61790,registry:PolicyExpiresAt@35344,registry:Pool@54766,registry:Provisioned@36182,registry:Provisioned@37447,registry:Provisioned@54725,registry:RateLimit@42535,registry:RateLimit@42686,registry:RateLimit@42973,registry:Region@54755,registry:Replication@41381,registry:Replication@41508,registry:Runtime@28984,registry:Runtime@29162,registry:Runtime@31367,registry:Runtime@40061,registry:Runtime@40115,registry:Runtime@40319,registry:Seed@44075,registry:SeedSource@43558,registry:Size@35335,registry:Socket@45643,registry:Socket@45658,registry:Socket@45955,registry:Socket@46511,registry:Socket@46524,registry:Unit@45561,registry:Unit@45574,registry:Unit@46478,registry:Unit@46489,whole:ClaimOwnership@36823,whole:ClaimOwnership@36840,whole:Route@26309,whole:Route@26320,whole:Route@26338,whole:Route@27619,whole:Route@29479,whole:Route@29486,whole:Route@29526,whole:Route@29887,whole:Route@30225,whole:Route@30672,whole:Route@30723,whole:Route@30760,whole:Route@32432,whole:Route@32641,whole:Route@32980,whole:Route@32989,whole:Route@33035,whole:Route@35268,whole:Route@35827,whole:Route@36298,whole:Route@36308,whole:Route@36665,whole:Route@36672,whole:Route@36740,whole:Route@37063,whole:Route@38096,whole:Route@41047,whole:Route@45787,whole:Route@47373,whole:Route@47418,whole:Route@47428,whole:Route@48298,whole:Route@49325,whole:Route@54791,whole:Route@54939,whole:Route@56036,whole:Route@56395,whole:Route@56777,whole:Route@61551,whole:Route@62136,whole:Route@62186 be1b699f14a2f8d6935d959dee168bdf6fb556cd78da458f5ba8a1c0e8512a17
-internal/activator/backend_rootfs.go ExecBackend.KillOneShot legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1), new: a rootfs row only (else errOneShotKillBinary) and a one-shot role only (cmd or tty): StopRootfs(host, role, 0, no worker, kill) to root's existing /stop on DeadlineControl, then waitRoleCgroupEmpty (unitEvents on the role's rootfs unit) on roleEmptyBound; nil is the proof; the registry:Host sites are log and error text and the host passed to root, which names the unit from its own validated host registry:Host@1027,registry:Host@154,registry:Host@279,registry:Host@374,registry:Host@433,registry:Host@563,registry:Host@661,registry:Host@720,registry:Host@958,whole:Route@881 46947416ed240d9e94383816308df5fcd6181a8fe7b0df166bc0cba4768b6836
+internal/activator/backend_rootfs.go ExecBackend.KillOneShot legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1), new: a rootfs row only (else errOneShotKillBinary) and a one-shot role only (cmd or tty): StopRootfs(host, role, 0, no worker, kill) to root's existing /stop on DeadlineControl, then waitRoleCgroupEmpty (unitEvents on the role's rootfs unit) on roleEmptyBound; nil is the proof; the registry:Host sites are log and error text and the host passed to root, which names the unit from its own validated host; fix round 2: root's kill waits on oneShotKillControlBound, a package var equal to DeadlineControl (30 s) so a test can shrink it, in place of the constant; the same budgets, the same reads registry:Host@1023,registry:Host@154,registry:Host@279,registry:Host@374,registry:Host@433,registry:Host@559,registry:Host@657,registry:Host@716,registry:Host@954,whole:Route@877 8168e9fc15e050df81837e7a66e6d20feed7df36639d119f14824c8be3bcbad5
internal/activator/backend_rootfs.go ExecBackend.startRootfsRun legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a, new: StartCmd's rootfs arm: refuses a run with no serving image (errNoCmdExe) or a partial one (errPartialStagedIdentity), both marked, and one with no launch environment (errNoGenEnv); asks replicaKeyGate; composes rootfsCmdVars over the generation's launch environment and the row's dbPath; then startRootfsCmd with the operator's argv exactly as given; root validates the image by digest and runs the argv inside the instance's namespace; the registry:Host sites are error text registry:Host@192,registry:Host@450,registry:Host@587,whole:Route@773,whole:Route@874,whole:Route@902,whole:Route@969 28ac40abb07e2561c7b8bf0e75d79645d2b20dfb8f5a05cfe33cb0b0ba350da5
internal/activator/backend_unit.go SplitBackend.KillOneShot legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a, new: forwards KillOneShot by pick(rt), as KillGen does; a half without it refuses (errOneShotKillBinary); reads only the route registry:Host@219,whole:Route@123,whole:Route@286 59823fbe5e35c5b54e0843a681ad59f684bd28e3a8315c1571198b3e5c43d3ee
internal/activator/cmd.go Service.killOneShot legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a, new: the backend's KillOneShot (oneShotKiller) for one run, bounded by DeadlineControl plus roleEmptyBound, logged either way; the registry:Host sites are log lines registry:Host@240,registry:Host@549,registry:Host@680,whole:Route@398 3eb9bb7269c2a5fc8d4c798d884d92f7fa32eddbde588a3c9ad2d741211b869b
@@ -74,7 +74,7 @@ internal/activator/rootfs_service.go Service.rootfsTick legacy accepted-legacy a
@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 . fbc28f10f89cd03cac31bae0d798ae7f707eb7671284a6115abd8c1c214369b6
-@coverage internal/activator cea21bcaeb98df2ea11cf94759d80cb0ee635f002d6cec6d19723d63e4684af4
+@coverage internal/activator 1771b5ddd7e820f33ee24b88037edd16886c81cea98fde67b2c5cee4bdcc5dde
@coverage internal/appconfig cac8d8ef7538a456d034801c95ce6508a4983e5516b3bbbd302bec0fbafdd479
@coverage internal/host 69c09eff5b3b87756182f001086b391c02b867e82e8d21ea40722c992fec43a7
@coverage internal/host/units c3cc4f3b917fdb938f20d406b1704ec54e24553851c298e312056d397d10b0e1