carlos / platform Public

Nearest-region never-reuse, merge B: offline activation and the refusals

Plan Tasks 5-10 and 13 as cut by Paul on 2026-10-26 (#404). A hostname that has
held data is never created again once the history is active (S1-S4), static and
service records exempt. Activation and invalidation are offline commands on the
console binary (console hosts-used roster / activate / invalidate), run with the
console stopped: they take the serve lock that 'console serve' holds for its life,
read the console database directly, and refuse on anything unsettled, unscanned
or changed since the roster was taken. On start the console serves no data-kind
create, and keeps app regions off, until its start-up check passes. Refusals:
'apps place' on an existing app; 'carlos accounts migrate' never creates a
data-kind record; a fleet in the history takes no new or reactivated box; a box
joining a scanned region blocks that region's creates until the history is
completed again. README runbook. Copy approved by delegated Luna pass. Astra:
per-task reviews, then two whole-branch rounds (round 2 READY AFTER FIXES, fixes
applied); census approved by the reviewer on #280. Nearest-region stays off until
the offline activation is run (plan Tasks 11, 12, 14, 15).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from nearest-region-b into main.
claude agent, operated by paul@keymail.dev 1eb4e7624d557360600057fa20d7b80b62b018c5 parent fc30b42
75 files changed, +5,787 −218
  • README.md +68 −2
  • accounts.go +17 −11
  • accounts_hostsused.go +172 −0
  • accounts_record_sequence_test.go +273 −0
  • cmd/console/hostsused.go +154 −0
  • cmd/console/main.go +26 −1
  • cmd/console/servelock_test.go +144 −0
  • cmd/console/servelock_unix.go +42 −0
  • cmd/console/servelock_windows.go +17 −0
  • docs/superpowers/notes/census-proposal-nearest-region-b.md +19 −0
  • docs/superpowers/notes/copy/nearest-region-never-reuse-b.md +225 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-branch-r1.md +60 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-branch-r2.md +49 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task10-r1.md +23 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task5-r1.md +26 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task5-r2.md +23 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task5-r3.md +35 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task6-r1.md +55 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task6-r2.md +27 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task7-r1.md +17 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task7-r2.md +28 −0
  • docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task8-r1.md +24 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-branch-R2.md +127 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-branch.md +125 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-census-delta.md +36 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task10.md +72 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task5-R2.md +98 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task5-R3.md +103 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task5.md +83 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task6-R2.md +110 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task6.md +91 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task7-R2.md +95 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task7.md +81 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task8.md +73 −0
  • docs/superpowers/plans/2026-10-02-nearest-region-copy.json +1 −1
  • docs/superpowers/plans/2026-10-26-nearest-region-never-reuse.md +6 −0
  • docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md +7 −1
  • internal/console/apicli.go +8 −0
  • internal/console/apiinstances.go +14 −0
  • internal/console/apisidecars.go +12 −0
  • internal/console/claim_invariant_fixtures_test.go +1 −1
  • internal/console/fleets.go +22 −0
  • internal/console/fleets_place_cut_test.go +85 −0
  • internal/console/hostsused.go +439 −101
  • internal/console/hostsused_activate.go +487 −0
  • internal/console/hostsused_activate_test.go +362 −0
  • internal/console/hostsused_active_test.go +406 −0
  • internal/console/hostsused_coverage_test.go +253 −0
  • internal/console/hostsused_status.go +57 −0
  • internal/console/hostsused_store.go +26 −0
  • internal/console/hostsused_tripwire.go +106 −0
  • internal/console/hostsused_tripwire_test.go +151 −0
  • internal/console/hostsused_writers_test.go +16 −15
  • internal/console/lifetimes_create.go +26 −5
  • internal/console/lifetimes_recovery.go +2 −2
  • internal/console/regioncandidates.go +11 −1
  • internal/console/regionclaim_test.go +1 −0
  • internal/console/regionconfig.go +4 −2
  • internal/console/regionconfig_test.go +1 −0
  • internal/console/regiondefault_test.go +1 −0
  • internal/console/regionlabels_test.go +1 −0
  • internal/console/testdata/claim-authority-sites.txt +1 −0
  • internal/layout/hostsused.go +158 −0
  • internal/layout/hostsused_test.go +145 −0
  • internal/provision/hostsused.go +51 −20
  • internal/provision/hostsused_map.go +94 −0
  • internal/provision/hostsused_map_test.go +54 −0
  • internal/provision/hostsused_test.go +34 −1
  • internal/provision/nearest_region_b_census_test.go +79 −0
  • internal/provision/plan9_b8_census_test.go +1 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-nearest-region-b.tsv +7 −0
  • system.go +1 −1
  • system_hostsused.go +25 −22
  • system_hostsused_test.go +12 −30

CI passed — run details

README.md

Loading diff…

accounts.go

Loading diff…

accounts_hostsused.go

Loading diff…

accounts_record_sequence_test.go

Loading diff…

cmd/console/hostsused.go

Loading diff…

cmd/console/main.go

Loading diff…

cmd/console/servelock_test.go

Loading diff…

cmd/console/servelock_unix.go

Loading diff…

cmd/console/servelock_windows.go

Loading diff…

docs/superpowers/notes/census-proposal-nearest-region-b.md

Loading diff…

docs/superpowers/notes/copy/nearest-region-never-reuse-b.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-branch-r1.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-branch-r2.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task10-r1.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task5-r1.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task5-r2.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task5-r3.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task6-r1.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task6-r2.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task7-r1.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task7-r2.md

Loading diff…

docs/superpowers/notes/reviews/ASTRA-FINDINGS-nearest-region-b-task8-r1.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-branch-R2.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-branch.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-census-delta.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task10.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task5-R2.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task5-R3.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task5.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task6-R2.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task6.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task7-R2.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task7.md

Loading diff…

docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-b-task8.md

Loading diff…

docs/superpowers/plans/2026-10-02-nearest-region-copy.json

Loading diff…

docs/superpowers/plans/2026-10-26-nearest-region-never-reuse.md

Loading diff…

docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md

Loading diff…

internal/console/apicli.go

Loading diff…

internal/console/apiinstances.go

Loading diff…

internal/console/apisidecars.go

Loading diff…

internal/console/claim_invariant_fixtures_test.go

Loading diff…

internal/console/fleets.go

Loading diff…

internal/console/fleets_place_cut_test.go

Loading diff…

internal/console/hostsused.go

Loading diff…

internal/console/hostsused_activate.go

Loading diff…

internal/console/hostsused_activate_test.go

Loading diff…

internal/console/hostsused_active_test.go

Loading diff…

internal/console/hostsused_coverage_test.go

Loading diff…

internal/console/hostsused_status.go

Loading diff…

internal/console/hostsused_store.go

Loading diff…

internal/console/hostsused_tripwire.go

Loading diff…

internal/console/hostsused_tripwire_test.go

Loading diff…

internal/console/hostsused_writers_test.go

Loading diff…

internal/console/lifetimes_create.go

Loading diff…

internal/console/lifetimes_recovery.go

Loading diff…

internal/console/regioncandidates.go

Loading diff…

internal/console/regionclaim_test.go

Loading diff…

internal/console/regionconfig.go

Loading diff…

internal/console/regionconfig_test.go

Loading diff…

internal/console/regiondefault_test.go

Loading diff…

internal/console/regionlabels_test.go

Loading diff…

internal/console/testdata/claim-authority-sites.txt

Loading diff…

internal/layout/hostsused.go

Loading diff…

internal/layout/hostsused_test.go

Loading diff…

internal/provision/hostsused.go

Loading diff…

internal/provision/hostsused_map.go

Loading diff…

internal/provision/hostsused_map_test.go

Loading diff…

internal/provision/hostsused_test.go

Loading diff…

internal/provision/nearest_region_b_census_test.go

Loading diff…

internal/provision/plan9_b8_census_test.go

Loading diff…

internal/provision/testdata/plan14-root-reads-chain.tsv

Loading diff…

internal/provision/testdata/plan14-root-reads-nearest-region-b.tsv

Loading diff…

system.go

Loading diff…

system_hostsused.go

Loading diff…

system_hostsused_test.go

Loading diff…