rented drive: keep-on-red (#716) never closes — the next same-slug wizard-rent 409s for a full 24h TTL #748
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.
Blocks
Reference
Matou/idss#748
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?
Failure:
wizard-rentreds every drive atrehearsal-c.idss.nzright now (drive20260824T145729Z, sig3b0b824f61b8), timing out atapp/tests/e2e/journey.rented.spec.ts:173(expect([data-status="address"]).toBeVisible({timeout: 8*60_000})). The captured card shows the real cause:brokerclient: /v1/gateways/rent: 409 Conflict: broker: this host already has an active rental(legs.json, error-context.md).Root cause — confirmed live, not a stale-ledger false positive:
Rentals.Rent(broker/internal/broker/rentals.go:189-222) only returnsErrAlreadyRented(line 147) after callingr.prov.Existson the existing lease's server — the #652/GOTCHAS-#58 self-heal. I checked withdoctldirectly: droplet594800072(idss-gateway-rehearsal-c-8e11, tagsidss-gateway,idss-rental, regionsyd1, sizes-2vcpu-4gb,created_at: 2026-08-24T14:45:48Z) is genuinelyactiveon DigitalOcean. The broker is telling the truth; this is not #58's scenario.That droplet belongs to the immediately prior drive,
20260824T144440Z. Itswizard-rentleg went green (legs.json: 36684ms), then it reds atenroll-configure(separately healed, commitf086c9ca). ItsafterAllteardown hit theREHEARSAL_KEEP_RED_DROPLET-on-RED path added for #716/#703/#704 (app/tests/e2e/fixtures/rented.ts:156-172releaseOnTeardown;scripts/lib/rehearsal-droplet.sh:868-909oc_rented_teardown) and intentionally left the rental open for post-mortem inspection — confirmed inrehearsal-executor.log:199362:"REHEARSAL_KEEP_RED_DROPLET + RED drive: NOT releasing rehearsal-c.idss.nz — the box stays up for evidence (broker TTL reaps it)". This is working exactly as #716 designed it.The gap:
REHEARSAL_SLUGis a fixed standing value (rehearsal-c,scripts/lib/swarm-identity.sh:41,.sandcastle/.envon the executor) — unlike therehearsal-rentfailhonesty leg, which stamps a per-drive token onto its slug specifically so a prior claim can never wedge the next drive (rentfailSlug,app/tests/e2e/fixtures/rented.ts:32-39). Nothing releases a kept-for-evidence box before the next same-slug drive fires, so every subsequentrenteddrive inherits the live conflict and reds atwizard-rentfor the full 8-minute ceiling — until a human manually releases the box or the broker's own TTL reaper closes the lease. The rent-card's own copy says the TTL is24h0m0s(Rentals.Offer,rentals.go:174); notescripts/lib/rehearsal-droplet.sh:555's comment ("TTL reaps in ≤6h") looks stale/wrong for the rented target specifically.Secondary finding, possibly compounding: the live droplet's tags are ONLY
idss-gateway/idss-rental— missing theidss-rental-expires-<epoch>tag thatrentalExpiresTag(rentals.go:57-60, feature #741) is supposed to stamp on every create. Without it,scripts/rental-reap.sh's doctl-only failsafe sweep (the one meant to work even if the broker process itself is down) cannot see this box at all — only the broker's own in-processReap(keyed off the ledger, not the tag) can close it. Worth checking against GOTCHAS #59 whether the broker running on the mail droplet is behindmain(i.e. predates #741).What plugging it needs (design decision, not mechanical): something has to close the keep-on-red hatch before the next same-slug drive starts — options include (a) releasing the previous kept box at the START of the next rented drive once its evidence has already been harvested, (b) rotating
REHEARSAL_SLUGper-drive for the rented target the wayrehearsal-rentfailalready does, or (c) a bounded evidence-inspection window after which an automated sweep (not just the 24h broker TTL) reaps it. Also confirm/backfill theidss-rental-expires-*tag is actually present on freshly-created rented boxes (may just needbroker-deploy, GOTCHAS #59).Immediate unblock (infra action, not a code change): once
idss-gateway-rehearsal-c-8e11(server id594800072) has been inspected for whatever evidence #716 wanted, release it —POST /v1/gateways/release {"host":"rehearsal-c.idss.nz"}with the drive's claim secret, ordoctl compute droplet delete 594800072as the documented fallback — or everyrenteddrive stays red until the 24h lease lapses on its own.drive
20260824T145729Zred atwizard-rent:expect(locator).toBeVisible() failed Locator: locator('[data-status="address"]') Expected: visible Timeout: 480000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 480000msevidence:
test-results/…/20260824T145729Z/on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)swarm-claim host=elitebook-distributed-server-03 run=9720
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
The decision: the issue offered three ways to close the keep-on-red hatch before the next same-slug rented drive rents — (a) release the prior kept box at the START of the next drive, (b) rotate
REHEARSAL_SLUGper-drive, (c) a bounded evidence window + automated sweep.Ruling: option (a). Option (b) is out — the rented target's cert-seeding continuity (#724/GOTCHAS #32) is keyed on a STABLE
$REHEARSAL_SLUG(the LE cert identifier is$REHEARSAL_SLUG.idss.nz), so rotating the slug per-drive would re-order fresh certs every drive and walk into LE rate limits. (a) keeps the fixed slug and simply reaps the prior box before renting.Shipped:
oc_rented_release_stale_slug, called fromoc_rented_preflight(before the wizard rents). It reaps any prioridss-gateway-<slug>-*droplet. Safe because: the prior drive's automated evidence gather (oc_rented_cleanup: journal, trace, report, cert harvest) already ran on that box in its own teardown; per-repo concurrency (#705) serialises the standing drive and this runs before we rent, so any same-slug box here is necessarily a PRIOR drive's, never a live peer; and deleting it lets the broker's own #58Existsself-heal free the ledger on this drive's rent (the same behind-the-broker's-back path the fallback reap already relies on).OC_RENTED_SWEEP_STALE=0opts out for a human doing live DO-console inspection across drives.Note this also auto-unblocks the currently-stuck box: the next rented drive's preflight will find
idss-gateway-rehearsal-c-8e11(594800072) and reap it, then rent cleanly — no manualPOST /v1/gateways/releaseordoctl droplet deleteneeded.Why a two-way door: revertible by a later commit; provable offline (
scripts/tests/rehearsal-rented-target-test.sh, 12 checks) and by the next live rented drive; not on the one-way-door list — it destroys only an ephemeral, already-evidence-harvested rehearsal droplet (not user data), widens no security posture, touches no credential/trust surface, and reduces (not increases) spend.What proves it:
scripts/tests/rehearsal-rented-target-test.sh(fake-doctl: same-slug box reaped,rehearsal-c2/rehearsal-rentfailboxes left alone, clean-start no-op,OC_RENTED_SWEEP_STALE=0skip). Final proof is the next live rented drive rentingrehearsal-cGREEN after a prior keep-on-red drive.Secondary finding (infra, not this code slice): the live box's tags lack
idss-rental-expires-*(#741) because the broker on the mail droplet predates #741 — abroker-deployaway (GOTCHAS #59). Left for an infra pass; my code fix does not depend on it.close-report for #748 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
rehearsal-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) #896