enroll-activate: acme-dns-register never reaches acme-dns's loopback API, drive times out #431
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#431
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
The
enroll-activateleg of the own-vps stand-up (droplet 170.64.234.72) went red.logs/founding-state.logrecords the fault at theenroll-activatestage:This is the
acme-dns-registersystemd unit (machines/gateway/acme-dns.nix) polling acme-dns's own loopback API (http://127.0.0.1:8081/register) to get the account Caddy needs for its DNS-01 challenge. The unit already retries up to 30x/1s specifically because, per the module's own comment, "The local API can lag acme-dns's own startup by a moment" — but on this fresh nixos-anywhere install + first reboot, that budget wasn't enough (or acme-dns.service never came up at all), and the register script's failure got surfaced by clan as a masked_exit ("reported success but the log shows a real failure").Two things blocked deeper diagnosis
artifacts/legs.jsonandartifacts/journey.jsonare empty ([]and{"rows": null, "fault": null}) — no per-leg telemetry was captured for this run; onlyfounding-state.log's stage events fill that gap here.Post-mortem droplet evidence gathering failed.
logs/droplet-journal.txtcontains only:nixos-anywhere regenerates the droplet's SSH host key on every reinstall (founding-state.log confirms the live connection "learned its SSH host key" fresh at connect time), but the harness's post-mortem SSH step still has the previous rehearsal's key cached in
known_hostsand refuses to connect under strict checking. So gateway's own journal (wasacme-dns.serviceactually up? crashed? slow to bind port 8081?) is unavailable — all we have is the 4 truncated curl-failure lines that made it into the UI's live log tail.The harness never saw a "failed" journey state either
The Playwright error is a timeout, not a detected failure:
readJourney()returns{state: 'absent'}whendocument.querySelector('[data-status="standup-progress"]')finds nothing. The full 1200s budget elapsed with that selector never matching — even though the founding wizard was on screen showing the real fault the whole time (error-context.md's page snapshot: "Activate the gateway system", the masked_exit/acme-dns detail text, a "Retry the connection" button). The fault was correctly surfaced to a human, butwaitForLeg's polling contract (data-status="standup-progress",data-state="failed", fault framedata-status="journey-fault"per DDR 0131) never matched the founding-fault screen's markup, so the drive burned the full 20-minute budget instead of failing fast on the real reason.Not the known frontier
This isn't the known own-VPS pairing-never-flips frontier:
legs.jsoncarries no skip entries at all (it's empty), and the run demonstrably got past connect/point/seed/enroll-configure — kexec, disko, install, and reboot all completed perfounding-state.log— before redlining atenroll-activate. This is a new, real failure, not the known carrier gap.Suspected layer(s) and what plugging needs
machines/gateway/acme-dns.nix—acme-dns-register.service'safter/requiresonacme-dns.serviceguarantees systemd-active, not "listening on 127.0.0.1:8081". On this box the register script's 30x1s poll wasn't enough (or acme-dns never came up at all). Needs a real readiness gate (longer/backoff wait-for-port, or socket-activate acme-dns) and, to distinguish crash vs. slow-start, the gateway's own journal — currently unreachable, see below.known_hoststhat isn't refreshed after nixos-anywhere regenerates the droplet's host key. It should learn/accept-new the key the same way the live founding SSH connection does, or evict the stale entry before gathering.enroll-activatedoesn't satisfy thewaitForLegcontract (data-status="standup-progress"/data-state="failed"), so a correctly-surfaced fault times out generically instead of failing fast. Worth checking whether founding-stage faults are meant to flow through the journey-bar contract at all, or need their own wait helper.drive
20260811T062137Zred atwizard:drive red at wizard — the wizard died before any leg ranevidence:
test-results/…/20260811T062137Z/on matou-workstation (legs.json, droplet-journal.txt, trace)Landed as
12ddea4onorigin/main(product-layer / primary fix).Root cause plugged:
acme-dns-registerwasafter/requires acme-dns.service, which only guarantees the daemon FORKED — not that it bound its loopback register/update API on127.0.0.1:8081("the port lies", GOTCHAS #2). The old 30x1s register poll was budgeted for a warm restart's momentary lag, not a fresh nixos-anywhere install's first reboot where the API binds seconds later, so the very first curl hit connection-refused and the budget ran out — surfaced by clan as amasked_exit.Fix (
internal/clan/acmedns.go,RenderAcmeDNS): before any register, the oneshot now polls acme-dns's non-mutating/healthfor up to 300x1s (still well inside the enroll-activate leg budget), and on timeout NAMES the unreachable capability (local API … never came up (acme-dns.service listening on loopback?)) so a crashed/never-listening acme-dns is distinguishable from a real registration failure. The mutating register POST runs only once the API answers.TestRenderAcmeDNS_WaitsForTheLocalAPIBeforeRegistering(internal/clan/acmedns_test.go); fullinternal/clansuite green; repo pre-push gate green.docs/GOTCHAS.md#15.STATUS.mdheader + milestone log updated.Deferred to their own issues — the two harness-side halves called out in this report (out of this product slice's scope):
known_hostsisn't refreshed after nixos-anywhere regenerates the droplet host key — so the gateway journal (crash vs. slow-start) stays unreachable.waitForLeg'sdata-status="standup-progress"/data-state="failed"contract (DDR 0131), so a correctly-surfaced fault times out on the full 1200s budget instead of failing fast.These are separate seams (the e2e harness, not the clan render) and want their own tickets; recommend filing them so the diagnosis + fail-fast gaps get their own slices.