broker: the slug registry forgets every claim on restart — a restart can hand a live community's name to someone else #278
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#278
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
broker/internal/broker/broker.go:96—NewRegistryreturnsreserved: map[string]bool{}and nothing inbroker/persists it. After a broker restart, claiming a slug a live community already owns answersavailable: true, and a subsequent/pointupserts over that community's existing A, wildcard and_acme-challengerecords on the product zone.With the idss.nz cut-over in flight (ADR 0128) this is live-infrastructure-shaped: the broker restarting is routine, and the zone writer is deliberately an overwrite-by-id upsert.
Acceptance
reservedSlugsstays the static fence it is today)./pointfor a slug the registry does not hold is refused rather than upserting blind.Filed from the 2026-08-05 fail-loud audit (three-agent pre-production sweep; findings verified against code).
Fixed in
c6079e6(onorigin/main).The broker's reservation set is now durable, following the repo's single-writer file-ledger idiom re-homed into the broker's own Go module (it cannot import the helper's
internal/jsonstore):broker/internal/broker/store.go— a newReservationStore(Memory + File backings): atomic temp+rename write, a versioned document, and a corrupt/unrecognised-version ledger refused loudly on load rather than read as empty (which would forget every live community's name).broker.go—OpenRegistryseeds the reserved set from the store at boot;Claim/Releasepersist every mutation. A claim that cannot be recorded durably is refused (rolled back in memory too), never reported available (ADR 0100).reservedSlugsstays the static infra fence it was.cmd/broker/main.go— wires aFileReservationStorefromBROKER_STATE_DIR(warns loudly when unset), and refuses to boot on an unreadable ledger.Acceptance covered by red-first tests in
store_test.go: claim → restart → re-claim refused (memory and on-disk File stores); restart → point-unknown-slug refused with no blind write; release survives a restart; corrupt/future-version ledgers refused; a non-persistable claim refused.go test/go vetgreen (broker module); pre-push repo gate green.rehearsal-c.idss.nz+ its wildcard resolve to a droplet DigitalOcean has taken back #758rehearsal-c.idss.nz+ its wildcard resolve to a droplet DigitalOcean has taken back #758rehearsal-cslug with no pre-rent reservation sweep, andoc_standing_teardownbins the claim secret on a red re-found — the name is now permanently wedged (GOTCHAS #80 / #757) #896rehearsal-cslug wedged, device target has no pre-rent sweep #897rehearsal-e.idss.nzreds "already taken" — the single-sourcedREHEARSAL_SLUGis permanently held by the device target's LIVE standing community #1401rehearsal-e.idss.nzreds "already taken" — the single-sourcedREHEARSAL_SLUGis permanently held by the device target's LIVE standing community #1401