carlos / platform Public

spec #658: Astra review brief, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 8547372bca42c8abeda410501bb1239c9e31c00b parent 433dfed
1 file changed, +51 −0
  • docs/superpowers/specs/CODEX-REVIEW-BRIEF-instance-restore-658.md +51 −0

CI passed — run details

diff --git a/docs/superpowers/specs/CODEX-REVIEW-BRIEF-instance-restore-658.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-instance-restore-658.md
new file mode 100644
index 000000000..96f670dea
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-instance-restore-658.md
@@ -0,0 +1,51 @@
+# Review brief: spec "Restore a deleted instance with its own data (#658)", round 1 of 3
+
+Repo carlos/platform, branch `design-instance-restore-658`, commit 433dfed0bed2ea7c4beacce56756617819843f9c.
+Under review: `docs/superpowers/specs/2026-11-07-instance-restore-658-design.md` (rev 2).
+Authorities: `docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md` (the hostname history), `docs/superpowers/specs/2026-10-21-self-serve-offline-moves-design.md`, and the code on main. Do not review against unmerged branches; if this work needs one, say so as a P1 and stop.
+
+You are an independent reviewer. Read the document, then the code it names, and check every claim against that code.
+
+## Fixed: do not re-argue
+
+- Paul's rulings, recorded in the spec and on amadan discussion #658: restore, not reuse, and the never-reuse rule stays unchanged for every create without `restore`; instances deleted before restore ships are refused (R8), with no fallback scan; restore goes through the existing create door with `restore: true`. Report only mechanisms that fail to honour them.
+- Out of scope by the spec's non-goals: sidecars, HA, rootfs, pool, fleet, addr-backed and replica instances (refused up front), claims on, a stop/start state, restoring the old record's configuration.
+
+## What to check
+
+1. The ownership proof (§4). With the history active and lifetimes on, can any sequence of creates, deletes, migrations (`carlos accounts migrate`), lazy lifetime migrations, lifetime recovery (`recoveryMark`), demo claims, app trash/restore, or a history invalidation and re-activation leave a host where items 1-8 all pass but some data under the hostname (replica prefix in the restore region, or a box file the restored record could be served from) was written by a different account or app, or by a different app lifetime?
+2. The restore region (§5.1). Is the record body stored at `BeginRetirement` exactly the body N1 tombstones, on every path that retires a record (the delete door, import rollback, demo claims, app trash and purge, lifetime recovery, anything else that writes `record_retirements` or deletes a record)? Can the record's region change between the stored body and the tombstone? Does any path delete a data-kind record without a retirement row, so a restore finds an older row's body?
+3. Staging (§5.1, R6). Is the claim "a staged copy exists only while an inbound move is landing, and delete is refused while a move is live" true for offline moves, the legacy move door, member moves, aborts, rollbacks and finished moves? If a staged copy can outlive its move, show how, since the wake promotes staging over the replica (`internal/activator/backend_exec.go` restorePlain).
+4. Box disks (§5.3). The spec leaves to plan task 1 whether a box other than the last serving one can hold a stale file at the host's derived path. Is that deferral safe, or does the spec need to decide it now?
+5. The door (§3). Does skipping the leftover rail for `instances/<host>` and passing a conflicting mark under the proof weaken any check for a create without `restore`? Does the proof run under the same app lock and lifetime admission as the mark write, so nothing can change between them? Is incarnation N+1 over a retired slot sound for the restored record, including anything keyed by the string identity `provision.Incarnation(account, app, host, CreatedAt)`?
+6. Information leaks. Do any refusal texts (§6, including C2) tell a caller about another account's or app's past use of a hostname?
+
+## 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 section or 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). 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.
+
+Write your findings to `docs/superpowers/specs/CODEX-FINDINGS-instance-restore-658-R1.md` in this worktree and nothing else.
+
+Do not edit any other file. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites.