carlos / platform Public

edge: pre-issue first-route claims too (Astra R2 P2)

A first static route's attach stores a claim with no Route; inside the operator's accounts and zones it now qualifies. R2 findings recorded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev ee7fee16a21cf6a214ca9d309ba5fef4cadb3660 parent ec7b62d
4 files changed, +44 −8
  • docs/superpowers/reviews/precert-dns01-1293/CODEX-FINDINGS-R2.md +32 −0
  • internal/edge/precert.go +6 −3
  • internal/edge/precert_test.go +5 −4
  • internal/provision/testdata/plan14-root-reads-precert-dns01-1293.tsv +1 −1

CI cancelled — superseded by a newer push — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-YHz0TR
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/superfly/ltx v0.5.1
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading golang.org/x/sys v0.49.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading golang.org/x/mod v0.41.0
go: downloading github.com/oschwald/maxminddb-golang v1.13.1
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.38
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.19
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec

amadan: job cancelled — a newer push superseded it
diff --git a/docs/superpowers/reviews/precert-dns01-1293/CODEX-FINDINGS-R2.md b/docs/superpowers/reviews/precert-dns01-1293/CODEX-FINDINGS-R2.md
new file mode 100644
index 000000000..e062ff9bf
--- /dev/null
+++ b/docs/superpowers/reviews/precert-dns01-1293/CODEX-FINDINGS-R2.md
@@ -0,0 +1,32 @@
+R1 P1-1 — **Resolved:** issuance now requires both an operator-listed account and zone.
+R1 P1-2 — **Resolved:** the shared challenge lock covers TXT publication, validation, and cleanup.
+R1 P2 — **Resolved:** least-recently-tried ordering prevents failing names from starving untried names.
+
+Reviewed `ec7b62d2261e9f854a953d28cfcf2022edd80a7c`, diff `origin/main...HEAD`, merge base `d3266e8e`.
+
+No P1 findings.
+
+**P2 — First-route claims are incorrectly excluded from pre-issuance.**
+
+[precert.go:263](/home/paulca/amadan.net/carlos/platform-precert-dns01-1293/internal/edge/precert.go:263) skips every nonregional claim with an empty `Route`. That shape also represents a legitimate first-route attach: [domainattach.go:205](/home/paulca/amadan.net/carlos/platform-precert-dns01-1293/internal/console/domainattach.go:205) constructs the claim, and lines 248–324 retain its empty `Route` while creating the static instance record at `Host`. [apidomains.go:520](/home/paulca/amadan.net/carlos/platform-precert-dns01-1293/internal/console/apidomains.go:520) explicitly preserves that representation on re-attach.
+
+**Failure scenario:** an allowed account attaches a hostname inside an allowed zone as its first static route, before moving DNS. Even after provisioning succeeds, every pre-issuer pass skips it. It still depends on HTTP-01 after the switch.
+
+**Fix:** distinguish a reservation from a first-route claim backed by its matching instance record. Admit the latter while retaining the pending, account, zone, and catch-all exclusions. Add a regression covering this first-route shape alongside an unbacked reservation.
+
+**Fault family:** candidate selection must recognize every supported representation of a served claim.
+
+No P3 findings.
+
+The cache format and serving fallback support pre-issued certificates on both issuer and non-issuer edges. Autocert renewal checks the refreshed cache before ordering. The fake CA’s DNS-01 mode checks the expected TXT digest.
+
+`git diff --check` and formatting checks passed. Targeted tests could not start: the read-only sandbox prevented Go from creating its work directory. Census execution was therefore not verified. No files were edited.
+
+| Census item | Verdict | Lines read and basis |
+|---|---|---|
+| `edge.go:RunWithActivatorReady` | **APPROVE** | [edge.go:5020](/home/paulca/amadan.net/carlos/platform-precert-dns01-1293/internal/edge/edge.go:5020), lines 5020–5150. Optional edge-process loop; no added root read or weakened root check. |
+| `internal/edge` envelope | **APPROVE** | `precert.go` 1–461; `wildcard.go` 693–926; changed tests and reached serving/provider paths. [carlos-edge.service:28](/home/paulca/amadan.net/carlos/platform-precert-dns01-1293/internal/host/units/carlos-edge.service:28), lines 28–46, confirms execution as `carlos` using the protected environment. |
+| `internal/host` envelope | **APPROVE** | [agent.go:139](/home/paulca/amadan.net/carlos/platform-precert-dns01-1293/internal/host/agent.go:139), lines 139–147. Comment-only configuration additions. |
+| `internal/hostenv` envelope | **APPROVE** | [hostenv.go:56](/home/paulca/amadan.net/carlos/platform-precert-dns01-1293/internal/hostenv/hostenv.go:56), lines 56–95, 129–144, 386–434. Operator configuration allowlist additions preserve value validation and introduce no tenant-controlled root path. |
+
+**READY AFTER FIXES**
\ No newline at end of file
diff --git a/internal/edge/precert.go b/internal/edge/precert.go
index e45104eb3..9198c71de 100644
--- a/internal/edge/precert.go
+++ b/internal/edge/precert.go
@@ -24,8 +24,11 @@ package edge
// record every attach writes), not the edges files: a claim exists from
// the moment of the attach, whatever DNS says. Read through a ClaimCache,
// so the steady state is one listing per pass and a body read only for a
-// claim that changed. Pending (unproven, #215) claims, catch-all claims
-// and claims that name nothing to serve are skipped.
+// claim that changed. Pending (unproven, #215) claims and catch-all
+// claims are skipped. A claim with no Route is NOT skipped: a first
+// static route's attach stores exactly that shape (domainattach.go),
+// and inside the operator's accounts and zones a certificate ahead of
+// the route costs nothing (Astra R2).
// - The scope is named by the operator twice over: CARLOS_DNS01_ZONES (the
// zones) and CARLOS_DNS01_ACCOUNTS (the account sqids whose claims may
// use them). Either unset, nothing here runs. Zones, rather than
@@ -260,7 +263,7 @@ func (p *preIssuer) candidates(claims []domains.Claim) []string {
for _, c := range claims {
host := strings.TrimSuffix(strings.ToLower(c.Host), ".")
switch {
- case c.Pending, strings.HasPrefix(host, "*."), c.Route == "" && !c.Regional():
+ case c.Pending, strings.HasPrefix(host, "*."):
continue
case !p.inZone(host), !slices.Contains(p.accounts, c.Account):
continue
diff --git a/internal/edge/precert_test.go b/internal/edge/precert_test.go
index f8a418caf..3f888451f 100644
--- a/internal/edge/precert_test.go
+++ b/internal/edge/precert_test.go
@@ -263,8 +263,9 @@ func TestWildcardObtainOverDNS01(t *testing.T) {
func TestPreIssueCandidates(t *testing.T) {
pending := proven("pending.example.com")
pending.Pending, pending.PendingUntil = true, time.Now().Add(time.Hour).UTC().Format(time.RFC3339)
- noRoute := proven("noroute.example.com")
- noRoute.Route = ""
+ // A first static route's claim has no Route (domainattach.go): kept.
+ firstRoute := proven("firstroute.example.com")
+ firstRoute.Route = ""
regional := proven("regional.example.com")
regional.Route = ""
regional.Schema = 2
@@ -282,7 +283,7 @@ func TestPreIssueCandidates(t *testing.T) {
proven("shop.other.test"),
proven("x.covered.example.com"),
pending,
- noRoute,
+ firstRoute,
regional,
catchall,
stranger, // an account the operator did not name
@@ -290,7 +291,7 @@ func TestPreIssueCandidates(t *testing.T) {
p, _, _ := testPreIssuer(t, []string{"example.com"}, nil, nil)
p.covered = func(h string) bool { return strings.HasSuffix(h, ".covered.example.com") }
got := p.candidates(claims)
- want := []string{"billing.example.com", "deep.a.b.example.com", "example.com", "regional.example.com"}
+ want := []string{"billing.example.com", "deep.a.b.example.com", "example.com", "firstroute.example.com", "regional.example.com"}
if !slices.Equal(got, want) {
t.Fatalf("candidates = %v, want %v", got, want)
}
diff --git a/internal/provision/testdata/plan14-root-reads-precert-dns01-1293.tsv b/internal/provision/testdata/plan14-root-reads-precert-dns01-1293.tsv
index 68031d5dc..4eb1c30de 100644
--- a/internal/provision/testdata/plan14-root-reads-precert-dns01-1293.tsv
+++ b/internal/provision/testdata/plan14-root-reads-precert-dns01-1293.tsv
@@ -2,6 +2,6 @@
# 1 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
@legacy e2f9aff7fc89e6f5d85c811489416b8961496c0d29550f52852948b90a1fb8a4 internal/edge/edge.go RunWithActivatorReady legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-certwarm-wake;basis=registers the cert warm's nudge on OnReload and on the home map's new served-hosts wake (#386); nudge only sends on a buffered channel; no read added, same 5 sites;rev3=census-ruling-edge-roll-blip;basis=the :80/:443 (and dev) listeners are bound on the calling goroutine with net.Listen via listen()/listenAddr (same empty-address defaults as ListenAndServe) before the serve goroutines, which now call Serve/ServeTLS on them, and one log line names the bound addresses; no read added, same 5 sites;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): the inline home-map arming (newHomeMap, one boot Refresh, Store, run) moves unchanged into the new Edge.ArmHomeMap and is called here as e.ArmHomeMap(); same refresh, same timeout, same order. The reads are moved, none added.;rev3=census-ruling-agent-start-demo-1;basis=Logs the combined explicit wildcard parents through demoWildcardDomains; no new watcher or read loop.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: invoke the local admission Close before HTTP/HTTPS draining and door shutdown in both dev and normal listeners. Preserve merged main's startup behavior and its census basis; the same five read sites, no new reads.;rev3=census-ruling-stateless-replicas-3;basis=Task 1b: defer stopping and joining the edge's replica jobs at shutdown. Existing five direct read sites unchanged; no new reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Wrap dev, HTTP and HTTPS listeners through ConfigureGroupHairpin before serving. Indirectly read protected root boot identity and group-ingress.json; kernel local/peer addresses mark local ingress, never HTTP headers. Agent edge uses verified public source for accounting; direct read sites unchanged and absent marker keeps original listeners. CI fix removes interface enumeration: local peer must match snapshot primary IPv4, an ingress IPv4 installed locally by root, or loopback; kernel destination must still be an ingress EIP on port 80/443. Merge 45cebde4 retains deferred stopReplicaProbes alongside group listener wrapping and shutdown admission closure.;rev3=census-ruling-demo-api-site-route;basis=Change the startup failure context from load routes to initialize because origin validation now runs during construction. Existing five read sites unchanged; no new read or runtime authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Invoke the agent shutdown timestamp hook synchronously at SIGTERM/SIGINT receipt before closing admission in dev and TLS paths. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: registers the https and http servers with the connection drain (conns.serve) so a drain can close idle keep-alive connections; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the inline cert warm construction (newCertWarm over warmSet and dnsGate, then OnReload and setServedWake registering warm.nudge) moves unchanged into the new Edge.newIssuerWarm in certwarm.go and is called here with the same apps domain, parents, perHostCert, warmResolver, edgeIPs and store; the loop still starts here. The warm set it wires now reads the published edges files through the home map (OwnServedHosts and ServedHosts, both already polled) instead of the local route table, regional names aside. It is a different source, not a subset: an attached name not yet published as pointing is no longer listed, while a name the route table has already dropped stays listed until this box's next edges file write and the home map's next poll catch up (HostPolicy still refuses an order for a name the registry no longer holds). A name published not pointing is not a warm candidate at all, whether or not its certificate is cached: the warm neither looks it up, orders it nor re-arms its renewal until its home box publishes it pointing again (a cached certificate keeps serving and re-arms on a handshake at the issuer). The warm reads the set only after the issuer gate, and the read is in memory (route table and the home map's last snapshot); it also drops a DNS-miss entry for a name that has left the set before probing it. It keeps a failure record while any box publishes the exact name (the home map DeployedHosts: every box's file, own included, pointing or not, the same in-memory snapshot) or the name is a regional route-table name, and prunes it only once no box publishes it. That retention set has no apps-domain or wildcard filter (those stay on candidacy only), so a name published not pointing, or one a wildcard parent starts covering, keeps the record that explains its backoff; the set is never a source of candidates. No read site added in this unit, same 5 sites.;rev3=census-ruling-w6-ingress-drain;basis=the two public servers are built by e.publicServers (internal/edge/ingressdrain.go): :443 as before (same handler, TLS config and ReadHeaderTimeout 10 s), :80 now wrapped by plainTracked so the ingress drain can count and close its requests (its barrier is never §25's); Serve's error test is listenerFailed(err) = err != nil && !errors.Is(err, http.ErrServerClosed) (was err != ErrServerClosed), so a graceful Shutdown by the drain is not fatal. New Edge.plain connDrain field. Same flags, addresses and listeners; read sites unchanged (5); no read added.;rev3=census-ruling-edge-ppv2;basis=Edge process (uid carlos), not root. Edge gains the proxy atomic.Pointer. Outside dev mode, before either public listener binds and before the ready hook hands the Edge to the agent, calls e.loadProxyIngress(os.Getenv, dataDir): CARLOS_INGRESS_PROXY_SOURCES from the edge's own environment (carlos-edge.service loads the root-owned 0600 host.env) through hostenv.ParseProxySources; blank leaves the edge unarmed with nothing read; a non-empty list arms it and Lstats <dataDir>/edge/trust-barrier (armProxyIngress); a value that does not parse is log.Fatal. After the hairpin configuration, wrapProxyIngress wraps both public listeners outermost (returns them untouched when unarmed); when armed it logs the armed line and starts runProxyJournal (counters to the journal, no reads). The existing 5 read sites are unchanged.;rev3=census-ruling-audit-request-path;basis=the dev-mode http.Server gains IdleTimeout: publicIdleTimeout (120 s) beside its ReadHeaderTimeout; comment updated. Same 5 read sites, no read added.;rev3=census-ruling-precert-dns01-1293;basis=the edge process (carlos-edge.service, user carlos), not root: after the cert warm starts, calls e.newPreIssuerFromEnv(certCache, mirror, wm) and, when it returns non-nil, starts its loop and logs one line. newPreIssuerFromEnv (precert.go) reads CARLOS_DNS01_ZONES and CARLOS_DNS01_ACCOUNTS from the edge environment (the root-owned host.env); either unset or invalid = nil, nothing else read. Only claims of the named accounts qualify. Armed, the loop runs only while this box holds the issuer gate: it lists domains/ claims in the deployment bucket through a ClaimCache, and for proven claims under the listed zones orders a certificate over DNS-01 through the existing DNS provider seam (dnsProviderFromEnv, same IAM-scoped _acme-challenge TXT writes the wildcard manager already makes), writing the result through the existing publishing cache (local acme dir + control/certs/<host>). No root read; the existing 5 read sites are unchanged. data-literal@129,data-literal@148,data-literal@284,data-literal@417,file:Open@1013 50e87b602c51b69fbe19d43e67210ca878e2ba0acb003eb326ab16e4619ad162
internal/edge/edge.go RunWithActivatorReady legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-certwarm-wake;basis=registers the cert warm's nudge on OnReload and on the home map's new served-hosts wake (#386); nudge only sends on a buffered channel; no read added, same 5 sites;rev3=census-ruling-edge-roll-blip;basis=the :80/:443 (and dev) listeners are bound on the calling goroutine with net.Listen via listen()/listenAddr (same empty-address defaults as ListenAndServe) before the serve goroutines, which now call Serve/ServeTLS on them, and one log line names the bound addresses; no read added, same 5 sites;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): the inline home-map arming (newHomeMap, one boot Refresh, Store, run) moves unchanged into the new Edge.ArmHomeMap and is called here as e.ArmHomeMap(); same refresh, same timeout, same order. The reads are moved, none added.;rev3=census-ruling-agent-start-demo-1;basis=Logs the combined explicit wildcard parents through demoWildcardDomains; no new watcher or read loop.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: invoke the local admission Close before HTTP/HTTPS draining and door shutdown in both dev and normal listeners. Preserve merged main's startup behavior and its census basis; the same five read sites, no new reads.;rev3=census-ruling-stateless-replicas-3;basis=Task 1b: defer stopping and joining the edge's replica jobs at shutdown. Existing five direct read sites unchanged; no new reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Wrap dev, HTTP and HTTPS listeners through ConfigureGroupHairpin before serving. Indirectly read protected root boot identity and group-ingress.json; kernel local/peer addresses mark local ingress, never HTTP headers. Agent edge uses verified public source for accounting; direct read sites unchanged and absent marker keeps original listeners. CI fix removes interface enumeration: local peer must match snapshot primary IPv4, an ingress IPv4 installed locally by root, or loopback; kernel destination must still be an ingress EIP on port 80/443. Merge 45cebde4 retains deferred stopReplicaProbes alongside group listener wrapping and shutdown admission closure.;rev3=census-ruling-demo-api-site-route;basis=Change the startup failure context from load routes to initialize because origin validation now runs during construction. Existing five read sites unchanged; no new read or runtime authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Invoke the agent shutdown timestamp hook synchronously at SIGTERM/SIGINT receipt before closing admission in dev and TLS paths. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: registers the https and http servers with the connection drain (conns.serve) so a drain can close idle keep-alive connections; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the inline cert warm construction (newCertWarm over warmSet and dnsGate, then OnReload and setServedWake registering warm.nudge) moves unchanged into the new Edge.newIssuerWarm in certwarm.go and is called here with the same apps domain, parents, perHostCert, warmResolver, edgeIPs and store; the loop still starts here. The warm set it wires now reads the published edges files through the home map (OwnServedHosts and ServedHosts, both already polled) instead of the local route table, regional names aside. It is a different source, not a subset: an attached name not yet published as pointing is no longer listed, while a name the route table has already dropped stays listed until this box's next edges file write and the home map's next poll catch up (HostPolicy still refuses an order for a name the registry no longer holds). A name published not pointing is not a warm candidate at all, whether or not its certificate is cached: the warm neither looks it up, orders it nor re-arms its renewal until its home box publishes it pointing again (a cached certificate keeps serving and re-arms on a handshake at the issuer). The warm reads the set only after the issuer gate, and the read is in memory (route table and the home map's last snapshot); it also drops a DNS-miss entry for a name that has left the set before probing it. It keeps a failure record while any box publishes the exact name (the home map DeployedHosts: every box's file, own included, pointing or not, the same in-memory snapshot) or the name is a regional route-table name, and prunes it only once no box publishes it. That retention set has no apps-domain or wildcard filter (those stay on candidacy only), so a name published not pointing, or one a wildcard parent starts covering, keeps the record that explains its backoff; the set is never a source of candidates. No read site added in this unit, same 5 sites.;rev3=census-ruling-w6-ingress-drain;basis=the two public servers are built by e.publicServers (internal/edge/ingressdrain.go): :443 as before (same handler, TLS config and ReadHeaderTimeout 10 s), :80 now wrapped by plainTracked so the ingress drain can count and close its requests (its barrier is never §25's); Serve's error test is listenerFailed(err) = err != nil && !errors.Is(err, http.ErrServerClosed) (was err != ErrServerClosed), so a graceful Shutdown by the drain is not fatal. New Edge.plain connDrain field. Same flags, addresses and listeners; read sites unchanged (5); no read added.;rev3=census-ruling-edge-ppv2;basis=Edge process (uid carlos), not root. Edge gains the proxy atomic.Pointer. Outside dev mode, before either public listener binds and before the ready hook hands the Edge to the agent, calls e.loadProxyIngress(os.Getenv, dataDir): CARLOS_INGRESS_PROXY_SOURCES from the edge's own environment (carlos-edge.service loads the root-owned 0600 host.env) through hostenv.ParseProxySources; blank leaves the edge unarmed with nothing read; a non-empty list arms it and Lstats <dataDir>/edge/trust-barrier (armProxyIngress); a value that does not parse is log.Fatal. After the hairpin configuration, wrapProxyIngress wraps both public listeners outermost (returns them untouched when unarmed); when armed it logs the armed line and starts runProxyJournal (counters to the journal, no reads). The existing 5 read sites are unchanged.;rev3=census-ruling-audit-request-path;basis=the dev-mode http.Server gains IdleTimeout: publicIdleTimeout (120 s) beside its ReadHeaderTimeout; comment updated. Same 5 read sites, no read added.;rev3=census-ruling-precert-dns01-1293;basis=the edge process (carlos-edge.service, user carlos), not root: after the cert warm starts, calls e.newPreIssuerFromEnv(certCache, mirror, wm) and, when it returns non-nil, starts its loop and logs one line. newPreIssuerFromEnv (precert.go) reads CARLOS_DNS01_ZONES and CARLOS_DNS01_ACCOUNTS from the edge environment (the root-owned host.env); either unset or invalid = nil, nothing else read. Only claims of the named accounts qualify. Armed, the loop runs only while this box holds the issuer gate: it lists domains/ claims in the deployment bucket through a ClaimCache, and for proven claims under the listed zones orders a certificate over DNS-01 through the existing DNS provider seam (dnsProviderFromEnv, same IAM-scoped _acme-challenge TXT writes the wildcard manager already makes), writing the result through the existing publishing cache (local acme dir + control/certs/<host>). No root read; the existing 5 read sites are unchanged. data-literal@129,data-literal@148,data-literal@284,data-literal@417,file:Open@1013 50e87b602c51b69fbe19d43e67210ca878e2ba0acb003eb326ab16e4619ad162
-@coverage internal/edge bd2687218d3fd9be8c701f7b548871479f224151a87b6e7f710a16d460aed0c4
+@coverage internal/edge 88c47565ad69fe60fb5f26acee99b338d8534e3fc419dcf2be3465eddfcc809b
@coverage internal/host d3e30f0432b1fb8a0c4affe1e1cd7cccf39d181f47ed44b2832d0465b7f22ddb
@coverage internal/hostenv 42dfd4b787b820301c75ee2a5c158a31b8db4fedd748b32140bd0cfc565fb411