carlos / platform Public

docs: carry the accepted nearest-region never-reuse spec (rev 5), plan, approved copy and review findings from design-nearest-region-199 (d572012f), unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 9ceae0221ef01a4ce7e4238f38b832e588f583ec parent b566097
7 files changed, +630 −0
  • docs/superpowers/notes/copy/nearest-region-never-reuse.md +12 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r1.md +55 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r2.md +81 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r3.md +46 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-r1.md +50 −0
  • docs/superpowers/plans/2026-10-26-nearest-region-never-reuse.md +252 −0
  • docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md +134 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/copy/nearest-region-never-reuse.md b/docs/superpowers/notes/copy/nearest-region-never-reuse.md
new file mode 100644
index 000000000..bb8f307fc
--- /dev/null
+++ b/docs/superpowers/notes/copy/nearest-region-never-reuse.md
@@ -0,0 +1,12 @@
+# Nearest-region never-reuse: approved copy
+
+Approved by Paul in copy review on 2026-10-26, unedited. Apply verbatim; `<host>` and `<target>` are placeholders.
+
+- **S1**: <host> is in use or has held an app's data before, so it can't be created. Choose another address.
+- **S2**: Could not check whether <host> is free. Try again.
+- **S3**: An app's placement can't be changed once it exists.
+- **S4**: New instances can't be created on <target> yet. Choose another region.
+- **S5**: New instances can't be created right now. Try again later.
+- **S6**: <host>: not migrated. Its destination record is gone, and recreating it would reuse a hostname that held data.
+- **S7**: Moves and placement are paused for maintenance. Try again later.
+- **S8**: New instances can't be created during maintenance. Try again in a few minutes.
diff --git a/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r1.md b/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r1.md
new file mode 100644
index 000000000..ca6364ef5
--- /dev/null
+++ b/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r1.md
@@ -0,0 +1,55 @@
+NOT READY
+
+1. **P1 — The in-region allowance still permits predecessor data and processes to be reused.** The rail checks bucket LTX files only; it skips entirely when `HibernateBucket` is unset ([createleftovers.go:43](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/createleftovers.go:43), [:69](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/createleftovers.go:69)). An existing local DB wins without an ownership check ([backend_exec.go:819](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/activator/backend_exec.go:819)). An already-awake process can also win without another restore ([activator.go:1509](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/activator/activator.go:1509), [:1534](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/activator/activator.go:1534)). Sidecars use the same hostname-derived DB layout ([sidecar_reconcile.go:131](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/provision/sidecar_reconcile.go:131)).
+
+ **Fix:** a clean bucket must not authorize reuse by itself. Retaining the exception requires proving the predecessor’s processes and replicators stopped, removing or safely parking its local data on every box that could serve it, and preventing stale admission during that transition. Refuse when the bucket is unconfigured or evidence is unavailable. A README purge procedure does not enforce this. The smallest safe scope cut is to refuse used hostnames at home too.
+
+2. **P1 — The proposed marking sites miss actual record writers.** Seeds and imports return from the instance handler before its two listed write arms ([apiinstances.go:1613](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apiinstances.go:1613)); `createSeedRecord` independently dispatches both writes ([apiinstanceseed.go:82](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apiinstanceseed.go:82)). Lifetime-enabled attach bypasses `domainattach.go:259` and writes through `createRecordWithLifetimeLocked` ([domainattach.go:227](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/domainattach.go:227), [:680](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/domainattach.go:680)). Recovery can publish an allocation without re-entering any HTTP create door ([lifetimes_recovery.go:202](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/lifetimes_recovery.go:202)).
+
+ The shared validation point does cover instance creates, canary, deploy’s first create, explicit regions, app-region placement, seeds and imports. That does **not** make their write sites shared.
+
+ **Fix:** explicitly include `createSeedRecord`, lifetime attach, and allocation recovery in the marking invariant. Mark before persisting replayable creation intent; settle pre-upgrade pending allocations before declaring history complete. For `accounts migrate`, preserve an existing hostname mark or create it before copying a record: claims-off migration currently writes directly to the store ([accounts_record_sequence.go:17](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/accounts_record_sequence.go:17)).
+
+3. **P1 — Create-only history is atomic evidence of use, but does not serialize reuse.** The store’s conditional PUT protects one key ([store.go:39](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/release/store.go:39)). Instance record keys are app-scoped; the code explicitly documents that concurrent creates from different apps can both pass hostname checks and write records ([apiinstances.go:1175](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apiinstances.go:1175)).
+
+ Two requests can pass those checks before either writes. One wins the history PUT; the other counts the host as used but remains eligible for the home-region exception. An empty home bucket does not prove that the winner has finished or owns no record elsewhere.
+
+ **Fix:** refuse a request that loses a fresh-marker PUT; do not turn that conflict into immediate home-region reuse. Any retained reuse path needs hostname exclusion and ownership revalidation through record publication, including lifetimes-off operation. Refusing all reuse avoids adding another ownership protocol. A successful mark followed by a failed record write or crash is conservatively safe; its permanent refusal is an availability tradeoff.
+
+4. **P1 — Backfill and import cannot establish completeness as specified.** The import names non-console buckets and pool directories, but omits local-only data on ordinary regional boxes and customer fleet boxes ([design:49](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md:49)). Those local databases can later be accepted directly. “Existing record listing” is also insufficient: even `ListAllRecordsStrict` excludes records under missing or soft-deleted accounts ([reconcile.go:2509](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/provision/reconcile.go:2509)); ordinary instance and sidecar listings skip malformed records ([provision.go:2980](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/provision/provision.go:2980), [sidecar.go:353](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/provision/sidecar.go:353)).
+
+ **Fix:** inventory raw record keys, including Trash/orphans; configured replica prefixes; staging; and local storage on every relevant platform, pool and fleet box. Define a stable inventory window covering legacy deletions and pending writes. Keep provider discovery in the adapter.
+
+ If an operator cannot list a required bucket or inspect a required box, **`complete` must refuse**. Every host continues to count as used: all non-console, pool and fleet creates remain refused. Home creates still need finding 1 resolved. Naming every region is not evidence that every inventory succeeded.
+
+5. **P1 — The rollback remedy loses deleted history, and restore has no defined boundary.** The disposition says to rerun backfill after an old console ([design:132](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md:132)). A hostname created **and deleted** during that downgrade is absent from backfill, while its data can remain. A persisted or cached `@complete` then authorizes it as new.
+
+ **Fix:** prohibit creation by pre-marking console binaries after activation. State that history is monotonic: restoring only console SQLite is safe for this invariant while the control-store history remains intact; restoring that store backwards is not. Recovery must preserve the union of marks or restart every console in incomplete mode and repeat the full inventory before admitting remote creates. Backfill alone cannot repair this. Account migration within the same store preserves history only if its source hosts were already marked.
+
+6. **P1 — `apps place` bypasses the proposed placement restriction.** It updates local route placement and rewrites existing instance records’ regions directly ([fleets.go:679](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/fleets.go:679), [:702](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/fleets.go:702)). It does not run the create gate or offline landing cleanup.
+
+ A hostname recreated at home can therefore be placed onto a fleet holding an older lifetime’s database despite the design’s “not on a customer fleet” rule.
+
+ **Fix:** refuse placement changes for populated apps under this design, before writing placement or routes. Preserve placement of empty apps followed by properly gated first creates. Do not add another move protocol here.
+
+7. **P1 — Offline landing prevents target contamination, but the blanket safety claim includes data loss.** Parking warm files and verifying staging are real ([movesoffline_land.go:550](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/movesoffline_land.go:550), [:700](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/movesoffline_land.go:700)). With a valid source, successful promotion replaces the target replica. However, it deletes destination-only objects ([mirror.go:332](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/lease/mirror.go:332)); it does not preserve an older lifetime’s potentially sole remaining bucket copy. Local parking does not protect that copy.
+
+ Moreover, a recreated source admitted over an old warm DB can checkpoint that DB **before its first wake** ([movesoffline_seal.go:398](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/movesoffline_seal.go:398)). Correct target mirroring would then faithfully transfer predecessor data.
+
+ **Fix:** close source reuse first, and refuse dirty destinations before staging can overwrite them. The cited self-serve cleanliness rule is a design requirement, not an implemented safeguard at this commit. Keep that dependency explicit; do not call arbitrary older-lifetime destinations safe.
+
+8. **P2 — “Create here, then `carlos move`” is not an available general escape route.** Offline mutations require an operator’s CLI token ([apiinstancemove_offline.go:90](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apiinstancemove_offline.go:90)). Move gates read instance records and reject static, pooled and fleet routes ([apiinstancemove.go:65](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apiinstancemove.go:65)). They do not move sidecars.
+
+ **Fix:** make choosing another hostname the supported remedy for this release. Mention moving only where an implemented, authorized offline path applies. Do not make this small plan depend implicitly on shipping self-serve moves.
+
+9. **P2 — One plan is appropriate, but its finish lines do not prove its safety claims.** Tasks 1–7 omit concurrent creates, recovery writers, inaccessible inventories, history restore, migration, placement bypasses and local-only leftovers ([design:165](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md:165)). Task 3 explicitly treats a clean bucket as sufficient.
+
+ **Fix:** retain one plan and require those refusal witnesses, plus mark-before-publication assertions for every writer with lifetimes on/off. Verify canary, deploy, explicit/app regions, temporary static creates, seeds/imports, sidecars and both attach arms through their real entry points.
+
+ Correct two supporting claims: sidecars currently use the request region or fleet placement, not the app-region default ([apisidecars.go:269](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apisidecars.go:269)). Also specify how a console started before completion observes `@complete`: restart after completion, or request-time rereads with the additional cost stated. No new box polling is necessary.
+
+10. **P2 — The round-1 disposition table closes unresolved findings.** At [design:127](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md:127): #1’s lifetime dependency is removed, but sidecar safety remains subject to findings 1–4 above; #2’s proposed archive is removed, but local residue is not limited to operator purges; #3 and #7 are removed; #4 and #5 remain open; #6’s new box-format concern disappears, but console rollback remains open; #8’s counter issue disappears, but restore and migration require explicit guarantees; #9’s old capability gate disappears, but completion-cache costs need correction; #10 remains open.
+
+ **Fix:** record these as removed mechanisms versus unresolved safety obligations. Also label the next revision **Option B, round 2 of 3**; this review is its round 1, separately from the discarded lifetime design.
+
+Reviewed against `2f1f5589`. Read-only; no files changed, tests run, or live operations performed.
\ No newline at end of file
diff --git a/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r2.md b/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r2.md
new file mode 100644
index 000000000..72bf368fa
--- /dev/null
+++ b/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r2.md
@@ -0,0 +1,81 @@
+NOT READY
+
+1. **P1 — `accounts migrate` retains a recreation exception.**
+
+ The spec allows an existing mark to count as success for migration ([spec:28](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md:28)). But migration performs a create-only copy whenever the destination key is absent ([accounts_record_sequence.go:17](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/accounts_record_sequence.go:17)), and deliberately retains the source objects ([accounts.go:69](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/accounts.go:69)). Rerunning it after deleting the destination can therefore republish saved record bytes. Neither the copy loop nor the proposed mark conflict establishes that this is a continuing live instance rather than a resurrection.
+
+ **Fix:** after activation, refuse migration that would create a data-kind record at an absent destination. Permit an already-present, identical destination and migration of unrelated objects. This cuts the exception without adding a migration protocol. Task 5 must witness **migrate → delete destination → migrate again → refusal**, with lifetimes on and off.
+
+2. **P1 — Inventory still cannot establish the global “ever used” claim.**
+
+ Three gaps remain in [§3](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md:36):
+
+ - **Closing an unreadable fleet is insufficient.** It prevents creates there, but leaves its historical hostnames unknown. Those names can still be accepted elsewhere. “Every target succeeded **or was closed**” is weaker than the chosen global rule. The same problem returns when a previously unexamined fleet joins after completion.
+ - **Present objects are not complete historical evidence.** Records can be deleted outright ([provision.go:2860](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/provision/provision.go:2860)). Ordinary store listings use `ListObjectsV2`, not historical versions ([store.go:1055](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/release/store.go:1055)). Data-bucket noncurrent versions also expire, with a seven-day default ([bucket lifecycle:95](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/infra/modules/deployment-buckets/main.tf:95)). A fully removed pre-marking hostname cannot be reconstructed from the specified sources.
+ - **The scan names default layouts, without defining their interpretation or a stable scan window.** Replica prefixes are configurable ([activator.go:147](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/activator/activator.go:147)); nested directory names can be hashes, with the full hostname inside ([provision.go:3140](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/provision/provision.go:3140)). Deletion/purge during the scan can remove unmarked evidence. Terminal allocation/retirement checks alone do not freeze those sources.
+
+ **Fix:** remove the “closed target permits completion” alternative. An uninventoryable fleet means this deployment cannot complete this global inventory; nearest-region stays ineffective, as Paul specified. Define the authoritative target roster, configured paths/prefixes, historical evidence and a short operator-controlled inventory window. Refuse completion for missing, unmappable or irrecoverable history, and refuse admission of unexamined existing targets afterward. Tasks 6 and 10 need these refusal witnesses—not merely successful directory listings.
+
+3. **P1 — The populated-app placement refusal is still vulnerable to concurrent creation.**
+
+ The proposed check precedes writes, but the retained mechanism changes app placement, then registry routes, then instance records ([fleets.go:665](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/fleets.go:665), [:679](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/fleets.go:679), [:702](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/fleets.go:702)). Instance creation reads placement earlier and publishes later ([apiinstances.go:1217](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apiinstances.go:1217), [:1702](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apiinstances.go:1702)).
+
+ An “empty” check can pass, a create can publish and begin serving at the old location, and placement can then repoint it without moving its data. Checking only bucket records also misses existing hand-added data routes that `SetPlacement` will mutate.
+
+ **Fix:** for this round’s scope cut, disable placement changes under Option B rather than retaining the existing repointing loops behind a preflight check. If empty-app placement remains, specify exclusion against every create/recovery writer and cover existing registry routes. Task 8 needs a barrier-controlled create-versus-place witness through the API and both page entry points.
+
+4. **P1 — A procedural rollback floor is acceptable, but its scope and breach cost are understated.**
+
+ A trusted-operator floor is reasonable for this design; it does not require new box enforcement. However, it must cover **every record-writing binary**, including the standalone `carlos accounts migrate`, not just the console.
+
+ The inspected external script at `carloku-infrastructure` commit `cb460ae5` currently checks cleanliness and builds the supplied checkout’s HEAD ([roll-console.sh:39](/home/paulca/github.com/carlosframework/carloku-infrastructure/scripts/roll-console.sh:39)). The proposed floor is therefore implementation work that must land before completion, with a refusal test—not only documentation reviewed under task 11.
+
+ A breach costs more than another scan:
+
+ - An old writer can admit reuse before the next startup tripwire.
+ - A create-and-delete during the breach leaves no current record to detect.
+ - Re-inventory cannot reconstruct evidence that has disappeared, as finding 2 explains.
+ - Reverting to the spec’s ordinary incomplete mode permits used names again ([spec:47–52](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md:47)); that is not a safe recovery mode for a previously activated deployment.
+
+ **Fix:** document and enforce the minimum release for console and migration CLI. Distinguish **initial incomplete**, where today’s behaviour remains, from **history invalidated after activation**, where data-kind creates are refused. Re-enable only when history can actually be recovered; otherwise keep that deployment outside the feature’s scope. A rescan cannot undo data exposure or overwriting that already happened.
+
+5. **P2 — The exemptions are supported, but the plan’s witnesses and response promises need correction.**
+
+ **Exemptions:** valid provisioned `static` and `service` records do not acquire platform database paths: `DerivesPaths` requires an addressless instance, and `RouteFor` derives paths only under that predicate ([provision.go:456](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/provision/provision.go:456), [reconcile.go:505](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/provision/reconcile.go:505)). Validation refuses static hibernation, requires service upstreams, and refuses upstream hibernation. It also rejects a replica role on either exempt kind ([provision.go:656](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/provision/provision.go:656)). Seed/import requests reject both kinds ([apiinstanceseed.go:90](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apiinstanceseed.go:90)). Updates revalidate shape. Task 1’s explicit kind-immutability guard remains appropriate. Sidecars correctly remain data kinds.
+
+ **Writer coverage:** the revised sites cover the live ordinary claims-off paths. Instance creates dispatch to lifetime creation or direct creation; seeds/imports dispatch independently through `createSeedRecord`. The lifetime mark belongs before `BeginAllocation`, not merely before record publication ([lifetimes_create.go:107](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/lifetimes_create.go:107)). Recovery publishes through `allocRecordLocked`, so its mark check must cover both replay branches ([lifetimes_recovery.go:202](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/lifetimes_recovery.go:202)). Sidecars use the direct writer with claims off even when lifetimes are on. Attach’s two arms and deploy’s automatic first record are static and exempt. The migration exception remains finding 1.
+
+ **Keep the one plan, but amend its eleven tasks:**
+
+ | Task | Required correction or witness |
+ |---|---|
+ | 1 | Keep; test shape restrictions and kind immutability through real updates. |
+ | 2 | Separate data writers from exempt attach/deploy/temporary-static cases. Exempt cases must **not** mark. Explicitly cover sidecars with lifetimes on too. |
+ | 3 | Assert one successful publication and one refusal. Do not require U2 specifically: existing ownership checks can refuse before the marker PUT. |
+ | 4 | Cover missing/erroring marks during recovery, both replay branches, pre-upgrade pending work, and work spanning completion. |
+ | 5 | Add the migration resurrection refusal from finding 1. |
+ | 6 | Add unknown/closed targets, historical-only names, scan races and incomplete target rosters. |
+ | 7 | Cover post-activation history invalidation and a downgrade create/delete invisible to the startup tripwire. |
+ | 8 | Add the placement race and route-only case—or test the scope-cut refusal. |
+ | 9 | Test an **already stored non-home app region** before completion. Creation currently reads it independently of `appRegionsOn` ([apiinstances.go:1232](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apiinstances.go:1232)). |
+ | 10 | Verify configured layouts, hashed directories, pagination and explicit failures against the full target roster. |
+ | 11 | Implement and test the external floor before activation; document all writers and the actual breach cost. |
+
+ Also simplify U1/U2 to one marker-conflict refusal: the conditional PUT returns the same conflict for an old mark and a concurrent winner ([store.go:34](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/release/store.go:34)). The promised duplicate-first read is currently skipped outside the home-bucket rail ([createleftovers.go:136](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/createleftovers.go:136)). Finally, startup needs body reads to distinguish unmarked exempt records; two key listings alone cannot implement that tripwire. Correct the cost statement.
+
+The round-1 disposition table should therefore read:
+
+| Round-1 finding | Round-2 disposition |
+|---|---|
+| 1 — Home reuse | **Fixed at the policy root**, subject to establishing history. |
+| 2 — Missing writers | **Coverage corrected; still open for migration’s recreation exception.** |
+| 3 — Concurrent reuse | **Fixed for ordinary post-activation creates** by refusing marker conflicts. |
+| 4 — Inventory | **Still open, P1.** Closing an unknown target does not establish global history. |
+| 5 — Rollback/restore | **Still open, P1.** Floor scope and recovery after lost history remain incomplete. |
+| 6 — Placement bypass | **Still open, P1.** Sequential refusal does not cover concurrent creates or route-only state. |
+| 7 — Offline moves | **Scoped out for previously reused hosts; addressed for genuinely fresh post-activation hosts.** Version recovery is time-limited, not permanent preservation. |
+| 8 — Move as remedy | **Fixed.** Choosing another hostname is the supported remedy. |
+| 9 — Plan/witnesses | **Partially fixed, P2.** Completion observation is specified; witness corrections remain above. |
+| 10 — Overclosed table | **Still open, P2.** Several “answered” entries remain conditional or incomplete. |
+
+Reviewed against `fd47a8d6`. Read-only; no files changed, tests run, or live operations performed.
\ No newline at end of file
diff --git a/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r3.md b/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r3.md
new file mode 100644
index 000000000..319010e95
--- /dev/null
+++ b/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r3.md
@@ -0,0 +1,46 @@
+NOT READY
+
+1. **P1 — A marked, pre-activation allocation can publish over old data after `complete`.**
+
+ Rev 4 blocks completion only for pending rows **from a pre-marking console** ([spec:43](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md:43)). But the marking console still admits today’s creates during initial incomplete mode, including non-home creates without a leftover-data check ([createleftovers.go:43](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/createleftovers.go:43)).
+
+ Concrete sequence: a deleted hostname H retains its former owner’s replica in a non-home region. Before inventory, a new create for H successfully writes its previously absent mark and begins a lifetime allocation. The slot write succeeds; record publication fails, leaving the allocation pending ([lifetimes_create.go:107](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/lifetimes_create.go:107), [:370](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/lifetimes_create.go:370)). Inventory finds H’s data and retains its mark. `complete` nevertheless passes because this allocation came from the marking console.
+
+ After activation, recovery’s “our slot, absent record” branch publishes it ([lifetimes_recovery.go:204](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/lifetimes_recovery.go:204)). Rev 4’s proposed mark-exists check passes. The new instance can restore the predecessor’s replica ([backend_exec.go:853](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/activator/backend_exec.go:853)). This is an actual post-activation data-exposure path; “never an unmarked publication” does not prevent it.
+
+ **Concrete cut to discuss with Paul:** require a maintenance boundary for activation: stop admitting data creates, drain in-flight writers, and refuse completion while **any** allocation or retirement remains pending, regardless of writer version. Resume only after every console observes active mode. Add a witness for the sequence above. Per the round limit, stop here for that scope decision.
+
+2. **P2 — The inventory-window freeze needs an executable boundary.**
+
+ Refusing move API requests does not pause moves already running on unchanged boxes. The worker independently dispatches offline moves ([movespass.go:1149](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/movespass.go:1149)); staging, sealing and landing continue from record state ([movesoffline.go:416](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/movesoffline.go:416)). Likewise, a placement request already past the proposed top-of-function refusal can still reach its writes.
+
+ **Fix:** make `begin` exclude new move/placement admissions and wait for admitted operations to finish; refuse to open the scan window with an unfinished move. Specify how consoles observe `begin`, `complete` and invalidation. This can accompany finding 1’s maintenance cut without changing boxes. The current “move attempted during the window” witness does not cover work already admitted.
+
+3. **P2 — The reader premise is substantially correct for ordinary Option B operation, but its version-read explanation is inaccurate.**
+
+ The inspected paths support current-data inventory:
+
+ | Reader | Evidence |
+ |---|---|
+ | Litestream restore | [lease.go:533](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/lease/lease.go:533); its client uses [ListObjectsV2](/home/paulca/go/pkg/mod/github.com/benbjohnson/litestream@v0.5.14/s3/replica_client.go:1405) and [GET without VersionId](/home/paulca/go/pkg/mod/github.com/benbjohnson/litestream@v0.5.14/s3/replica_client.go:657). |
+ | Promotion/mirror | [mirror.go:616](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/lease/mirror.go:616) lists current objects; [:683](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/lease/mirror.go:683) copies without a version ID. |
+ | `db pull/query`, forwarding and dbreads | The console uses [ReadReplicaClient](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apidb.go:492); the forwarding box wires [the same client](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/dbreads.go:154). |
+ | Seeds | [seeddoer.go:28](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/seeddoer.go:28) reads replica coordinates; snapshot placement uses [storeSeedObjects.Open](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/seedwiring.go:27), ultimately [an unversioned GET](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/release/store.go:924). |
+ | Offline stage/seal/land | [Stage](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/movesoffline_stage.go:174) mirrors current objects; [seal](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/movesoffline_seal.go:473) records the current listing; [landing](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/movesoffline_land.go:700) checks and restores that listing. |
+ | Warm cache | [backend_exec.go:819](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/activator/backend_exec.go:819) requires a present database; absent-database metadata is purged before restoration. |
+
+ However, **some readers can read noncurrent versions**: `SealedClient.OpenLTXFile` explicitly opens a pinned version ([sealedclient.go:147](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/moves/sealedclient.go:147)). That belongs to the generation/Phase 1 machinery, not the offline path described above. Claims and Phase 1 also have separate switches.
+
+ **Fix:** explicitly bound Option B to the supported claims/Phase 1 configuration and correct §1’s attribution. Do not present current-only reads as a repository-wide property. I found no noncurrent-version fallback in the ordinary paths listed above.
+
+4. **P2 — The current-object inventory omits seed snapshots.**
+
+ Source 2 names configured replica prefixes and `moves/`, but boxes also read `seeds/<host>/<id>/snapshot.db` ([seedwiring.go:25](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/host/seedwiring.go:25)). Current seed records normally mark their hosts, so this omission alone is **not a demonstrated cross-owner leak**.
+
+ **Fix:** include `seeds/` in the conservative inventory and test orphan snapshots. Otherwise document and prove why every surviving seed reference is necessarily covered by another inventoried source.
+
+The round-2 migration exception is **cut correctly**. The placement cut fixes its steady-state bypass, subject to the transition boundary above. The broader inventory and rollback policy address their earlier root problems, but completion is not yet safe because of finding 1. Closing fleets is defensible for isolation: reconciliation separates placements, and both [database access](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apidb.go:64) and [moves](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/console/apiinstancemove.go:83) refuse fleet routes.
+
+**The plan is not buildable safely as written.** The remaining P1 calls for the activation scope cut with Paul, not another design-review round.
+
+Reviewed at `62f019680df5abb5c143e7f36e3382311745499a`. Read-only; no files changed, tests run or live operations performed.
\ No newline at end of file
diff --git a/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-r1.md b/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-r1.md
new file mode 100644
index 000000000..f49ddfb46
--- /dev/null
+++ b/docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-r1.md
@@ -0,0 +1,50 @@
+NOT READY
+
+1. **P1 — Sidecars do not use the lifetime protocol.** The design’s claim that Plan 1 already supplies every creation path with a lifetime is false (`design:64–70`, `223–225`). `SidecarRecord` has neither `Incarnation` nor `ReplicaScope` (`internal/provision/sidecar.go:71`); its create door calls `CreateSidecarRecord` directly (`internal/console/apisidecars.go:390`), and lifetime retirement explicitly applies only to instances (`internal/console/hostclaimops.go:19`). Recreating a deterministic sidecar name therefore still reaches its predecessor’s storage.
+
+ **Fix:** explicitly design sidecar allocation, retirement, legacy adoption, recovery and route propagation. Include app purge and temporary-app expiry. Stamping `createRecordWithLifetimeLocked` cannot implement this by itself.
+
+2. **P1 — The proposed local archive remains readable by the replacement tenant.** The in-place rename in `design:102–106` leaves the archived database beside the replacement’s database. That entire directory is mounted read-write into the tenant (`internal/instancectl/gen.go:66–71`). A fresh database does not prevent the replacement app from opening the archived file directly. The existing layout code documents this exact hazard and deliberately archives outside the instance tree: [preflight.go:74](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-nearest-region-199/internal/layout/preflight.go:74).
+
+ **Fix:** keep the archive in-region but outside every tenant-visible mount, using existing agent-owned storage and safe rename operations. Verify that a replacement tenant cannot list or read its predecessor’s archive.
+
+3. **P1 — `<db>.life` is tenant-writable identity evidence.** The acceptance rule in `design:102–103` trusts a file inside that same writable directory. An old tenant can write the predictable next lifetime number before deletion; the replacement then accepts the old database as its own. Safe filesystem traversal alone does not authenticate the stamp.
+
+ **Fix:** store the authoritative local ownership evidence outside the tenant namespace. Bind it to the actual database installation and update it durably with replacement. Test forged, removed and symlinked tenant-side stamps. This can use existing agent authority; it does not require a new root operation.
+
+4. **P1 — A recreated record can continue using its predecessor’s running process without reaching restore.** Reconciliation installs the successor lifetime onto an existing unheld row (`internal/provision/reconcile.go:1435`, `2305–2331`). The activator indexes entries by hostname and returns an already-awake entry without comparing lifetimes (`internal/activator/activator.go:1509`, `1534–1557`). Even `wakeRouteChanged` checks account, app, address and seed identity, but not incarnation (`internal/activator/wakeidentity.go:36–51`). The proposed `restorePlain` check never runs in this case.
+
+ **Fix:** make lifetime replacement an ordered local transition: block new admission, cancel or finish an outstanding wake, prove the previous process and replicator stopped, set aside its data, then expose the successor. Check incarnation on awake admission, queued wakes and worker respawns. The lease remains sufficient for one writer **per lifetime**; separate lifetime leases do not serialize access to the shared local pathname.
+
+5. **P1 — Offline checkpoints and initial seed placement bypass the proposed local ownership check.** Changing bucket prefixes does not cover every local database consumer:
+
+ - Offline sealing checkpoints an existing local DB when its position is not behind the replica (`internal/host/movesoffline_seal.go:386–410`). The production checkpoint callback takes only `dbPath`, derives the host from its filename and starts replication (`internal/host/movespass.go:315–322`). After recreation, a predecessor’s local DB could therefore be uploaded into the successor’s scoped prefix without a wake.
+ - Initial seeded restore can purge the previous database and place the seed without calling `restorePlain` (`internal/activator/seedplace.go:172–207`). Its purge deletes the DB, WAL and metadata (`:341–355`), contrary to the archive requirement.
+
+ **Fix:** require verified local ownership before every checkpoint, replication start, seed replacement and warm-cache acceptance. Pass the judged record/route identity into checkpoint callbacks. Put archival before seed-marker cleanup. Test “recreate, then move before first wake” and “recreate with seed/import over an old local DB.”
+
+6. **P1 — A README floor does not protect existing records from rollback, and the console also needs protection.** The design explicitly admits that a downgraded box serves predecessor data (`design:180–183`). Stopping new placements cannot protect records already present. An old console is also dangerous: record updates decode into the old `Record` type and marshal it back (`internal/provision/provision.go:1051–1097`), dropping an unknown `replica_scope`; `WriteRecord` preserves sequence semantics, not unknown fields (`internal/provision/record_sequence.go:120–156`). Even upgraded boxes would subsequently interpret that record as legacy.
+
+ **Fix:** enforce a minimum release for boxes **and every record-writing console/process**, covering update, recovery, boot and retained binaries, before stamping begins. Existing floor machinery already addresses these activation paths (`internal/host/movesfloor.go:20–53`); specify how it is reused within the no-new-root-powers/no-new-poll constraints. Turning nearest-region off must leave scope handling and the floor enforced.
+
+7. **P2 — The quarantine operation lacks crash recovery and a disk bound.** `design:104–106` describes several renames but no durable operation record or recovery ordering. A crash after moving the DB but before moving its WAL leaves a split archive; today’s missing-DB restore subsequently purges remaining artifacts (`internal/activator/backend_exec.go:824–831`). A Unix timestamp is not itself a non-overwriting guarantee. Seven-day retention (`design:247–249`) also does not bound bytes accumulated within seven days, and neither plan implements cleanup.
+
+ **Fix:** specify a recoverable archive transaction, collision-proof destinations, durable completion and handling of partial renames. Add a byte/free-space limit and a defined refusal when exhausted. Assign cleanup to an existing housekeeping pass, with tests that protect incomplete archives and any sole recoverable copy.
+
+8. **P2 — “Never reused” needs a precise recovery boundary and migration policy.** For ordinary instance creation, the foundation is sound: allocation uses `max(console history, durable hostname slot)+1`, with overflow refusal (`internal/console/lifetimes_create.go:81–96`). Slots are hostname-global, so changing accounts does not reset the counter (`internal/provision/lifetime.go:46–52`). A console SQLite restore alone does not rewind an intact slot. Trash restore intentionally retains the same lifetime; seed/import creation enters the allocator (`internal/console/apiinstanceseed.go:82–87`; `apiinstanceimport.go:179`).
+
+ But unused void allocations may reuse numbers (`internal/console/lifetimes_store.go:185–191`), and `accounts migrate` bypasses its record-copy restrictions when claims are off (`accounts_record_sequence.go:17–40`). It can also change local route ownership directly (`accounts.go:457–471`). The design does not define that operation after cutover, or recovery when authoritative slots are restored backwards.
+
+ **Fix:** state the guarantee as “no lifetime that could have served data is reused, provided durable slots never regress.” Preserve slots and the cutover marker across restores; explicitly refuse or define lifetime-aware account migration. Add stale-console-DB recovery, cross-account recreation and migration tests.
+
+9. **P2 — The capability gate and request budget are underspecified.** The claimed “picker’s cached edges listing” (`design:143`) does not exist here: `liveEdges` performs a fresh read (`internal/console/regioncandidates.go:203`), comprising an edges LIST plus per-file GETs (`internal/edgesfile/snapshot.go:225–248`) and a status snapshot load (`:123–137`). The existing picker also always accepts home and excludes stale boxes from eligibility calculations (`internal/console/regioncandidates.go:81–82`, `101–117`), which is not equivalent to proving every potential reader understands the scope.
+
+ **Fix:** define one capability predicate for home, explicit regions, automatic placement, sidecars and move destinations. Specify missing/stale/incomplete evidence behavior. Reuse a request’s existing snapshot where available and state additional LIST/GET costs where it is not. No new per-box polling or AWS-specific core logic is inherently required by scoped names, but the proposed zero-additional-request claim is not yet demonstrated.
+
+10. **P2 — The plans’ finish lines do not prove complete path coverage or safe activation.** Removing two helpers and compiling (`design:205–209`) cannot prove that every caller supplied the correct scope. Several interfaces currently discard the needed identity: checkpoint takes only a path (`movespass.go:315`), seed replica deletion takes only a host (`seedwiring.go:242`), and hibernate verification carries only host/DB path (`ops/hibernate_verify.go:59`). Claim-based park discovery separately hard-codes flat namespaces (`internal/park/sweep.go:224–231`); it must be explicitly classified as unreachable with claims off, rather than assumed converted.
+
+ The **move naming itself is viable**: `MirrorPrefix` copies relative keys between explicit directory boundaries (`internal/lease/mirror.go:185–216`). Passing the same scope through stage, seal, land and promotion preserves it in either direction. However, the acceptance test must include A→B→A, stale same-lifetime replicas, predecessor leftovers, abort/retry, tombstones and local stamps—not only a successful outbound move.
+
+ **Fix:** retain two delivery phases if useful, but split their work into independently testable identity, local-transition, replica-consumer, move and floor tasks. Require exact-prefix witnesses for acquire/restore/promote, seeds, pull/query/forward, dbreads, verification, checkpoint, mirror and cleanup. Ordinary instance creates, canary (`canary.go:591`), deploy (`deploy.go:1023`) and explicit-region creates share the instance door (`apiinstances.go:1698–1703`); test those wrappers plus temporary/automatic placement and the separate sidecar protocol. Complete dev validation before flagship activation, enforce both capabilities and the rollback floor before stamping, and include rollback/restart witnesses before enabling nearest-region.
+
+`design` references identify `docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md`. All evidence is from `c49129d5`. Review was read-only; no tests or live operations were run.
\ No newline at end of file
diff --git a/docs/superpowers/plans/2026-10-26-nearest-region-never-reuse.md b/docs/superpowers/plans/2026-10-26-nearest-region-never-reuse.md
new file mode 100644
index 000000000..9c427d97d
--- /dev/null
+++ b/docs/superpowers/plans/2026-10-26-nearest-region-never-reuse.md
@@ -0,0 +1,252 @@
+# Nearest-Region Never-Reuse Implementation Plan
+
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
+
+**Goal:** No new data-kind record is ever created for a hostname whose earlier data may still exist, so `CONSOLE_APP_REGIONS` can be turned on without the host lifecycle claim (#199, #404).
+
+**Architecture:** A permanent create-only mark per hostname in the console's control store (`control/hosts-used/<host>.json`), written by every data-kind record writer before it persists anything. A one-time activation window drains in-flight work, inventories every place old data could live, and switches the console to `active`. In `active` mode a mark conflict refuses the create. Nothing on the box data path changes.
+
+**Tech Stack:** Go (console, provision, CLI), the release.Store control-store API, one AWS adapter script, one shell change in carloku-infrastructure.
+
+**Spec:** docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md (rev 5, accepted 2026-10-26). Read §1-§5 before any task.
+
+## Global Constraints
+
+- The rule applies only with claims off (`cfg.HostClaim` false) and Phase 1 off (`CARLOS_MOVES_PHASE1`, moves/switch.go:6). `complete` refuses otherwise.
+- Data kinds are every record whose `KindOrDefault()` is not `static` or `service`, plus every sidecar. Exempt creates never mark.
+- Marks are create-only (`Put` with `ifMatch ""`) and are never deleted by any code path.
+- Request budget: one conditional PUT per data-kind create; one GET of `@mode` per console start; tripwire at start = two listings plus one GET per unmarked record key. No per-request GET, no box changes, no polling.
+- One console process per deployment (spec §3a). No code may assume two.
+- Copy: every user-facing string comes verbatim from Task 1's approved list. No em dashes. Error fragments, diagnostics and JSON keys are out of copy review.
+- Witnesses go through real entry points (HTTP doors and the CLI), with the lifetimes cutover both off and on, as `lifetimes_create_test.go` does. No fixture-only proofs for gates.
+- Provider-neutral core: S3 and SSM appear only in the adapter script (Task 11) and the infra repo (Task 12).
+- Local tests: only the touched packages, with `-run`. CI runs the full suite.
+
+## Review Focus
+
+1. A create retried after its record landed: it must get the door's ordinary duplicate answer, not S1. Pinned in Task 3 (`TestRetryAfterLandedCreateIsDuplicate`).
+2. A host that differs only by a suffix (`app.example.co` vs `app.example.com`) in a bucket listing: it must map to its own host and never to the other. Pinned in Task 6 (`TestBucketListingSuffixHostsStayDistinct`).
+3. A store outage during a create in `incomplete` mode: refuse with S2, never create unmarked. Pinned in Task 3 (`TestMarkErrorRefusesInIncomplete`).
+4. A console restart during `activating`: it must come back still `activating`, with admissions stopped. Pinned in Task 5 (`TestActivatingSurvivesRestart`).
+5. Uppercase or trailing-dot hostnames in adapter output: they normalise exactly as `controlname.ValidHostShape` does, or count as unmapped. Pinned in Task 6 (`TestListingHostNormalisation`).
+
+## Delivery and review sizing
+
+| Merge | Tasks | What Paul can see |
+|---|---|---|
+| A | 1-4 | dev console: `carlos system hosts-used status` shows mode `incomplete` and the mark count growing as instances are created |
+| B | 5-10, 13 | the window, inventory and enforcement, all inert until `complete` |
+| infra | 11, 12 | the adapter script; `roll-console.sh` refuses below the floor |
+| ops | 14, 15 | switch-on, dev then flagship |
+
+**Own review (AGENTS.md rule 3, security gate or production storage):** Tasks 2, 3, 5, 6, 7, 8, 10, 12. Tasks 1, 4, 9, 11 and 13 are covered by one whole-branch review per merge. Each review has at most three rounds (stopping rule 1).
+
+## File map
+
+- Create `internal/provision/hostsused.go`: mark store, mode store, `DataKind`.
+- Create `internal/provision/hostsused_map.go`: pure listing-to-hostname mapping.
+- Modify `internal/provision/record_sequence.go:120` (`WriteRecord`): kind immutability.
+- Create `internal/console/hostsused.go`: gate state, `markForCreate`, admissions, doors.
+- Create `internal/console/hostsused_inventory.go`: roster, sources 1 and 4, import, `complete`.
+- Create `internal/console/hostsused_tripwire.go`: start-up check.
+- Modify `internal/console/apiinstances.go` (arms at :1702, :1706; region resolution :1225-1250), `apiinstanceseed.go:82-87`, `apisidecars.go:391`, `lifetimes_create.go:107` and `:370`, `fleets.go:578`, `regionconfig.go:10`, `regioncandidates.go`, and the offline move admission doors (`apiinstancemove_offline.go`).
+- Create `system_hostsused.go` (CLI). Modify `accounts_record_sequence.go:17-45`.
+- Create `scripts/hosts-used-scan-aws.sh` (adapter).
+- Modify `README.md` ("App regions rollback floor", "Turning app regions on").
+- carloku-infrastructure: `scripts/roll-console.sh`.
+
+---
+
+### Task 1: Copy review of every new string (Paul)
+
+Runs in parallel with Tasks 2-3. Blocks any task that writes a string.
+
+- [ ] Extract S1-S8 (spec §6), the operator log line, the `status` output lines (Task 4) and the README text (Task 13) into the copy-review skill's format.
+- [ ] Run copy review and apply Paul's edits verbatim to spec §6.
+- [ ] Commit the approved list as `docs/superpowers/notes/copy/nearest-region-never-reuse.md`.
+
+**Done when:** Paul has approved every string and the approved list is committed.
+
+### Task 2: History store, data-kind predicate, kind immutability (own review)
+
+**Files:** Create `internal/provision/hostsused.go` and `hostsused_test.go`. Modify `internal/provision/record_sequence.go:120`. Test `internal/provision/record_sequence_test.go`.
+
+**Interfaces (produces):**
+- `const HostsUsedPrefix = "control/hosts-used/"`
+- `func HostsUsedKey(host string) string`: `""` for a host failing `ValidHostShape`.
+- `type HostUse struct { Host, Account, App, Kind, Source string; At time.Time }` (json snake_case).
+- `func MarkHostUsed(ctx context.Context, s release.Store, u HostUse) (fresh bool, err error)`: `ErrCASConflict` gives `(false, nil)`.
+- `func HostIsUsed(ctx context.Context, s release.Store, host string) (bool, error)`
+- `func (r Record) DataKind() bool`
+- Mode: `HostsModeIncomplete`, `HostsModeActivating`, `HostsModeActive`, `HostsModeInvalidated`. `func ReadHostsMode(ctx, s) (mode, etag string, err error)` (absent gives incomplete). `func WriteHostsMode(ctx, s, mode, ifMatch string) (string, error)`. Key `control/hosts-used/@mode`.
+- `type HostsFloor struct { Version, Commit string }`, key `control/hosts-used/@floor`, with `ReadHostsFloor` and `WriteHostsFloor`.
+- `var ErrKindChange = errors.New("provision: a record's kind cannot change")`
+
+- [ ] Write the failing tests: `TestMarkHostUsedCreateOnly` (first call fresh, second not, body unchanged), `TestMarkHostUsedStoreError` (error passes through), `TestDataKindExemptsStaticAndService` (`""` and `instance` true, addr-backed `instance` true, `static` and `service` false), `TestHostsModeDefaultsIncomplete`, `TestWriteRecordRefusesKindChange` (`before` kind static, body kind instance gives `ErrKindChange`; same kind passes; `before` `{}` passes).
+- [ ] Run `go test ./internal/provision -run 'TestMarkHostUsed|TestDataKind|TestHostsMode|TestWriteRecordRefusesKindChange'`. Expect FAIL.
+- [ ] Implement. `WriteRecord` decodes only the `kind` field of `before` and `body` when `before` is not `{}`, with `""` read as `instance`.
+- [ ] Run the tests. Expect PASS. Run `go test ./internal/provision -run 'Update|Record'`. Expect PASS.
+- [ ] Commit `provision: hostname history store, data-kind predicate, kind immutability`.
+
+**Done when:** the five tests pass and every existing record-update test still passes.
+
+### Task 3: Mark in every create writer (own review)
+
+**Files:** Create `internal/console/hostsused.go` and `hostsused_writers_test.go`. Modify `apiinstances.go` (before :1702 and :1706), `apiinstanceseed.go:82-87`, `apisidecars.go:391`, `lifetimes_create.go` (before `BeginAllocation` at :107).
+
+**Interfaces:**
+- Consumes `provision.MarkHostUsed`, `Record.DataKind`, `ReadHostsMode`.
+- Produces `func (s *Server) markForCreate(ctx context.Context, u provision.HostUse) *doorRefusal`. With mode `incomplete`, a conflict passes and an error gives 503 S2. With mode `active`, a conflict gives 409 S1 and an error gives 503 S2. The `s.hostsMode()` accessor reads a field set at start (Task 5 adds transitions).
+
+- [ ] Write the failing tests, each through the real door with lifetimes off and on:
+ - `TestCreateDoorsMarkBeforePersisting`: a store wrapper records Put order, and for instances create, canary-shaped, `--region`, app-region, seed, import and sidecar the mark key's Put precedes the record Put (or the `BeginAllocation` row).
+ - `TestExemptCreatesDoNotMark`: attach (both arms), static first create and a temporary static create write no mark.
+ - `TestRetryAfterLandedCreateIsDuplicate`: the second identical create gets the door's existing duplicate answer.
+ - `TestMarkErrorRefusesInIncomplete`: a Put error gives 503 and no record.
+ - `TestUsedHostRefusedEverywhereWhenActive`: mode forced active, an existing mark, and every door and region (console's own included) gives 409 S1.
+ - `TestEveryCreateWriterMarksFirst`: a source-scan guard over `internal/console/*.go` lists every call of `provision.CreateRecord`, `provision.CreateSidecarRecord`, `provision.CreateRecordReplica` and `s.store.BeginAllocation`, and fails on any call site missing from the allowlist of sites Task 3 covers.
+- [ ] Run `go test ./internal/console -run 'TestCreateDoorsMark|TestExemptCreates|TestRetryAfterLanded|TestMarkError|TestUsedHostRefused|TestEveryCreateWriter'`. Expect FAIL.
+- [ ] Implement. The mark goes after the door's own record-exists read and every other check, immediately before the persisting call. Sidecars use the sidecar host name and kind `sidecar`.
+- [ ] Run the tests. Expect PASS. Run `go test ./internal/console -run 'Create|Sidecar|Seed|Import|Lifetime'`. Expect PASS.
+- [ ] Commit `console: every data-kind create writer marks its hostname first`.
+
+**Done when:** every listed door marks before persisting in both lifetimes states, exempt creates do not mark, and the guard fails on an unlisted writer.
+
+### Task 4: `hosts-used status` door and CLI (first visible slice)
+
+**Files:** Modify `internal/console/hostsused.go`. Create `system_hostsused.go` and `system_hostsused_test.go` (root CLI).
+
+**Interfaces:**
+- Produces operator door `GET /api/system/hosts-used/status`. It returns JSON `{mode, marks, inflight_creates, pending_allocations, pending_retirements, unfinished_moves}`, with the last four filled by Task 5 (0 until then). `marks` counts keys under `HostsUsedPrefix`, listed on request.
+- `carlos system hosts-used status` prints them with Task 1's approved lines.
+
+- [ ] Write the failing tests: `TestHostsUsedStatusDoor` (operator-only, counts marks), `TestSystemHostsUsedStatusCLI`.
+- [ ] Run them. Expect FAIL. Implement, using the existing `/api/system/*` operator auth. Run them. Expect PASS.
+- [ ] Commit, then open merge A (Tasks 1-4) for one branch review.
+
+**Done when:** on dev after merge A, `carlos system hosts-used status` shows `incomplete` and the mark count rises with each new data-kind instance.
+
+### Task 5: The activation window: modes, admissions, drain (own review)
+
+**Files:** Modify `internal/console/hostsused.go`, `apiinstancemove_offline.go` (admission doors) and `fleets.go:578`. Test `internal/console/hostsused_window_test.go`.
+
+**Interfaces:**
+- Produces `func (s *Server) admitDataCreate() (done func(), ref *doorRefusal)`: S8 in activating, S5 in invalidated, and an in-flight count otherwise.
+- Produces `func (s *Server) admitMoveOrPlace() (done func(), ref *doorRefusal)`: S7 in activating.
+- Produces doors `POST /api/system/hosts-used/begin` and `/cancel`. The console reads `@mode` once at start, and doors change it in process and in the store (`WriteHostsMode` with the read ETag) together.
+- Drain counts: in-flight from `admitDataCreate` and `admitMoveOrPlace`; any non-terminal `host_allocations` and `record_retirements` row of any writer version; every record whose `Move` is not terminal (one `apps/` listing plus a GET per record, on `status` only).
+
+- [ ] Write the failing tests: `TestBeginStopsAdmissions` (data-kind create S8, offline move start S7, place S7, static create allowed), `TestDrainWaitsForAdmittedMove` (a record with a non-terminal `Move` keeps `unfinished_moves` at 1 until it ends), `TestDrainCountsInflightCreate` (a create blocked inside its handler holds the count at 1), `TestActivatingSurvivesRestart`, `TestCancelReturnsToIncomplete`.
+- [ ] Run them. Expect FAIL. Implement. Wrap each data-kind create door's handler in `admitDataCreate` at its top, and the offline-move start doors and `placeAppTarget` in `admitMoveOrPlace`.
+- [ ] Run them. Expect PASS. Commit `console: the hostname-history activation window`.
+
+**Done when:** `begin` stops exactly those admissions, the counts fall to zero only when admitted work has finished, and the mode survives a restart.
+
+### Task 6: Inventory, import and `complete` (own review)
+
+**Files:** Create `internal/provision/hostsused_map.go` and its test, and `internal/console/hostsused_inventory.go` and its test.
+
+**Interfaces:**
+- `func HostsFromBucketListing(replicaPrefix string, keys []string) (hosts, unmapped []string)`. It maps `<replicaPrefix>/<host>/…`, `moves/<host>/…`, `moves/@offline/<host>/…` and `seeds/<host>/…`, ignores `moves/@lanes/…`, and reports any other key under those roots as unmapped.
+- `func HostsFromBoxListing(paths []string) (hosts, unmapped []string)`. Paths are relative to the box's data dir. It maps flat `<host>.db*`, `<host>.env`, `<host>.config.env` and `<host>/`, and `.offline-moves/<host>/…`. For `instances/<id>/…` and `.instances/<id>/…`, the host is the full host named by a file inside; an `id` starting with `_` and no host-named file inside is unmapped.
+- `type TargetListing struct { Target, Kind, Prefix, Error string; OK bool; Entries []string }`, the adapter's JSON line format. `Kind` is `bucket` or `box`.
+- Doors `POST /api/system/hosts-used/import` (body: TargetListing lines) and `POST /api/system/hosts-used/complete`. Roster: regions and pools from `control/edges/*.json`, fleets from the console's fleet table, and boxes from the edges files and fleet bindings, fixed at `begin`.
+- Console-side sources at `complete`: raw keys under `apps/` (every instance and sidecar key, a body decoding to an exempt kind skipped, an undecodable body marked) and every host in `host_allocations`, `record_retirements` and `record_migrations`.
+- `complete` refuses when: not activating, any drain count is non-zero, a roster target has no `OK` listing and is not a closed fleet, any unmapped entry exists, the roster changed since `begin`, or `HostClaim` or `MovesEnabled` is on. On success it writes every mark (`Source` = `records`, `tables`, `bucket:<target>` or `box:<target>`), `@floor` (this build's version and commit) and `@mode` = active.
+- `carlos system hosts-used import <file>|complete|close-fleet <name>`.
+
+- [ ] Write the failing tests: `TestBucketListingSuffixHostsStayDistinct`, `TestListingHostNormalisation`, `TestHashedInstanceDirMapsByInnerFile`, `TestHashedInstanceDirWithoutHostIsUnmapped`, `TestInventoryMarksOrphanSeedSnapshot`, `TestInventoryMarksRawRecordKeys` (Trash app, orphan, soft-deleted account, malformed body), `TestCompleteRefusesFailedSource`, `TestCompleteRefusesUnmappable`, `TestCompleteRefusesRosterChange`, `TestCompleteRefusesClaimsOrPhase1`, `TestCompleteRefusesPendingAllocationAnyVersion` (Astra round 3: mark H, begin an allocation, fail the record write, scan finds H's bucket data, so `complete` refuses until recovery ends the allocation), `TestLocalOnlyLeftoverRefused` (a box listing names H with no record and no bucket data, so after `complete` a create of H gets S1), `TestHistoricalOnlyNameAllowed` (H with no current data anywhere and no mark can be created).
+- [ ] Run `go test ./internal/provision -run 'Listing|Hashed' && go test ./internal/console -run 'Inventory|Complete|LocalOnly|HistoricalOnly'`. Expect FAIL.
+- [ ] Implement. Run the tests. Expect PASS. Commit `console: hostname inventory, import and complete`.
+
+**Done when:** every refusal above is witnessed and a clean inventory ends in `active` with the floor written.
+
+### Task 7: Enforcement in `active` (own review)
+
+**Files:** Modify `lifetimes_create.go:370` (`allocRecordLocked`), `apiinstances.go:1225-1250`, `regioncandidates.go` and `regionconfig.go:10`. Test `internal/console/hostsused_active_test.go`.
+
+**Interfaces:**
+- In `active`, `allocRecordLocked` publishes only when `HostIsUsed` is true for the allocation's host. An absent mark sets mode `invalidated` (store and process), pages through the existing alert path and leaves the allocation pending. In `incomplete`, it marks create-only and ignores a conflict.
+- `appRegionsOn()` becomes `s.cfg.AppRegions && s.cfg.HomeRegion != "" && s.hostsMode() == provision.HostsModeActive`.
+- A target (region, pool or fleet) not in the examined set from `complete`, or a closed fleet, refuses a data-kind create with S4 and is skipped by the picker. App creation with `--place` on it (apicli.go:411-445) also gets S4.
+
+- [ ] Write the failing tests: `TestConcurrentCreatesOneWins` (two apps, one new host, a barrier before the mark: exactly one publication and one refusal of any kind), `TestRecoveryRefusesUnmarkedPublication` (both replay branches, lifetimes_recovery.go:201 and :207), `TestStoredNonHomeRegionBeforeComplete` (an app with a stored non-home region creates there as today in `incomplete`, and the switch assigns no new non-home region), `TestNearestRegionAfterComplete`, `TestUnexaminedTargetRefused`, `TestClosedFleetRefused`.
+- [ ] Run them. Expect FAIL. Implement. Run them. Expect PASS.
+- [ ] Commit `console: enforce the hostname history once active`.
+
+**Done when:** all six witnesses pass with lifetimes off and on.
+
+### Task 8: Tripwire, invalidation and restore (own review)
+
+**Files:** Create `internal/console/hostsused_tripwire.go` and its test. Add the door `POST /api/system/hosts-used/invalidate`.
+
+**Interfaces:** `func (s *Server) hostsTripwire(ctx context.Context) error` runs at start when mode is `active`. It lists `apps/` and `HostsUsedPrefix`, GETs each record key with no mark, and enters `invalidated` on any data-kind body or undecodable body.
+
+- [ ] Write the failing tests: `TestTripwireInvalidatesOnUnmarkedRecord`, `TestTripwireIgnoresExemptUnmarked`, `TestRestoreDroppingMarksInvalidates` (delete one mark key from a test store and restart, so invalidated, S5 on data-kind creates, and the switch off), `TestReinventoryLeavesInvalidated` (begin, clean scans, complete, active).
+- [ ] Run them. Expect FAIL. Implement. Run them. Expect PASS. Commit `console: hostname-history tripwire and invalidated mode`.
+
+**Done when:** a dropped mark or an unmarked data-kind record found at start turns creates and the switch off until a full re-inventory completes.
+
+### Task 9: Cut `apps place`
+
+**Files:** Modify `internal/console/fleets.go:578`. Test `internal/console/fleets_place_cut_test.go`.
+
+- [ ] Write the failing test `TestPlaceRefusedAfterActivation`. Through `handleAPIPlace` (:729), `handleAppPlace` (:791) and `handleFleetPlacePage` (:834) in `active` or `invalidated`, an existing app gets S3, the registry is not opened and no record changes. In `incomplete`, behaviour is today's. `carlos apps create --place fleet/<f>` still succeeds.
+- [ ] Run it. Expect FAIL. Implement the refusal as the first statement of `placeAppTarget`. Run it. Expect PASS. Commit.
+
+**Done when:** all three entry points refuse with no write after activation.
+
+### Task 10: Cut `accounts migrate` resurrection, and the CLI floor (own review)
+
+**Files:** Modify `accounts_record_sequence.go:17-45` (`putMigrationObject`, `validateMigrationRecords`). Test `accounts_record_sequence_test.go`.
+
+- [ ] Write the failing tests: `TestMigrateRefusesResurrection` (migrate, delete the destination record, migrate again: S6, with lifetimes off and on), `TestMigrateIdenticalDestinationPasses`, `TestMigrateUnrelatedObjectsPass`, `TestMigrateMarksBeforeCopy` (in `incomplete`, a data-kind record copy marks first), `TestCLIRefusesBelowFloor` (an `@floor` naming a later version makes `accounts migrate` refuse before any write).
+- [ ] Run `go test . -run 'TestMigrate|TestCLIRefusesBelowFloor'`. Expect FAIL. Implement. Data-kind is decided by decoding the record body's `kind`. Run them. Expect PASS. Commit.
+
+**Done when:** a re-run can never recreate a deleted data-kind record after activation, and an old-floor CLI refuses.
+
+### Task 11: AWS adapter scan
+
+**Files:** Create `scripts/hosts-used-scan-aws.sh`.
+
+- [ ] Write the script. It takes `--profile`, the roster JSON from `status` and an output file. For each region bucket it lists current objects under the configured replica prefix, `moves/` and `seeds/` with `aws s3api list-objects-v2`, all pages. For each box it runs a read-only `find <data dir> -maxdepth 3` through `aws ssm send-command`. It emits one `TargetListing` JSON line per target with `ok:false` and the error on any failure. It never writes or deletes.
+- [ ] Dry run on dev with the operator profile. Import with `carlos system hosts-used import`, check `status`, then `cancel`.
+
+**Done when:** the dev dry run lists every roster target with `ok:true`, or a named failure, and the import reports no unmapped entries.
+
+### Task 12: `roll-console.sh` floor (carloku-infrastructure; own review)
+
+**Files:** carloku-infrastructure `scripts/roll-console.sh` and a test beside it in that repo's existing style.
+
+- [ ] Write the failing test: with a fake `@floor` naming commit C, rolling a checkout that does not contain C exits non-zero before building, and a checkout containing C proceeds.
+- [ ] Implement. Read `control/hosts-used/@floor` with the operator profile. If present, require `git merge-base --is-ancestor <commit> HEAD` in the checkout. Absent means no floor.
+- [ ] Run the test. Expect PASS. Open the infra PR and merge it **before** Task 14 step 3.
+
+**Done when:** the infra script refuses a below-floor console, with a passing test, merged.
+
+### Task 13: README
+
+**Files:** Modify `README.md`.
+
+- [ ] Add, from Task 1's approved text: the modes, the activation window runbook (announce, `begin`, `status` to zero, scan, import, `complete`), the one-console assumption, the floor for the console and `carlos accounts migrate`, the restore rule, closing a fleet, and to "Turning app regions on" a step 0 (window completed) and new probe hostnames on every run.
+- [ ] Commit. Open merge B (Tasks 5-10, 13) for its branch review once the own-review tasks are approved.
+
+**Done when:** merge B is reviewed and merged.
+
+### Task 14: Switch-on, dev (operator; Paul's go)
+
+- [ ] Roll the release with merges A and B to the dev console. Boxes are unchanged. Then update the operator's `carlos` CLI.
+- [ ] Announce the window. Run `begin`, then `status` until every count is 0.
+- [ ] Run Task 11's scan for every roster target, then `import` and `complete`. Check `status` says `active`.
+- [ ] Check: create a data-kind instance and a sidecar in each region, delete them, and recreate each host in every region (all S1). Create a new host through nearest-region and check its region.
+- [ ] Run README "Turning app regions on" steps 1-6 on dev, with new probe names, and `scripts/region-service-gate.sh <probe-host> <build> <other edge EIPs>` for every eligible region.
+
+**Done when:** dev is `active`, the recreation checks are refused, and every region passes the service gate.
+
+### Task 15: Switch-on, flagship (operator; Paul's go)
+
+- [ ] Confirm Task 12 is merged, then roll the flagship console.
+- [ ] Run the window as in Task 14.
+- [ ] Run README "Turning app regions on" step 5 (probes per eligible region, with the gate), then step 6 (switch on).
+
+**Done when:** flagship is `active`, every region's gate passes and `CONSOLE_APP_REGIONS=on` places new apps in their nearest region.
diff --git a/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md b/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md
new file mode 100644
index 000000000..97f1d50e8
--- /dev/null
+++ b/docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md
@@ -0,0 +1,134 @@
+# Nearest-region placement without claims: no new record over data that still exists
+
+Rev 5, 2026-10-26, **accepted 2026-10-26** (Paul). Branch `design-nearest-region-199`. Design review is over (AGENTS.md stopping rule 1): Option B had three Astra rounds (docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-optionB-r1.md, -r2.md, -r3.md). Round 3's P1, a marked allocation started before activation publishing after `complete`, is closed by the cut Paul accepted: a one-time activation maintenance window (§3a). Rev 5 adds that window and round 3's three P2 fixes and nothing else.
+
+## 1. The invariant
+
+**No new data-kind record can be created for a hostname whose data from an earlier record still exists anywhere a box could read it.**
+
+The hazard is data that still exists, not names ever used. **Option B is bound to claims off (`HostClaim` false) and Phase 1 off (`CARLOS_MOVES_PHASE1`, moves/switch.go:6, default off).** `complete` refuses with either on. In that configuration, once a hostname's data is gone it is harmless to reuse, because every reader sees current objects and present files only:
+- A wake restores through `lease.Restore` (lease.go:533). Its litestream S3 client lists with `ListObjectsV2` and GETs without a version id (litestream v0.5.14 `s3/replica_client.go:1405`, `:657`).
+- Staging promotion lists current objects and copies without a version id (mirror.go:616, :683).
+- `db pull`, `db query`, forwarding and dbreads use the same `ReadReplicaClient` (apidb.go:492, host/dbreads.go:154).
+- Seeds read replica coordinates (seeddoer.go:28) and place snapshots by an unversioned GET (seedwiring.go:27, release/store.go:924).
+- Offline stage, seal and land mirror, record and check current listings (movesoffline_stage.go:174, movesoffline_seal.go:473, movesoffline_land.go:700).
+- The warm cache needs a present database (backend_exec.go:819).
+
+Pinned-version reads exist (`SealedClient.OpenLTXFile`, moves/sealedclient.go:147), but they belong to the claims and Phase 1 generation machinery, which Option B excludes. This is not a repository-wide property.
+
+Noncurrent versions also expire after `data_noncurrent_days`, 7 by default (deployment-buckets/main.tf:95-100).
+
+**Mechanism.** A permanent create-only mark `control/hosts-used/<host>.json` means "this hostname may hold data". After activation, a data-kind create whose mark PUT conflicts is refused (S1), whether the conflict comes from an old mark or a concurrent winner, since the store gives one answer for both (release/store.go:34-46). Marks are never cleared: conservative and cheap.
+
+**No-data kinds (exempt, never marked):** `static` and `service`. `RouteFor` derives a DB path only when `DerivesPaths` holds, that is an addressless `instance` (provision.go:456-458, reconcile.go:505). `ValidateShape` refuses hibernate on `static` (provision.go:710-720), requires an upstream for `service` and refuses hibernate with one (:722, :731), and refuses the replica role on both (:656). Seed and import refuse both (apiinstanceseed.go:90). Updates revalidate shape. Plan task 1 adds `Kind` immutability. An addr-backed `instance` is not exempt, because its `Addrs` can change (apiinstances.go:2110). Sidecars are always data kinds.
+
+## 2. Writers (mark first, after every other check of the door)
+
+Each writer first reads its own record and answers with the door's duplicate response if it is present. The rail does this read only in the home bucket (createleftovers.go:136), so the mark step does it itself. Then it marks, then it persists.
+
+| Writer | Mark |
+|---|---|
+| lifetimes on: `createRecordWithLifetimeLocked` for the instance door (apiinstances.go:1702) and `createSeedRecord` (apiinstanceseed.go:84; seeds and imports, apiinstanceimport.go:179) | before `BeginAllocation` (lifetimes_create.go:107) |
+| lifetime recovery: every replay branch publishes through `allocRecordLocked` (lifetimes_recovery.go:201, :207) | inside `allocRecordLocked`: after activation it publishes only if the mark exists. An absent mark invalidates the history (§4) and leaves the allocation pending. Before activation it marks create-only and ignores a conflict |
+| lifetimes off: `CreateRecord` (apiinstances.go:1706), `createSeedRecord` (apiinstanceseed.go:87) | immediately before the write |
+| sidecars, always the direct writer even with lifetimes on (`CreateSidecarRecord`, apisidecars.go:391) | immediately before the write |
+| attach (domainattach.go:250, :675), deploy's first create (deploy.go:1023), temporary static sites | exempt: **no mark** |
+| `carlos accounts migrate` (accounts_record_sequence.go:17-40) | **cut:** after activation it refuses to create a data-kind record at an absent destination (S6). An identical present destination and unrelated objects still migrate. It retains its sources (accounts.go:69), so a re-run would resurrect a record |
+| `internal/hostops` writers | claims-on only, unreachable with claims off (#404). A witness asserts that |
+
+A successful mark followed by a failed write or a crash leaves the hostname refused for ever. That is accepted.
+
+## 3. Inventory: hazard-complete, once
+
+**Roster**, fixed when the operator opens the window: every region and pool from `control/edges/*.json`, every fleet in the console's fleet table, and every box in those edges files and fleet bindings. **Sources**, each one a union of marks:
+1. **Current records:** raw keys under `apps/`, whatever the body, including Trash, orphans, soft-deleted or missing accounts and malformed bodies (the strict listings skip these: reconcile.go:2509, provision.go:2980, sidecar.go:353). Only a body that decodes to an exempt kind is skipped.
+2. **Current objects** in every roster region's data bucket, under the box's **configured** replica prefix (`activator.Config.Prefix`, activator.go:147, read from each box's configuration, not assumed) and under `moves/`, `moves/@offline/` and `seeds/` (`seeds/<host>/<id>/snapshot.db`, read by boxes at seedwiring.go:25). An orphan snapshot whose seed record is gone still marks its host.
+3. **Local data on every box** (platform, pool, fleet) under its configured data directory: flat `<host>.db*` and `<host>` entries, nested `instances/<InstanceID>` and `.instances/<InstanceID>`, and `.offline-moves/<host>`. A hashed `InstanceID` (`_` + prefix + hash, provision.go:3127-3145) maps to its hostname by the full host in the file names inside (provision.go:3147-3158).
+4. **Console tables:** `complete` refuses while **any** `host_allocations` or `record_retirements` row is not terminal, whatever console version wrote it (§3a).
+
+Deleted history and noncurrent versions are not sources, because they are harmless (§1).
+
+**`complete` refuses** on any failed, partial or unmappable source (an object key or directory it cannot map to a hostname), a roster change since `begin`, a pending row from source 4, an unfinished move, or claims or Phase 1 on. Provider discovery (S3 listing, an SSM read-only listing) lives in the adapter in infra. The core imports lists per target, each with its result.
+
+**An uninventoried fleet can be closed instead.** Its old data is reachable only by a record placed on that fleet. Platform boxes never mint fleet records, and fleet boxes mint only their own fleet's (`inScope`, reconcile.go:443-455). Moves refuse fleet routes (apiinstancemove.go:65), and placement changes are cut (§5). A closed fleet refuses data-kind creates placed on it and app creation with `--place` on it (apicli.go:411-445), with S4. Regions and pools cannot be closed. Their inventories must succeed.
+
+**After completion, unexamined targets are refused.** A region, pool or fleet that was not in the roster gets S4 for data-kind creates, and the nearest-region picker skips it, until its own inventory is imported.
+
+## 3a. The activation window (accepted 2026-10-26)
+
+A one-time maintenance window wraps the inventory. It closes round 3's P1: a marked allocation started before activation and still pending could otherwise publish over old data after `complete` (recovery's "our slot, absent record" branch, lifetimes_recovery.go:204).
+
+1. **`carlos system hosts-used begin`** puts the console in **activating**. It stops admitting data-kind creates (S8), offline move admissions and their cleanup (S7), and `apps place` (S7). Exempt kinds and every other door keep working.
+2. **Drain.** Work admitted before `begin` finishes on its own. In-flight create and place requests are counted in process and leave when their handler returns. Offline moves already admitted keep running on boxes from record state, since the worker dispatches them itself (movespass.go:1149, movesoffline.go:416). Lifetime recovery keeps settling allocations and retirements. `carlos system hosts-used status` reports what is left: in-flight requests, pending `host_allocations` and `record_retirements` rows of any writer version, and records whose `Move` is not terminal. **The scans may start only when every count is zero.** `status` reads every record body each time it runs: one `apps/` listing (a page per 1,000 keys) plus one GET per record. That is an operator action, not a poll.
+3. **Scan and import** (§3), with admissions still stopped.
+4. **`complete`** re-checks the drain and every source result, writes `control/hosts-used/@mode` = `active`, and switches the console to **active** in the same step. Admissions resume with the rule enforced.
+5. **`cancel`** at any point returns to **initial incomplete**.
+
+**How consoles observe the mode.** The doors live on the console, and a deployment runs one console process (the same assumption self-serve moves plan 1 makes for `console.db`). The roll stops the old process before starting the new one. A console reads `@mode` (`incomplete`, `activating`, `active` or `invalidated`) once at start, before serving, and the doors change it in process and in the store together. Cost: one GET per console start and nothing per request. A second console process is out of scope. The README says so, and it would need its own mode read per create.
+
+## 4. Modes and the floor
+
+| Mode | Behaviour |
+|---|---|
+| **initial incomplete** (from the release until `complete`) | today's behaviour: the rail in the home region only, and creates honour an already stored non-home app region as today (apiinstances.go:1232). `CONSOLE_APP_REGIONS=on` has no effect: no new non-home app regions are assigned, and the console logs that once |
+| **active** | §1-§3 enforced; nearest-region works |
+| **activating** (from `begin`) | §3a: data-kind creates, move admissions and `apps place` refused; drain, scan, `complete` or `cancel` |
+| **invalidated** (after activation: tripwire, absent mark in recovery, or operator) | every data-kind create refused (S5), nearest-region off, page. Leaving it needs a fresh full inventory and `complete` |
+
+A re-inventory restores the invariant. A create-and-delete during a breach either left current data, which the scan finds, or did not, which is harmless. Live breach records are current records. What a breach already exposed cannot be undone. That is why the floor exists.
+
+**The floor covers every record-writing binary:** the console and the `carlos` CLI's `accounts migrate`. The console's floor is enforced by `roll-console.sh` (carloku-infrastructure). Today it builds the checkout's HEAD after a cleanliness check (roll-console.sh:39). Plan task 12 makes it refuse a version below the floor once `@complete` exists, with a refusal test, landed **before activation**. The CLI's floor is the README and the operator recipe. From this release the CLI also reads `control/hosts-used/@floor` and refuses below it.
+
+**Tripwire** at each console start: list `apps/` keys and `control/hosts-used/`, then GET the body of every record key with no mark, to tell exempt kinds from breach records. Cost per start: two listings (one page per 1,000 keys) plus one GET per unmarked record, which is every current static and service record. There is no per-request cost.
+
+**Restores:** restoring console SQLite alone is safe. A control-store restore must keep the union of marks. Any restore that may have dropped keys enters **invalidated**.
+
+## 5. Placement and moves
+
+- **`apps place` is cut after activation:** refused (S3) at the top of `placeAppTarget` (fleets.go:578), its only implementation, called by the API (:747) and both page entry points (:810, :859). The refusal comes before its temporary-app check, before the registry is opened and before any write (`SetPlacement` :679, `SetRecordRegion` :702). The create-versus-place race and route-only rows therefore never arise. Placement at app creation (`carlos apps create --place fleet/<f>`, apicli.go:411) stays, and its instances go through the gated door.
+- **Offline moves:** a host created after activation is never recreated, so a move destination can hold only that host's own older data. Promotion mirrors staging exactly (mirror.go:185-216, deletes at :332). On versioned buckets the deletes leave noncurrent versions for `data_noncurrent_days`, the same time-limited recovery as today. Landing parks local warm files (movesoffline_land.go:550-596). Hosts reused before activation are scoped out: the operator runbook's destination check stays their guard.
+- **Remedy:** choose another hostname. No string points at moves.
+
+## 6. Strings (drafts for Paul's copy review)
+
+- S1: "<host> is in use or has held an app's data before, so it can't be created. Choose another address."
+- S2: "Could not check whether <host> is free. Try again."
+- S3: "An app's placement can't be changed once it exists."
+- S4: "New instances can't be created on <target> yet. Choose another region."
+- S5: "New instances can't be created right now. Try again later."
+- S6 (CLI): "<host>: not migrated. Its destination record is gone, and recreating it would reuse a hostname that held data."
+- S7: "Moves and placement are paused for maintenance. Try again later."
+- S8: "New instances can't be created during maintenance. Try again in a few minutes."
+- Operator log: "app regions are off until the hostname history is complete"
+
+## 7. Findings
+
+| Round, # | Disposition |
+|---|---|
+| r1-1 home reuse | fixed: no reuse anywhere; §1 says why gone data is harmless |
+| r1-2, r2-5 writers | fixed: §2, mark before `BeginAllocation`, recovery inside `allocRecordLocked`, sidecars always direct, exempt cases unmarked |
+| r1-3 concurrency | fixed: a conflict is S1, with one string |
+| r1-4, r2-2 inventory | reframed to current data (§1). Sources with configured prefixes and hashed directories, a fixed roster, a window that freezes moves, refusal on any gap. Fleets close; regions and pools cannot |
+| r1-5, r2-4 rollback | three modes, a floor over console and CLI, the roll-script refusal as a task before activation, a tripwire with its real cost, and a stated breach cost |
+| r1-6, r2-3 placement | cut: `apps place` refused after activation, before any write |
+| r1-7 moves | fresh hosts: own data only, time-limited version recovery. Pre-activation reuse scoped out |
+| r1-8 move remedy | fixed: another hostname |
+| r1-9, r2-5 plan | §8 applies Astra's task table |
+| r1-10 table | this table separates fixes, cuts and scope-outs |
+| r2-1 migrate | cut: refused at an absent destination after activation |
+| r3-1 pre-activation allocation | cut: the activation window (§3a) refuses `complete` while any allocation or retirement is pending, whatever wrote it. Plan witness: Astra's sequence |
+| r3-2 freeze boundary | §3a: `begin` stops admissions, admitted moves and placements drain, scans wait for zero |
+| r3-3 version reads | §1: bound to claims and Phase 1 off; `SealedClient` attributed |
+| r3-4 seed snapshots | §3 source 2 includes `seeds/`; orphan-snapshot witness |
+| lifetime design (rev 1) | its mechanisms are gone. Its local and process reuse findings are fixed by §1's invariant |
+
+## 8. Plan
+
+docs/superpowers/plans/2026-10-26-nearest-region-never-reuse.md: one plan, with the witnesses from rounds 1-3.
+
+## 9. Switch-on, dev first
+
+1. Roll the marking console and CLI (boxes unchanged), dev then flagship. Land the `roll-console.sh` floor.
+2. Announce the window, then `begin`, drain to zero, scan every roster target, import and `complete`. Dev first.
+3. Dev check: create a data-kind instance and a sidecar, delete them, then recreate each host in every region (all S1). A new host through nearest-region lands in the nearest region.
+4. README "Turning app regions on", steps 1-6, with **new probe hostnames on every run**, and `scripts/region-service-gate.sh` per eligible region, dev then flagship.