carlos / platform Public

reviews: round 2 briefs and round 1 findings for rootfs-apps-3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 4ece7e51c447df9bbcf65eed69756c9d75264a17 parent 46cd42f
4 files changed, +319 −0
  • docs/superpowers/notes/branch-review-rootfs-apps-3-r1.md +47 −0
  • docs/superpowers/notes/census-review-rootfs-apps-3-r1.md +189 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-census-rootfs-apps-3-R2.md +42 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-apps-3-branch-R2.md +41 −0

CI failed — run details

diff --git a/docs/superpowers/notes/branch-review-rootfs-apps-3-r1.md b/docs/superpowers/notes/branch-review-rootfs-apps-3-r1.md
new file mode 100644
index 000000000..4814e5969
--- /dev/null
+++ b/docs/superpowers/notes/branch-review-rootfs-apps-3-r1.md
@@ -0,0 +1,47 @@
+Reviewed the requested diff through `78fd0d8a`, round 1. Found three P1s and one P2.
+
+1. **P1 — Database recovery: a replacement box can boot a previously served instance empty.**
+
+ [activator.go:2583](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/activator/activator.go:2583) permits an empty placeholder when `GoodVersion` is empty. That value lives in the local registry; a newly reconciled row on another box has no good-build history. Meanwhile, [rootfs_service.go:329](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/activator/rootfs_service.go:329) only logs a failed first replica upload and allows the instance to serve.
+
+ **Failure scenario:** box A serves before its first successful upload, then fails. Box B acquires the lease with a fresh registry and no replica. Its empty `GoodVersion` admits an empty database for the existing instance. The same hole applies when an established replica disappears before replacement.
+
+ **Fix:** distinguish first initialization using durable evidence scoped to the instance’s lifetime, checked under the lease before placing a database. Refuse missing replicas for previously initialized instances. Add a two-box test with independent registries.
+
+ **Fault family:** database continuity—“never boot empty after serving.” The new evidence is the cross-box boundary; the local good-build guard cannot establish this invariant.
+
+2. **P1 — Mixed versions: older boxes materialize rootfs records as binary rows.**
+
+ [rootfs.go:172](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/console/rootfs.go:172) accepts a placement when any fresh box reports readiness, without requiring lifecycle support from every reconciler. [apiinstances.go:1668](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/console/apiinstances.go:1668) then publishes an ordinary schema-1 instance record with the new runtime field.
+
+ At base `bf55f29e`, `DecodeRecord` ignores that unknown field (`internal/provision/maintenance.go:73`), and `RouteFor` creates a binary row (`internal/provision/reconcile.go:510`). Older boxes already publish the rootfs readiness bit.
+
+ **Failure scenario:** a new console creates a rootfs instance during a rolling upgrade. An older box in the placement mints a binary row. Upgrading it does not repair the row: [reconcile.go:1739](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/provision/reconcile.go:1739) preserves the immutable runtime mismatch. Conversely, an older console can discard runtime during a typed rewrite; a fresh new box then also mints a binary row.
+
+ **Fix:** enforce a compatibility barrier covering all writers and reconcilers, including replacement/joining boxes, before publishing rootfs records; alternatively use a representation that old readers demonstrably refuse. Test both version directions. A schema-number bump alone is insufficient because the old record reader does not enforce it.
+
+ **Fault family:** runtime identity across version boundaries.
+
+3. **P1 — Promotion floor: the check and publication use different pointer snapshots.**
+
+ [rootfsfloor.go:44](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/console/rootfsfloor.go:44) discards the checked pointer’s ETag. After that check, [hostactivation.go:205](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/console/hostactivation.go:205) prepares the promotion; [systempointer.go:281](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/release/systempointer.go:281) rereads the pointer and uses that newer ETag without repeating the floor check.
+
+ **Failure scenario:** a below-floor promotion passes while the channel is on v0.28.x, then pauses. Another console advances the channel to v0.29.0. The delayed request resumes, reads the v0.29.0 pointer during preparation, and successfully replaces it with the older release without an override. Its CAS succeeds precisely because it uses the second read. Systemd applies that signed downgrade as intended by the ruling.
+
+ **Fix:** bind the floor decision to the exact pointer snapshot used for preparation and publication. Enforce it before reservation, reject changed snapshots, and cover the unreserved fallback too. Add an interleaved-promotion test.
+
+ **Fault family:** rollback authorization must cover the state actually replaced.
+
+4. **P2 — Rollback audit: the unreserved path drops the explicit override.**
+
+ [hostactivation.go:262](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/console/hostactivation.go:262) calls `RollbackSystem` without forwarding `allowBelowRootfsFloor`. [systempointer.go:325](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/release/systempointer.go:325) consequently constructs options containing only the actor.
+
+ **Failure scenario:** an explicitly authorized below-floor rollback proceeds without a reservation—for example, when no host floor exists—but its signed pointer records no override.
+
+ **Fix:** pass the complete promotion options through the fallback, preserving its expected ETag, and test an unreserved rollback with the override enabled.
+
+ **Fault family:** preservation of operator authorization in the signed record.
+
+Targeted tests could not start because the read-only sandbox prevented Go from creating its work directory. No full suites were run and no files were changed.
+
+NOT READY
\ No newline at end of file
diff --git a/docs/superpowers/notes/census-review-rootfs-apps-3-r1.md b/docs/superpowers/notes/census-review-rootfs-apps-3-r1.md
new file mode 100644
index 000000000..6e4dc00cd
--- /dev/null
+++ b/docs/superpowers/notes/census-review-rootfs-apps-3-r1.md
@@ -0,0 +1,189 @@
+| Unit | Class / disposition | Verdict | Lines read |
+|---|---|---|---|
+| `internal/activator/activator.go:Service.finishStop` | body / legacy | APPROVE | 4759–4771 |
+| `internal/activator/activator.go:Service.respawnWorkerLocked` | body / authority | APPROVE | 4098–4122 |
+| `internal/activator/activator.go:Service.serveWakeError` | body / diagnostic | APPROVE | 5888–5904, 5927–5939 |
+| `internal/activator/activator.go:type Service` | body / authority | APPROVE | 1338–1375 |
+| `internal/activator/recoveryprobe.go:Service.finishRecoveryProbe` | body / legacy | APPROVE | 227–240 |
+| `internal/activator/rootfs.go:ExecBackend.rootfsGateCheck` | body / legacy | APPROVE | 141–170 |
+| `internal/activator/rootfs.go:ExecBackend.rootfsGates` | body / legacy | APPROVE | 130–132 |
+| `internal/activator/rootfs.go:ExecBackend.startRootfsFromLive` | body / legacy | APPROVE | 179–198 |
+| `internal/activator/rootfs.go:ExecBackend.startRootfsGen` | body / legacy | APPROVE | 208–238 |
+| `internal/appconfig/sync.go:syncHostClaimed` | body / legacy | APPROVE | 638–644 |
+| `internal/caps/converge.go:Converge` | body / authority | APPROVE | 229–236 |
+| `internal/host/agent.go:makeStartRoute` | body / authority | APPROVE | 4623–4630 |
+| `internal/host/agent.go:runAgent` | body / authority | APPROVE | 702–708 |
+| `internal/host/restart.go:restartPass` | body / authority | APPROVE | 762–769 |
+| `internal/host/restartscope.go:restartScopeLeg` | body / authority | APPROVE | 493–500 |
+| `internal/host/rollout.go:armRollout` | body / legacy | APPROVE | 403–412 |
+| `internal/host/rootfsplacement.go:agentRootfs.arm` | body / legacy | APPROVE | 374–382 |
+| `internal/host/systemapply.go:RunSystemApply` | body / authority | APPROVE | 113–142 |
+| `internal/host/systemapply.go:systemApplier.Run` | body / authority | APPROVE | 435–473, 479–515 |
+| `internal/provision/offline_move.go:offlineBegin` | body / legacy | APPROVE | 182–190 |
+| `internal/provision/provision.go:MoveRequest` | body / legacy | APPROVE | 1488–1496 |
+| `internal/provision/provision.go:MoveStartTransition` | body / legacy | APPROVE | 1528–1536 |
+| `internal/provision/seedswap.go:importShape` | body / legacy | APPROVE | 47–53 |
+| `internal/registry/registry.go:upsertRoute` | body / legacy | APPROVE | 1477–1542 |
+| `internal/release/adopt.go:PassFilter` | body / authority | APPROVE | 1238–1246 |
+| `internal/release/adopt.go:adoptHost` | body / authority | APPROVE | 2155–2162 |
+| `internal/release/rootrestart_history.go:RootRestarts.Observe` | body / authority | APPROVE | 250–257 |
+| `internal/schedule/converge.go:StatusFor` | body / legacy | APPROVE | 476–483 |
+| `internal/status/snapshot.go:CollectBox` | body / legacy | APPROVE | 1014–1020 |
+| `cli.go:addWrite` | new / legacy | APPROVE | 94–100 |
+| `cli.go:refuseAddRootfs` | new / legacy | APPROVE | 81–90 |
+| `internal/activator/activator.go:Service.awaitWake` | new / legacy | APPROVE | 1779–1791 |
+| `internal/activator/activator.go:Service.installProcLocked` | new / legacy | APPROVE | 3007–3029 |
+| `internal/activator/backend_exec.go:refuseRuntimeBinaryLaunch` | new / legacy | APPROVE | 2841–2846 |
+| `internal/activator/backend_exec.go:refuseUnknownRuntime` | new / legacy | APPROVE | 2831–2836 |
+| `internal/activator/backend_rootfs.go:ExecBackend.Processes` | new / legacy | APPROVE | 46–78 |
+| `internal/activator/backend_rootfs.go:Service.declaredProcesses` | new / legacy | APPROVE | 117–127 |
+| `internal/activator/backend_rootfs.go:Service.rootfsProcessesHook` | new / legacy | APPROVE | 90–112 |
+| `internal/activator/backend_unit.go:SplitBackend.PlaceRootfsDB` | new / legacy | APPROVE | 353–360 |
+| `internal/activator/backend_unit.go:SplitBackend.Processes` | new / legacy | APPROVE | 365–372 |
+| `internal/activator/backend_unit.go:SplitBackend.rootfsStartable` | new / legacy | APPROVE | 342–349 |
+| `internal/activator/genbackend.go:refuseHostCgroupProof` | new / legacy | APPROVE | 632–637 |
+| `internal/activator/layout.go:LayoutExempt` | new / legacy | APPROVE | 69–79 |
+| `internal/activator/rootfs.go:ExecBackend.rootfsStartable` | new / legacy | APPROVE | 137–139 |
+| `internal/activator/rootfs.go:ExecBackend.startStagedRootfs` | new / legacy | **REJECT — P1-1** | 253–277, 325–375 |
+| `internal/activator/rootfs_service.go:Service.killResidentGens` | new / legacy | APPROVE | 938–959 |
+| `internal/activator/rootfs_service.go:Service.noteResidentRefusalLocked` | new / legacy | APPROVE | 591–598 |
+| `internal/activator/rootfs_service.go:Service.noteResidentStopLocked` | new / legacy | APPROVE | 1002–1021 |
+| `internal/activator/rootfs_service.go:Service.noteResidentWakeLocked` | new / legacy | APPROVE | 971–992 |
+| `internal/activator/rootfs_service.go:Service.noteRootfsRefusal` | new / legacy | APPROVE | 250–266 |
+| `internal/activator/rootfs_service.go:Service.placeRootfsDB` | new / legacy | APPROVE | 311–320 |
+| `internal/activator/rootfs_service.go:Service.residentHeldLocked` | new / legacy | APPROVE | 543–551 |
+| `internal/activator/rootfs_service.go:Service.residentJob` | new / legacy | APPROVE | 733–764 |
+| `internal/activator/rootfs_service.go:Service.residentLeaseLost` | new / legacy | APPROVE | 897–932 |
+| `internal/activator/rootfs_service.go:Service.residentOrderLocked` | new / legacy | APPROVE | 611–620 |
+| `internal/activator/rootfs_service.go:Service.rootfsBackendGates` | new / legacy | APPROVE | 205–242 |
+| `internal/activator/rootfs_service.go:Service.rootfsRefusalLocked` | new / legacy | APPROVE | 133–147 |
+| `internal/activator/rootfs_service.go:Service.rootfsStartRefusal` | new / legacy | APPROVE | 155–173 |
+| `internal/activator/rootfs_service.go:Service.rootfsTick` | new / legacy | APPROVE | 643–717 |
+| `internal/activator/rootfs_service.go:Service.rootfsWakeRefusal` | new / legacy | APPROVE | 288–296 |
+| `internal/activator/rootfs_service.go:firstWakeBudgetFor` | new / legacy | APPROVE | 49–54 |
+| `internal/activator/rootfs_service.go:healthBoundFor` | new / legacy | APPROVE | 37–42 |
+| `internal/activator/rootfs_service.go:markOwnershipRefusal` | new / legacy | APPROVE | 478–488 |
+| `internal/activator/rootfs_service.go:residentRunnable` | new / legacy | APPROVE | 577–584 |
+| `internal/activator/rootfs_service.go:residentShaped` | new / legacy | APPROVE | 564–566 |
+| `internal/activator/rootfs_service.go:rootfsGateKey` | new / legacy | APPROVE | 182–185 |
+| `internal/activator/rootfsdb.go:ExecBackend.PlaceRootfsDB` | new / legacy | APPROVE | 108–168 |
+| `internal/activator/rootfsdb.go:buildEmptySQLiteDB` | new / legacy | APPROVE | 58–92 |
+| `internal/activator/rootfsdb.go:writeBeneathExcl` | new / legacy | APPROVE | 172–185 |
+| `internal/activator/rootfsenv.go:ExecBackend.rootfsCmdVars` | new / legacy | APPROVE | 1–22 |
+| `internal/activator/swap.go:Service.genHealthy` | new / legacy | APPROVE | 360–368 |
+| `internal/host/socket_advice.go:socketAdvice` | new / legacy | APPROVE | 134–139 |
+| `internal/layout/pass.go:Pass.Held` | new / legacy | APPROVE | 675–682 |
+| `internal/layout/pass.go:Pass.exempt` | new / legacy | APPROVE | 224–269 |
+| `internal/layout/pass.go:Pass.exemptRows` | new / legacy | APPROVE | 273–285 |
+| `internal/registry/registry.go:Registry.ResidentInstances` | new / legacy | APPROVE | 3139–3161 |
+| `internal/registry/registry.go:Registry.UpsertUnlessRootfs` | new / legacy | APPROVE | 1420–1439 |
+| `internal/registry/registry.go:Registry.upsert` | new / legacy | APPROVE | 1447–1473 |
+| `internal/registry/runtime.go:Route.ActivatorLeased` | new / legacy | APPROVE | 40–47 |
+| `internal/registry/runtime.go:Route.ActivatorOwned` | new / legacy | APPROVE | 25–32 |
+| `internal/registry/runtime.go:Route.Resident` | new / legacy | APPROVE | 34–38 |
+| `internal/registry/runtime.go:Route.Rootfs` | new / legacy | APPROVE | 16–18 |
+| `cli.go:addMintsNested` | reads / legacy | APPROVE | 140–149 |
+| `cli.go:runRouteHibernate` | reads / legacy | APPROVE | 1558–1568 |
+| `internal/activator/activator.go:Service.doWake` | reads / legacy | APPROVE | 2293–2455, 2492–2501, 2571–2603, 2790–2969 |
+| `internal/activator/backend_exec.go:ExecBackend.HasSidecar` | reads / legacy | APPROVE | 3083–3097 |
+| `internal/activator/genbackend.go:ExecBackend.EmptyHost` | reads / legacy | APPROVE | 726–749 |
+| `internal/activator/genbackend.go:ExecBackend.KillHost` | reads / legacy | APPROVE | 679–695 |
+| `internal/activator/genbackend.go:ExecBackend.StartStaged` | reads / legacy | **REJECT — P1-1** | 236–297; `rootfs.go` 253–277, 340–375 |
+| `internal/activator/wakeidentity.go:wakeRouteChanged` | reads / legacy | APPROVE | 39–48 |
+| `internal/host/layoutleg.go:nestedRowsPresent` | reads / legacy | APPROVE | 327–333 |
+| `internal/layout/pass.go:Pass.recheck` | reads / legacy | APPROVE | 637–645 |
+| `internal/provision/reconcile.go:Reconcile` | reads / legacy | APPROVE | 1496–1513, 1553–1568, 1725–1758 |
+| `internal/provision/reconcile.go:RouteFor` | reads / authority | APPROVE | 545–575 |
+| `internal/provision/reconcile.go:everywhereRoute` | reads / legacy | APPROVE | 415–423 |
+| `internal/provision/reconcile.go:shapeMismatch` | reads / legacy | APPROVE | 746–755 |
+| `internal/registry/registry.go:Registry.SetHibernate` | reads / legacy | APPROVE | 3034–3059 |
+| `internal/registry/registry.go:Registry.SetPlacement` | reads / legacy | APPROVE | 2781–2805 |
+| `internal/registry/registry.go:normalizeRoute` | reads / authority | APPROVE | 1547–1572 |
+| `cli.go:replicationRail` | sites / legacy | APPROVE | 1885–1896 |
+| `cli.go:runAdd` | sites / legacy | APPROVE | 309–317, 372–381 |
+| `internal/activator/activator.go:Service.ServeScheduled` | sites / legacy | APPROVE | 5774–5797 |
+| `internal/activator/activator.go:Service.begin` | sites / legacy | APPROVE | 1609–1692 |
+| `internal/activator/activator.go:Service.serve` | sites / legacy | APPROVE | 5799–5803, 5826–5837 |
+| `internal/activator/activator.go:Service.sweepOnce` | sites / legacy | APPROVE | 5050–5085, 5384–5391 |
+| `internal/activator/activator.go:Service.wake` | sites / legacy | APPROVE | 1927–1990, 2031–2091, 2136–2145 |
+| `internal/activator/backend_exec.go:ExecBackend.Seed` | sites / legacy | APPROVE | 976–982 |
+| `internal/activator/backend_exec.go:ExecBackend.SeedExe` | sites / legacy | APPROVE | 1001–1007 |
+| `internal/activator/backend_exec.go:ExecBackend.Start` | sites / legacy | APPROVE | 1932–1945 |
+| `internal/activator/backend_exec.go:ExecBackend.StartGen` | sites / legacy | APPROVE | 1974–1981 |
+| `internal/activator/backend_exec.go:ExecBackend.StartGenExe` | sites / legacy | APPROVE | 2001–2009 |
+| `internal/activator/backend_exec.go:ExecBackend.StartSidecar` | sites / legacy | APPROVE | 3103–3109 |
+| `internal/activator/backend_exec.go:ExecBackend.nestedGate` | sites / legacy | APPROVE | 2820–2859 |
+| `internal/activator/backend_exec.go:ExecBackend.spawnInCgroupGated` | sites / authority | APPROVE | 505–520 |
+| `internal/activator/containment.go:ExecBackend.spawnInCgroupAtTier` | sites / authority | APPROVE | 236–252 |
+| `internal/activator/genbackend.go:ExecBackend.StartSidecarGen` | sites / legacy | APPROVE | 456–462 |
+| `internal/activator/genbackend.go:SplitBackend.EmptyHost` | sites / legacy | APPROVE | 754–760 |
+| `internal/activator/genbackend.go:SplitBackend.KillHost` | sites / legacy | APPROVE | 701–707 |
+| `internal/activator/layout.go:ActivatorManaged` | sites / legacy | APPROVE | 57–67 |
+| `internal/activator/layout.go:Classify` | sites / legacy | APPROVE | 89–99 |
+| `internal/activator/swap.go:Service.swapOverlap` | sites / legacy | APPROVE | 475–606, 663–669, 708–717 |
+| `internal/activator/swaphold.go:Service.startPinnedAt` | sites / legacy | APPROVE | 430–437, 478–484 |
+| `internal/activator/wakeplan.go:Service.spawnPlanned` | sites / legacy | APPROVE | 378–385; `verdictFloorGate` 470–489 |
+| `internal/edge/edge.go:Edge.Reload` | sites / legacy | APPROVE | 810–819, 924–952, 979–985 |
+| `internal/host/layoutleg.go:layoutStatusReport` | sites / diagnostic | APPROVE | 207–213 |
+| `internal/host/probes.go:currentSocketProbe` | sites / legacy | APPROVE | 307–313 |
+| `internal/host/socket_advice.go:advisorySocketServing` | sites / diagnostic | APPROVE | 83–89 |
+| `internal/host/socket_advice.go:socketAdvisoryLoop` | sites / diagnostic | APPROVE | 121–139 |
+| `internal/host/socket_advice.go:warnExternalSockets` | sites / diagnostic | APPROVE | 40–48 |
+| `internal/layout/pass.go:Pass.Converge` | sites / legacy | APPROVE | 305–352 |
+| `internal/layout/pass.go:Pass.convergeHost` | sites / legacy | APPROVE | 354–360 |
+| `internal/layout/pass.go:Pass.recoverHost` | sites / legacy | APPROVE | 1181–1202, 1243–1253 |
+| `internal/layout/pass.go:Pass.restoreHold` | sites / legacy | APPROVE | 597–609 |
+| `internal/layout/pass.go:Pass.shift` | sites / legacy | APPROVE | 829–837 |
+| `internal/ops/hibernate_verify.go:HibernatingHosts` | sites / legacy | APPROVE | 55–63 |
+| `internal/ops/litestream.go:FleetDBsWithSkipped` | sites / legacy | APPROVE | 353–364 |
+| `internal/registry/registry.go:Registry.Upsert` | sites / authority | APPROVE | 1407–1473 |
+| `internal/registry/remote_dispatch.go:Registry.dispatchRemote` | sites / hint | APPROVE | 213–220, 309–316 |
+| `internal/release/pins.go:BuildStateKept` | sites / authority | APPROVE | 227–239 |
+| `internal/rollout/policy.go:Managed` | sites / legacy | APPROVE | 156–170 |
+| `internal/host/schedule_wiring.go:activatorDeliverer.managedByGenerations` | quiet / retired direct-read row | APPROVE | 373–377; `registry/runtime.go` 30–32 |
+| `.` | envelope / re-pin | APPROVE | `cli.go` rows above; `system.go` 286–386, 571–607 |
+| `internal/activator` | envelope / re-pin | **REJECT — P1-1** | Unit rows above; `rootfs_service.go` 1–1021; `rootfs.go` 253–468; changed helpers in `claimspawn.go`, `identity.go`, `logsink.go`, `wakeplan.go` |
+| `internal/appconfig` | envelope / re-pin | APPROVE | `sync.go` 638–644 |
+| `internal/caps` | envelope / re-pin | APPROVE | `converge.go` 229–236 |
+| `internal/edge` | envelope / re-pin | APPROVE | `edge.go` rows above; `prober.go` 23–28 |
+| `internal/host` | envelope / re-pin | APPROVE | Unit rows above; `rootfsplacement.go` 226–286, 361–432; `layoutleg.go` 433–460, 789–797; `retention.go` 391–418; `systemapply.go` 479–515 |
+| `internal/hostops` | envelope / re-pin | APPROVE | `fleetowner_classifier.go` 1–49; `mutation_classifier.go` 98–180 |
+| `internal/instancectl` | envelope / re-pin | APPROVE | `client.go` 524–557; reached `rootfs.go` 161–265, 1004–1115 |
+| `internal/layout` | envelope / re-pin | APPROVE | `pass.go` unit rows above |
+| `internal/ops` | envelope / re-pin | APPROVE | `hibernate_verify.go` 55–63; `litestream.go` 353–364 |
+| `internal/provision` | envelope / re-pin | APPROVE | Unit rows above; `runtime.go` 1–250; `record_sequence.go` 125–182; `provision.go` 124–137, 737–750, 1026–1035 |
+| `internal/registry` | envelope / re-pin | APPROVE | Unit rows above; `runtime.go` 1–47; `remote.go` 14–17 |
+| `internal/release` | envelope / re-pin | APPROVE | Unit rows above; `layoutintent.go` 213–252; `systempointer.go` 29–42, 257–265, 278–361 |
+| `internal/rollout` | envelope / re-pin | APPROVE | `policy.go` 156–170 |
+| `internal/rolloutwords` | envelope / re-pin | APPROVE | `words.go` 68–88 |
+| `internal/schedule` | envelope / re-pin | APPROVE | `converge.go` 476–483 |
+| `internal/status` | envelope / re-pin | APPROVE | `snapshot.go` 1014–1020 |
+| `cli.go:runRouteHibernate` | record-write re-pin / key-site | APPROVE | 1558–1568 |
+| `internal/console/apiinstancemove.go:Server.moveTransitionSaying` | record-write re-pin / record-writer | APPROVE | 359–384 |
+| `internal/console/apiinstancemove.go:Server.handleAPIInstanceMoveRequest` | record-write re-pin / record-writer | APPROVE | 574–590 |
+| `internal/provision/provision.go:SetRecordRegion` | record-write re-pin / record-writer | APPROVE | 1026–1035 |
+| `internal/console/fleets.go:Server.placeAppTarget` | record-write re-pin / record-writer | APPROVE | 674–720, 767–778, 806–820 |
+| `internal/console/lifetimes_create.go:Server.createRecordWithLifetimeLocked` | record-write re-pin / key-site | APPROVE | 60–75; `rootfs.go` 293–311 |
+| `internal/console/hostsused.go:Server.createRecordMarked` | record-write re-pin / record-writer | APPROVE | 560–575; `rootfs.go` 293–311 |
+| `internal/provision/record_sequence.go:WriteRecord` | record-write re-pin / record-primitive | APPROVE | 125–182; `runtime.go` 106–250 |
+| `internal/provision/reconcile.go:Reconcile` | record-write re-pin / key-site | APPROVE | 1496–1513, 1553–1568, 1725–1758 |
+| `internal/ops/litestream.go:FleetDBsWithSkipped` | record-write re-pin / key-site | APPROVE | 353–364 |
+
+Reviewed `origin/main...78fd0d8a8cdcb6c21791d5418b9e8418cdac61a2`, with merge base `bf55f29e67f21b56667b5ab3f6cefa7c9d40c555`. The table covers all 141 units, 17 envelopes and 10 record-write re-pins: **165 approvals, three rejections arising from one finding**. `legacy` means the proposed frozen `accepted-legacy` disposition. The quiet unit has no direct census sites; its field reads remain covered by `Route.ActivatorOwned`.
+
+**P1-1 — The staged rootfs launcher discards the swap’s selected memory limit.**
+
+- **Problem and evidence:** `swapOverlap` deliberately preserves the incumbent’s larger memory tier when a size override shrinks or is cleared, and assigns that limit to `m.gen.Tier` ([swap.go:517](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/activator/swap.go:517)). The new `startStagedRootfs` retains this nonzero tier but calls `spawnRootfs` without passing it ([rootfs.go:261](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/activator/rootfs.go:261)). `spawnRootfs` instead recomputes `b.GenTier(rt, id.Version)` at line 340 and sends that recomputed `MemoryMax` to root at line 375. The returned generation still records the original, larger tier.
+- **Failure scenario:** An incumbent runs at `xlarge`—2 GiB—and its size override is cleared. During the next overlap deploy, the scheduler selects 2 GiB for the successor so shrinking waits for a cold start. The rootfs launcher instead requests the 1 GiB default. Root installs that smaller limit in the generation’s drop-in. A successor requiring more than 1 GiB can be OOM-killed and the deploy can fail, despite the scheduler selecting enough memory. If it starts, its recorded tier still disagrees with its actual limit.
+- **Fix:** Pass the selected `g.Tier` through the rootfs spawn path, using `GenTier` only when no tier was supplied. Add a focused regression with a nonzero supplied tier larger than the route-derived tier; assert both the control request’s `memory_max` and the returned generation. The existing [tier test](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/rootfs-apps-3/internal/activator/rootfs_staged_test.go:354) supplies no tier, so it misses this case.
+- **Fault family:** Preservation of the scheduler-selected resource limit across the agent-to-root launch boundary; overlap deploys must not introduce a memory shrink.
+
+**P2:** None.
+
+**P3:** None.
+
+The fleet-owner classifier approves only the exact validated key family, a create-only `Put`, and a body naming the key’s account and fleet. The 10 record-write re-pins retain their targets, kinds and classes.
+
+Validation is by source inspection. The targeted root-read, scope and record-write census tests could not start because the read-only sandbox prevented Go from creating its work directory. No files were edited, no subagents were spawned, and no full suites ran. Network access was blocked, so this verdict was not posted to #280.
+
+**NOT READY**
\ No newline at end of file
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-census-rootfs-apps-3-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-census-rootfs-apps-3-R2.md
new file mode 100644
index 000000000..ca31fd8f6
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-census-rootfs-apps-3-R2.md
@@ -0,0 +1,42 @@
+# Review brief: census for branch rootfs-apps-3-lifecycle, round 2 of 3
+
+Repo carlos/platform, branch `rootfs-apps-3-lifecycle`, commit 46cd42f22bf070b5a2cf547157c999fbdf6abda4.
+Under review: the census card `docs/superpowers/notes/census-proposal-rootfs-apps-3.md` (141 units: 29 body, 41 sites, 53 new, 17 reads, 1 quiet; 17 envelopes re-pinned, including `internal/hostops`), its overlay `internal/provision/testdata/plan14-root-reads-rootfs-apps-3.tsv`, the claims `docs/superpowers/notes/census-rootfs-apps-3-claims.md`, and the card's hand-added section "Record-write re-pins" (10 sites in `rootfsApps4WriteCensusInventory`, `internal/provision/plan9_b8_census_test.go`). Read them against the branch's diff `origin/main...46cd42f22bf070b5a2cf547157c999fbdf6abda4` (merge base bf55f29e) on the amadan.net remote.
+Authorities: AGENTS.md "The census: the reviewer decides" and "Stopping rules"; docs/superpowers/specs/2026-10-24-rootfs-apps-design.md (rev 5) and the rootfs plans index on main. The branch holds rootfs apps Plan 3 Group A (lifecycle) and Plan 4's console first slice; its plans are on the branch (docs/superpowers/plans/2026-10-24-rootfs-apps-3-lifecycle.md, -4-console-and-docs.md) and describe intent only.
+
+You are the independent census reviewer (the code was written by Claude models). Paul no longer rules on census units: you decide every class.
+
+## Fixed: do not re-argue
+
+- Paul's rulings R1-R11 (spec), and the build rulings in the plans' amendment sections: unknown non-empty runtime is fixed and inert; Task 12 (carlos run on rootfs) cut; Task 13 placement immutability; Task 15 rollback floor at the console with a hand-run box refusal only.
+
+## What to check
+
+1. For every unit and envelope on the card: approve or reject per AGENTS.md step 4. Reject if the change lets root open, run, query or follow anything it did not before, from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment root relies on; if a new unit's disposition is wrong for its reads; if a quiet unit is not really quiet; or if the diff cannot settle it.
+2. The `internal/hostops` envelope: Task 5a's fleet owner classifier (`internal/hostops/fleetowner_classifier.go`, routed in `mutation_classifier.go`). It admits only a create-only Put of `accounts/<acct>/fleets/<fleet>.json` naming its own account and fleet. Confirm no other key or op reaches it, and that it loosens nothing.
+3. The rootfs box surfaces root reads: `internal/host` (rootfs placement, fleet owner check, system apply's hand-run floor refusal), `internal/activator` (rootfs starts, resident lease watch, swaps), `internal/registry` (runtime column guards, SetPlacement/Upsert), and `internal/provision` (WriteRecord runtimeFixed beside main's checkKindUnchanged). Data a box agent or tenant writes must never steer root.
+4. The 10 record-write re-pins: is each one only a guard or refusal added before or inside an existing write, as the card says? Does any change a write's target, kind or class?
+
+## Round 2
+
+Earlier rounds: `docs/superpowers/notes/census-review-rootfs-apps-3-r1.md`. The card now has 153 units (31 body, 41 sites, 65 new, 17 reads, 1 quiet) and a section "Changes since round 1 (fix wave 1)": focus there (spawnRootfs, startRootfs, startStagedRootfs, doWake, the 12 rootfsmarker.go units, Reconcile, the release promotion units, and the new record-write site ExecBackend.SettleRootfsFirstBoot classed nonrecord sel:Put). Units approved in round 1 and unchanged since keep their verdict; say so in one line rather than re-tabling them.
+
+First give one line per P1 and P2 from round 1: resolved, partly, or not. Carry every unresolved or partly resolved finding forward at its current severity, then add new findings. The verdict covers everything outstanding, earlier rounds included.
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks merge.
+- **P2**: wrong or missing. Fixed without reopening this review (the census still checks the fix; see AGENTS.md, "Stopping rules").
+- **P3**: clarity or polish. Goes on a follow-up list; never a reason for another round.
+
+A P1 states its failure scenario and the evidence (file:line). Do not raise a P2 to P1 to keep the review open.
+
+## Output
+
+First a table with one row per unit, envelope and record-write re-pin: unit, class/disposition, verdict (APPROVE/REJECT), lines read. Then findings ranked P1, P2, P3, each with the problem, evidence (file:line, verified), failure scenario, fix and fault family. End with exactly one verdict:
+
+- **READY**: every unit approved, no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another round.
+- **NOT READY**: one or more P1s or rejected units, listed.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-apps-3-branch-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-apps-3-branch-R2.md
new file mode 100644
index 000000000..7d803a874
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-rootfs-apps-3-branch-R2.md
@@ -0,0 +1,41 @@
+# Review brief: whole branch rootfs-apps-3-lifecycle, round 2 of 3
+
+Repo carlos/platform, branch `rootfs-apps-3-lifecycle`, commit 46cd42f22bf070b5a2cf547157c999fbdf6abda4.
+Under review: the diff `origin/main...46cd42f22bf070b5a2cf547157c999fbdf6abda4` (merge base bf55f29e, 202 files): rootfs apps Plan 3 Group A (lifecycle: runtime column predicates, Record.Runtime, reconcile, readers, cmd environment, swaps/holds/planned wakes, start placement and wake bound, residency, declared-but-unrun processes, move refusals, the rollback floor) and Plan 4's console first slice (single-tenant setting, where a rootfs instance may run, instance create mints rootfs records, first rootfs ship refused while binary instances exist, fleet owner record). It ships as platform v0.29.0 to dev first, then serves a Rails 8 app on a dev fleet box.
+Authorities on main: docs/superpowers/specs/2026-10-24-rootfs-apps-design.md (rev 5), docs/superpowers/plans/2026-10-24-rootfs-apps-0-index.md, AGENTS.md ("Stopping rules"). Intent on the branch: docs/superpowers/plans/2026-10-24-rootfs-apps-3-lifecycle.md (Group A, its Invariants INV-1..7) and -4-console-and-docs.md ("First-slice amendments (preflight 2026-10-27)" overrides task text). Every task was reviewed on its own; this review looks at what crosses tasks.
+
+You are an independent reviewer (the code was written by Claude models). Read the diff, then the code it names, and check every claim against that code.
+
+## Fixed: do not re-argue
+
+- Paul's rulings R1-R11 (spec). Build rulings, recorded in the plans' amendment sections and commit messages: unknown non-empty runtime is fixed and inert; layout never applies to a row with a runtime (activator.LayoutExempt asked first); every binary launch asks the runtime first (refuseRuntimeBinaryLaunch); installProcLocked is the single resident install point and installs the lease watch; Task 12 (carlos run on rootfs, --version) CUT, so rootfs runs stay refused; moves and `apps place` refuse rootfs (by established app kind; SetPlacement refuses runtime rows; Upsert keeps a runtime row's region and hibernation unless the tenant changed); the rollback floor is v0.29.0, judged at the console before any activation reservation, with the override in the reservation's identity and a box-side refusal on a hand-run `carlos system apply` only; Group R (release process) and Group W (workers) come later, and apps migrate in their own web command meanwhile; Plan 4 Task 4 cut.
+- Per-task findings already resolved, in each task's commits. Raise one again only with new evidence.
+
+## What to check
+
+1. Cross-task invariants INV-1..7 (Plan 3 plan, "Invariants"), end to end: from a rootfs record minted by the console (Plan 4 Task 3) through reconcile (Task 4), the registry row, the box's placement and fleet owner checks (Plan 2, Plan 4 Task 5a), start, swap, hold, planned wake, residency and stop. Can any path start, stop, delete or launch anything without its proof or outside its row's account, app or host; let a rootfs row take a binary path; change a binary row's behaviour; record a refusal as a build failure; or let an unknown runtime admit anything?
+2. WriteRecord now has two guards, runtimeFixed (this branch) and main's checkKindUnchanged. Check their interplay and order on create, rewrite, tombstone and write-back, including JSON key aliases of protected fields.
+3. The first-kind boundary across ship and create (Plan 4 Tasks 3 and 5: firstKindRecheck under the record writers' lockApp, the ship slot's lockApp with strict record and pending-allocation counts, the recovery backstop) together with Plan 1's EstablishedKind and the kind marker: can an app end up with records of both kinds?
+4. The rollback floor: the console judges the channel's current pointer, not each box's installed version. A systemd-started apply gets no box refusal, and the pointer carries a signed allow_below_rootfs_floor that boxes do not read. Is there a realistic path to a box with rootfs instances running a release below v0.29.0 without an explicit operator override? (The ruling accepts a box lagging its channel.)
+5. Binary rows, static sites and existing apps: does anything on this branch change their behaviour, their wakes, swaps, moves or create door, beyond the reads the per-task reviews accepted?
+6. Mixed versions: a v0.29.0 console with older boxes, and v0.29.0 boxes with an older console. Do older boxes ignore rootfs rows safely? Can an older console write anything a v0.29.0 box misreads?
+
+## Round 2
+
+Earlier rounds: `docs/superpowers/notes/branch-review-rootfs-apps-3-r1.md`. Fix wave 1 commits: d35fcb1f (rootfs spawn keeps the swap tier), 6189a9db (lifetime-scoped first-boot marker beside the replica; fresh wake reads it, first boot writes it create-only before start; local pending file), 3c087d8e (floor bound to the judged pointer ETag; override forwarded on the unreserved rollback), ceea6353 (console refuses a rootfs create unless every fresh active box of the placement reports a release >= v0.29.0; box Reconcile leaves a runtime-less record of a rootfs-kind app unmaterialized), 46cd42f2 (census). Controller rulings for these are in the fix commits' messages. Accepted, do not re-raise: old boxes that are stale at create time or join a placement later; a marker written then box lost before serving needs an operator to delete the marker.
+
+First give one line per P1 and P2 from round 1: resolved, partly, or not. Carry every unresolved or partly resolved finding forward at its current severity, then add new findings. The verdict covers everything outstanding, earlier rounds included.
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks merge.
+- **P2**: wrong or missing. Fixed without reopening this review.
+- **P3**: clarity or polish. Goes on a follow-up list; never a reason for another round.
+
+A P1 states its failure scenario and the evidence (file:line). Do not raise a P2 to P1 to keep the review open.
+
+## Output
+
+Findings ranked P1, P2, P3. Each gives the area, the problem, the evidence (file:line, verified), the failure scenario, a concrete fix and its fault family (the invariant or trust boundary it breaks). End with exactly one verdict: READY / READY AFTER FIXES / NOT READY.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites.