rented gateway: an own-domain community never renews its broker lease — the renewer lives inside the address heartbeat, which rests for own domains, so the reaper destroyed tu-ia's live gateway at the 24 h TTL #2189
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#2189
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?
What happened
tu-ia (own domain
tech.tuia.co, Access rented) completed its founding on app 2026.11.3430: authority flipped 2026-11-10 22:01 local, hand-off finished and the founding state scrubbed at 23:00. At 2026-11-11 04:12:27 UTC the gateway droplet (DigitalOcean id 617642142,idss-gateway-tu-ia-d764, 170.64.232.153) was destroyed — DigitalOcean action 3536924536, typedestroy. It had been created at 2026-11-10 04:07:44 UTC: 24 h 05 min earlier, i.e. the broker's rental TTL. The community, its KERIA/witness state and everything on the box are gone; only the laptop's config-repo replica remains.Why
control-plane/cmd/control-plane/main.goproductionAddressHeartbeatwires the lease renewer (heartbeat.WithRenewer→brokerclient.RenewGateway, ADR 0189) inside the address heartbeat, and the heartbeat returnsnilbefore that point for:<slug>.idss.nz— "own-domain communities are outside this loop by construction (ADR 0049/0136)";IDSS_CLAIM_SECRET— andinstallRentedsetsclaimonly forAddressSubdomain.So a rented gateway with an own domain never renews its lease, and the broker's reaper destroys it at the TTL, silently, after the community is live. Until #2185 an own-domain rented founding never got far enough to hit this; now it does every time.
Fix
Split the lease renew from the address heartbeat:
IDSS_ACCESS_KIND=rentedalone wires a renew loop, whatever the address kind. It needs a credential the broker accepts that does not depend on a broker-claimed subdomain — the rental's own secret fromRentServer(keyed on whatever host the rental was booked under), exported to the gateway the wayIDSS_CLAIM_SECRETis. A test should found a rented + own-domain community and assert the control plane wires a renewer. Also: the reaper should not destroy a box whose lease was never renewed without a loud standing condition on the operator app in the hours before — the TTL is a cliff with no warning today.Related: ADR 0189, ADR 0135/0136, #1335, #2185,
internal/founding/rentedpath.go(installRented),internal/brokerclient/client.go.Agent Brief
Category: bug
Summary: A rented gateway on an own domain never renews its broker lease, so the broker's TTL reaper destroys the live community at ~24h. Wire the lease renewer whenever the access kind is
rented, independent of the address kind, using the rental's own secret.Current behavior:
The lease renewer (
heartbeat.WithRenewer→brokerclient.Client.RenewGateway, ADR 0189) is wired inside the address heartbeat builder (productionAddressHeartbeat). That builder returnsnilearly for two cases the renewer sits after:<slug>.idss.nzname (own-domain communities "rest" out of the DNS loop by construction, ADR 0049/0136); andIDSS_CLAIM_SECRET— and the rented-path installer only exports a claim secret when the address kind is a broker-claimed subdomain.So a rented + own-domain gateway (now reachable since #2185) reaches neither the claim-secret nor the renewer path: the heartbeat rests entirely, the lease is never renewed, and the broker reaps the live droplet at the rental TTL. This destroyed tu-ia's live gateway (community, KERIA/witness state, everything on the box) ~24h05m after rent, silently, after hand-off completed.
Verified in code:
RenewGatewayauthenticates by the host's bound rental secret against/v1/gateways/renew(the broker adopts/uses the host's claim secret; a host not claimed via/subdomains/claimadopts the first secret presented at rent). So the broker already accepts a renew for an own-domain host if the renewer presents the secret that rent was booked under — no new broker trust model is required.Desired behavior:
Renewing a rented gateway's lease is gated on the access kind being
rented, not on the address kind being an idss.nz subdomain. A rented community on its own domain renews its lease on every healthy pass and is never reaped while live. Non-rented (own-VPS / self-hosted / private) communities carry no broker lease and stay unwired, exactly as today. An idss.nz-subdomain rented community is unchanged.The renewer must present a credential the broker accepts for the own-domain host that does not depend on a broker-claimed subdomain: the rental's own secret (the one the rent was booked under for that host), exported to the gateway process the way
IDSS_CLAIM_SECRETis today. For a subdomain-rented community the existing claim secret continues to serve (behavior unchanged).Key interfaces:
productionAddressHeartbeatincontrol-plane/cmd/control-plane/main.go): the renew loop should be decided by therentedaccess kind and its own rental credential, decoupled from the two early returns that rest the DNS re-point loop for own-domain / no-claim-secret communities. The DNS re-point resting for own domains is correct and stays; only the lease renew must survive it.internal/founding.installRented/rentedpath.go) and the gateway render (internal/clan): export the rental's own secret to the gateway environment for an own-domain rented draft, alongsideIDSS_ACCESS_KIND=rented, as a stable env the control plane reads (mirror howIDSS_CLAIM_SECRETis threaded).brokerclient.Client.RenewGateway(ctx, host, secret)— unchanged; it already posts{host}with the secret as bearer.ErrGatewayNotRentedhandling (the loud standing condition) stays as-is.Acceptance criteria:
/v1/gateways/renew.go testfor the touched packages,go vet, gofmt clean.Out of scope:
enhancement; this ticket is the renewer wiring that stops the silent reap in the first place. (Note: the heartbeat already raises a standing condition onErrGatewayNotRented; the missing piece is the no-warning-before-TTL cliff, which is broker/design work.)Ruled by agent under ADR 0174 — veto anytime.
Ruling:
ready-for-agent. This is a two-way door — additive renewer wiring plus an exported rental secret, revertible per commit, and proven by the seam test named above. It is not on the one-way-door list: no personal credentials (the rental secret already exists and already authenticated the rent), no security-posture widening (the broker already accepts a host-keyed renew), no member-facing trust accept, no data destruction (this prevents the reap), no non-routine spend. The reaper-warning half is carved out as a follow-up so it does not block the renewer fix.swarm-claim host=bens-mac-04 run=63566
(automated multi-host claim — lowest live claim id works this ticket)
⏩ independent reviewer for #2189 — verdict
unauthenticatedreview JSON
close-report for #2189 — status
success✅ close-report gates passed — every claim verified against the pushed worker branch
sandcastle/worker/20261111-073131-0f4af0(pre-land — the host promotes it tomainonly after its post-run verify, #193/#283); issue closed.envelope