review: Astra/Fable brief for fleet record labels M1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+70
−0
docs/superpowers/reviews/ASTRA-BRIEF-fleet-record-labels-m1.md+70 −0
CI failed — run details
Intent
Attributed to this commit: 34.5 g CO₂e (3,813,346 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-fleet-record-labels, 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/reviews/ASTRA-BRIEF-fleet-record-labels-m1.md b/docs/superpowers/reviews/ASTRA-BRIEF-fleet-record-labels-m1.md| new file mode 100644 |
| index 000000000..aded22b06 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/ASTRA-BRIEF-fleet-record-labels-m1.md |
| @@ -0,0 +1,70 @@ |
| +# Review brief: fleet record labels, merge M1 (release A), whole-branch, round 1 of 3 |
| + |
| +Repo carlos/platform, branch `design-fleet-record-labels`, tip: the commit that adds this brief (see `git log -1 -- docs/superpowers/reviews/ASTRA-BRIEF-fleet-record-labels-m1.md`). |
| +Under review: the diff `7e86fb13..HEAD` (merge base with main; the branch merged main at e27f469d, so main's own commits are not under review). |
| +Authorities: the spec `docs/superpowers/specs/2026-11-14-fleet-record-labels-design.md` (rev 3, final) and plan `docs/superpowers/plans/2026-11-14-fleet-record-labels.md`. Both land with this merge; the release manager (8a3d302) approved them and ruled no more spec rounds (#1008). |
| + |
| +M1 = plan Tasks T1 (R1 stale unlabelled wake fence), T2 (R2 proven final checkpoint), T3 (R3 stateless drain and failover), T6 Part B (D2, the relabel worker's first labelling off), and the M1 census (T8 m1). M1 ships as release A, which becomes this slice's rollback floor (spec D2). T4, T5, T6 Part A, T7 and the m2 census are a later merge and must NOT be in this diff. |
| + |
| +You are an independent reviewer. Read the diff, then the code it names, and check every claim against that code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Option B (owner-authorized labelling), v1 labels only to the serving box, R1-R4 as binding requirements, no more spec rounds: release manager rulings on #1008. |
| +- Controller rulings recorded in the build ledger (copied below). Report only mechanisms that fail to honour them, or a ruling whose cost turns out unsafe. |
| + |
| +## What to check |
| + |
| +1. R1: every wake, stateless and worker start of an unlabelled fleet-placed row on a fleet box passes the one gate in `currentWakeRoute` under the lease and before restore or start; refused on any FleetBox, ReplicaAssignment, retired, nil or unreadable record with errRouteChangedUnderLease; FleetWakeNone and off-fleet rows read nothing; no periodic record reads (worker refusals back off). |
| +2. R2: a fleet-placed non-HA stop never releases the lease over an unproven final checkpoint, on any path: normal stop, sweep retry, lost lease, Shutdown (including a checkpoint whose own budget ended, and a stop already pending). Platform-region stops unchanged. HA path unchanged. The start rule still refuses an empty start of a Moved row (C43). Check `CloseProven`/`TryAbandon`/`Abandon` teardown semantics in internal/lease against every existing caller of `Close` and `Abandon` (the non-HA teardown is now single-shot). |
| +3. R3: relabel and drain use `movableVerified`; an unverifiable manifest leaves the record and drain names the app. |
| +4. D2: the worker writes no first label on any path; its lost/draining/detached handling stays. Rollback: a release-A console never labels ownerlessly. |
| +5. Release A is safe on its own: nothing in M1 depends on M2 code; a box running release A next to a console running the previous release, and the reverse, behaves safely. |
| +6. Tests: deterministic witnesses (no sleeps, no polling helpers), real behaviour asserted, no test weakened to pass. Cross-compile: darwin builds of changed non-test packages. |
| +7. Triage the ledger items below: say for each parked or deferred item whether it must be fixed before this merge (P1/P2) or can follow (P3). |
| + |
| +## Census (Astra only) |
| + |
| +Also give the census verdict for `docs/superpowers/notes/census-proposal-fleet-record-labels-m1.md` (the card, with its review question), per unit and per re-pinned envelope: approve or reject, against the diff. Record nothing yourself; the controller records it on #280. |
| + |
| +## Ledger items (rulings, parked and deferred findings) |
| + |
| +- | T1 self | wakeidentity.go, host wiring | Plan names internal/host/agent.go; FleetWakeIdentityUnknown is built in internal/host/fleetidentity.go (fleetWakeFor). Ruling A. Helper `fleetBucket` not found by that name in pendingwake_linux_test.go; implementer uses the harness's real equivalent. | |
| +- | T1 self | FleetWakeUnknown mode | Spec R1 says FleetWakeCheck; plan extends fence to FleetWakeUnknown. Ruling B. | |
| +- Ruling A: T1 wires the record reader in internal/host/fleetidentity.go fleetWakeFor (passing FleetRecordFrom(store)), not agent.go — that is where the value is built — costs nothing if wrong (reviewer will flag). |
| +- Ruling B: fence applies in FleetWakeUnknown too, as the plan says (fail closed; that box already refuses labelled wakes). Cost if wrong: an identity-unknown box with a nil store also refuses unlabelled wakes — an availability change on a misconfigured box; reviewers may raise it. |
| +- T1 Ruling: worker-start GET budget — a record GET per worker start/restart of an unlabelled stateless fleet row is accepted (it is a start event, like labelled copies today; §7's "per wake" read as "per start"), but fence refusals must not re-read every ~2 s: refusals from the unlabelled fence double the worker backoff from sidecarRestartBase to sidecarRestartMax (no crash noted, no C10 event); labelled-copy refusal pacing unchanged — why: keeps the fresh safety check, bounds GETs to a backoff curve, no new periodic polling — cost if wrong: a worker on a just-labelled row restarts up to sidecarRestartMax late after reconcile. |
| +- T1 Ruling: Fable minor 7 (new fence detail strings) — log/diagnostic detail, not deck copy — cost if wrong: three strings miss Paul's copy review; T7 may still pick them up. |
| +- Task 1: minor (deferred): Fable 2 — unlabelled stateless path reads the record twice (fence + statelessFinalRecord); returning rec would enable the equality check at stateless.go:347, needs its own decision. |
| +- Task 1: minor (deferred): Fable 5 — rec.Retired branch reachable only from test readers (GetRecord errors on retired). |
| +- Task 1: minor (deferred): plan's T1 host -run 'TestAgent.*Fleet' matches nothing; real witness TestFleetWakeFor*. |
| +- Task 1: minor (deferred): fence refusals share the worker crash backoff; a worker installed after a long fence keeps the grown backoff, so an early crash reaches crashLoop sooner (reset on install, or own field). |
| +- T2 Ruling: lost lease + failed checkpoint -> tear down WITHOUT releasing (Abandon semantics, lock left to TTL), return a distinct error (not ErrCheckpointUnproven) so the stop finishes unclean, ERROR names the host — both reviewers' fix; cost if wrong: a lost-lease host waits out the TTL before another box may wake it. |
| +- T2 Ruling: shutdown ERROR line gets marker `// draft for copy review (C45)`; T7 adds C45 to the deck (spec §9 is final; deck carries the extra row) — cost: none. |
| +- T2 Ruling: C43 also covers the set-aside branch (startrule.go ~:383) with the path filled in, so its second slot is real — C43's text names set-aside copies; cost if wrong: one wording change reverted in T7. |
| +- Task 2: minor (deferred): no backoff on pending fleet checkpoint retries (one failed PUT + logs per sweep tick per host during an outage); HA arm same. |
| +- Task 2: parked — C45 after Shutdown returns — Ruling: at the cap; the safety invariant (no release over an unproven checkpoint, lease left to TTL) holds on every path Astra traced; only the ERROR's timing relative to Shutdown's return is lost in a rare race. Final whole-branch review sees it. |
| +- Task 2: parked — deregistration gap (activator.go:5598) — Ruling: at the cap; in the window the lease keeps renewing (the safe direction, never released) until the checkpoint goroutine resumes and abandons; on a real box Shutdown precedes process exit, which ends renewal. Real but not load-bearing for T3/T6B/T4; final whole-branch review may pull it into its fix wave (restore deferred deregistration). |
| +- Task 2: minor (deferred): CloseProven duplicates litestream v0.5.14 DB.SyncAndWait body (matches today); a litestream upgrade must re-check it. |
| +- Task 2: complete (commits e5a77903..7615022c, 2 parked) |
| +- Task 3: minor (deferred): fleetrelabel_test.go:878 log capture ends before the failing drain; uncaptured manifest diagnostic in test output. |
| +- Task 3: minor (deferred): activator pin TestLabelledStatelessRowStartsOnTheNewBox uses a substitute backend + rootfs row; no binary ExecBackend witness of the moved stateless start. |
| +- Task 6B: minor (deferred): readFleetBinding + binding type have no callers until T4's door uses them. |
| + |
| +## 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, and review of any newly changed security, root, termination or production-storage behaviour, still check 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 |
| + |
| +Findings ranked P1, P2, P3. Each gives the task, the problem, the evidence (file:line, verified), the failure scenario, a concrete fix and the invariant or trust boundary it breaks (that is its fault family). Then the census verdicts (Astra). End with exactly one verdict: |
| + |
| +- **READY**: no P1 and no P2. |
| +- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another round. |
| +- **NOT READY**: one or more P1s, listed. |
| + |
| +Do not edit files. Do not spawn reviewers or subagents of your own. Do not run the full test suites; a focused `-run` is fine when reading raises a specific doubt. |