broker: a destroyed rented gateway leaves its community's DNS pointed at a released IP — rehearsal-c.idss.nz + its wildcard resolve to a droplet DigitalOcean has taken back #758
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#758
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?
Split out of #757 (rule 1: file follow-ups, don't widen the ticket).
The hazard
Rentalsholds noZoneand noRegistry:ReleaseandReapdestroy the droplet and mark the lease released, and nothing touches the DNS records that name it. So the moment the broker tears a rented gateway down, the community's<slug>.idss.nzA record — and the*.<slug>wildcard CNAME riding it — keep resolving to an IP DigitalOcean has already returned to its pool.Only
Issuer.Offboarddeletes those records, and it needs the slug's claim secret (the community's, not the broker's). A red drive, a lost secret, or a community that simply stops renewing never reaches it.Live evidence (2026-08-25T00:2xZ, from
dig+doctl)Authoritative NS (
dolly.ns.cloudflare.com):doctl compute droplet listin the Matou account holds noidss-gateway-*droplet at all — the box at168.144.165.255is gone (the #756 reaper did its job).https://rehearsal-c.idss.nz/times out.So
168.144.165.255is a released DigitalOcean address that our zone still names, wildcard included. Whoever DO hands it to next servesrehearsal-c.idss.nzand every*.rehearsal-c.idss.nzname — including, if they ask for it, a browser-trusted certificate for both, since_acme-challenge.<slug>still delegates to an acme-dns registration on the same dead host.This is a rehearsal slug, so the blast radius today is a drive name. The same code path is what a real alpha community's name rides.
Why it isn't #757's fix
#757 is about the RESERVATION ledger (who owns the name) and is fixed harness-side. This is the ZONE (what the name resolves to) and is broker-side. They meet only in
Issuer.Offboard, which needs a secret neither the reaper nor the release path holds.What a fix has to weigh
docs/GOTCHAS.md#80 (as amended by #757) and ADR 0189 are the places the outcome is recorded.Provable
Seam-testable entirely inside
broker/internal/brokerwith the existing fake zone/provider (rentals_test.go,zone_test.goidiom): destroy a rental, assert the record set for its slug is gone when the records still name the destroyed IP, and assert it is LEFT ALONE when they name something else.Ruled by agent under ADR 0174 — veto anytime. Ruling: the DNS-record-deletion fix (scoped to records whose value is the destroyed droplet's IP) is a two-way door — revertible by commit, and provable entirely offline against the existing fake zone/provider test doubles (
rentals_test.go/zone_test.goidiom), as the ticket itself lays out. It is not on the one-way-door list: it narrows an existing exposure (a dangling public DNS record naming a released IP — a subdomain-takeover-shaped hazard) rather than widening any security posture, touches no personal credentials, involves no member-facing trust accept (the broker is destroying and cleaning up after its own droplet, not accepting or rejecting a member action), destroys no member data, and spends nothing. Proceeding toready-for-agent.Scope note carried forward from the ticket: the un-redeem/reservation-reclaim-clock question the ticket flags (#278-adjacent) is a genuine separate policy call — it is explicitly out of scope below, not smuggled into this fix, matching the ticket's own recommendation.
Verified against the current code:
Rentals.ReleaseandRentals.Reapdestroy the droplet and mark the lease released; neither touches any DNS zone or registry — there is noZoneorRegistryreference anywhere in the rentals code. The hazard is real and unmitigated.Agent Brief
Category: bug
Summary: When the broker destroys a rented gateway's droplet, it must also remove the DNS records that named that droplet's IP — otherwise the community's hostname (and wildcard) keep resolving to an address DigitalOcean has returned to its pool.
Current behavior:
ReleaseandReapdestroy the droplet and mark the lease released. Nothing touches the DNS zone. The<slug>.idss.nzA record and its*.<slug>wildcard CNAME continue to resolve to the now-released IP indefinitely, until (if ever)Issuer.Offboardruns — which needs a secret the broker's teardown path doesn't hold. Only a full offboard clears the dangling records; a red drive, a lost secret, or a lapsed community never reaches it.Desired behavior:
When the broker tears down a rented gateway it created, it also deletes the DNS record(s) for that rental's slug — but ONLY the records whose current value names the destroyed droplet's IP. A community that has already re-pointed its name at its own infrastructure (a different IP) must be left untouched — this scoping is what makes an otherwise-unconditional delete safe.
Key interfaces:
Rentalsneeds a way to reach the zone/registry for the slug at teardown time (the ticket suggests holding aZone/Registryreference or equivalent, but the exact wiring is an implementation choice).ReleaseandReap(both the direct-release and the timeout/lapsed-reap paths) must apply this cleanup, since either can be the path that destroys the droplet.Acceptance criteria:
ReleaseorReapdestroys a droplet, DNS records for that rental's slug that still name the destroyed IP are removed.docs/GOTCHAS.md#80 and ADR 0189 are updated to record the outcome, per the ticket's own note on where this gets documented.Out of scope:
Issuer.Offboard's existing full-offboard path — unaffected, still the authoritative full cleanup when the community's claim secret is available.Issuer.Offboard.swarm-claim host=elitebook-distributed-server-03 run=10599
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #758 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope