Correction: shop-probe-1027-ie began serving at 14:40:10Z, about 8 minutes after the failed warm at 14:32:03Z, not after the logged 1 h retry. Something else ordered the certificate in between (likely an on-demand handshake). leo's copy followed within a minute. So the dark window for a new dev home host is minutes, but long enough that carlos deploy's 2-minute watch times out on it.
Dev home-region hosts fail their first cert warm (no viable challenge type) and stay dark for the 1 h retry closed
Claimed by claude~paul@keymail.dev 1 month ago
Seen on dev's sophie-knitting (home region, *.dev.oncarlos.com) on v0.28.26 and v0.28.28. Every new home-region instance host fails its first certificate warm:
edge: cert warm for <host>: acme/autocert: unable to satisfy "https://acme-v02.api.letsencrypt.org/acme/authz/3591550571/..." for domain "<host>": no viable challenge type found — retrying in 1h0m0s
Hosts: hapair-a1 and hapair-a2 (2026-10-26 23:05 and 23:13Z), shop-t14-ie1 (2026-10-27 14:28Z) and shop-probe-1027-ie (14:32Z). hapair-a1 got its certificate on the one-hour retry (00:13Z). Until the retry, the host answers every handshake with a TLS internal-error alert, so carlos deploy times out on it.
New UK-region hosts (issued through dennis-stenciling and mirrored to sophie) warm within about 30 s (shop-t14-uk1, shop-probe-1027-uk).
The warm runs about 1 s after the route is minted (#386's cert-warm wake). My guess is that sophie answers LE's challenge before the edge accepts the host, so both challenge types fail, and the one-hour backoff then holds the host dark. Not investigated further. Found during Task 14's region service gate, where the IE probe waited for the retry.
Root cause
The issuer orders a new name's certificate before the deployment's other edges know the name, and Let's Encrypt validates part of the order through those edges.
- On dev, sophie (ie) holds the housekeeper lease, so it is the issuer. A new ie host is minted on sophie, and the cert warm's wake (#386) orders about a second later. A client's first handshake would do the same.
- Let's Encrypt validates from several vantage points.
*.bab.dev.oncarlos.comis geo/latency-routed: from AWS eu-north-1 and ap-southeast-1 (two of LE's remote validators) it resolves to dennis (uk), not sophie. Checked with EDNS client-subnet queries against the Route53 servers. - dennis is not the issuer. It answers a challenge from the bucket only for names it knows (
alpnTokenCertandchallengeResponseare bounded bydeploymentHost). It learns sophie's names from its home map, polled every 30 s. Seconds after the mint, it doesn't know the name yet, so it refuses, the validations fail, and the order fails. autocert then reports this as "no viable challenge type found". - The host stays dark because autocert refuses the name for a minute, the warm backs off for an hour, and geo DNS sends most clients to dennis, which never orders. The certificate finally comes when some handshake happens to reach sophie after that minute. That is why the gap is 5 to 12 minutes, not the logged hour.
UK hosts never failed because the issuer learns them from its own home map poll, by which time the home box has them. Flagship geo-routes its app wildcard the same way. I didn't touch flagship, so I haven't checked why its ie hosts get certificates at once. The likely reason is that its issuer isn't the ie box (it was AU on 10-25), which puts a home-map poll before every order there too.
Evidence
Task 14 (2026-10-27), dennis's journal:
14:28:36 TLS handshake error from 13.63.165.226: acme/autocert: no token cert for "shop-t14-ie1.bab.dev.oncarlos.com" 14:28:36 TLS handshake error from 54.169.210.144: acme/autocert: no token cert for "shop-t14-ie1..." 14:32:00 TLS handshake error from 16.171.57.7: acme/autocert: no token cert for "shop-probe-1027-ie..." 14:32:00 TLS handshake error from 52.77.224.2: acme/autocert: no token cert for "shop-probe-1027-ie..."
Sophie minted those hosts at 14:28:33 and 14:31:58 and failed the warm at 14:28:39 and 14:32:03. The certificates landed in control/certs/ at 14:40:10 (shop-probe-1027-ie, the same second a request woke it on sophie), and at 23:10:04 and 23:15:36 for hapair-a1 and a2. No rate limiting appears anywhere. The last order's authz on LE's side is deactivated with all three challenges pending: autocert had already used up tls-alpn-01 and http-01 on two earlier orders.
Reproduced 2026-10-28 on v0.28.29 with shop-cert-1028 (ie), now trashed:
07:28:00 sophie minted shop-cert-1028-ie.bab.dev.oncarlos.com 07:28:05 dennis no token cert ... from 13.49.80.41 (eu-north-1) 07:28:06 dennis no token cert ... from 54.169.36.6 (ap-southeast-1) 07:28:07 dennis host ... not in registry <- home map hasn't learned it yet 07:28:09 sophie cert warm ...: no viable challenge type found, retrying in 1h0m0s 07:28:13 dennis not available here <- home map has it now 07:30:07 carlos deploy: timed out ... remote error: tls: internal error (2m05s) 07:42:53 still no certificate (15 min); only dennis-side traffic, which never orders 07:43:07 one handshake sent straight to sophie: ordered, got the certificate and served 200 in 6.1 s
The last line is the "something else ordered it" from Task 14. Once every edge knows the name, a single order succeeds at once.
Fix
Branch cert-warm-propagation-443. In a deployment with more than one edge, issuerHostPolicy holds the first order for a name the issuer first saw less than one home-map poll plus 15 s ago (45 s). Every edge has polled by then. The cert warm treats the hold as "not yet": no 1 h backoff, no failure record, and the order budget is handed back. It comes back 2 s after the hold ends. Names that already have a certificate are still served by the mirror, and a single-box deployment is never held.
Tests: internal/edge/certsettle_test.go (8 tests; the three hold tests fail without the change). The full internal/edge package and the census tests in internal/provision pass. Census: internal/edge envelope re-pinned, no new reads.
Status: stopped on stopping rule 2
Astra round 1 (17349ef7) and round 2 (50c0bc79) each found one P1 in the same family: retry scheduling in the cert warm. Every pending hold must keep a scheduled retry through unrelated passes. Round 1: a pass run for another reason skipped a held name and returned the hourly delay. Fixed in 115f29ce. Round 2: a hold that ends while a long pass is still running (another host's 30 s order) is still dropped. The census is APPROVE at both tips. Findings are in docs/superpowers/reviews/CODEX-REVIEW-cert-warm-443-R{1,2}.md.
Paul, rule 2 needs your choice before a third fix:
- State the invariant and enforce it in one place (recommended, and what Astra recommends). "A name in
settleUntilis owed a pass at max(deadline, now)." The entry is cleared only by that name's own success, failure or hold, or by handing it to the cap or DNS-miss schedule, and the pass's return delay is computed fromsettleUntilalone. A guard test checks it under a clock that moves during orders. This would be round 3, the last. - Cut the warm-side scheduling. The warm drops a held name with no bookkeeping, and the name gets its certificate from the next handshake on the issuer after the 45 s hold, or the hourly pass. This removes the family, but a new host can again wait for a lucky handshake, which is the 15 minutes seen in the repro.
- Refuse up front. The warm never meets a hold: a name joins the warm set only once it is older than the window, and the loop's existing wake runs it then. It needs its own timer, so it is the same family under another name. Not recommended.
The issuerHostPolicy hold itself (the root-cause fix) is not in question in either round.
Option 1 built; Astra round 3 is NOT READY. Not merged.
Paul chose option 1 (one rule in one place). It's built in adcc542f on cert-warm-propagation-443 (tip now 06f33daf, with the R3 findings committed).
- The rule: a name in
certWarm.settleUntilis owed a pass at max(deadline, now). - One place:
owedWaitis the only thing that turns owed names into the next pass's time, and a deadline that has already passed counts as now. - One way out: an entry leaves only through
discharge. That happens when the name is ordered (success or failure), handed to the order cap or the DNS-miss schedule, or leaves the set. - Tests (failing first): -
TestWarmOwedRetryInvariantSimulation: 300 seeds, a clock that moves inside orders, random early wakes. -TestWarmRetriesAHoldThatEndsDuringAPass: the R2 scenario. -TestWarmHandsADueHoldToTheCap. - Results: all 15 settle tests pass, the full
internal/edgepackage passes, and theinternal/provisioncensus tests pass.
Astra round 3 (212be158): R1 and R2 are both resolved. The census is APPROVE: no new reads, and the envelope was recomputed independently. One new P1 in the same family. Both stand-down exits in pass() return warmInterval without consulting owedWait. If the box gets the issuer lease back between a pass's gate read and the loop's own read, the loop sees no transition and an owed name waits for the hourly pass. Astra notes the narrow window (a lease re-acquired within that gap), and on-demand handshakes still order. Findings are in docs/superpowers/reviews/CODEX-REVIEW-cert-warm-443-R3.md.
The three-round budget is spent, so per the brief I've stopped: no fix, no merge, no release. If you want it landed, one fix would close this. pass() would return its result through the same owedWait on every exit, and the loop would treat a stand-down seen inside a pass as an issuer transition. That would be a fourth round, which needs your go.
Merged as 4638a74076ce08ecef6d6f0b3fdca7de201a180f (squash of cert-warm-propagation-443 at f5bbc26e, CI green), on Paul's ruling to merge as it stands. Not released or rolled.
- The fix: the issuer holds a name's first cert order for 45 s in a multi-edge deployment, so every edge the CA validates through can answer the challenge, and the cert warm owes each held name a retry.
- Tests: 15 settle tests (including a 300-seed guard), plus the full
internal/edgepackage and theinternal/provisioncensus tests. - Census: the
internal/edgeenvelope was re-pinned after merging main 9665606d (#434). Astra re-approved it at f5bbc26e, recorded on #280. - Astra round 3's P1 is filed as #456: a stand-down in
pass()skipsowedWait, so if the issuer role comes back in that window a held name can wait an hour. Proposed fix: route every exit throughowedWaitand treat "not issuer during the pass" as an issuer change.
On dev the fix only takes effect after a release and roll, which this work does not do.