| index c77575a4c..1d2a6d17d 100644 |
| --- a/docs/superpowers/plans/2026-10-30-managed-fleets-1b-box-per-instance.md |
| +++ b/docs/superpowers/plans/2026-10-30-managed-fleets-1b-box-per-instance.md |
| @@ -1,4 +1,4 @@ |
| -# Managed fleets 1b: each instance runs on one named box Implementation Plan (rev 3) |
| +# Managed fleets 1b: each instance runs on one named box Implementation Plan (rev 4) |
| |
| > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. |
| |
| @@ -8,21 +8,21 @@ |
| |
| **Tech Stack:** Go. `internal/provision`, `internal/registry`, `internal/edge`, `internal/console`, `internal/activator`, `internal/host`, `cmd/console`. |
| |
| -**Spec:** `docs/superpowers/specs/2026-10-28-managed-fleets-design.md` §4 Phase 1, "1b addendum", rules 1-10 (approved by Paul 2026-10-30; rule 6 his option 1; rule 8 his "gate and alert"; rules 5 and 10 revised after plan review R1). Code: main 65fd8060 (1a merged). Review history: round 1 `CODEX-FINDINGS-MANAGED-FLEETS-1B-PLAN-R1.md` (7 P1, 4 P2), round 2 `CODEX-FINDINGS-MANAGED-FLEETS-1B-PLAN-R2.md` (2 P1, 5 P2; stopping rule 2 on the restore and drain families; Paul chose "one rule each, enforced in one place"), both in `docs/superpowers/plans/`; dispositions at the end. Round 3 is the last. |
| +**Spec:** `docs/superpowers/specs/2026-10-28-managed-fleets-design.md` §4 Phase 1, "1b addendum", rules 1-10 (approved by Paul 2026-10-30; rule 6 his option 1; rule 8 his "gate and alert"; rules 5 and 10 revised after plan review R1). Code: main 65fd8060 (1a merged). Review history: round 1 `CODEX-FINDINGS-MANAGED-FLEETS-1B-PLAN-R1.md` (7 P1, 4 P2), round 2 `CODEX-FINDINGS-MANAGED-FLEETS-1B-PLAN-R2.md` (2 P1, 5 P2; stopping rule 2 on the restore and drain families; Paul chose "one rule each, enforced in one place"), both in `docs/superpowers/plans/`; dispositions at the end. Round 3 (`...-R3.md`, 4 P1, 3 P2, 1 P3) was the last: Paul ruled to skip a fourth round, apply the refusals below, and build subagent-driven with Astra on Tasks 3, 4 and 6 and the whole branch. |
| |
| ## Global Constraints |
| |
| -- Unlabelled records behave exactly as on main. Single-box fleets and fleets with sidecars are never labelled. |
| +- Unlabelled records behave exactly as on main. Single-box fleets, fleets with sidecars, and fleets holding any record the platform does not run (`Addr`/`Addrs` set, or a binary with hibernation off) are never labelled (`movable(rec)`, Task 2). |
| - **Activation gate** (`release.FleetBoxLabelFloor = "v0.33.0"`; the release that ships this must be v0.33.0 or later): the console labels a fleet only when (a) the fleet has two or more active boxes, (b) the fleet has no sidecar records, (c) every box in the deployment, platform and fleet, reports a version at or above the floor in its heartbeat (the same complete box listing `carlos system status` reads; an incomplete listing counts as not met), and (d) the console's own version is at or above it. |
| - **Alert:** once a fleet has labels, a box in it reporting a version below the floor pauses all relabelling for that fleet and raises an alert (an ERROR log line naming fleet, box and version, plus `LABELS PAUSED` in `carlos fleets ls`), until every box is back at or above the floor. |
| - Every label write is a conditional update: the record's region, current label and `CreatedAt` must equal what the decision read, rechecked inside every retry of the update. |
| - **The start rule** (one function, `startAllowed`, Task 4): a fleet instance starts only from a copy kept under its current assignment, a restored replica, or empty when its record has never moved (`FleetBoxMoved` false) and no set-aside copy of it exists on this box. Stale copies are set aside, never deleted; the set-aside copy is the persistent reason to refuse. |
| -- **The drain rule** (one function, `drainDone`, Task 6): a draining box may be detached only when its newest heartbeat was composed after `draining_since` and reports no routes for the fleet and no held leases. |
| +- **The drain rule** (one function, `drainDone`, Task 6): a draining box may be detached only when its newest heartbeat was composed after `draining_since` and reports no routes for the fleet, no held leases and no unresolved failed final replications. No other detach path for a box that holds or held labelled records. |
| - The lease stays the one-writer guarantee. Lease take and release are unchanged. |
| - Lost box: no fresh heartbeat for `lease.LeaseTTL + 5*time.Minute` (20 minutes). |
| -- **Request budget** (asserted by store-call counting tests in Tasks 2 and 6). The console keeps an in-process inventory cache per fleet: record and sidecar keys with their ETags from the LIST, and the decoded record; a record is re-read only when its ETag changed; any LIST error makes the inventory incomplete (no writes that pass). Per pass, per fleet with two or more active boxes: one heartbeat LIST plus one GET per box (memoised), one deployment-wide heartbeat listing for the gate (shared across fleets in the pass), and one instance LIST plus one sidecar LIST per placed app; record GETs only for changed ETags (zero when idle); zero PUTs when nothing is unlabelled, lost or draining. A create uses the same cache under the fleet lock. First labelling: one GET per record and per binding object, one PUT per record. A move or drain: one conditional update (a GET and a PUT) per moved record. Drain completion reads only the box's heartbeat. |
| +- **Request budget** (asserted by store-call counting tests in Tasks 2 and 6). The console keeps an in-process inventory cache per fleet: record and sidecar keys with their ETags from the LIST, and the decoded record; a record is re-read only when its ETag changed; any LIST error makes the inventory incomplete (no writes that pass). Per pass, per fleet with two or more active boxes: one heartbeat LIST plus one GET per box (memoised), one deployment-wide heartbeat listing for the gate (shared across fleets in the pass), and one instance LIST plus one sidecar LIST per placed app; record GETs only for changed ETags (zero when idle); lifetime validity is not cached: each pass re-reads each record's incarnation slot through the lifetime judge (one GET per record per pass when lifetimes are on; counted in the test), and an unreadable slot makes the inventory incomplete; zero PUTs when nothing is unlabelled, lost or draining. A create uses the same cache under the fleet lock. First labelling: the inventory reads above, one GET per binding object, then per labelled record one conditional update (a judged re-read and a PUT, plus one more of each per lost-race retry). A move or drain: the same per moved record. Drain completion reads only the box's heartbeat. |
| - Member-facing strings (drain and detach refusals, the sidecar refusal, the paused state) get a Luna copy pass before merge; log lines do not. |
| -- Local tests: touched packages with `-run`; activator and host e2e tests need a short temp root for Unix socket paths (memory "Gate tmp exec wrapper"): `R=$(mktemp -d /tmp/k.XXXX) && TMPDIR=$R go test ...; rm -r $R` (small, owned, removed); Go builds in a worktree with `GOFLAGS=-buildvcs=false`; CI runs the full suite. Darwin and windows must cross-compile. |
| +- Local tests: touched packages with `-run`; activator and host e2e tests need a short temp root for Unix socket paths (memory "Gate tmp exec wrapper"): `R=$(mktemp -d /tmp/k.XXXX) && TMPDIR=$R go test ...; rm -r $R` (small, owned, removed; a ruling: `/var/tmp` roots exceed the 107-byte socket path, as the gate recipe found, so this one exception to "no scratch in /tmp" stays, kept tiny and removed); Go builds in a worktree with `GOFLAGS=-buildvcs=false`; CI runs the full suite. Darwin and windows must cross-compile. |
| - Neutral names (`shop`, `example.com`, fleet `pi`, boxes `pi-1`, `pi-2`). |
| |
| ## Review Focus |
| @@ -61,13 +61,14 @@ |
| - `func (s *Server) loadDeploymentBoxesComplete(ctx context.Context) (boxes []status.Box, complete bool, err error)`: every heartbeat prefix (platform regions, pools, every fleet) through `loadBoxes`, AND-ing each prefix's completeness flag; a skipped or unreadable heartbeat makes it incomplete. Not `systemBoxes`, which drops that flag (`apisystemupdate.go:270-287`). |
| - `type fleetInventory struct` (the cache in Global Constraints) with `func (s *Server) fleetInventoryFor(ctx context.Context, fleet string) (records []provision.Record, sidecars int, complete bool, err error)`: per placed app, the instance LIST (as `ListRecordsCompleteJudged` reads) and the sidecar LIST (as `ListSidecarRecordsStrict`, `sidecar.go:404`, reads), re-reading only changed ETags; an unreadable record or sidecar makes it incomplete. |
| - `func (s *Server) loadFleetView(ctx context.Context, fleet string) (fleetView, error)`: the fleet's heartbeats, the deployment listing for (c), and the inventory for `Load` and `HasSidecars`. Anything incomplete leaves `Active` false. |
| -- `func (v fleetView) labelActive() bool`: the Global Constraints gate. |
| +- `func (v fleetView) labelActive() bool`: the Global Constraints gate, including no record failing `movable`. |
| +- `func movable(rec provision.Record) bool`: true only for a record the activator runs and can stop and start elsewhere: no `Addr`, no `Addrs`, and either a rootfs runtime or hibernation not switched off. |
| - `func (v fleetView) chooseDestination(rootfs bool, exclude string) string`: among boxes that are fresh, not draining, at the label floor (and rootfs-ready at the rootfs floor for a rootfs record), the lowest load, ties by label; "" when none. Independent of whether other boxes are fresh. |
| - `func (s *Server) lockFleet(fleet string) (unlock func())`: one mutex per fleet, held from `loadFleetView` through the record create. |
| - Store `AppsPlacedOn(ctx context.Context, placement string) ([]AppRef, error)`. |
| - Copy: `msgSidecarNeedsSingleBoxFleet(fleet string) string`. |
| |
| -- [ ] **Step 1: Write the failing tests.** `TestCreateOnASingleBoxFleetLeavesNoLabel`; `TestCreateLabelsTheLeastLoadedReadyBox`; `TestCreateSkipsStaleDrainingAndDetachedBoxes`; `TestGateNeedsEveryDeploymentBoxCurrent` (a platform box below the floor: no label); `TestGateClosedForAFleetWithSidecars`; `TestGateClosedOnAnIncompleteListing` (through `loadDeploymentBoxesComplete`: a skipped below-floor heartbeat and a capped listing both close the gate); `TestSidecarOnlyAppClosesTheGate`; `TestInventoryRereadsOnlyChangedRecords` (store-call counter: an unchanged second load does zero record GETs); `TestConcurrentCreatesSpreadAcrossBoxes`; `TestSidecarCreateRefusedOnAMultiBoxFleet` (and allowed on a single-box fleet); `TestRootfsAdmissionFollowsTheChosenBox`; `TestCreateOnALabelledFleetCostsOneInventory` (store-call counter: one LIST per placed app, zero record PUTs beyond the create). Existing `rootfs_test.go` and `TestAPIInstanceCreateInheritsFleetPlacement` still pass. |
| +- [ ] **Step 1: Write the failing tests.** `TestCreateOnASingleBoxFleetLeavesNoLabel`; `TestCreateLabelsTheLeastLoadedReadyBox`; `TestCreateSkipsStaleDrainingAndDetachedBoxes`; `TestGateNeedsEveryDeploymentBoxCurrent` (a platform box below the floor: no label); `TestGateClosedForAFleetWithSidecars`; `TestGateClosedForAnUnmanagedRecord` (an `Addr` record; a binary with hibernation off: no labels anywhere in the fleet); `TestGateClosedOnAnIncompleteListing` (through `loadDeploymentBoxesComplete`: a skipped below-floor heartbeat and a capped listing both close the gate); `TestSidecarOnlyAppClosesTheGate`; `TestInventoryRereadsOnlyChangedRecords` (store-call counter: an unchanged second load does zero record GETs); `TestConcurrentCreatesSpreadAcrossBoxes`; `TestSidecarCreateRefusedOnAMultiBoxFleet` (and allowed on a single-box fleet); `TestRootfsAdmissionFollowsTheChosenBox`; `TestCreateOnALabelledFleetCostsOneInventory` (store-call counter: one LIST per placed app, zero record PUTs beyond the create). Existing `rootfs_test.go` and `TestAPIInstanceCreateInheritsFleetPlacement` still pass. |
| - [ ] **Step 2: Run them to see them fail.** `go test ./internal/console/ -run 'FleetBox|LeastLoaded|SkipsStale|Gate|ConcurrentCreatesSpread|SidecarCreateRefused|RootfsAdmissionFollows|CostsOneInventory'` → FAIL. |
| - [ ] **Step 3: Implement.** Freshness and readiness reuse `status.BoxStale`, `boxRootfsReady`, `boxAtRootfsFloor` and the join at `rootfs.go:212-238`. The create door stamps the label only when `labelActive()`; a rootfs create on an active fleet with no rootfs-ready destination is refused with today's rootfs refusal. |
| - [ ] **Step 4: Run them to see them pass,** plus `-run 'Rootfs|FleetPlacement|Sidecar'` → PASS. |
| @@ -114,13 +115,13 @@ |
| |
| ### Task 6: The relabel worker, two-step drain, pause and alert (rules 2, 4, 5, 8) |
| |
| -**Files:** create `internal/console/fleetrelabel.go`; modify `internal/console/claim_workers.go`, `cmd/console/main.go`, `internal/console/testdata/claim-routes.txt`, `internal/console/fleets.go` (new drain door; detach doors :544, :1455), `internal/registry/fleets.go` (`draining` column on `fleet_boxes`; `FleetChannelAuth` still admits a draining active box), `fleets.go` at the repo root (the CLI: `carlos fleets drain`, `LABELS PAUSED` in `fleets ls`); tests `internal/console/fleetrelabel_test.go`, `cmd/console/claimworkers_started_test.go`, `internal/registry` fleet tests, `cli_test.go` patterns for the CLI; docs `docs/site/cli.md` (document `fleets drain`, drain refusal and completion, detach after a drain, `LABELS PAUSED`, and revise the existing detach-first advice at :2168 for a leaked key: detach still works at once for a box that holds nothing; otherwise rotate its token first, then drain). |
| +**Files:** create `internal/console/fleetrelabel.go`; modify `internal/console/claim_workers.go`, `cmd/console/main.go`, `internal/console/testdata/claim-routes.txt`, `internal/console/fleets.go` (new drain door; detach doors :544, :1455), `internal/registry/fleets.go` (`draining` column on `fleet_boxes`; `FleetChannelAuth` still admits a draining active box), `fleets.go` at the repo root (the CLI: `carlos fleets drain`, `LABELS PAUSED` in `fleets ls`); tests `internal/console/fleetrelabel_test.go`, `cmd/console/claimworkers_started_test.go`, `internal/registry` fleet tests, `cli_test.go` patterns for the CLI; docs `docs/site/cli.md` (document `fleets drain`, drain refusal and completion, detach after a drain, `LABELS PAUSED`, and revise the existing detach-first advice at :2168 for a leaked key: a box that holds nothing can be detached at once; otherwise drain first, which needs the box's current token, then detach and rotate. Rotating first would cut the box off before it can see the drain). |
| |
| -**Interfaces (produces):** worker `FleetRelabel` every 5 minutes, started like `StartRunSweep`; `func (s *Server) fleetRelabelPass(ctx context.Context) error`; `func (s *Server) relabelFleet(ctx context.Context, fleet string, v fleetView) (moved int, err error)`; `func (s *Server) drainBox(ctx context.Context, fleet, label string) (stuck []string, err error)`; `func drainDone(hb status.Box, drainingSince time.Time) bool` (the drain rule: `hb` composed after `drainingSince`, no routes for the fleet, `LeasesHeld == 0`), the only check both detach doors make for a draining box; a box that is lost (silent past `fleetBoxLostAfter`) may be detached without it once no record names it, since its access is moot; `status.Box.LeasesHeld int` (`json:"leases_held"`), filled by the box from the activator's held leases when it composes the heartbeat; `fleet_boxes.draining_since` (timestamp; null when not draining); `const fleetBoxLostAfter = lease.LeaseTTL + 5*time.Minute`; copy `msgDrainStrandsApps(fleet, label string, apps []string) string`, `msgDetachNotDrained(fleet, label string) string`. |
| +**Interfaces (produces):** worker `FleetRelabel` every 5 minutes, started like `StartRunSweep`; `func (s *Server) fleetRelabelPass(ctx context.Context) error`; `func (s *Server) relabelFleet(ctx context.Context, fleet string, v fleetView) (moved int, err error)`; `func (s *Server) drainBox(ctx context.Context, fleet, label string) (stuck []string, err error)`; `func drainDone(hb status.Box, drainingSince time.Time) bool` (the drain rule: `hb` composed after `drainingSince`, no routes for the fleet, `LeasesHeld == 0`, `ReplicationFailures == 0`), the only check both detach doors make for any box that holds or held labelled records, with no exception for a silent box; `status.Box.LeasesHeld int` (`json:"leases_held"`) and `status.Box.ReplicationFailures int` (`json:"replication_failures"`), filled by the box when it composes the heartbeat: held leases from the activator, and failed final replications from a durable record the activator writes under its data dir when a final sync fails (`activator.go:4877`, `lease.go:557`) and clears when a later replication of that host succeeds; the drain also refuses a record failing `movable`, naming the app; `fleet_boxes.draining_since` (timestamp; null when not draining); `const fleetBoxLostAfter = lease.LeaseTTL + 5*time.Minute`; copy `msgDrainStrandsApps(fleet, label string, apps []string) string`, `msgDetachNotDrained(fleet, label string) string`. |
| |
| -Per fleet, per pass: if a labelled fleet has a box below the floor, log the alert and skip it (paused). Else if `labelActive()`: label each unlabelled record to the box its binding names (`fleets/<f>/bindings/<host>.json`) when that box is a valid destination, otherwise `chooseDestination`; move each record whose box is lost to `chooseDestination(rootfs, lost)`; move each record of a draining box likewise. All writes use `SetRecordFleetBox` with the expectation read in this pass; `ErrFleetBoxMoved` is skipped until the next pass. Truncated or skipped records make the pass write nothing for that fleet. |
| +Per fleet, per pass: if a labelled fleet has a box below the floor, log the alert and skip it (paused). Else if `labelActive()`: label each unlabelled record to the box its binding names (`fleets/<f>/bindings/<host>.json`) when that box is a valid destination; an existing record with no such binding stays unlabelled this pass (never `chooseDestination`: that would let a clean box boot it empty); records created after activation are labelled at create (Task 2); move each record whose box is lost to `chooseDestination(rootfs, lost)`; move each record of a draining box likewise. All writes use `SetRecordFleetBox` with the expectation read in this pass; `ErrFleetBoxMoved` is skipped until the next pass. Truncated or skipped records make the pass write nothing for that fleet. |
| |
| -- [ ] **Step 1: Write the failing tests.** `TestFirstLabellingFollowsBindings` (three running records, bindings on `pi-1`, `pi-1`, `pi-2`: labelled the same; nothing moves); `TestRelabelPassLeavesAnUngatedFleetAlone`; `TestLostBoxMovesToTheSurvivor` (two-box fleet, `pi-1` silent 21 minutes: all its records to `pi-2`; 19 minutes: nothing); `TestRelabelLosesToAPlacementChange`; `TestBelowFloorBoxPausesAndAlerts`; `TestDrainMovesEverythingOrNothing` (one record with no destination: refused naming the app, nothing written); `TestDrainingBoxKeepsFleetAccess` (`FleetChannelAuth` still lists it); `TestDrainDoneNeedsAPostDrainHeartbeat` (an empty heartbeat composed before `draining_since`: not done); `TestDrainDoneNeedsNoLeases` (no routes but one lease held: not done); `TestBothDetachDoorsUseDrainDone` (API and page); `TestHeartbeatCountsHeldLeases` (in `internal/host` or `internal/status`: a box holding two leases reports 2, after release 0); `TestIdlePassCostsTheBudget` (store-call counter for an idle labelled fleet: per the Global Constraints); `TestEveryRegisteredClaimWorkerIsStarted` with `FleetRelabel`; CLI tests for `carlos fleets drain` and the `LABELS PAUSED` column. |
| +- [ ] **Step 1: Write the failing tests.** `TestFirstLabellingFollowsBindings` (three running records, bindings on `pi-1`, `pi-1`, `pi-2`: labelled the same; nothing moves); `TestRelabelPassLeavesAnUngatedFleetAlone`; `TestLostBoxMovesToTheSurvivor` (two-box fleet, `pi-1` silent 21 minutes: all its records to `pi-2`; 19 minutes: nothing); `TestRelabelLosesToAPlacementChange`; `TestBelowFloorBoxPausesAndAlerts`; `TestDrainMovesEverythingOrNothing` (one record with no destination: refused naming the app, nothing written); `TestDrainingBoxKeepsFleetAccess` (`FleetChannelAuth` still lists it); `TestDrainDoneNeedsAPostDrainHeartbeat` (an empty heartbeat composed before `draining_since`: not done); `TestDrainDoneNeedsNoLeases` (no routes but one lease held: not done); `TestDrainDoneNeedsNoFailedReplication` (fault injection: the final sync fails but the lease is released; the box reports 1; not done; a later successful replication clears it); `TestSilentBoxCannotBeDetached` (a box silent 21 minutes whose records moved: detach refused at both doors); `TestFirstLabellingSkipsAnUnboundRecord` (no binding: stays unlabelled; a clean box never gets it); `TestDrainRefusesAnUnmanagedRecord`; `TestBothDetachDoorsUseDrainDone` (API and page); `TestHeartbeatCountsHeldLeases` (in `internal/host` or `internal/status`: a box holding two leases reports 2, after release 0); `TestIdlePassCostsTheBudget` (store-call counter for an idle labelled fleet: per the Global Constraints); `TestEveryRegisteredClaimWorkerIsStarted` with `FleetRelabel`; CLI tests for `carlos fleets drain` and the `LABELS PAUSED` column. |
| - [ ] **Step 2: Run them to see them fail.** `go test ./internal/console/ ./internal/registry/ ./cmd/console/ . -run 'FirstLabelling|RelabelPass|LostBox|RelabelLoses|BelowFloor|Drain|Detach|IdlePass|ClaimWorker|FleetsDrain|LabelsPaused'` → FAIL. |
| - [ ] **Step 3: Implement.** Log one line per moved record (host, from, to, reason). |
| - [ ] **Step 4: Run them to see them pass.** Same command → PASS. |
| @@ -138,7 +139,7 @@ Per fleet, per pass: if a labelled fleet has a box below the floor, log the aler |
| |
| ### Task 8: Census, copy, review, merge |
| |
| -- [ ] **Step 1:** `go test ./internal/provision/ -run TestPlan14RootReadCensus`; on failure, AGENTS.md "The census" (`make census-card`, CLAIMS, `make census-propose NAME=<branch>`); include the two new route columns and the `fleet_boxes.draining` column. The reviewer decides; record on #280. |
| +- [ ] **Step 1:** `go test ./internal/provision/ -run TestPlan14RootReadCensus`; on failure, AGENTS.md "The census" (`make census-card`, CLAIMS, `make census-propose NAME=<branch>`); include the three new route columns (`fleet_assigned`, `fleet_moved`, `fleet_label`) and the `fleet_boxes.draining` and `draining_since` columns, and the heartbeat fields `leases_held` and `replication_failures`. The reviewer decides; record on #280. |
| - [ ] **Step 2:** Luna copy pass on the drain, detach and sidecar refusals, the `LABELS PAUSED` state and the drain help text; apply verbatim. |
| - [ ] **Step 3:** Whole-branch Astra review from `docs/superpowers/reviews/REVIEW-BRIEF-TEMPLATE.md`, round 1 of 3, with this plan's Review Focus; name Tasks 3, 4 and 6 as production storage and removal. |
| - [ ] **Step 4:** CI green on the tip; merge with `amadan branch merge carlos/platform <branch> -squash` on Paul's go. |
| @@ -183,3 +184,18 @@ Stopping rule 2 triggered on two families (restore, drain completion). Paul chos |
| | 5 | P2 | Idle budget contradicts the readers | Accepted: the inventory cache re-reads only changed ETags; budget restated; cold and unchanged passes tested separately. | |
| | 6 | P2 | Fixture seam, expiry case, scratch path | Accepted: exported `RunFleetRelabelPass`; stopped-renewal expiry case; owned short temp roots (`mktemp -d /tmp/k.XXXX`, removed), since socket paths rule out the longer `$TMPDIR`. | |
| | 7 | P2 | CLI docs | Accepted: `docs/site/cli.md` in Task 6, including the revised leaked-key advice. | |
| + |
| +## Round 3 dispositions (`CODEX-FINDINGS-MANAGED-FLEETS-1B-PLAN-R3.md`) |
| + |
| +Paul: skip a fourth round, apply the refusals, build subagent-driven with Astra on Tasks 3, 4, 6 and the whole branch. |
| + |
| +| # | Sev | Finding | Disposition | |
| +|---|---|---|---| |
| +| 1 | P1 | First labelling can boot an existing instance empty | Accepted (refusal): existing records are labelled only to the box their binding names; unbound ones stay unlabelled (Task 6; spec rule 6). | |
| +| 2 | P1 | Lost-box detach exception | Accepted (refusal): exception removed; detach always needs `drainDone` (Task 6; spec rule 5). | |
| +| 3 | P1 | Zero leases does not prove final replication | Accepted: `ReplicationFailures` from a durable record of failed final syncs; `drainDone` requires zero; fault-injection test (Task 6). | |
| +| 4 | P1 | Unmanaged process shapes | Accepted (refusal): `movable(rec)`; fleets with any unmovable record are not labelled; drains refuse them (Tasks 2, 6; spec rule 11). | |
| +| 5 | P2 | Lifetime freshness and read counts | Accepted: lifetime slots re-read every pass, counted; mutation re-reads and retries counted (Global Constraints). | |
| +| 6 | P2 | Scratch under /tmp | Declined with reason: socket paths exceed 107 bytes under `/var/tmp` (gate recipe); kept to a tiny owned `/tmp/k.XXXX`, removed after each run. | |
| +| 7 | P2 | Rotate-then-drain advice | Accepted: drain first, then detach and rotate (Task 6 docs). | |
| +| P3 | P3 | Census checklist columns | Accepted: Task 8 lists every new column and heartbeat field. | |