spec: round 2 findings for #1139 (NOT READY; stopping rule 2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+45
−0
docs/superpowers/specs/CODEX-FINDINGS-fleet-seeded-create-R2.md+45 −0
CI passed — run details
diff --git a/docs/superpowers/specs/CODEX-FINDINGS-fleet-seeded-create-R2.md b/docs/superpowers/specs/CODEX-FINDINGS-fleet-seeded-create-R2.md| new file mode 100644 |
| index 000000000..868e59cb9 |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-FINDINGS-fleet-seeded-create-R2.md |
| @@ -0,0 +1,45 @@ |
| +- R1-1 (P1): **Resolved** — §3.5 specifies both layout gates, instance-scoped temporary files, rollback paths and concurrent placement coverage. |
| +- R1-2 (P1): **Partly resolved** — the rollback door exists, but cleanup before hostname release remains unsafe; carried below. |
| +- R1-3 (P1): **Resolved** — `failed → aborted → rolled-back` defines terminal recovery without changing import refusal. |
| +- R1-4 (P2): **Resolved** — §3.4 specifies heartbeat evidence, completeness checks, floor access and feature-specific admission. |
| +- R1-5 (P2): **Resolved** — §3.2 requires lifecycle consumers and corresponding tests to support `file`. |
| +- R1-6 (P2): **Resolved** — §7 includes documentation, parity and UX/copy work. |
| + |
| +1. **P1 — §3.6: absence of an active owner does not prove cleanup is unnecessary.** |
| + **Carry-forward: R1-2.** |
| + |
| + **Problem:** Design lines 223–227 permit console-side finishing because no box owns the seed and its record never left `ready`. Neither fact proves that placement produced no data. |
| + |
| + **Evidence:** `internal/activator/seedplace.go:551` confirms the first replica upload **before** calling the placement recorder at line 557. An interrupted or failed recording therefore leaves a `ready` record with local data and a replica. Existing rollback explicitly fences and proves stopping before cleanup (`internal/provision/seedreconcile.go:315`), while console finishing requires `rolled-back` (`internal/console/seedfinish.go:84`). The sweep also has no seven-day expiry for `ready` seeds (`internal/console/seedsweep.go:104`). |
| + |
| + **Failure scenario:** A box uploads the seed’s replica, fails to report `placed`, and subsequently becomes unavailable or is detached. The member aborts the still-`ready` seed. The proposed shortcut releases its hostname despite outstanding cleanup; `ready` did not establish that nothing was placed. |
| + |
| + **Concrete fix:** Remove the no-owner shortcut for any seed that reached `ready`. Retain the record until cleanup is proved, or define an explicit recovery operation with equivalent fencing and cleanup evidence. A never-placeable reservation can have a separate shortcut only if its transition history proves it never reached `ready`. Correct the claimed seven-day expiry. |
| + |
| + **Fault family:** Abandonment must complete cleanup before releasing the hostname. |
| + |
| +2. **P1 — §3.3–3.6: fleet replica leftovers can silently replace the newly uploaded database.** |
| + |
| + **Problem:** The proposed rollback removes local files and the deployment-bucket snapshot, but assigns nobody responsibility for removing an aborted seed’s fleet-bucket replica. More generally, fresh seeded creation inherits no fleet-aware leftover-replica admission check. |
| + |
| + **Evidence:** `internal/console/createleftovers.go:53` explicitly excludes fleets from the existing create check. `internal/console/seedfinish.go:124` currently selects replica/demo-claim kinds for replica deletion; even extending that selection to `file` still skips fleet storage at line 283. The unchanged placement algorithm treats any existing host replica as prior placement and restores it without fetching the new snapshot (`internal/activator/seedplace.go:173`, `:177`). |
| + |
| + **Failure scenario:** Seed A uploads a replica but its `placed` report fails. An owner completes the proposed local rollback, reports `rolledback`, and the console releases the hostname. Seed B is created at that hostname with a different uploaded database. Its first wake finds A’s surviving replica, restores A, and reports B placed; B’s snapshot is then deleted without being used. Ordinary pre-existing fleet replicas expose the same problem on a first seeded create. |
| + |
| + **Concrete fix:** Specify fleet-side, fenced replica cleanup before rollback acknowledgement, bound to the current record and seed ID. Also establish a fleet-side admission/provenance check that distinguishes a replica predating this seed from this seed’s interrupted placement; uncertainty must refuse placement. Cover both pre-existing replicas and upload-success/report-failure followed by abort and recreate. |
| + |
| + **Fault family:** A fresh seed must not inherit another incarnation’s replica; hostname release requires complete cleanup. |
| + |
| +3. **P3 — §5: the box test still expects the superseded `refused` operation.** |
| + |
| + **Evidence:** Design line 262 expects `refused`, while lines 177–189 and 207–210 specify `failed` and `SeedFail`. |
| + |
| + **Failure scenario:** The test description contradicts the accepted failure protocol. |
| + |
| + **Concrete fix:** Change the expectation to `failed`, followed by `aborted`, and retain the no-empty-start assertion. |
| + |
| + **Fault family:** Test expectations must agree with the defined state machine. |
| + |
| +The abandonment invariant has findings in both rounds. Stopping rule 2 therefore applies: do not attempt a third incremental fix in that family. The recommended cut is to retain the hostname when cleanup cannot be proved, with any broader recovery implemented around one cleanup invariant and a deterministic interrupted-placement/recreate test. |
| + |
| +NOT READY |
| \ No newline at end of file |