nearest-region-a
What
Merge A of the nearest-region never-reuse plan (#404; spec docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md rev 5, plan docs/superpowers/plans/2026-10-26-nearest-region-never-reuse.md, both carried here unchanged from design-nearest-region-199). Tasks 2, 3 and 4.
- Task 2 (
internal/provision/hostsused.go): a create-only mark per hostname atcontrol/hosts-used/<host>.json;@mode(absent = incomplete) and@floorbeside it;Record.DataKind(static and service exempt);WriteRecordrefuses an in-place kind change (a create or a tombstone excepted), decoding the kind as record readers do, on the bytes actually written. - Task 3 (
internal/console/hostsused.go): the instance (every placement), seed, import and sidecar doors mark after every other check and immediately before persisting (beforeBeginAllocationwith lifetimes on). Exempt creates never mark. Incomplete mode: a mark already there passes. Active mode: S1, except a landed retry, which gets the door's own duplicate. A failed mark or mode read: S2 in every mode. Mode read once per process. - Task 4:
GET /api/cli/system/hosts-used/status(operators, read-only) andcarlos system hosts-used status.
What a user sees
Nothing new on create while the mode is incomplete, which it stays until merge B: the only change is that an unwritable bucket answers 503 S2 instead of 502. The nearest-region switch stays off. Paul can see: carlos system hosts-used status on dev shows mode incomplete and the count rising with each new data-kind instance.
Tests and review
Witnesses through the real doors with lifetimes off and on, mutation-checked; a source-scan guard over every record-creating call in internal/console. Local: touched packages with -run, vet, gofmt, linux/darwin/windows builds. CI on the tip.
Reviews (Astra, findings committed unedited under docs/superpowers/notes/reviews/):
- Task 2: r1 NOT READY (1 P1, kind decoding vs readers' alias rules; fixed), r2 READY.
- Task 3: r1 READY AFTER FIXES (1 P2, temporary-app witness; applied).
- Branch (covers Task 4) and census approval: see below.
- Branch (covers Task 4): r1 READY AFTER FIXES (1 P2, CLI witness through the built binary; applied).
- Census: approval (envelopes ., internal/console, internal/provision; body changes to runSystem and systemVerb), Astra approved every unit and envelope, recorded on #280. No decisions.
Drafts for merge B's copy review
carlos system hosts-used status lines, and its usage entry, are plain drafts (see system_hostsused.go, system.go).
Merge A of the nearest-region never-reuse plan (#404, spec rev 5 on design-nearest-region-199): Tasks 2-4. A create-only hostname mark (control/hosts-used/<host>.json) written by every data-kind create writer before it persists, record kind immutability, and carlos system hosts-used status. Mode stays incomplete; the nearest-region switch stays off.
Discussions
- No discussions on this branch yet.
Tasks 5/5 done
- Task 2: hostname history store, data-kind predicate, kind immutability (Astra r1 NOT READY 1 P1 fixed; r2 READY) Done
- Task 3: mark in every data-kind create writer (Astra r1 READY AFTER FIXES, 1 P2 applied) Done
- Task 4: hosts-used status door and CLI Done
- Whole-branch review (covers Task 4): Astra r1 READY AFTER FIXES, 1 P2 applied Done
- Census approval on #280 (Astra: all approve, no escalation) Done
Activity
- claude agent, operated by paul@keymail.dev pushed ea8425493 Merge remote-tracking branch 'origin/main' into nearest-region-a
- claude agent, operated by paul@keymail.dev pushed e19dac917 ci: re-run (internal/rollout TestAMoveOntoTheInstalledGoodBuildWaitsForASignedRollback timed out on f1af4bcc; untouched package, passes locally)
- claude agent, operated by paul@keymail.dev pushed f1af4bcc4 ci: re-run (the gate on 6106f024 hit the 30 min job timeout with no test failure)
- task updated: Whole-branch review (covers Task 4): Astra r1 READY AFTER FIXES, 1 P2 applied
- task updated: Census approval on #280 (Astra: all approve, no escalation)
- claude agent, operated by paul@keymail.dev pushed 6106f0248 branch review P2 and CI fixes
- claude agent, operated by paul@keymail.dev pushed 7eb8354c2 review brief: nearest-region-a whole branch and census approval, round 1
- task updated: Task 3: mark in every data-kind create writer (Astra r1 READY AFTER FIXES, 1 P2 applied)
- task updated: Task 4: hosts-used status door and CLI
- claude agent, operated by paul@keymail.dev pushed 15f0ba08a hosts-used status door and CLI (Task 4); Task 3 review P2 applied
- claude agent, operated by paul@keymail.dev pushed 780f3431e review brief: nearest-region-a Task 3, round 1
- task updated: Task 2: hostname history store, data-kind predicate, kind immutability (Astra r1 NOT READY 1 P1 fixed; r2 READY)
- claude agent, operated by paul@keymail.dev pushed 8d5c39e35 console: every data-kind create writer marks its hostname first
- claude agent, operated by paul@keymail.dev pushed a8e1aec45 review: Astra Task 2 round 2, READY (unedited)
- claude agent, operated by paul@keymail.dev pushed 1a7ac274c review brief: nearest-region-a Task 2, round 2
- claude agent, operated by paul@keymail.dev pushed da9f765ea provision: the kind check decodes as record readers do, on the bytes written (Astra Task 2 r1 P1)
- claude agent, operated by paul@keymail.dev pushed 0a7bad140 review brief: nearest-region-a Task 2, round 1
- claude agent, operated by paul@keymail.dev pushed 9ceae0221 docs: carry the accepted nearest-region never-reuse spec (rev 5), plan, approved copy and review findings from design-nearest-region-199 (d572012f), unchanged
- claude agent, operated by paul@keymail.dev pushed b56609752 provision: hostname history store, data-kind predicate, kind immutability
- claude agent, operated by paul@keymail.dev added task Task 2: hostname history store, data-kind predicate, kind immutability (Astra r1 NOT READY 1 P1 fixed; r2 READY)
- claude agent, operated by paul@keymail.dev added task Task 3: mark in every data-kind create writer (Astra r1 READY AFTER FIXES, 1 P2 applied)
- claude agent, operated by paul@keymail.dev added task Task 4: hosts-used status door and CLI
- claude agent, operated by paul@keymail.dev added task Whole-branch review (covers Task 4): Astra r1 READY AFTER FIXES, 1 P2 applied
- claude agent, operated by paul@keymail.dev added task Census approval on #280 (Astra: all approve, no escalation)