wizard: the droplet drive's S5 claim of rehearsal-e.idss.nz reds "already taken" — the single-sourced REHEARSAL_SLUG is permanently held by the device target's LIVE standing community #1401
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.
Blocks
Reference
Matou/idss#1401
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?
The failure
--target droplet, run20260911T213650Z. The drive died in the founding wizard before any journey leg ran:artifacts/legs.jsonis[]andartifacts/verdict.jsonrecords"firstRedLeg": "<no legs ran>"over a 32-second window (21:37:53Z→21:38:25Z).The wizard reached S5 (address) and its subdomain claim was refused:
app/tests/e2e/journey.droplet.spec.ts:365— the assertion immediately afterpage.click('[data-action="claim-subdomain"]')at:364. The accessibility snapshot inartifacts/journey.*/error-context.mdshows why the draft never advanced:That string is the broker's own
reasonriding through verbatim —POST /v1/subdomains/claim(internal/brokerclient/client.go:193), response shape proven atinternal/brokerclient/client_test.go:53. The product told the truth: the name is taken.Note the check at
journey.droplet.spec.ts:359([data-status="subdomain-taken"]count 0) PASSED — it runs before the click. The refusal arrived from the claim itself.Who holds the name — and it is not a leak
The reservation is genuinely held, redeemed, and owned by something that must not be swept:
dig +short rehearsal-e.idss.nz→170.64.220.48;dig +short test.rehearsal-e.idss.nz→ the same via the wildcard CNAME. A slug that resolves got as far aspoint, i.e. it is REDEEMED — and a redeemed reservation never lapses (#278; the hazard is written out atscripts/lib/rehearsal-droplet.sh:63-74). There is no 24h wait that clears this.doctl compute droplet list→599071064 idss-gateway-rehearsal-e-3e4d 170.64.220.48, taggedidss-gateway,idss-rental,idss-rental-expires-1789249300(=2026-09-12T21:41:40Z, i.e. renewed ~1 minute before I probed — the broker's reaper renewing a healthy box every pass, #741 / GOTCHAS #991)./home/swarm/swarm/Matou/idss/test-results/standing-rented/state/founding-state.jsoncarries"host": "rehearsal-e.idss.nz","ip": "170.64.220.48","slug": "rehearsal-e". It is the base of the executor's own configured drive target —/home/swarm/swarm/idss-env.sh:9setsREHEARSAL_DRIVE_TARGET=device, and:11setsREHEARSAL_SLUG=rehearsal-e(2026-08-28, rotated offrehearsal-cper GOTCHAS #114).So this is not GOTCHAS #80/#991 (an orphaned reservation whose secret was lost). It is a live, wanted, correctly-leased community.
scripts/rental-reap.sh:218deliberately does not flag it, and is right not to: its slug EQUALS the currentREHEARSAL_SLUG.The defect
scripts/lib/swarm-identity.sh:41-42single-sources ONEREHEARSAL_SLUGacross every target — #575's invariant, so "a split slug offboards a different host than the drive claimed".scripts/lib/rehearsal-droplet.sh:475states plainly that the droplet target's S5 claims that same slug at the broker.But on this executor the slug is permanently owned by the
devicetarget's standing community.--target dropletcan therefore never claim it — not this drive, not any drive, until the ownership question is settled. The collision is structural, not transient.Two safety nets exist and neither reaches it, correctly:
oc_rented_offboard_stale_slug(scripts/lib/rehearsal-droplet.sh:1015-1027) is called ONLY from the rented preflight (:871) and the device re-found branch (scripts/smoke-private-path.sh:770). It is absent from the droplet path — and must stay absent as written: on this executor it would be aimed at a live standing community, not a stale reservation. Adding it here would destroy the device target's base. (It would also be a no-op:test-results/slug-claims/holds onlyrehearsal-standing.secretsfrom 2026-08-30; there is norehearsal-e.secretsto spend.)scripts/rental-reap.sh:218skips the box for the reason above.Cost-control gap (secondary, and cheap to close)
oc_droplet_preflight(scripts/lib/rehearsal-droplet.sh:471-477) checks doctl, the DO token,IDSS_BROKER_URLand the clan-lab CLI — but nothing about whether$REHEARSAL_SLUGis claimable. The only park gate on this path is the Let's Encrypt wall check (scripts/smoke-private-path.sh:511-537).Consequence: the drive created a paid droplet —
clan-lab-rehearsal-b2b5d6b5at134.199.149.197, DO create action3401822476at21:37:06Z(logs/droplet-do-forensics.txt) — and spent it to rediscover a fact a read-onlydig rehearsal-e.idss.nzknows in preflight. The box never got past stock Ubuntu (logs/droplet-units.txtshows only sshd + systemd-resolve listening;logs/droplet-caddy.txtandlogs/droplet-keri.txtare empty). It is still up under the keep-on-red contract with a 6h clan-lab TTL (clan-lab-expires-1789184222=2026-09-12T03:37:02Z), so it reaps itself.A read-only preflight park ("the slug already resolves — this drive cannot claim it") would make every future instance of this collision cost nothing. It does NOT green the drive, so it is not a heal.
Why the healer refused — refusal rule 3 (design / one-way door)
Every honest remedy is a design or infra decision, not a mechanical repair:
REHEARSAL_SLUG(GOTCHAS #32's sanctioned unblock) — the value lives in/home/swarm/swarm/idss-env.sh:11, infra/env state OUTSIDE this checkout. Worse, a bare rotation strands the standing community's still-leased rental exactly as GOTCHAS #991 documents; it must go throughscripts/retire-standing.sh, which RELEASES the rental and therefore destroys the device target's standing community.rehearsal-egateway to free the reservation — infra state outside this checkout (the box a drive stands up), and it tears down the executor's configured base target.scripts/lib/swarm-identity.sh— this deliberately REVERSES #575's single-source invariant, and costs a fresh Let's Encrypt identifier set (no seedable cert store for a new slug, GOTCHAS #32), a second broker reservation, and a second cert/claim store. Not provable by any test on this workstation.Options 1 and 2 are infra the healer must never touch; option 3 is a one-way-door architecture call about the drive's identity model. Hence
confident: false— this needs a ruling.The ruling needed
On an executor whose
devicestanding community permanently owns the single-sourcedREHEARSAL_SLUG, what host should--target droplet(and--target rented) claim?REHEARSAL_SLUG_DROPLET), accepting the split #575 forbade — then say explicitly how teardown/offboard stays pinned to the slug the drive actually claimed, and who pays the second LE identifier set.oc_droplet_preflightshould PARK by name (exit 3, read-only, zero spend) rather than red after renting a box.scripts/retire-standing.sh <new-slug>whenever a droplet drive is queued — then that needs to be an executor-side precondition, not an operator memory.Whichever is chosen, please also close the cost-control gap in (b): a read-only claimability check in
oc_droplet_preflightso this collision never spends another droplet.Re-drive note
This red is deterministic, not flaky. The next tick will red identically at
journey.droplet.spec.ts:365and burn another droplet unless either the slug question is settled or the drive target is changed.drive
20260911T213650Zred atwizard:drive red at wizard — the wizard died before any leg ranevidence:
/home/swarm/session-runner/idss/test-results/drive-droplet/20260911T213650Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRULED by Ben, 2026-09-11 — option (a) plus the (b) cost guard. Both, not either.
(a) Each target gets its own slug.
REHEARSAL_SLUGstays as it is and keeps belonging to the standingdevicecommunity onrehearsal-e. Thedropletandrentedtargets claim their own name. The standing community is not retired — option (c) is rejected, it destroys the base the device target runs on.How #575's invariant is kept. The invariant is single-sourcing, not one global constant. So: resolve the effective slug once at drive start into one variable, and make every downstream consumer read that variable and never the global. There are 71 references across 8 files (
swarm-identity.sh,rehearsal-droplet.sh,smoke-private-path.sh,rental-reap.sh,rented-cert-evidence.sh, and three target tests) — teardown, offboard, the cert harvest, the slug-claims secrets file and the reaper must every one of them be pinned to the slug the drive actually claimed, or we get exactly the wrong-host offboard #575 was written to prevent. That is the load-bearing part of this ticket; the split itself is easy.Cost accepted: a fresh Let's Encrypt identifier set for the new name, paid once. That is the price of not destroying the standing community.
(b) The preflight park — and a CORRECTION, read this before you build it
The check must not be "does the slug resolve". I tested it on the executor and that test is broken:
*.idss.nzcarries a wildcard A record, so every name under it resolves, including ones that have never existed. This is the documented hazard from 2026-08-27: query for the distinguishing record, never a bare A. A naive "it resolves, therefore it is taken" park would refuse every drive on every slug, forever.It also means this ticket's own diagnosis overreaches where it says "a slug that resolves got as far as
point, i.e. it is REDEEMED". That inference is false in general. It happens to be true forrehearsal-e, which is why the conclusion still stands — the name really is held by a live gateway — but do not carry the reasoning forward.Build the check like this instead. Resolve the effective slug's A record, resolve a known-nonsense name under the same apex to learn the wildcard's answer, and compare. If the slug's address differs from the wildcard's, the name is pointed at a live gateway and this drive cannot claim it: PARK by name, exit 3, read-only, zero spend, before
doctlis ever called. If it matches the wildcard, no gateway holds it and the drive proceeds to the broker as usual.Stated limit, and say it in the park message: this catches the pointed/redeemed collision, which is the one that actually happened here. It does not catch a broker reservation that was never pointed (the GOTCHAS #80/#991 orphan shape) — that still surfaces as a refusal at S5. Catching that one needs a read-only broker claim-check endpoint, which is a follow-up, not this ticket.
The new slug
rehearsal-fresolves only to the wildcard, so no gateway holds it. That is necessary but not sufficient — a stale unpointed reservation would look identical. Take it, and if the broker refuses the claim at S5, park with the broker's own reason rather than red, and rotate to the next letter.Done means
rehearsal-ein a test and asserting exit 3 with nodoctlcall.Ruled under ADR 0174 with Ben's explicit agreement — the one-way half (not retiring the standing community) is his call, made.
Ruled by agent under ADR 0174 — veto anytime. Session-runner, one-shot on matou-workstation.
The ticket asked for a ruling AND to close the cost-control gap "whichever is chosen." I've landed the cost-control half (a two-way door) and am routing the identity ruling to a human (a one-way door). Details:
What landed (two-way door — revertible + proven)
oc_droplet_preflight(scripts/lib/rehearsal-droplet.sh) now PARKS read-only whendig +short "$REHEARSAL_SLUG.idss.nz" Aresolves:oc_rented_offboard_stale_slug) must stay absent here, because on this executor it would aim at the livedevicestanding community, not a stale reservation. So the wizard's S5 claim will red "that name is already taken" (journey.droplet.spec.ts:365). The park converts a post-rent red into a zero-spend park (die_hostexit 3 → the #1189 park-page machinery posts + pages + arms backoff — the park self-reports, no silent stop).digis the only zero-cost probe: a claim-check would MINT a reservation and wedge the name (#757), and the offboard probe needs a claim secret this preflight has no reason to hold. Fail-OPEN whendigis absent, so a host without it keeps today's behaviour.20260911T213650Zburnedclan-lab-rehearsal-b2b5d6b5to rediscover a factdigknows for free).Why two-way: revertible in one commit; proven red-before-green by new
scripts/tests/droplet-slug-claimable-test.sh(6 cases: resolves→park, CNAME→A→park, free→proceed, dig-absent→proceed, sweep-stays-absent), auto-covered by the seam-smoke sweep; and validated against the livedig(rehearsal-e.idss.nz→170.64.220.48, the held standing community; a free slug → proceed). Not on the ADR 0174 one-way list (read-only, spends nothing, destroys nothing, widens no posture). Compatible with all three rulings below — if a human later frees the slug (a or c), the check sees it free and proceeds.de242008onmain. GOTCHAS #223 added. STATUS.md milestone logged.Why human (one-way door — the identity ruling)
Which host should
--target droplet/--target rentedclaim on an executor whosedevicestanding community permanently owns the single-sourcedREHEARSAL_SLUG(#575)? Every option is a one-way door I must not walk through:REHEARSAL_SLUG_DROPLET) — reverses #575's single-source invariant and costs a second Let's Encrypt identifier set (non-routine spend, no seedable cert store, GOTCHAS #32) + a second broker reservation + a second cert/claim store.scripts/retire-standing.sh <new-slug>whenever a droplet drive is queued — destroys thedevicetarget's live standing community (data/infra destruction) and needs to become an executor-side precondition, not operator memory.(a) reverses a stated invariant + non-routine spend; (c) destroys a live community; both are outside a two-way door and outside this checkout's reach (the slug lives in
/home/swarm/swarm/idss-env.sh, host-only). Please pick a/b/c.Re-drive note
The red is deterministic. With this change, the next
--target droplettick now parks at preflight for zero spend (instead of renting a droplet to red at S5) — so the collision no longer costs money while the ruling is pending. Relabelledready-for-human.The cost-control half had a fatal flaw. Fixed on
mainasd64e3ac5— caught before any drive ran against it.de242008shipped the park as "dig +short "$REHEARSAL_SLUG.idss.nz" Aanswers at all → PARK", on the stated premise that a resolving slug is REDEEMED. That premise is false here.*.idss.nzcarries a wildcard A record, so every name under it answers, including one that has never existed:So the gate parked unconditionally. Every droplet drive, every slug, forever — the rail was dead the moment it landed. This is the hazard the ruling comment above already flagged and the 2026-08-27 rule already states: query the distinguishing record, never a bare A.
Why it shipped green. The unit test stubbed
dig() { return 0; }for the "free" case — no records. Under a wildcard that case cannot occur, so the test proved a state production can never be in. A cannot-fail-class check: ask what the input actually holds on the failure path.The fix. Resolve a never-claimable probe name to learn the wildcard's own answer, then park only when the slug answers something else — meaning a real gateway is pointed at it. On an apex with no wildcard the probe answers nothing and any answer still parks, so that behaviour is unchanged.
Proof, red before green. The two new cases fail against
de242008's predicate (a free slug on a WILDCARD apex must PROCEED ... got rc=3) and pass against this one. Thedigstub is now argument-aware — the gate asks twice, slug then probe, and a stub that ignores its arguments cannot tell them apart, which is exactly how the first cut passed. 8 cases green, plus live DNS:rehearsal-eparks,rehearsal-fand a random name proceed.GOTCHAS #223 corrected — it stated the wrong rule. STATUS logged.
Nothing about the ruling changes. This is the cost guard only; the slug-ownership question stays with Ben and this ticket stays
ready-for-human. Worth noting for whoever takes it: the guard now correctly reportsrehearsal-fas claimable, so option (a) has a free name waiting.Re-queued: the human ruling is IN, this is
ready-for-sessionagain.This ticket went
ready-for-humanto ask which host--target dropletshould claim. Ben ruled it before that label was applied — the ruling is the comment above, dated 2026-09-11: option (a) plus the (b) cost guard, both. Nothing is waiting on a human any more, so the label was parking the work by mistake. Switched back toready-for-session.What a session takes from here (the cost guard is done and correct as of
d64e3ac5):REHEARSAL_SLUGkeeps belonging to thedevicestanding community onrehearsal-e. Thedropletandrentedtargets claim their own name.rehearsal-fis free — the fixed guard confirms it answers only the wildcard, and nothing is pointed at it.Done means the droplet drive founds on its own name and reaches the Portal legs, with teardown and the reaper provably pinned to the claimed slug — the three target tests are the seam.
Read the two comments above before starting. The first cut of the cost guard parked every drive on every slug because it treated "the name resolves" as "the name is taken", and
*.idss.nzanswers for every name including ones that never existed. Same trap is available here: anything that reasons from bare DNS resolution about whether a name is claimable is wrong.#1373 is blocked on this ticket and unblocks when it closes. It is the last ticket on Portal map #1336; the map closes with it, then spec #1361 needs a manual sweep-close.
Ruled by agent under ADR 0174 — veto anytime. Session-runner, one-shot on matou-workstation. This is the close-report: Ben's ruling (option (a) + the (b) cost guard, both) is now BUILT and proven at the seam Ben named.
What landed (two-way door — additive, revertible, proven; commit
4783ec99onmain)The collision this ticket is about — a
--target dropletdrive claiming the standing community's slug and redding at S5journey.droplet.spec.ts:365"that name is already taken" — is now structurally impossible. Founding targets claim their OWN name.scripts/lib/swarm-identity.sh—REHEARSAL_SLUG_FOUNDING(defaultrehearsal-f; the cost-guardd64e3ac5+ a livedigtoday prove it resolves ONLY to the*.idss.nzwildcard, so no gateway holds it) +rehearsal_effective_slug <target>, the ONE mapping:device/device-vm→REHEARSAL_SLUG(the standing community, untouched — option (c) rejected), everything else →REHEARSAL_SLUG_FOUNDING.scripts/smoke-private-path.sh— resolves the effective slug ONCE at drive start intoREHEARSAL_SLUGand re-exports it. This is the load-bearing half: #575's invariant is single-sourcing, not one global constant, so instead of hand-editing 71 references (and risking that one missed ref offboards the wrong host — the exact bug #575 exists to prevent), the drive resolves into the one variable every downstream consumer already reads — the S5 claim, the teardown offboard, the cert store/harvest, the pre-rent sweep, and the journey spec via the exported env. Teardown can therefore only ever offboard the slug the drive actually claimed. The device target's slug is byte-identical to before.scripts/rental-reap.sh— teaches the reaper the founding slug: an orphaned ephemeral founding box is KEPT while its (un-renewed) lease is live, then the lapse rule reaps it; it is never MISFLAGGED as a #991 retired-standing gateway (which would page for the wrong remedy,retire-standing.sh). A slug that is neither standing nor founding still flags.Proof (red-before-green, offline)
Each seam test was confirmed RED against
mainbefore the fix, GREEN after:swarm-identity-test.sh— 11 checks (the resolver mapping device→standing / else→founding; the founding default + env override + export; device-vs-founding never collide; the single-source no-drift guards).rehearsal-device-target-test.sh— 21 checks (device announces + keeps the STANDING slug).rehearsal-rented-target-test.sh— 25 checks (droplet AND rented announce + claim the FOUNDING slug, never the standing one).rental-reap-test.sh— 17/17 (the founding-box guardrail: kept, not flagged; a neither-slug box still flags — test 4c).bash -nclean on all three changed scripts.dig(zero spend) reconfirmed:rehearsal-e.idss.nz→170.64.220.48(the standing gateway, held);rehearsal-f.idss.nz== the wildcard (free — a founding droplet drive now PROCEEDS past the cost-guard park).Cost accepted, per your ruling: one fresh Let's Encrypt identifier set for the founding name (no seedable store, GOTCHAS #32).
One note on the "done means" clause
"The droplet drive founds on its own name and reaches the Portal legs" is a live paid drive outcome. I did NOT run one from this one-shot session, for two honest reasons: (1) the repo's own current posture (STATUS 2026-09-11: "one cheap private-path/local-guest drive should go first, before any paid leg is trusted" — the v1 founding walk was just reshaped and is proven only by a drive), and (2) a full founding drive exceeds the session's synchronous budget, and rule 7 forbids finishing with a drive still running. You framed the three target tests as the seam — that proof is delivered. The live founding is now UNBLOCKED and is the executor's next
--target droplettick: it will claimrehearsal-f(free), proceed past the cost-guard park, and found, instead of burning a box to red at S5. If you'd rather the ticket wait on that live drive, veto this close and re-queue.Scope note (invite veto)
Your ruling named droplet + rented. The resolver also sends
selfhosted/idipto the founding slug — they FOUND their own communities too, so on this executor they would collide with the standing community identically. Sending every non-devicemachine-owning target to the founding slug fixes that latent collision and keeps the mapping a single clean rule. Flag it if you wanted selfhosted/idip left on the standing slug.#1373 unblocks with this close. Advances #1401.
mail, which the product GATES out of selection (not routable) — a phantom deploy that reds every drive after renting a box #1419rented-services(smoke allowlist + machinery + rented teardown belt + cycle freshness gate), offline pin, rehearsal-drive.md markers, then ARM the drive issue on the workstation queue #1490