rented-gateway drives have zero cert-persistence wiring — same-slug drives repeatedly walk into Let's Encrypt's 429 (GOTCHAS #32) #724
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#724
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
Drive
20260824T003513Z(rented target,#720phase-4 confirmation) reds at theactivationleg afterdeployruns and Caddy on the fresh droplet never binds:443. Every other leg is green; the deploy itself, evidence, and teardown all behaved correctly. The app's own failure frame is honest and working as designed (ADR 0100) — this is not a product bug.Evidence
logs/droplet-caddy.txt(harvested from the rented box) shows Caddy's ACME obtain failing on every retry with:HTTP 429 urn:ietf:params:acme:error:rateLimited - too many certificates (5) already issued for this exact set of identifiers in the last 168h0m0s, retry after 2026-08-25 0[7-8]:xx UTC— for bothrehearsal-b.idss.nzand*.rehearsal-b.idss.nz.docs/GOTCHAS.md:843-892) documents: LE production allows 5 certs per exact identifier set per rolling 168h, and every drive against the same slug spends 2 of that budget.internal/founding/deploy.go:1060-1071bounds the public-door probe to 120×5s (~10 min) — correctly generous for a cold ACME issuance, but no budget helps here: the caddy log's ownretry aftertimestamps are ~7-8 hours out, so the door was never going to answer inside any reasonable ceiling.logs/founding-state.log:635-649) records the honestno_rollbackfailure frame citing GOTCHAS #15, ADR 0014, #524 — correct diagnosis text, but the underlying acme-dns-registration/DNS-01 explanation it gives is one layer up from the real cause (LE rate-limiting), which only the caddy journal (not the app-visible failure detail) names.Root cause
GOTCHAS #32 was fixed for the own-VPS / takeover droplet path only:
scripts/lib/rehearsal-droplet.shwiresoc_droplet_seed_certs(called fromoc_droplet_create, line 328) andoc_droplet_harvest_certs(called fromoc_droplet_cleanup, line 88) so a green drive's Caddy store is harvested and re-seeded onto the next same-slug drive's box, spending zero new LE orders (#532/#559, ADR 0176).The rented target has no such wiring.
oc_rented_cleanup(scripts/lib/rehearsal-droplet.sh:563) is the rented path's only teardown hook, and its own comment says why nothing was wired (lines 558-561):That reasoning conflates two different things. #559's fix was specifically about timing — the own-VPS FullInstall reformats the disk mid-drive (ADR 0024), so a store staged at create-time is wiped and has to be re-staged after takeover in the
#554gate window. The rented VMMode path never reformats — which means the original, simpler #532 approach (stage the store onto the box before Caddy's first start) would actually work fine here; there's no reformat to race. But nobody ported it:oc_droplet_seed_certs/oc_droplet_harvest_certsare called only from the droplet-target functions (oc_droplet_create/oc_droplet_cleanup); grep confirms neither is reachable from any rented-path function.So every rented drive against the default slug (
rehearsal-b,scripts/lib/swarm-identity.sh:41) orders two fresh certs from a cold start, with no persistence between drives. Given recent drive volume againstrehearsal-b(see57d0fa5f,641d7c07,f039ac0b— a phase-4 confirmation queue running repeated same-slug rented drives), the 5-cert/168h budget for that exact identifier set is exhausted, and this and any subsequent same-slug rented drive will red the same way until 2026-08-25 ~07:30-08:30 UTC (per the caddy log's ownretry aftertimestamps).What plugging it needs
REHEARSAL_SLUGfor rented drives to a fresh identifier set (the sanctioned GOTCHAS #32 mitigation) — but this touches shared drive-queue/DNS state outside a single checkout, so it's a call for whoever owns the standing queue (docs/operator-app/rehearsal-drive.md), not something this healer should do unilaterally.oc_droplet_harvest_certs-equivalent fromoc_rented_cleanup(afteroc_droplet_evidence, before teardown destroys the box) and a seed call once the rented IP is known and reachable but before the deploy leg lets Caddy start. Because VMMode never reformats, this can likely reuse the pre-#559, create-time-style staging (no need for the post-takeover gate-window worker) — but the exact hook point needs to be picked against the wizard's actual rent→pair→deploy timing (the box isn't created by this shell — the Playwright-driven wizard rents it mid-drive), which needs a design look, not a mechanical patch.Not self-fixed: this needs a design decision about the seed/harvest hook timing on a path this healer can't create or verify (a live rented droplet + a real LE order), and touches the standing rehearsal-queue's shared slug state.
drive
20260824T003513Zred atactivation:the gateway deploy failed — The gateway deploy failed. [There is no old operating system to roll back to — this server was rented fresh for the community, so nothing of yours was overwritten.]evidence:
test-results/…/20260824T003513Z/on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)Note from the #720 loop (Ben's ruling 2026-08-24): the confirmation drives continue on
rehearsal-cmeanwhile, so this ticket no longer blocks #720. When wiring the rented harvest/seed, harvest from the FIRSTrehearsal-cgreen (there is norehearsal-bstore to seed from — the green box was released with its certs, the kept red box never obtained any) so the third confirmation drive seeds instead of issuing. Keep-on-red worked as intended on this red:droplet-stall.txt+ journal captured, box kept, then released by hand.Ruled by agent under ADR 0174 — veto anytime
Ruling: port certificate persistence to the rented path now, without a live drive to prove it, and without touching the shared slug.
Why it is a two-way door: the whole change is one revertible commit in the drive harness (no product code, no security-posture change, no spend, no shared queue state), it is proven by a new offline test, and it ships with a kill switch (
OC_RENTED_CERT_PERSIST=0) so an operator can stand it down mid-queue without editing anything. Item 1 of this ticket (rotateREHEARSAL_SLUG) was not taken — it is the queue owner's call and Ben already made it (rehearsal-c, comment above).Landed:
4ad3e4bc— "the rented gateway had ZERO cert persistence; both halves now ride the drive, not its edges".What the diagnosis missed, and it matters
The ticket's §2 proposed calling a harvest from
oc_rented_cleanup. That cannot work. On a GREEN rented drive the journey's ownreleaseleg (journey.rented.spec.tsleg 12) has the broker destroy the box beforeoc_rented_cleanupruns — so a cleanup-time harvest reads a droplet that no longer exists. This is exactly why the walledrehearsal-bset had no store to fall back on: "the green box was released with its certs" (Ben, above). The harvest has to happen during the drive, not at its edge.Same shape on the seed side: there is no create hook because the harness never creates the box.
So the rented path has no hooks to wire — which is why the gap survived review, and why "call
oc_droplet_harvest_certsfromoc_rented_cleanup" would have shipped a harvest that silently captured nothing on every green drive.What shipped
Both halves ride one backgrounded worker, armed by
scripts/smoke-private-path.shbefore playwright fires (oc_rented_certs_arm/oc_rented_certs_worker,scripts/lib/rehearsal-droplet.sh):wizard-rentleg's ownartifacts/droplet-ip.txt(the harness has no other way to learn the IP).caddy.serviceis not yet active. The whole rent→pair stretch is that window; thedeployleg closes it. The ticket's read was right that VMMode's no-reformat makes the original #532 shape work here — #559's re-timing exists only because the own-VPS FullInstall reformats (ADR 0024). One thing the ticket did not anticipate: thecaddyuser does not exist yet pre-deploy (the VMModeclan updatecreates it), so the seed chowns numerically to uid 239 and verifies withfind ! -uid 239rather thanrunuser -u caddy(#536's check has no user to run as).*.crt, while the box is still alive, soreleasecan no longer take the store down with it. It skips the harvest when the seed demonstrably took (zerocreating new orderlines on the box): the store already held is that gateway's store, and re-reading it can only downgrade it.Also:
oc_droplet_assert_zero_obtainnow fires on this path too, so a seed that did not take is named on the drive that made it — never rediscovered a week later as a 429. Verdict lands inlogs/cert-rented.txt. Stage/harvest are now shared primitives (oc_cert_stage_store/oc_cert_harvest_store) used by both targets, so what lands on a box and who owns it is written once.Proof
scripts/tests/rehearsal-rented-certs-test.sh— 13 checks, red before green (the first run failed 127: the worker did not exist). Driven with a fakesshon the shell, no broker, no droplet, no LE order:239:239;caddy.servicealready active → missed window named, and nothing staged into a running gateway;assert_zero_obtainnow fires on the rented path;*.crtguard is unchanged;cmd/rehearsal-certstoreadapter, so the layout facts cannot drift from the seam-testedinternal/certpersist;OC_RENTED_CERT_PERSIST=0kill switch.Neighbours re-run green:
rehearsal-rented-target-test.sh(8),droplet-evidence-order-test.sh(3),go test ./internal/certpersist/... ./cmd/rehearsal-certstore/....What is NOT proven, and why I did not prove it
No live rented drive was run from this session, deliberately. Live proof needs two
rehearsal-cdrives (first harvests, second seeds with zero new orders — grep-provable indroplet-caddy.txt), and Ben's #720 confirmation queue is already running exactly those drives; a session-launched drive would contend for the drive lock and collide with that queue's active rental (409 already has an active rental, #652). The queue's checkout syncsorigin/mainbefore each drive (rehearsal-cycle.sh:133), so it picks this up on its own.Risk is staged in the right order: the next drive is the harvest-only case (no store held for
rehearsal-c→seedable=0→ the worker only reads from the box, never writes). The seed half — the only part that writes to a live gateway before its deploy — first activates on the drive after a successful harvest. If it misbehaves,assert_zero_obtainsays so on that drive, andOC_RENTED_CERT_PERSIST=0stands it down.Live confirmation is tracked as a follow-up so it cannot be lost.
Docs: GOTCHAS #32 amended (the rented gap, the no-hooks reason, the new rule), ADR 0176 extended with the rented deliverable,
STATUS.mdheader updated in the same commit.Close report
Landed:
4ad3e4bc— session: #724 — the rented gateway had ZERO cert persistence; both halves now ride the drive, not its edges. Pushed toorigin/main; the drive queue syncs it before its next drive (rehearsal-cycle.sh:133).scripts/lib/rehearsal-droplet.sh—oc_rented_certs_arm/oc_rented_certs_worker/oc_rented_certs_reap/oc_rented_harvest_fallback; sharedoc_cert_stage_store/oc_cert_harvest_storenow used by both targetsscripts/smoke-private-path.sh— arms the worker before playwright fires (rented only)scripts/tests/rehearsal-rented-certs-test.sh— 13 checks, red first (first run: exit 127, the worker did not exist)STATUS.mdheader, same commitOC_RENTED_CERT_PERSIST=0Proven: 13/13 offline (fake
sshon the shell — no broker, no droplet, no LE order), plusrehearsal-rented-target-test.sh8/8,droplet-evidence-order-test.sh3/3,go test ./internal/certpersist/... ./cmd/rehearsal-certstore/...green. Detail in the ruling comment above.Not proven: no live rented drive ran from this session, deliberately — #720's confirmation queue was already driving
rehearsal-c, and a session drive would have contended for the drive lock and collided with its rental. Live confirmation is #743 (ready-for-session,priority): drive 1 must endrented-cert-harvest: done, drive 2 must showgrep -c 'creating new order' logs/droplet-caddy.txt== 0. The risk is staged correctly — the next drive is the read-only harvest-only case; the seed half first writes to a live gateway only on the drive after a successful harvest.Ticket item 1 (rotate
REHEARSAL_SLUG) not taken — the queue owner's call, and Ben already made it (rehearsal-c).Filed, not fixed — #744: while establishing which SSH identity reaches a rented box before its deploy, a read-only probe of the live rental found
/root/.ssh/authorized_keyscarrying 18 keys, including every human on the DigitalOcean account. Bothnix/gateway-image/configuration.nix("the image bakes NO authorized key") andbroker/internal/broker/provider.go("the only key the box trusts") state the opposite. The golden snapshot appears to ship the build box'sauthorized_keys— #707's sibling, one file over. Out of scope here; filed with the evidence.Closing: the durable fix this ticket asked for is landed, offline-proven and reversible, with its live confirmation tracked separately so it cannot be lost.
oc_droplet_assert_zero_obtaingreps a caddy journal that the release leg already destroyed — a 2-line file makes #559's guard always say "the seed took" #747