carlos / platform Public

Managed fleets design: removal is drain then terminate-confirmed detach (Paul, after branch review R1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 89891ac82f809f71ef97d2f04b886b74631308eb parent c10e6d4
1 file changed, +10 −12
  • docs/superpowers/specs/2026-10-28-managed-fleets-design.md +10 −12
diff --git a/docs/superpowers/specs/2026-10-28-managed-fleets-design.md b/docs/superpowers/specs/2026-10-28-managed-fleets-design.md
index c0269f483..3b5e39a93 100644
--- a/docs/superpowers/specs/2026-10-28-managed-fleets-design.md
+++ b/docs/superpowers/specs/2026-10-28-managed-fleets-design.md
@@ -183,23 +183,21 @@ The rule (my calls, approved by Paul 2026-10-30):
writer: a box that was only partitioned keeps its lease until it
lapses, and the new box waits for it. When the old box returns, its
reconcile no longer admits those records and it drops them.
-5. **Removal drains, in two steps (my call, after plan review R1).**
+5. **Removal: drain moves, detach needs the machine gone (Paul,
+ 2026-10-31, after branch review R1 and stopping rule 2).**
`carlos fleets drain <fleet> <box>` marks the box draining (no new
assignments; it keeps its fleet access) and relabels all its records
to other ready boxes, or refuses, naming the apps, when any record has
nowhere to go. The old box drops the rows, stops the instances and
releases their leases; the new box wakes them from the fleet bucket.
- Detaching a box is refused until the box itself shows it is done: a
- heartbeat composed after the drain began that lists no routes for
- the fleet and no held leases (leases are released only after the
- instance is proven stopped and its final replication ran). Detaching
- first would revoke the box's access before it had seen the relabel
- and released its leases. The heartbeat must also report no failed
- final replications still on the box's disk, since a lease is released
- even when the last upload failed. There is no exception for a silent
- box: its records still move, but it stays attached until it shows it
- is done. One check, in one place, in the console (Paul, 2026-10-30,
- after plan review R2 and stopping rule 2; R3 refinements).
+ A box that has ever held labelled records is detached only with an
+ operator's confirmation that its machine is terminated
+ (`detach-box --terminated`); in phase 2 the console confirms it from
+ the cloud itself. A box that never held labelled records detaches as
+ before. This replaces the heartbeat-evidence drain rule, whose
+ evidence kept producing new failure cases across three reviews. The
+ accepted cost: an unreplicated tail on a box terminated without a
+ clean drain is lost.
6. **No stale local copy (#470), by assignment time (Paul, 2026-10-30,
option 1).** The record carries the time it was assigned to its box,
beside the label. A box notes that time next to its local copy. When