carlos / platform Public

Managed fleets design: 1b rule 6 by assignment time (Paul, option 1); mixed versions, removal phase, sidecars

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev f41ad40100c4468af73ba89d0b6a21bbf5ff3d33 parent 5ec88df
1 file changed, +22 −7
  • docs/superpowers/specs/2026-10-28-managed-fleets-design.md +22 −7

CI cancelled — superseded by a newer push — run details

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 e9013ded2..6a6321d48 100644
--- a/docs/superpowers/specs/2026-10-28-managed-fleets-design.md
+++ b/docs/superpowers/specs/2026-10-28-managed-fleets-design.md
@@ -187,16 +187,31 @@ The rule (my calls, approved by Paul 2026-10-30):
ready boxes first; the old box hibernates them, releasing their
leases, and the new box wakes them from the fleet bucket. Removal is
still refused when no other box can take them (Phase 2 §Removal).
-6. **No stale local copy (#470).** On a fleet box, a box keeps its local
- database on acquire only when the lock it took was last held by this
- same box (owner `ref` and `iid` match; the owner string carries both
- since 4029ac5). Otherwise it discards the local copy and restores
- from the fleet bucket, as the HA path already decides
- (`hafresh.DecideKeep`). An owner it cannot parse counts as another
- box.
+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
+ it mints a labelled record whose assignment time differs from its
+ note, it discards the local copy before any wake and records the new
+ time, so the first wake restores from the fleet bucket. After A, then
+ B, then A, box A sees a newer assignment and restores. The check is
+ local: no lock change, no extra bucket request, and ordinary wakes on
+ an unchanged assignment keep their warm copy. (This replaces the
+ draft's "last lock holder" rule: a legacy release deletes the lock,
+ so there is usually no previous holder to compare; code map,
+ `internal/lease/lease.go:299-319`.) Unlabelled records keep today's
+ behaviour until rule 2's labelling pass reaches them.
7. **Rootfs admission follows the box.** A rootfs placement is admitted
when the chosen box is rootfs-ready, replacing "one fresh box ready
and every box on the floor" (`internal/console/rootfs.go:160-212`).
+8. **Mixed versions (my call).** A box binary that predates the label
+ ignores it and mints every fleet record. So the console labels a
+ fleet's records only when every active box in the fleet reports the
+ release that carries this rule or later; until then the fleet keeps
+ today's behaviour, unlabelled.
+9. **The removal phase checks the label too (my call).** A row whose
+ record now names another box is removed, not kept on region alone
+ (`internal/provision/reconcile.go` scan and removal phase).
+10. **Sidecars (my call)** follow the same rules as instances.
Tests that prove it: a real two-box fleet test (activator, lease and
restore, not the modelled lease of `TestTwoBoxFleetEndToEnd`) covering