activation: gateway deploy red — both TLS doors never answer, DNS-01 delegation absent #905
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#905
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
artifacts/verdict.json—"verdict": "red","firstRedLeg": "standing",{"total": 17, "green": 15, "red": 2, "skip": 0}.standingis the wrapper; the leg that actually burned isactivation, 648 s:This is not the KNOWN frontier.
artifacts/legs.jsonrecords"skip": 0and carries no skip reasons at all, and pairing did flip —{"leg": "pair", "status": "green", "ms": 96}, corroborated bylogs/founding-state.log:817: "paired — the community name was aimed at the server before install, so the public reachability check is skipped; the gateway deploy begins". The own-VPS carrier issue is not what killed this drive.The deploy reached the last door and only that one.
logs/founding-state.log:64-95— five of six stepsdone:The evidence
1. Neither door ever answered, and neither ever came close.
logs/founding-state.log:143–615, 119 logged probes, all identical in shape:Checked in this run dir:
grep -c 'not answering yet'= 119; the count of those lines lacking the two-name pending set is 0. The pending set never shrank by a single name across the whole ~600 s budget.2. The app blames a budget, offers a retry, and ships
kindliterally unknown.logs/founding-state.log:633-638:The apex-lags-wildcard story needs one name to answer before the other. Neither did. The UI surfaces exactly this (
artifacts/journey.…/error-context.md: "The gateway deploy failed." + Resume the deploy / Reinstall the agent / Rescue boot).3. The box was alive throughout; only the door was shut.
logs/gateway-do-forensics.txt— droplet595628182/idss-gateway-rehearsal-c-fe92,status: active, a singlecreateaction and nothing else (no DO-side power_cycle/resize),0% packet loss, andtcp/22: a FRESH connect succeeded — the box answers, whatever ssh did.What is absent
No live-box section was appended to this diagnosis. I was given no access line, and this session's sandbox refused an authoritative
dig, an outboundcurlto the public entry, and every read outside the run directory (includinggit). I could not independently re-verify the zone, the live gateway, or any in-repo claim below. Diagnosis below is from harvested logs.logs/droplet-journal.txtdoes not exist. This drive writeslogs/device-journal.txt(the clan-lab device box, 134.199.162.122) andlogs/gateway-journal.txtinstead.All four gateway captures are blind.
gateway-journal.txt,-units.txt,-stall.txt,-caddy.txtare the same two lines:Against
tcp/22: a FRESH connect succeededin the same run's own forensics, "unreachable?" is a misread: the harvest dialledroot@<ip>with no identity, and the rented gateway trusts only the app's rent-operator key — the enrollment blob at the tail oflogs/founding-state.lognames ittest-results/standing-rented/state/rent-operator/id_ed25519. The drive kept zero evidence off the one box that failed.logs/broker-journal.txt—dev@100.98.48.68: Permission denied (publickey); off the admin mesh from this executor, absent by design (ADR 0208, #681). The broker is the prime suspect and its journal is precisely what is missing.artifacts/journey.jsonis{"rows": null, "fault": null}— the device-add journey never reached its founding rows, as expected whenstandingreds.logs/state-logs.log—ENOENT … test-results/standing-rented/state/logs.logs/qemu.logandlogs/guest-*.logare empty by design ("the guest was never created"); this drive rents a DO gateway, no local guest.logs/helper.logis 0 bytes.logs/device-units.txtshows the device box is bare Ubuntu — onlysshdandsystemd-resolvelistening,nginx/phpfpm-nextcloud"could not be found",--failedempty, uptime 1:06 with no reboot. Consistent with the run dying before device-add, not a second fault.Suspected layer — infra (the live broker), with a product tail
The only live-box reading in this run dir is
logs/healer-claude.out, a prior healer agent's harvest off the still-standing gateway using the rent-operator key. I relay it as that agent's claim; I could confirm none of it. It reports:07feca20-5f4c-4c51-a570-24c0f7fc4c70.acme.rehearsal-c.idss.nzat 14:58:36.388Z; the control plane re-pointed 1.6 s later (14:58:37.991Z,address heartbeat: gateway address changed, community record re-pointed ip=168.144.172.20) — so the challenge value existed and was carried.dig @andy.ns.cloudflare.com:_acme-challenge.rehearsal-c.idss.nz CNAME rehearsal-c.idss.nz.— the apex, not the fulldomain;acme.rehearsal-c.idss.nz NSNODATA; no glue A. Only the two challenge-independent records ofPutRecords' five-record set are live, and the challenge CNAME that is live names the wrong target.acme-dns-gateat15:03:40said so out loud: "_acme-challenge.rehearsal-c.idss.nznever resolved to07feca20-…on all of [1.1.1.1 8.8.8.8] within budget — releasing Caddy anyway (fail-open)".tls.obtain … timed out waiting for record to fully propagate, for both*.rehearsal-c.idss.nzandrehearsal-c.idss.nz, still retrying (attempt: 7,elapsed: 2651s) long after the drive gave up./v1/gateways/renewreturned 502 on all 11 passes, 14:58:39Z → 15:53:40Z —DigitalOcean refused: Forbidden … You are not authorized to perform this operation. The rented lease is therefore never renewed.If that harvest holds, this is the dead end GOTCHAS #28 was opened for, whose own deploy gate reads: the LIVE broker runs from
/usr/local/bin/idss-brokerand a repo landing does not change it — it must be rebuilt and redeployed before any drive can green. A larger door budget cannot fix this, and "Resume the deploy" would burn wall-clock forever.What I can verify in the run dir is consistent with that and inconsistent with the app's own stated theory: both names pending across all 119 probes rules out apex-lags-wildcard.
What plugging it needs
dev@100.98.48.68,ourcloud-broker.service, off-mesh from this executor): identify which build/usr/local/bin/idss-brokeris, and read its journal for14:58:37Z— whether the point request arrived withAcmeChallengenon-empty is the one check that splits stale build from challenge dropped in transit. Rebuild and redeploy at the #508 five-recordPutRecordsif stale._acme-challenge.rehearsal-cis a live wrong-target CNAME, not a missing record — whatever writes the set must replace it./v1/gateways/renew→ 403 Forbidden)._acme-challenge.<slug>naming the gateway's per-boot acme-dns fulldomain."kind": "unknown"with text blaming a cold-start budget (founding-state.log:637) whileacme-dns-gatealready knew the truth at15:03:40. Feed the gate's fail-open verdict into the deploy fault so it names the missing delegation, and so "Resume the deploy" is not the advice offered against a dead delegation.logs/healer-claude.outclaims commit8f5ae592gives the gateway harvest the rent-operator identity. I could not rungitto confirm it is on the branch drives run from — verify it, or the next red is blind in exactly the same place and "gateway unreachable?" will again contradicttcp/22: a FRESH connect succeededin the same run dir.drive
20260827T144343Zred 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:
/home/swarm/swarm/Matou/idss/test-results/drive-device/20260827T144343Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedProduct tail landed; deploy-green root cause handed to a human
Landed on
origin/main(commit1ae38ba,sandcastle: #905 (product tail)):the in-repo, independently-actionable item — point 5 of the diagnosis.
The deploy fault the drive shipped read
kind:"unknown", blamed the first-bootcold-start budget, invoked the apex-lags-wildcard story, and offered Resume the
deploy as the lead recovery — against a run where both names stayed pending
across all 119 probes. The apex-lags story needs one door live; when no door
ever answers the cause is an absent/wrong
_acme-challenge.<apex>delegationCaddy's
:443waits on forever, and a resume only re-probes it into the same deadend. Fixed at the seam (
internal/founding/deploy.go):probeDoorsLivenow reportsanyLive;deadDoorFailuresplits the two shapes — one door live → the existingFailUnknowncold-start lag (resume-first, unchanged); no door live → thenew
clan.FailDelegationkind, a fault that names the missing delegation(GOTCHAS #27/#28, ADR 0014, #508/#554) with no self-settling-cold-start language;
buildDeployFailuredemotes Resume the deploy out of the lead for adelegation fault and rewords it (still offered, for after the delegation is
repaired off-box).
Regression tests: the all-doors-dead case asserts
kind=delegation, adelegation-naming detail, no "settles" language, and resume demoted; the apex-lag
case asserts it stays
FailUnknownwith resume the lead.go build/vet/test ./internal/founding/... ./internal/clan/...green; the pinnedgolangci-lint run ./...gate green.Why human
The deploy itself is still red and that root cause is not in-repo. The
repo's
broker/internal/broker/zone.goPutRecordsalready writes the correctfive-record set (
_acme-challenge.<slug>CNAME at the acme-dns fulldomain plusthe
acme.<slug>NS + glue A) — this is GOTCHAS #28. What remains is the standingdeploy gate of GOTCHAS #28 plus the DO tail, both off-mesh from any sandcastle
executor (ADR 0208, #681), and one of them a credential/security-posture change I
cannot rule or prove with a test:
/usr/local/bin/idss-brokeron thebroker host (
dev@100.98.48.68,ourcloud-broker.service) is what actuallywrites the zone; a repo landing does not change it (GOTCHAS #28 deploy gate,
#508). Confirm which build it is, read its journal at the point request
(
14:58:37Zon the harvested drive — wasAcmeChallengenon-empty?), andredeploy at the five-record
PutRecords. Overwrite, don't skip:_acme-challenge.<slug>is a live wrong-target CNAME (→ apex), not a missingrecord.
—
/v1/gateways/renewreturned403 Forbiddenon all 11 passes. This is acredential/security-posture change on production infra (one-way door).
with
_acme-challenge.<slug>naming the gateway's per-boot acme-dns fulldomain.Re-arm with
ready-for-agentonce the broker + zone + token are healed and a drivecan reach the gateway's public doors.
Housekeeping: the same push also landed
sandcastle: unblock the shared Go push gate(commit2d4b114) — #788's IDIP arc (internal/keria,internal/keriawire,internal/idp,internal/keriauth) had landed via session pushes that skip thesandcastle pre-push gate, leaving
origin/mainlint-red on 11 revive/errcheckfindings and refusing every sandcastle worker's Go push. Purely mechanical
lint-green fixes (doc comments,
_ = resp.Body.Close(), unused-param rename); no#788 behaviour changed.
Item 1 ANSWERED from the live gateway, under ADR 0174 (Ben approved the redeploy; I did NOT run it — read why).
The handover asked: read the journal at the point request (
14:58:37Z) — wasAcmeChallengenon-empty? It was empty, and here is the mechanism.The gateway never obtained an acme-dns fulldomain — and said it succeeded
Gateway
168.144.172.20(droplet595628182) is still standing.acme-dns-register.service, the unit whose whole job is to register the account and publishIDSS_ACMEDNS_*for Caddy (ADR 0014):It could not reach acme-dns, registered nothing, and exited 0/SUCCESS.
/run/acme-dns-envdoes not exist on the box;IDSS_ACMEDNS_*was never published. The point request went out one second later, at14:58:37Z, carrying an emptyAcmeChallenge— so the broker wrote its fallback and the zone reads exactly as this ticket describes.Why the curl failed — a readiness race, not a broken service
acme-dnsis active right now and listening:LISTEN 127.0.0.1:8081 users:(("acme-dns",pid=2206)). And the ordering is declared correctly —acme-dns-registerhas bothAfter=andWants/Requires=acme-dns.service.Note the PIDs: acme-dns is 2206, the register is 2209. acme-dns had been started; it had not yet bound its socket.
After=on a plain (non-Type=notify, non-socket-activated) service guarantees only that the unit was started, never that it is accepting connections. This is GOTCHAS #2's family and the exact shape of #691 — "DigitalOcean'sactiveis not proof sshd is up" — one layer down.Live zone state, confirming the consequence
rehearsal-c.idss.nz168.144.172.20*.rehearsal-crehearsal-c.idss.nz._acme-challenge.rehearsal-crehearsal-c.idss.nz.acme.rehearsal-cacme-dns.rehearsal-c168.144.172.20DNS-01 can never validate, Caddy waits on
:443forever, neither door answers — which is precisely theanyLive == falseshape1ae38ba0just taught the deploy to report honestly.Why I did not run the approved redeploy
"Redeploy at the five-record
PutRecords, overwrite don't skip" would write the same wrong record again. There is still no fulldomain to point_acme-challengeat — the gateway never obtained one. Re-pointing DNS treats the symptom; the record is wrong because its input was empty. Ben approved the redeploy on the ticket's framing; the live evidence changes what the right action is, so I stopped rather than execute it.What actually needs fixing
acme-dns-registermust wait for the socket to accept, not merely for the unit to start — poll until connect succeeds, with a bounded budget. The repo already has this shape twice:vm.Manager.WaitReady/pollReady, and DDR 0192'sCarrierConfig.ConnectTimeout/ConnectPolladded for the identical #691 race. (Alternatively make acme-dnsType=notifyor socket-activated, which fixes it at the source for every future consumer.)AcmeChallengereach the broker and a wrong CNAME reach the zone, with no red anywhere until a deploy died 648 s later at a leg five stages downstream.PutRecordsat all.Item 2 (the DigitalOcean token's
403 Forbiddenon/v1/gateways/renew, visible in the broker journal asDELETE /v2/tags/idss-rental-expires-…refused) is untouched and remains Ben's — it is a production credential change and a one-way door.Leaving this
ready-for-humanfor Ben's call on whether the fix lands as a session or a swarm ticket. Gateway168.144.172.20is still up if anyone wants to read more before it is reaped.CORRECTION from the watch — my earlier comment's diagnosis was WRONG. Ignore it. The acme-dns registration SUCCEEDED.
I claimed
acme-dns-registersilently failed to register and published nothing. That is not what happened, and anyone picking this up on my say-so would look in the wrong place.What the gateway actually holds (
168.144.172.20,/var/lib/idss-acmedns/, all written 14:58):The registration worked and the fulldomain fact exists. Two mistakes on my part:
/run/acme-dns-env, which is not the path — the unit writes to itsStateDirectory,/var/lib/idss-acmedns/(acmednsStateDir = "idss-acmedns").curl: (7) Failed to connect to 127.0.0.1 port 8081at 14:58:35 as the failure. It is the health poll's first iteration.#431already fixed this race: the script polls$api/healthfor up to 300s andexit 1s if it never binds. One refused probe, success one second later, then registration — the retry loop working exactly as designed.status=0/SUCCESSwas honest.So there is no readiness race and no fail-loud violation here. #431's fix holds.
The real fault is one layer out, and it is a design gap rather than a bug:
ChallengeSource.AcmeChallenge(internal/fleetwire/challenge.go:81) reads the fulldomain fact over SSH from the gateway, and returns honest-absent""— never an error — in three cases: no SSH forward yet, gateway unreachable, or fact not yet written. The point request went out at 14:58:37, one second after the registration finished at 14:58:36. It read empty, so the broker wired the name with A + wildcard only and no delegation — which is exactly what the zone shows:_acme-challenge.rehearsal-cis a CNAME to the apex, andacme.rehearsal-cNS is absent, while the gateway has held a valid fulldomain the whole time.The comment at that function says "a missing challenge only decorates the name-wiring, so it must never abort it". For DNS-01 that is precisely backwards: without the delegation the door can never get a certificate, so the "decoration" is load-bearing. And nothing re-points once the fact does appear — the absent delegation is permanent for the life of that name.
Filed as its own swarm ticket per Ben. Item 2 (the DO token) is DONE — see the separate note; the broker is running a new credential with delete scope and has logged zero 403s since 22:34:58Z.
Closing — both halves of the handover are resolved. #854 is re-pointed at #915.
This ticket's human handover named three items. Where each landed:
"", wires the name with no delegation, and nothing ever re-points). My first reading of this — a readiness race inacme-dns-register— was wrong and is corrected above; #431's 300 s health gate holds.GET /v2/droplets200 andPOST /v2/tags201, butDELETE /v2/tags/…403 — which is why/v1/gateways/renewfailed every pass, SSH-key reaping failed, and the standing gateway accumulated 93idss-rental-expires-*tags (one created per renew, none removable — the signature of create-yes/delete-no). Ben issued a replacement; it was probed before install (droplet read 200, snapshot read 200, ssh_key read 200, ssh_key create→delete 201→204, tag create→delete 201→204), installed to/etc/idss-broker/do-tokenwith the previous file backed up asdo-token.bak-20260827T223403Z, and the broker restarted at 22:34:58Z. It has logged zero 403s since. Probe artifacts cleaned up.Residue, non-blocking: the 93 orphaned expiry tags will not self-clean —
Retagremoves only the tag it replaces. They are not a reaper hazard: the earliest deadline decodes to 2026-08-28 14:45Z, ~16 h ahead of the fix, so no premature reap. They go with the droplet.#854now blocks on #915 alone. Worth a fresh drive once that lands — the token fix on its own may change how far it gets, since renew and reap were failing on every previous pass.