edges: fixes from Astra R2 (the edge's real cache; composed-path tests)
- edgeAcmeDir: one derivation of the edge's certificate cache (the agent's -acme-cache flag, else $CARLOS_DATA_DIR/acme), used by the domains sweep and handed to the edges-file writer; empty = nothing published early. - Tests: the issuer's composed chain (mirror over autocert, fake CA) serves the mirrored cert and places no order for ECDSA, RSA-only and certificate-less hellos; a remote edge relays a dns_pointing false alias end to end; the configured cache, not the default, decides.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 files changed,
+264
−36
docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md+8 −3docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2.md+43 −0internal/edge/alias_prepoint_e2e_test.go+104 −0internal/host/agent.go+20 −9internal/host/edgesfile.go+9 −10internal/host/edgesfile_precert_test.go+69 −8internal/host/fleet_secrets_key_test.go+1 −1internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv+9 −4internal/provision/testdata/plan14-root-reads-chain.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-FhSpDl .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 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/aws/aws-sdk-go-v2/service/iam v1.58.2 go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0 go: downloading github.com/pion/dtls/v3 v3.1.4 go: downloading github.com/pion/transport/v4 v4.0.2 go: downloading github.com/klauspost/compress v1.20.2 go: downloading github.com/pierrec/lz4/v4 v4.1.22 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/wlynxg/anet v0.0.5 go: downloading github.com/prometheus/client_golang v1.17.0 go: downloading golang.org/x/sync v0.24.0 go: downloading github.com/lmittmann/tint v1.1.3 go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18 go: downloading github.com/prometheus/client_model v0.5.0 go: downloading github.com/prometheus/common v0.45.0 go: downloading google.golang.org/protobuf v1.36.10 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 golang.org/x/text v0.43.0 go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 go: downloading modernc.org/sqlite v1.55.0 go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0 go: downloading github.com/klauspost/compress v1.20.2 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 github.com/dustin/go-humanize v1.0.1 go: downloading modernc.org/mathutil v1.7.1 go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec amadan: job cancelled — a newer push superseded it
diff --git a/docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md b/docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md| index 2b663037e..70f799cb3 100644 |
| --- a/docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md |
| +++ b/docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md |
| @@ -1,10 +1,12 @@ |
| # Census approval: alias-publish-precert-1293 |
| -Ruling `census-ruling-alias-publish-precert-1293`. The independent reviewer approves or rejects every change below, 2 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| +Ruling `census-ruling-alias-publish-precert-1293`. The independent reviewer approves or rejects every change below, 3 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| | unit | change | read sites | what changed | |
| |---|---|---|---| |
| | `internal/edge/edge.go` `RunWithActivatorReady` | body | unchanged (5) | the edge process (carlos-edge.service, user carlos), not root: the pre-issuer start log now reads its zones from p.scope.Zones (the zones and accounts moved into the shared edge.DNS01Scope); no behaviour change, no read added, the existing 5 read sites unchanged. | |
| +| `internal/host/agent.go` `runAgent` | body | unchanged (8) | starts edgesFileLoop with one more argument, edgeAcmeDir(os.Getenv, peekAcmeCache(args)): the agent's own -acme-cache flag (already parsed for domainsLoop) or $CARLOS_DATA_DIR/acme; a string computed from the operator's command line and environment, no read. Same 8 read sites. | |
| +| `internal/host/edgesfile.go` `edgesFileWriteClaims` | sites | +registry:Account, +registry:Alias ×2 | the box agent (root) writing its own control/edges/<box>.json: an alias not yet stamped pointing is also published (marked dns_pointing false) when edge.DNS01Scope allows its name and account and domains.UsablePerHostCert finds a usable per-host certificate for it. New inputs: CARLOS_DNS01_ZONES and CARLOS_DNS01_ACCOUNTS from the agent environment (root-owned host.env, operator-only), and ident.AcmeDir, set once at arm by runAgent from edgeAcmeDir (the agent's own -acme-cache flag, else $CARLOS_DATA_DIR/acme, the same derivation the domains sweep uses); empty publishes nothing early. New read, via domains.UsablePerHostCert: <AcmeDir>/<alias> for an alias inside the operator scope only, where the name must pass validHostShape (lowercase DNS labels, so one file directly under acme/, no separators or dot segments); Lstat first and only a regular file under 64 KiB is opened (a symlink is not followed); the bytes are only parsed by tls.X509KeyPair and reduced to a boolean, never executed, followed or written. That directory is the edge cache (written by carlos-edge, user carlos) the agent already reads as root in domains hostCertExpiry; same read sites otherwise. | |
| Envelopes re-pinned: `internal/domains`, `internal/edge`, `internal/host`. |
| @@ -13,12 +15,15 @@ Review: a model from the other family than the author reads the branch's diff ag |
| Recorded dispositions, which each change must still satisfy: |
| - `internal/edge/edge.go` `RunWithActivatorReady`: legacy, task accepted-legacy. Basis: 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. |
| +- `internal/host/agent.go` `runAgent`: authority, task B,C,D,F. Basis: rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-stateless-replicas-4-task1;basis=Arms the fleet-only replica swap worker next to the placement worker: same console URL and fleet token as the existing replicaCoordinatorAPI, the existing activator Service; stops and joins at shutdown. No new read site, credential or bucket reader.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: sets deployWorker.step to the rollout scheduler answer for the record permit (replicaStepOf over armedRollout), an in-memory callback; no read site, credential or bucket reader added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: the swap worker step is armedReplicaStep, the same lazy scheduler lookup as before as a named function; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (01d6ca78, linked-deployments-slice1) starts linkLoop beside tunnelLoop; this branch keeps its replica coordinator wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 2: wires the swap worker's drive (armedReplicaDrive, the armed rollout manager's DriveReplicaRelease); no read added;rev3=census-ruling-stateless-replicas-4-merge-main2;basis=Merge of main af871da0 (v0.34.49): both sides changed it. Main (178dcfe5, member-backups-2a) moves the inline duty-view closure into armDutyView/dutyView and starts verifyAssignLoop; its sites drop by registry:Host and whole:Route x2 as main recorded them. This branch keeps its replica coordinator, swap worker and drive wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R24: makes one in-memory channel, closes it (once) inside the edge's existing shutdown-started callback after ingress.shutdownStarted, and passes it to tunnelLoop, which drains only a fleet channel name; no read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision;rev3=census-ruling-edge-ppv2;basis=Agent (uid carlos), not root. memwatchLoop now gets edgeProxyCounters(&demoEdge) (in-process counters, no read). The drain socket's driver is newAgentDrainSocket(ingress, e, os.Getenv), which attaches the edge trust handler only when CARLOS_INGRESS_PROXY_SOURCES in the agent's environment (from the root-owned host.env) parses to a non-empty list; the socket is served when drainSocketServed: a group member or a configured ingress drain (both as before), or a box armed for PROXY protocol (new). The socket's path and agent-user-only permissions are unchanged. Read sites unchanged (6).;rev3=census-ruling-same-box-edge-fence;basis=Agent (uid carlos), not root. One added line: armEdgeFenceStatus(ctl.EdgeFence), beside the existing armExecSandboxStatus, so the layout report can ask root's /ready for the edge fence state over the control socket client the agent already holds. No read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added.;rev3=census-ruling-fleet-drain-followups;basis=P3 (#1008 T9): one call after armChangeIndex, requestBootFullPass(v, &backstopFullDue), which stores true in the existing in-memory backstopFullDue flag only when no record view is armed, so the fast loop runs its existing full pass on its first tick instead of instancesLoop a minute later; armed boxes unchanged. No read added; read sites unchanged (8); agent, not root.;rev3=census-ruling-fleet-first-reconcile-speed;basis=Startup timing log lines only: runDuties builds a step logger (newStartupLog, which reads the in-memory agent start time) and logs one line after the wait on the activator startup latch and after each existing duty before go fastConvergeLoop. One newStartupLog().at line in the edge ready hook before go tunnelLoop. No read added; read sites unchanged (8). Agent, not root.;rev3=census-ruling-ha-1192;basis=sets the group drain driver's departed hook to armedPeerDeparted (the armed departure controller's PeerDeparted: local registry identity + departure journal); no new read;rev3=census-ruling-replica-wake-gap-r3;basis=Calls lease.SetContinuityDir(<data dir>/.continuity) beside the existing obligation store: the agent's own 0700 directory for clean records, outside every instance tree (#1290 round 3). No new read; failure is logged and every start then takes a full image.;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2: cfg.ReplicaRecord = replicaRecordFacts(boxLifetimes, cfg.Record): hands the existing judged record read (haRecordFacts over openDeployStore and boxJudge) as the live read on a lifetime index miss. No read site added here; agent, not root. |
| +- `internal/host/edgesfile.go` `edgesFileWriteClaims`: authority, task F,J1. Basis: rev3=census-ruling-self-serve-moves-1;basis=root-route;kept=F;scope=protected-decision-only; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): region-ha-2a's body, which with the box's lifetimes switch on also publishes each served row's lifetime pair (registry:Incarnation and registry:ServingSeq, two new sites on the rows it already lists) and an alias's or served catch-all's primary's pair, and names that primary as target_host whatever the switch; a report the edge orders unstamped entries by, not a decision; no record, /data, release or claim read added; F,J1 authority retained; self-serve moves 1 Task 8;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 8: takes a localAddrs reader (instancectl.LocalAddresses in production, which reads /proc/net/fib_trie and /proc/net/if_inet6 in the agent) and publishes its non-loopback entries as the edges file's addrs before the write gate (boxAddrs, no read of its own), so an address change writes once. The same 44 sites, offsets moved; no record, /data, release or claim read added; a report the console's egress grant check reads, not a root decision; F,J1 authority retained.;rev3=census-ruling-edge-asset-cache-3;basis=starts with assets = assets.active(), so a policy whose box has not opened its asset store publishes no assets blocks and reads no manifests, and copies the decision's Primary (the route host the block was decided for, drift D4) into the published assets block; read sites unchanged (44); no read added. Merged onto main's #328 body, which takes the localAddrs reader: the assets.active() line sits after that signature and the loop passes pub and instancectl.LocalAddresses;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: the claims argument (*edgesClaims) becomes addrs (AddressSource) and the applyEdgesClaims(ctx, claims, routes, hosts) call is deleted with edgesclaims.go, which is the one whole:Route site removed: no host claim is read and every served row publishes as with region HA off; the box-address publication is the same code reading addrs.BoxAddresses() instead of claims.addrs; a report the edge reads, not a root decision; no read added; merge of origin/main d7ae1d76: main's edge asset cache plan 3 body is kept (census-ruling-edge-asset-cache-3): the first line is assets = assets.active(), so a policy whose store has not opened publishes no assets blocks and reads no manifests, and edgesFileLoop passes pub (assets.active() for that tick) in the assets argument; main's claims *edgesClaims argument is this branch's addrs AddressSource, and no edgesClaims, applyEdgesClaims or hostclaim reference remains;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: skips publishing a platform alias edge.PlatformAliasFold refuses (and so anything attached to it); reads the same route listing;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 and its fix rounds: publishes by FleetArmVerdict (via fleetRefusedFor): withheld rows left out; a forward host's path rows left out of its owner; no assets for forward rows; the alias loop replays Reload's alias fold from the served rows so a chained alias carries its root primary's owner; certRefused and parentRefused leave out a refused claim's wildcard parent (+registry:Alias x5, +registry:Host x4, +whole:Route, +whole:RouteAlias x2, +whole:RoutePath x7, +whole:WildcardDomain). Rows already read in the pass; keeps authority F,J1; publishes less, never more.;rev3=census-ruling-probe-burst-limit;basis=sets the constant BurstNotices=true on the box's own edges file (this build's edge answers probe-burst notices, so peers may send them); not from config or any read; the same 65 sites; a report other edges read, not a root decision; F,J1 authority retained; no new root read or write kind;rev3=census-ruling-region-ha-p3a;basis=Publish one injected role snapshot with box_role/admitted/drained; retain legacy route and alias rows during booting, cutting namespace withdrawal under the 2026-11-04 ruling; acknowledge the exact published tuple only after PUT; existing registry reads unchanged.;rev3=census-ruling-region-ha-p2b;basis=region HA P2b-1 T0 (Q1 ruling): before building the comparison copy and the body, a nil NamedPools on the identity becomes []string{} so the additive named_pools field is always an explicit array; the list itself is computed once at arm by edgesFileEligibility from the same provisionTickConfig(os.Getenv) parse as serves_shared_pool (CARLOS_POOLS through provision.ParseBoxPools, filtered to nonempty provision.ValidPool names, sorted, unique). A report the console reads for create admission, not a root decision; no record, /data, release or claim read added; read sites unchanged (65); F,J1 authority retained. One-off cost: the first pass after the upgrade writes once per box (seeded gate null vs []).;rev3=census-ruling-region-ha-p3b;basis=Require cached GroupReadersReady before first group publication and append additive names-2 capability even for supplied identities. Agent writes the same edges object/index with existing registry reads; known readers come from root boot configuration, snapshot from existing fold, no added GET/LIST or root authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Omit non-forward, non-platform-alias rows outside local served pools from home publication; added Host/Pool field reads and local configuration use, existing registry/store operations retained.;rev3=census-ruling-edge-page-cache-1;basis=prunes the manifest cache through the new atomic pointer (assets.manifests.Load().prune(...), nil-safe); nothing else changes; read sites unchanged (67); no read added;rev3=census-ruling-region-ha-held-build;basis=writes also when DrainPublishRequired, and reports the written drain state, its ha_drain mark (transaction and publication id) and generation to DrainSource (in-memory); the file gains ha_drained and ha_drain beside the existing draining; no read added. held-requests Task 4: sets the constant ha_take=1 on the box's own file when its in-memory capabilities include region-ha-1 (this build's edge answers take requests); not from config or any read; a report other edges read, not a root decision; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the agent as carlos: reads PLATFORM_APPS_DOMAIN from the environment once per pass (the variable domainsLoop already reads) and sets an additive dns_pointing mark on each published custom name through dnsPointingMark: true on a published alias (registry:Alias, already published only when its dns_status is pointing), and on a route with a hostname outside the apps domain whether its registry:DNSStatus is pointing (registry:Host, registry:DNSStatus on rows the pass already lists). No mark under the apps domain, on a wildcard row, or with no apps domain set. A report the issuer cert warm reads to leave a not-yet-pointing custom name out of its set, not a root decision; it publishes the same names as before. No record, /data, release or claim read added; no new registry query; F,J1 authority retained. One-off cost: the first pass after the upgrade writes once on a box homing a custom name.;rev3=census-ruling-held-floor-capability;basis=held floor capability (region HA §25.9, agent manager 8a3d302, 2026-11-10): sets the constant ha_handover=1 on the box's own edges file on every pass, whatever its capabilities (this build understands the held-requests headers and the drain acknowledgement); the group roll floor reads it. Not from config or any read; ha_take unchanged; a report other tools read, not a root decision; no read added; F,J1 authority retained. One-off cost: the first pass after the upgrade writes once per box.;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: fleetArmInputs now returns edge.ForwardOwners (this box's fleets table and its active links, registry LinkOwners, read only where tunnels are on), passed to edge.FleetArmVerdict as before, so the hub's eligible link-placed forward rows are published for backhaul like fleet rows; same listing and verdict, no read added in the unit;rev3=census-ruling-path-routes-across-boxes;basis=#186 spec 5.1: publishes route_account, route_app, path_front, path_target (registry.PathFront/PathTarget over the route row) on exact real route rows only (never a platform alias or a '*.' row); additive omitempty fields read from the registry route rows already loaded; adds reads of Route.Host and Route.App |
| New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| - new `internal/domains/certusable.go:UsablePerHostCert`: reads +file:Lstat, +file:Open, +file:ReadAll; written legacy, accepted-legacy, frozen |
| -- reads `internal/host/edgesfile.go:edgesFileWriteClaims`: +data-literal ×2, +registry:Account, +registry:Alias ×2; keeps authority, task F,J1 |
| +- new `internal/host/agent.go:edgeAcmeDir`: reads +data-literal ×2; written legacy, accepted-legacy, frozen |
| +- quiet `internal/host/agent.go:domainsTickConfig`: reads nothing now; retired while it reads nothing (or its row keeps no sites) |
| -Seal: `841361b89e20c3763149e8784cdebb037dcc4b828b24196a01d3e300ff319661` → `b5696bb882d8a58c05efb62574a7de96804e30fe78686d6ce54409167f9459f0`. |
| +Seal: `841361b89e20c3763149e8784cdebb037dcc4b828b24196a01d3e300ff319661` → `5115b6b1ed19c0acc648f068e17a291f8c2da0137c6c5f321f533713fbfb4d31`. |
| Overlay: `internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2.md b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2.md| new file mode 100644 |
| index 000000000..25375b87a |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2.md |
| @@ -0,0 +1,43 @@ |
| +R1 P1 — **Resolved:** remote, non-pointing aliases are refused before autocert’s cache load, order creation or renewal registration. |
| +R1 P2 — **Partly resolved:** certificate contents and removal are checked, but readiness can be checked against the wrong cache directory. |
| + |
| +No new P1 findings. |
| + |
| +1. **P2 — Publication ignores the configured certificate cache.** |
| + |
| + [edgesfile.go:863](/home/paulca/amadan.net/carlos/platform-alias-publish-precert-1293/internal/host/edgesfile.go:863) always derives `$CARLOS_DATA_DIR/acme`. The edge honors `-acme-cache`, and the domain sweep explicitly receives that override at [agent.go:4571](/home/paulca/amadan.net/carlos/platform-alias-publish-precert-1293/internal/host/agent.go:4571). |
| + |
| + **Failure scenario:** a usable pre-issued certificate exists only in the configured cache. Publication still withholds its alias, preserving the original post-switch delay. Conversely, a valid certificate left in the default directory can pass readiness even when neither the active cache nor mirror can serve it. |
| + |
| + **Fix:** pass the effective serving-cache directory to the writer. Test both a certificate present only in the configured directory and stale material present only in the default directory. |
| + |
| + **Fault family:** publication readiness must reflect the certificate material actually available for serving. |
| + |
| +2. **P2 — The issuer regression does not exercise the behavior it claims to prove.** |
| + |
| + [homemap_dnspointing_test.go:148](/home/paulca/amadan.net/carlos/platform-alias-publish-precert-1293/internal/edge/homemap_dnspointing_test.go:148) calls HostPolicy directly. It creates no ClientHello, autocert manager, certificate cache or ACME order counter. The adjacent relay test checks map lookup, without sending a request. |
| + |
| + **Failure scenario:** broken mirror fallback or TLS/backhaul wiring could leave these tests green while pre-issued aliases fail handshakes or requests. The requested RSA-only, cache-miss and renewal-registration regressions remain unverified. |
| + |
| + **Fix:** exercise the composed certificate path with cached ECDSA, RSA-only and missing-cache cases; assert zero orders and no autocert cache load for refused aliases. Add a remote-to-home request using the published false-marked alias and its pre-issued certificate. |
| + |
| + **Fault family:** tests must cover the issuance and serving boundary, beyond its policy predicate. |
| + |
| +No P3 findings. |
| + |
| +The readiness invariant has findings in both R1 and R2. Under stopping rule 2, the choices are an upfront refusal for unsupported cache configurations, cutting early publication, or enforcing one shared cache/readiness source with a guard test. I recommend the shared source. This round has no P1; do not reopen review after the P2 fixes, apart from the required census and newly changed security-behavior checks. |
| + |
| +Census verdicts for `69ec96c1057aa8ff9f393beb723cb4fb0404861b`: |
| + |
| +| Item | Verdict | Lines read and basis | |
| +|---|---|---| |
| +| `domains.UsablePerHostCert` | **APPROVE** | `certusable.go` 26–54; `claims.go` 970–979; `carlos-edge.service` 41–50. Hostname-constrained, bounded certificate parsing in the agent process; no added root execution or authority. Accept `legacy / accepted-legacy`. | |
| +| `edge.RunWithActivatorReady` | **APPROVE** | `edge.go` 5060–5165, especially 5156–5158. Log-field access changes; existing read sites and startup authority remain unchanged. | |
| +| `host.edgesFileWriteClaims` | **APPROVE** | `edgesfile.go` 646–919, 1010–1168; `agent.go` 1137–1156. Retains served-primary, refusal and ownership checks. Scoped certificate inspection affects publication, without granting root authority. Retains `authority / F,J1`. | |
| +| `internal/domains` envelope | **APPROVE** | `certusable.go` 1–55; `certusable_test.go` 1–26; reached hostname validator. No additional privileged operation. | |
| +| `internal/edge` envelope | **APPROVE** | `dns01scope.go` 1–49; `precert.go` 118–272; `certsync.go` 104–229; `homemap.go` 1031–1106, 1420–1438; startup and changed tests. Account-and-zone intersection remains; the new policy narrows issuance admission. | |
| +| `internal/host` envelope | **APPROVE** | Writer ranges above; `edgesfile_precert_test.go` 1–216; reached asset-policy and scheduling paths. Existing publication destination and authority checks remain. | |
| + |
| +`git diff --check` and changed-file formatting checks passed. Targeted tests could not start: Go attempted to update `go.mod`, which the read-only sandbox refused. No files were edited, no subagents were spawned, and no full suites ran. |
| + |
| +**READY AFTER FIXES** |
| \ No newline at end of file |
diff --git a/internal/edge/alias_prepoint_e2e_test.go b/internal/edge/alias_prepoint_e2e_test.go| new file mode 100644 |
| index 000000000..3e1b4e7a9 |
| --- /dev/null |
| +++ b/internal/edge/alias_prepoint_e2e_test.go |
| @@ -0,0 +1,104 @@ |
| +package edge |
| + |
| +import ( |
| + "context" |
| + "crypto/tls" |
| + "net/http" |
| + "testing" |
| + |
| + "golang.org/x/crypto/acme" |
| + "golang.org/x/crypto/acme/autocert" |
| + |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/release" |
| +) |
| + |
| +// #1293, end to end: the home box publishes a pre-issued alias before its |
| +// DNS points here, marked dns_pointing false. A client whose DNS already |
| +// lands on ANOTHER edge gets the pre-issued certificate there and the home |
| +// app's answer through the backhaul, instead of 503 "Almost ready". |
| +func TestBackhaulE2ERelaysAnAliasNotPointingYet(t *testing.T) { |
| + const alias = "billing.prepoint.test" |
| + s := newBackhaulSceneWith(t, backhaulSceneExtra{ |
| + certs: []string{alias}, |
| + homeEntries: map[string]string{alias: `{"role":"home","alias":true,"target_host":"` + e2eHomedHost + `","dns_pointing":false}`}, |
| + }) |
| + // The home box serves the alias itself: its registry holds the row the |
| + // claim pass derives (whatever DNS says), so its edge maps the name. |
| + if err := s.a.reg.UpsertAlias(registry.RouteAlias{Alias: alias, Host: e2eHomedHost, Account: "acct", App: "app"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + s.a.restart(t) |
| + s.converge(t) |
| + |
| + if s.b.edge.Allowed(alias) { |
| + t.Fatal("test bug: the sending edge must not hold the alias itself") |
| + } |
| + resp, body := s.get(t, s.b, "https://"+alias+"/", nil, true) |
| + if resp.StatusCode != http.StatusOK { |
| + t.Fatalf("status = %d, want 200 through the home edge (body %q)", resp.StatusCode, body) |
| + } |
| + if got := resp.TLS.PeerCertificates[0]; !got.Equal(s.leaf[alias]) { |
| + t.Fatalf("the sending edge served %q, want the pre-issued certificate", got.Subject.CommonName) |
| + } |
| + if seen := e2eParseApp(t, body); seen.marker != e2eHomeMarker { |
| + t.Fatalf("marker = %q, want the home edge's app", seen.marker) |
| + } |
| +} |
| + |
| +// #1293 on the issuer, through the composed handshake chain (mirror over |
| +// autocert, as RunWithActivatorReady builds it): a remote alias published |
| +// only as not pointing is served from the mirror, and no hello (ECDSA, |
| +// RSA-only, or one for a name with no certificate at all) reaches the CA or |
| +// makes autocert load the entry. |
| +func TestIssuerServesButNeverOrdersAnAliasNotPointingYet(t *testing.T) { |
| + e2eQuietLogs(t) |
| + const alias, bare = "billing.prepoint.test", "bare.prepoint.test" |
| + store := release.NewDirStore(t.TempDir()) |
| + ca := newE2ECA(t) |
| + ca.publish(t, store, alias) |
| + putJSON(t, store, "control/edges/betty.json", `{"v":1,"box":"betty","eip":"2.2.2.2","hosts":{ |
| + "app.acct.apps.test":{"role":"home","platform":true}, |
| + "`+alias+`":{"role":"home","alias":true,"target_host":"app.acct.apps.test","dns_pointing":false}, |
| + "`+bare+`":{"role":"home","alias":true,"target_host":"app.acct.apps.test","dns_pointing":false}}}`) |
| + |
| + e := testIssuerEdge("mine.example.com") |
| + e.staticStore = store |
| + e.issuer = func() (context.Context, bool) { return context.Background(), true } |
| + homes := newHomeMap(store, "annie") |
| + refreshHomeMap(t, homes) |
| + e.homes.Store(homes) |
| + |
| + local := newCountingCache(t) |
| + mirror := newCertMirror(store, local) |
| + issuing := true |
| + mirror.gated = func() bool { return !issuing } |
| + if err := mirror.Refresh(context.Background()); err != nil { |
| + t.Fatal(err) |
| + } |
| + fake := newFakeACME(t) |
| + mgr := &autocert.Manager{Prompt: autocert.AcceptTOS, Cache: local, HostPolicy: e.issuerHostPolicy(), |
| + Client: &acme.Client{DirectoryURL: fake.directoryURL()}} |
| + chain := mirror.wrapGetCertificate(mgr.GetCertificate) |
| + |
| + before := local.count(alias) |
| + if c, err := chain(ecdsaHello(alias)); err != nil || c == nil || c.Leaf.VerifyHostname(alias) != nil { |
| + t.Fatalf("ECDSA hello for %s: cert %v, err %v; want the mirrored certificate", alias, c != nil, err) |
| + } |
| + rsaOnly := &tls.ClientHelloInfo{ServerName: alias, CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, |
| + SignatureSchemes: []tls.SignatureScheme{tls.PKCS1WithSHA256}} |
| + _, _ = chain(rsaOnly) |
| + if _, err := chain(ecdsaHello(bare)); err == nil { |
| + t.Fatalf("a name with no certificate anywhere completed a handshake") |
| + } |
| + if accounts, orders := fake.counts(); accounts+orders != 0 { |
| + t.Fatalf("the CA saw %d accounts and %d orders; a not-pointing alias must never reach it", accounts, orders) |
| + } |
| + // The mirror's last-resort local read may look; autocert's own load (the |
| + // one that arms a renewal timer) must not. autocert reads the entry under |
| + // the bare name before anything else, so any autocert load shows here as |
| + // more reads than the mirror's own fallback makes. |
| + if got := local.count(alias) - before; got > 0 { |
| + t.Fatalf("the local cache entry for %s was read %d time(s); the mirror's snapshot should have answered", alias, got) |
| + } |
| +} |
diff --git a/internal/host/agent.go b/internal/host/agent.go| index e9a823c91..b38bc772c 100644 |
| --- a/internal/host/agent.go |
| +++ b/internal/host/agent.go |
| @@ -1153,7 +1153,7 @@ func runAgent(args []string, buildClaims ClaimFactory) { |
| } |
| go retentionLoop(reg, collectBuildStates, boxJudge) |
| go registrySnapshotLoop(reg) |
| - go edgesFileLoop(reg, lifetimes, boxAssets) |
| + go edgesFileLoop(reg, lifetimes, boxAssets, edgeAcmeDir(os.Getenv, peekAcmeCache(args))) |
| // Region HA enrollment evidence (spec 1 §5.1): once, at start, and only |
| // with CARLOS_REGION_HA on. See boxrecord.go. |
| go boxRecordLoop() |
| @@ -4028,6 +4028,23 @@ func countExpiredCanaries(ctx context.Context, routes []registry.Route, store re |
| // the edge actually mints into when the operator moved it off the default. |
| // "" = flag not given; domainsTickConfig then derives the edge's own default |
| // ($CARLOS_DATA_DIR/acme). |
| +// edgeAcmeDir is the edge's certificate cache directory: the agent's |
| +// -acme-cache flag when given (the edge honours the same flag), otherwise |
| +// $CARLOS_DATA_DIR/acme ("/data" when unset), the edge's own default. The one |
| +// derivation for every agent reader of that cache: the domains sweep's |
| +// cert_expires_at stamp and the edges-file writer's pre-issued alias check |
| +// (#1293) must read the directory the edge actually serves from. |
| +func edgeAcmeDir(getenv func(string) string, acmeCacheFlag string) string { |
| + if acmeCacheFlag != "" { |
| + return acmeCacheFlag |
| + } |
| + dd := getenv("CARLOS_DATA_DIR") |
| + if dd == "" { |
| + dd = "/data" |
| + } |
| + return filepath.Join(dd, "acme") |
| +} |
| + |
| func peekAcmeCache(args []string) string { |
| fs := flag.NewFlagSet("agent", flag.ContinueOnError) |
| fs.SetOutput(io.Discard) |
| @@ -4083,16 +4100,12 @@ func domainsTickConfig(getenv func(string) string, publicIP string) (domains.Con |
| if len(ips) == 0 && publicIP != "" { |
| ips = []string{publicIP} |
| } |
| - dd := getenv("CARLOS_DATA_DIR") |
| - if dd == "" { |
| - dd = "/data" |
| - } |
| cfg := domains.Config{ |
| AppsDomain: domain, |
| // The same default the edge's -acme-cache flag carries |
| // (edge.RunWithActivator): $CARLOS_DATA_DIR/acme. domainsLoop |
| // overrides this when the flag was given explicitly. |
| - AcmeDir: filepath.Join(dd, "acme"), |
| + AcmeDir: edgeAcmeDir(getenv, ""), |
| Now: time.Now, |
| Resolve: resolveHost, |
| } |
| @@ -4568,9 +4581,7 @@ func domainsLoop(reg *registry.Registry, acmeCacheFlag string, hostClaim bool) { |
| log.Printf("agent: domains loop disabled: PLATFORM_APPS_DOMAIN is not set") |
| return |
| } |
| - if acmeCacheFlag != "" { |
| - cfg.AcmeDir = acmeCacheFlag |
| - } |
| + cfg.AcmeDir = edgeAcmeDir(os.Getenv, acmeCacheFlag) |
| store, err := openDeployStore(ctx) |
| if err != nil { |
| log.Printf("agent: domains loop disabled: %v", err) |
diff --git a/internal/host/edgesfile.go b/internal/host/edgesfile.go| index 23ddd00c0..0ab56dd44 100644 |
| --- a/internal/host/edgesfile.go |
| +++ b/internal/host/edgesfile.go |
| @@ -10,7 +10,6 @@ import ( |
| "math/rand/v2" |
| "net/netip" |
| "os" |
| - "path/filepath" |
| "slices" |
| "strings" |
| "sync" |
| @@ -320,6 +319,10 @@ func awakeCount(reg *registry.Registry) int { |
| // batch-wide if it ever reached here (plan review catch, 2026-08-23). |
| // edgesFileRegion resolves the real thing. |
| type edgesFile struct { |
| + // AcmeDir is the edge's certificate cache (edgeAcmeDir), where the |
| + // writer checks a pre-issued alias's certificate (#1293). Not published. |
| + // Empty: no alias is published before it points. |
| + AcmeDir string `json:"-"` |
| RoleSource edgesRoleSource `json:"-"` |
| RolePublishRequired bool `json:"-"` |
| BoxRole boxroles.Role `json:"box_role,omitempty"` |
| @@ -861,14 +864,9 @@ func edgesFileWriteClaims(ctx context.Context, s release.Store, reg *registry.Re |
| } |
| } |
| dns01 := edge.DNS01ScopeFromEnv(os.Getenv) |
| - // The edge's certificate cache: the same default its -acme-cache flag |
| - // and the domains sweep use ($CARLOS_DATA_DIR/acme). A box run with a |
| - // different flag finds nothing here and simply publishes no alias early. |
| - dataDir := os.Getenv("CARLOS_DATA_DIR") |
| - if dataDir == "" { |
| - dataDir = "/data" |
| - } |
| - acmeDir := filepath.Join(dataDir, "acme") |
| + // The edge's certificate cache, from the one derivation the domains |
| + // sweep also uses (edgeAcmeDir); empty publishes nothing early. |
| + acmeDir := ident.AcmeDir |
| now := time.Now() |
| for _, a := range aliases { |
| if a.Alias == "" || strings.HasPrefix(a.Alias, "*.") { |
| @@ -1312,7 +1310,7 @@ func edgesFileSecretsFP(getenv func(string) string) string { |
| // published at would advance by 20 minutes or more, or the authority clocks |
| // first became known). The policy is the edge's too: its settled snapshots, |
| // stored by this loop's passes, are what the box's own catch answers from. |
| -func edgesFileLoop(reg *registry.Registry, lifetimes bool, assets *assetPolicy) { |
| +func edgesFileLoop(reg *registry.Registry, lifetimes bool, assets *assetPolicy, acmeDir string) { |
| ctx := context.Background() |
| if shouldSkipPublisherElection(os.Getenv) { |
| log.Printf("agent: edges file loop is a platform-box job — skipped on a fleet box") |
| @@ -1337,6 +1335,7 @@ func edgesFileLoop(reg *registry.Registry, lifetimes bool, assets *assetPolicy) |
| // reconcile pass scopes by — the two vocabularies travel in one file so |
| // a reader can join them without a second source. |
| ident := edgesFile{ |
| + AcmeDir: acmeDir, |
| Box: box, |
| Region: region, |
| Placement: strings.TrimSpace(os.Getenv("CARLOS_REGION")), |
diff --git a/internal/host/edgesfile_precert_test.go b/internal/host/edgesfile_precert_test.go| index e64d4529d..219aa2f54 100644 |
| --- a/internal/host/edgesfile_precert_test.go |
| +++ b/internal/host/edgesfile_precert_test.go |
| @@ -67,9 +67,7 @@ func TestEdgesFilePublishesPreIssuedAliasesBeforeDNS(t *testing.T) { |
| if err := reg.Upsert(registry.Route{Host: "app.acct.apps.test", Kind: "service", Addr: "10.0.0.1:3000", Status: "ready", Platform: true}); err != nil { |
| t.Fatal(err) |
| } |
| - dataDir := t.TempDir() |
| - t.Setenv("CARLOS_DATA_DIR", dataDir) |
| - acme := filepath.Join(dataDir, "acme") |
| + acme := filepath.Join(t.TempDir(), "acme") |
| now := time.Now() |
| future, past := now.Add(80*24*time.Hour), now.Add(-time.Minute) |
| const ( |
| @@ -124,7 +122,7 @@ func TestEdgesFilePublishesPreIssuedAliasesBeforeDNS(t *testing.T) { |
| publish := func() map[string]hostView { |
| t.Helper() |
| var last []byte |
| - if err := edgesFilePass(context.Background(), s, reg, edgesFile{Box: "annie"}, "1.2.3.4", &last); err != nil { |
| + if err := edgesFilePass(context.Background(), s, reg, edgesFile{Box: "annie", AcmeDir: acme}, "1.2.3.4", &last); err != nil { |
| t.Fatal(err) |
| } |
| body, _, err := s.Get(context.Background(), "control/edges/annie.json") |
| @@ -190,11 +188,10 @@ func TestEdgesFilePreIssuedAliasMarkWithoutAppsDomain(t *testing.T) { |
| if err := reg.UpsertAlias(registry.RouteAlias{Alias: "billing.example.com", Host: "app.example.net", Account: "acct", App: "app"}); err != nil { |
| t.Fatal(err) |
| } |
| - dataDir := t.TempDir() |
| - t.Setenv("CARLOS_DATA_DIR", dataDir) |
| - writeCertEntry(t, filepath.Join(dataDir, "acme"), "billing.example.com", []string{"billing.example.com"}, time.Now().Add(80*24*time.Hour), true) |
| + acme := filepath.Join(t.TempDir(), "acme") |
| + writeCertEntry(t, acme, "billing.example.com", []string{"billing.example.com"}, time.Now().Add(80*24*time.Hour), true) |
| var last []byte |
| - if err := edgesFilePass(context.Background(), s, reg, edgesFile{Box: "annie"}, "1.2.3.4", &last); err != nil { |
| + if err := edgesFilePass(context.Background(), s, reg, edgesFile{Box: "annie", AcmeDir: acme}, "1.2.3.4", &last); err != nil { |
| t.Fatal(err) |
| } |
| body, _, err := s.Get(context.Background(), "control/edges/annie.json") |
| @@ -214,3 +211,67 @@ func TestEdgesFilePreIssuedAliasMarkWithoutAppsDomain(t *testing.T) { |
| t.Fatalf("billing.example.com = %+v (published %v); want an explicit dns_pointing false", h, ok) |
| } |
| } |
| + |
| +// The writer reads the cache the edge actually serves from: a certificate |
| +// only in the default directory does not count when the edge was given |
| +// another, and the one in the configured directory does (Astra R2 P2). |
| +func TestEdgesFilePreIssuedAliasReadsTheConfiguredCache(t *testing.T) { |
| + withheldAliasSaid = sync.Map{} |
| + t.Setenv("PLATFORM_APPS_DOMAIN", "apps.test") |
| + t.Setenv("CARLOS_DNS01_ZONES", "example.com") |
| + t.Setenv("CARLOS_DNS01_ACCOUNTS", "acct") |
| + dataDir := t.TempDir() |
| + t.Setenv("CARLOS_DATA_DIR", dataDir) |
| + configured := filepath.Join(t.TempDir(), "edge-cache") |
| + future := time.Now().Add(80 * 24 * time.Hour) |
| + writeCertEntry(t, filepath.Join(dataDir, "acme"), "stale.example.com", []string{"stale.example.com"}, future, true) |
| + writeCertEntry(t, configured, "billing.example.com", []string{"billing.example.com"}, future, true) |
| + |
| + s, reg := release.NewDirStore(t.TempDir()), edgesTestRegistry(t) |
| + if err := reg.Upsert(registry.Route{Host: "app.acct.apps.test", Kind: "service", Addr: "10.0.0.1:3000", Status: "ready", Platform: true}); err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, a := range []string{"billing.example.com", "stale.example.com"} { |
| + if err := reg.UpsertAlias(registry.RouteAlias{Alias: a, Host: "app.acct.apps.test", Account: "acct", App: "app", DNSStatus: "elsewhere"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + dir := edgeAcmeDir(os.Getenv, configured) |
| + if dir != configured { |
| + t.Fatalf("edgeAcmeDir with a flag = %q, want %q", dir, configured) |
| + } |
| + var last []byte |
| + if err := edgesFilePass(context.Background(), s, reg, edgesFile{Box: "annie", AcmeDir: dir}, "1.2.3.4", &last); err != nil { |
| + t.Fatal(err) |
| + } |
| + body, _, err := s.Get(context.Background(), "control/edges/annie.json") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + var f struct { |
| + Hosts map[string]json.RawMessage `json:"hosts"` |
| + } |
| + if err := json.Unmarshal(body, &f); err != nil { |
| + t.Fatal(err) |
| + } |
| + if _, ok := f.Hosts["billing.example.com"]; !ok { |
| + t.Error("billing.example.com: its certificate is in the configured cache, want it published") |
| + } |
| + if _, ok := f.Hosts["stale.example.com"]; ok { |
| + t.Error("stale.example.com: its certificate is only in the default directory the edge is not using") |
| + } |
| +} |
| + |
| +// One derivation of the edge's cache for every agent reader: the domains |
| +// sweep's default and the writer's must be the same directory. |
| +func TestEdgeAcmeDirIsTheSweepsDefault(t *testing.T) { |
| + env := map[string]string{"PLATFORM_APPS_DOMAIN": "apps.test", "CARLOS_DATA_DIR": "/srv/carlos"} |
| + getenv := func(k string) string { return env[k] } |
| + cfg, _, _ := domainsTickConfig(getenv, "") |
| + if want := edgeAcmeDir(getenv, ""); cfg.AcmeDir != want || want != "/srv/carlos/acme" { |
| + t.Fatalf("sweep AcmeDir %q, edgeAcmeDir %q; want both /srv/carlos/acme", cfg.AcmeDir, want) |
| + } |
| + if got := edgeAcmeDir(func(string) string { return "" }, ""); got != "/data/acme" { |
| + t.Fatalf("edgeAcmeDir default = %q, want /data/acme", got) |
| + } |
| +} |
diff --git a/internal/host/fleet_secrets_key_test.go b/internal/host/fleet_secrets_key_test.go| index adec34b66..c94478bd7 100644 |
| --- a/internal/host/fleet_secrets_key_test.go |
| +++ b/internal/host/fleet_secrets_key_test.go |
| @@ -306,7 +306,7 @@ func TestFleetBoxWritesNoEdgesFile(t *testing.T) { |
| done := make(chan struct{}) |
| go func() { |
| defer close(done) |
| - edgesFileLoop(nil, false, nil) |
| + edgesFileLoop(nil, false, nil, "") |
| }() |
| select { |
| case <-done: |
diff --git a/internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv b/internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv| index b54134170..51fa8c0e9 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv |
| @@ -1,11 +1,16 @@ |
| # Census overlay alias-publish-precert-1293, written by census-propose (#369). census-ruling-alias-publish-precert-1293, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md. |
| -# 1 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| -# 2 new dispositions: 1 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +# 2 body, 1 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 3 new dispositions: 0 reads re-frozen at their disposition with the claim, 2 new units frozen accepted-legacy, 1 quiet units retired while they read nothing, 0 other. |
| @legacy 68b6a36b116b67087a57c727659810163456a951e35ec4a36f3d671912136335 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.;rev3=census-ruling-alias-publish-precert-1293;basis=the edge process (carlos-edge.service, user carlos), not root: the pre-issuer start log now reads its zones from p.scope.Zones (the zones and accounts moved into the shared edge.DNS01Scope); no behaviour change, no read added, the existing 5 read sites unchanged. data-literal@129,data-literal@148,data-literal@284,data-literal@417,file:Open@1013 59e23002365aaecb99ac7b0f5719095ade566b0e5d4b965fa8671574fa6f1996 |
| @legacy 046f72ed4a9c6af5f13a820ddf815cda09320ac5a777f348d97b2568345f1dd8 internal/domains/certusable.go UsablePerHostCert legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-publish-precert-1293;basis=new: reads <acmeDir>/<host> for the box agent edges-file writer (#1293): host must pass validHostShape (lowercase DNS labels joined by dots, so exactly one file directly under acmeDir; empty, dot segments and separators refused), Lstat first and only a regular file under 64 KiB is opened (no symlink followed), read through a 64 KiB LimitReader, parsed only by tls.X509KeyPair and reduced to a boolean (key matches leaf, leaf names host, inside its validity). acmeDir is $CARLOS_DATA_DIR/acme from the operator environment, the edge cache root already reads in hostCertExpiry. Nothing executed, followed or written. file:Lstat@177,file:Open@289,file:ReadAll@365 2457e0a19f95249ab2ff4cc0b8cb0203a7c2e05b2eba56ad5f01c2918779d267 |
| +@legacy 2548f61289755c46e0f216176d53a8dbbfa8f8b42fad908ffb8f06444629e663 internal/host/agent.go edgeAcmeDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-publish-precert-1293;basis=new: the "/data" default and the "acme" join move here unchanged from domainsTickConfig (its two data literals); returns the -acme-cache flag when given, else $CARLOS_DATA_DIR (default /data) + /acme. A path computation from operator configuration; it reads nothing. data-literal@142,data-literal@183 c69fdf6215d9a5c40fdc190c5b7699e953f4f00bbc3163094503668a02f9ebf4 |
| 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.;rev3=census-ruling-alias-publish-precert-1293;basis=the edge process (carlos-edge.service, user carlos), not root: the pre-issuer start log now reads its zones from p.scope.Zones (the zones and accounts moved into the shared edge.DNS01Scope); no behaviour change, no read added, the existing 5 read sites unchanged. data-literal@129,data-literal@148,data-literal@284,data-literal@417,file:Open@1013 59e23002365aaecb99ac7b0f5719095ade566b0e5d4b965fa8671574fa6f1996 |
| +internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-stateless-replicas-4-task1;basis=Arms the fleet-only replica swap worker next to the placement worker: same console URL and fleet token as the existing replicaCoordinatorAPI, the existing activator Service; stops and joins at shutdown. No new read site, credential or bucket reader.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: sets deployWorker.step to the rollout scheduler answer for the record permit (replicaStepOf over armedRollout), an in-memory callback; no read site, credential or bucket reader added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: the swap worker step is armedReplicaStep, the same lazy scheduler lookup as before as a named function; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (01d6ca78, linked-deployments-slice1) starts linkLoop beside tunnelLoop; this branch keeps its replica coordinator wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 2: wires the swap worker's drive (armedReplicaDrive, the armed rollout manager's DriveReplicaRelease); no read added;rev3=census-ruling-stateless-replicas-4-merge-main2;basis=Merge of main af871da0 (v0.34.49): both sides changed it. Main (178dcfe5, member-backups-2a) moves the inline duty-view closure into armDutyView/dutyView and starts verifyAssignLoop; its sites drop by registry:Host and whole:Route x2 as main recorded them. This branch keeps its replica coordinator, swap worker and drive wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R24: makes one in-memory channel, closes it (once) inside the edge's existing shutdown-started callback after ingress.shutdownStarted, and passes it to tunnelLoop, which drains only a fleet channel name; no read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision;rev3=census-ruling-edge-ppv2;basis=Agent (uid carlos), not root. memwatchLoop now gets edgeProxyCounters(&demoEdge) (in-process counters, no read). The drain socket's driver is newAgentDrainSocket(ingress, e, os.Getenv), which attaches the edge trust handler only when CARLOS_INGRESS_PROXY_SOURCES in the agent's environment (from the root-owned host.env) parses to a non-empty list; the socket is served when drainSocketServed: a group member or a configured ingress drain (both as before), or a box armed for PROXY protocol (new). The socket's path and agent-user-only permissions are unchanged. Read sites unchanged (6).;rev3=census-ruling-same-box-edge-fence;basis=Agent (uid carlos), not root. One added line: armEdgeFenceStatus(ctl.EdgeFence), beside the existing armExecSandboxStatus, so the layout report can ask root's /ready for the edge fence state over the control socket client the agent already holds. No read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added.;rev3=census-ruling-fleet-drain-followups;basis=P3 (#1008 T9): one call after armChangeIndex, requestBootFullPass(v, &backstopFullDue), which stores true in the existing in-memory backstopFullDue flag only when no record view is armed, so the fast loop runs its existing full pass on its first tick instead of instancesLoop a minute later; armed boxes unchanged. No read added; read sites unchanged (8); agent, not root.;rev3=census-ruling-fleet-first-reconcile-speed;basis=Startup timing log lines only: runDuties builds a step logger (newStartupLog, which reads the in-memory agent start time) and logs one line after the wait on the activator startup latch and after each existing duty before go fastConvergeLoop. One newStartupLog().at line in the edge ready hook before go tunnelLoop. No read added; read sites unchanged (8). Agent, not root.;rev3=census-ruling-ha-1192;basis=sets the group drain driver's departed hook to armedPeerDeparted (the armed departure controller's PeerDeparted: local registry identity + departure journal); no new read;rev3=census-ruling-replica-wake-gap-r3;basis=Calls lease.SetContinuityDir(<data dir>/.continuity) beside the existing obligation store: the agent's own 0700 directory for clean records, outside every instance tree (#1290 round 3). No new read; failure is logged and every start then takes a full image.;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2: cfg.ReplicaRecord = replicaRecordFacts(boxLifetimes, cfg.Record): hands the existing judged record read (haRecordFacts over openDeployStore and boxJudge) as the live read on a lifetime index miss. No read site added here; agent, not root.;rev3=census-ruling-alias-publish-precert-1293;basis=starts edgesFileLoop with one more argument, edgeAcmeDir(os.Getenv, peekAcmeCache(args)): the agent's own -acme-cache flag (already parsed for domainsLoop) or $CARLOS_DATA_DIR/acme; a string computed from the operator's command line and environment, no read. Same 8 read sites. file:Exec@22002,file:Open@2191,file:Statfs@58453,registry:App@13299,registry:App@13677,whole:Route@13291,whole:Route@13669,whole:Route@51668 1a8ab6710ec49bfb31045fc06b89b0490d61823d2ba2db269929c76974de1c32 |
| internal/domains/certusable.go UsablePerHostCert legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-publish-precert-1293;basis=new: reads <acmeDir>/<host> for the box agent edges-file writer (#1293): host must pass validHostShape (lowercase DNS labels joined by dots, so exactly one file directly under acmeDir; empty, dot segments and separators refused), Lstat first and only a regular file under 64 KiB is opened (no symlink followed), read through a 64 KiB LimitReader, parsed only by tls.X509KeyPair and reduced to a boolean (key matches leaf, leaf names host, inside its validity). acmeDir is $CARLOS_DATA_DIR/acme from the operator environment, the edge cache root already reads in hostCertExpiry. Nothing executed, followed or written. file:Lstat@177,file:Open@289,file:ReadAll@365 2457e0a19f95249ab2ff4cc0b8cb0203a7c2e05b2eba56ad5f01c2918779d267 |
| -internal/host/edgesfile.go edgesFileWriteClaims authority F,J1 rev3=census-ruling-self-serve-moves-1;basis=root-route;kept=F;scope=protected-decision-only; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): region-ha-2a's body, which with the box's lifetimes switch on also publishes each served row's lifetime pair (registry:Incarnation and registry:ServingSeq, two new sites on the rows it already lists) and an alias's or served catch-all's primary's pair, and names that primary as target_host whatever the switch; a report the edge orders unstamped entries by, not a decision; no record, /data, release or claim read added; F,J1 authority retained; self-serve moves 1 Task 8;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 8: takes a localAddrs reader (instancectl.LocalAddresses in production, which reads /proc/net/fib_trie and /proc/net/if_inet6 in the agent) and publishes its non-loopback entries as the edges file's addrs before the write gate (boxAddrs, no read of its own), so an address change writes once. The same 44 sites, offsets moved; no record, /data, release or claim read added; a report the console's egress grant check reads, not a root decision; F,J1 authority retained.;rev3=census-ruling-edge-asset-cache-3;basis=starts with assets = assets.active(), so a policy whose box has not opened its asset store publishes no assets blocks and reads no manifests, and copies the decision's Primary (the route host the block was decided for, drift D4) into the published assets block; read sites unchanged (44); no read added. Merged onto main's #328 body, which takes the localAddrs reader: the assets.active() line sits after that signature and the loop passes pub and instancectl.LocalAddresses;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: the claims argument (*edgesClaims) becomes addrs (AddressSource) and the applyEdgesClaims(ctx, claims, routes, hosts) call is deleted with edgesclaims.go, which is the one whole:Route site removed: no host claim is read and every served row publishes as with region HA off; the box-address publication is the same code reading addrs.BoxAddresses() instead of claims.addrs; a report the edge reads, not a root decision; no read added; merge of origin/main d7ae1d76: main's edge asset cache plan 3 body is kept (census-ruling-edge-asset-cache-3): the first line is assets = assets.active(), so a policy whose store has not opened publishes no assets blocks and reads no manifests, and edgesFileLoop passes pub (assets.active() for that tick) in the assets argument; main's claims *edgesClaims argument is this branch's addrs AddressSource, and no edgesClaims, applyEdgesClaims or hostclaim reference remains;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: skips publishing a platform alias edge.PlatformAliasFold refuses (and so anything attached to it); reads the same route listing;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 and its fix rounds: publishes by FleetArmVerdict (via fleetRefusedFor): withheld rows left out; a forward host's path rows left out of its owner; no assets for forward rows; the alias loop replays Reload's alias fold from the served rows so a chained alias carries its root primary's owner; certRefused and parentRefused leave out a refused claim's wildcard parent (+registry:Alias x5, +registry:Host x4, +whole:Route, +whole:RouteAlias x2, +whole:RoutePath x7, +whole:WildcardDomain). Rows already read in the pass; keeps authority F,J1; publishes less, never more.;rev3=census-ruling-probe-burst-limit;basis=sets the constant BurstNotices=true on the box's own edges file (this build's edge answers probe-burst notices, so peers may send them); not from config or any read; the same 65 sites; a report other edges read, not a root decision; F,J1 authority retained; no new root read or write kind;rev3=census-ruling-region-ha-p3a;basis=Publish one injected role snapshot with box_role/admitted/drained; retain legacy route and alias rows during booting, cutting namespace withdrawal under the 2026-11-04 ruling; acknowledge the exact published tuple only after PUT; existing registry reads unchanged.;rev3=census-ruling-region-ha-p2b;basis=region HA P2b-1 T0 (Q1 ruling): before building the comparison copy and the body, a nil NamedPools on the identity becomes []string{} so the additive named_pools field is always an explicit array; the list itself is computed once at arm by edgesFileEligibility from the same provisionTickConfig(os.Getenv) parse as serves_shared_pool (CARLOS_POOLS through provision.ParseBoxPools, filtered to nonempty provision.ValidPool names, sorted, unique). A report the console reads for create admission, not a root decision; no record, /data, release or claim read added; read sites unchanged (65); F,J1 authority retained. One-off cost: the first pass after the upgrade writes once per box (seeded gate null vs []).;rev3=census-ruling-region-ha-p3b;basis=Require cached GroupReadersReady before first group publication and append additive names-2 capability even for supplied identities. Agent writes the same edges object/index with existing registry reads; known readers come from root boot configuration, snapshot from existing fold, no added GET/LIST or root authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Omit non-forward, non-platform-alias rows outside local served pools from home publication; added Host/Pool field reads and local configuration use, existing registry/store operations retained.;rev3=census-ruling-edge-page-cache-1;basis=prunes the manifest cache through the new atomic pointer (assets.manifests.Load().prune(...), nil-safe); nothing else changes; read sites unchanged (67); no read added;rev3=census-ruling-region-ha-held-build;basis=writes also when DrainPublishRequired, and reports the written drain state, its ha_drain mark (transaction and publication id) and generation to DrainSource (in-memory); the file gains ha_drained and ha_drain beside the existing draining; no read added. held-requests Task 4: sets the constant ha_take=1 on the box's own file when its in-memory capabilities include region-ha-1 (this build's edge answers take requests); not from config or any read; a report other edges read, not a root decision; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the agent as carlos: reads PLATFORM_APPS_DOMAIN from the environment once per pass (the variable domainsLoop already reads) and sets an additive dns_pointing mark on each published custom name through dnsPointingMark: true on a published alias (registry:Alias, already published only when its dns_status is pointing), and on a route with a hostname outside the apps domain whether its registry:DNSStatus is pointing (registry:Host, registry:DNSStatus on rows the pass already lists). No mark under the apps domain, on a wildcard row, or with no apps domain set. A report the issuer cert warm reads to leave a not-yet-pointing custom name out of its set, not a root decision; it publishes the same names as before. No record, /data, release or claim read added; no new registry query; F,J1 authority retained. One-off cost: the first pass after the upgrade writes once on a box homing a custom name.;rev3=census-ruling-held-floor-capability;basis=held floor capability (region HA §25.9, agent manager 8a3d302, 2026-11-10): sets the constant ha_handover=1 on the box's own edges file on every pass, whatever its capabilities (this build understands the held-requests headers and the drain acknowledgement); the group roll floor reads it. Not from config or any read; ha_take unchanged; a report other tools read, not a root decision; no read added; F,J1 authority retained. One-off cost: the first pass after the upgrade writes once per box.;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: fleetArmInputs now returns edge.ForwardOwners (this box's fleets table and its active links, registry LinkOwners, read only where tunnels are on), passed to edge.FleetArmVerdict as before, so the hub's eligible link-placed forward rows are published for backhaul like fleet rows; same listing and verdict, no read added in the unit;rev3=census-ruling-path-routes-across-boxes;basis=#186 spec 5.1: publishes route_account, route_app, path_front, path_target (registry.PathFront/PathTarget over the route row) on exact real route rows only (never a platform alias or a '*.' row); additive omitempty fields read from the registry route rows already loaded; adds reads of Route.Host and Route.App;rev3=census-ruling-alias-publish-precert-1293;basis=the box agent (root) writing its own control/edges/<box>.json: an alias not yet stamped pointing is also published (marked dns_pointing false) when edge.DNS01Scope allows its name and account and domains.UsablePerHostCert finds a usable per-host certificate for it. New inputs: CARLOS_DNS01_ZONES, CARLOS_DNS01_ACCOUNTS and CARLOS_DATA_DIR from the agent environment (root-owned host.env, operator-only). New read, via domains.UsablePerHostCert: <CARLOS_DATA_DIR>/acme/<alias> for an alias inside the operator scope only, where the name must pass validHostShape (lowercase DNS labels, so one file directly under acme/, no separators or dot segments); Lstat first and only a regular file under 64 KiB is opened (a symlink is not followed); the bytes are only parsed by tls.X509KeyPair and reduced to a boolean, never executed, followed or written. That directory is the edge cache (written by carlos-edge, user carlos) the agent already reads as root in domains hostCertExpiry; same read sites otherwise. data-literal@11160,data-literal@11211,registry:Account@11545,registry:Account@18709,registry:Alias@10737,registry:Alias@10756,registry:Alias@10855,registry:Alias@11318,registry:Alias@11353,registry:Alias@11415,registry:Alias@11536,registry:Alias@11594,registry:Alias@11936,registry:Alias@12093,registry:Alias@12163,registry:Alias@12195,registry:Alias@13099,registry:Alias@13190,registry:Alias@16182,registry:Alias@16232,registry:App@18721,registry:App@6228,registry:DNSStatus@11469,registry:DNSStatus@12102,registry:DNSStatus@5744,registry:Host@10782,registry:Host@10830,registry:Host@16085,registry:Host@16105,registry:Host@16370,registry:Host@16450,registry:Host@16485,registry:Host@16534,registry:Host@16996,registry:Host@17031,registry:Host@18139,registry:Host@4189,registry:Host@4292,registry:Host@4338,registry:Host@4397,registry:Host@5736,registry:Host@6155,registry:Host@6323,registry:Host@7293,registry:Incarnation@5943,registry:Platform@5251,registry:Pool@4252,registry:Provisioned@5265,registry:Replica@5289,registry:ServingSeq@5958,registry:Status@2953,whole:Route@1026,whole:Route@1839,whole:Route@20179,whole:Route@21004,whole:Route@21179,whole:Route@2323,whole:Route@6224,whole:Route@6284,whole:Route@6308,whole:Route@7378,whole:Route@750,whole:RouteAlias@10620,whole:RouteAlias@10702,whole:RouteAlias@11303,whole:RouteAlias@16136,whole:RouteAlias@20201,whole:RouteAlias@21194,whole:RoutePath@20194,whole:RoutePath@21187,whole:RoutePath@7162,whole:RoutePath@7194,whole:RoutePath@7241,whole:RoutePath@7269,whole:RoutePath@7307,whole:RoutePath@7327,whole:RoutePath@7339,whole:RoutePath@7393,whole:WildcardDomain@16063,whole:WildcardDomain@16439 b1db1df3e1a6b7f081a62420c848459af2c6d62d0d6c9513b6a993119fb48cc9 |
| +internal/host/agent.go edgeAcmeDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-publish-precert-1293;basis=new: the "/data" default and the "acme" join move here unchanged from domainsTickConfig (its two data literals); returns the -acme-cache flag when given, else $CARLOS_DATA_DIR (default /data) + /acme. A path computation from operator configuration; it reads nothing. data-literal@142,data-literal@183 c69fdf6215d9a5c40fdc190c5b7699e953f4f00bbc3163094503668a02f9ebf4 |
| +internal/host/edgesfile.go edgesFileWriteClaims authority F,J1 rev3=census-ruling-self-serve-moves-1;basis=root-route;kept=F;scope=protected-decision-only; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): region-ha-2a's body, which with the box's lifetimes switch on also publishes each served row's lifetime pair (registry:Incarnation and registry:ServingSeq, two new sites on the rows it already lists) and an alias's or served catch-all's primary's pair, and names that primary as target_host whatever the switch; a report the edge orders unstamped entries by, not a decision; no record, /data, release or claim read added; F,J1 authority retained; self-serve moves 1 Task 8;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 8: takes a localAddrs reader (instancectl.LocalAddresses in production, which reads /proc/net/fib_trie and /proc/net/if_inet6 in the agent) and publishes its non-loopback entries as the edges file's addrs before the write gate (boxAddrs, no read of its own), so an address change writes once. The same 44 sites, offsets moved; no record, /data, release or claim read added; a report the console's egress grant check reads, not a root decision; F,J1 authority retained.;rev3=census-ruling-edge-asset-cache-3;basis=starts with assets = assets.active(), so a policy whose box has not opened its asset store publishes no assets blocks and reads no manifests, and copies the decision's Primary (the route host the block was decided for, drift D4) into the published assets block; read sites unchanged (44); no read added. Merged onto main's #328 body, which takes the localAddrs reader: the assets.active() line sits after that signature and the loop passes pub and instancectl.LocalAddresses;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: the claims argument (*edgesClaims) becomes addrs (AddressSource) and the applyEdgesClaims(ctx, claims, routes, hosts) call is deleted with edgesclaims.go, which is the one whole:Route site removed: no host claim is read and every served row publishes as with region HA off; the box-address publication is the same code reading addrs.BoxAddresses() instead of claims.addrs; a report the edge reads, not a root decision; no read added; merge of origin/main d7ae1d76: main's edge asset cache plan 3 body is kept (census-ruling-edge-asset-cache-3): the first line is assets = assets.active(), so a policy whose store has not opened publishes no assets blocks and reads no manifests, and edgesFileLoop passes pub (assets.active() for that tick) in the assets argument; main's claims *edgesClaims argument is this branch's addrs AddressSource, and no edgesClaims, applyEdgesClaims or hostclaim reference remains;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: skips publishing a platform alias edge.PlatformAliasFold refuses (and so anything attached to it); reads the same route listing;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 and its fix rounds: publishes by FleetArmVerdict (via fleetRefusedFor): withheld rows left out; a forward host's path rows left out of its owner; no assets for forward rows; the alias loop replays Reload's alias fold from the served rows so a chained alias carries its root primary's owner; certRefused and parentRefused leave out a refused claim's wildcard parent (+registry:Alias x5, +registry:Host x4, +whole:Route, +whole:RouteAlias x2, +whole:RoutePath x7, +whole:WildcardDomain). Rows already read in the pass; keeps authority F,J1; publishes less, never more.;rev3=census-ruling-probe-burst-limit;basis=sets the constant BurstNotices=true on the box's own edges file (this build's edge answers probe-burst notices, so peers may send them); not from config or any read; the same 65 sites; a report other edges read, not a root decision; F,J1 authority retained; no new root read or write kind;rev3=census-ruling-region-ha-p3a;basis=Publish one injected role snapshot with box_role/admitted/drained; retain legacy route and alias rows during booting, cutting namespace withdrawal under the 2026-11-04 ruling; acknowledge the exact published tuple only after PUT; existing registry reads unchanged.;rev3=census-ruling-region-ha-p2b;basis=region HA P2b-1 T0 (Q1 ruling): before building the comparison copy and the body, a nil NamedPools on the identity becomes []string{} so the additive named_pools field is always an explicit array; the list itself is computed once at arm by edgesFileEligibility from the same provisionTickConfig(os.Getenv) parse as serves_shared_pool (CARLOS_POOLS through provision.ParseBoxPools, filtered to nonempty provision.ValidPool names, sorted, unique). A report the console reads for create admission, not a root decision; no record, /data, release or claim read added; read sites unchanged (65); F,J1 authority retained. One-off cost: the first pass after the upgrade writes once per box (seeded gate null vs []).;rev3=census-ruling-region-ha-p3b;basis=Require cached GroupReadersReady before first group publication and append additive names-2 capability even for supplied identities. Agent writes the same edges object/index with existing registry reads; known readers come from root boot configuration, snapshot from existing fold, no added GET/LIST or root authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Omit non-forward, non-platform-alias rows outside local served pools from home publication; added Host/Pool field reads and local configuration use, existing registry/store operations retained.;rev3=census-ruling-edge-page-cache-1;basis=prunes the manifest cache through the new atomic pointer (assets.manifests.Load().prune(...), nil-safe); nothing else changes; read sites unchanged (67); no read added;rev3=census-ruling-region-ha-held-build;basis=writes also when DrainPublishRequired, and reports the written drain state, its ha_drain mark (transaction and publication id) and generation to DrainSource (in-memory); the file gains ha_drained and ha_drain beside the existing draining; no read added. held-requests Task 4: sets the constant ha_take=1 on the box's own file when its in-memory capabilities include region-ha-1 (this build's edge answers take requests); not from config or any read; a report other edges read, not a root decision; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the agent as carlos: reads PLATFORM_APPS_DOMAIN from the environment once per pass (the variable domainsLoop already reads) and sets an additive dns_pointing mark on each published custom name through dnsPointingMark: true on a published alias (registry:Alias, already published only when its dns_status is pointing), and on a route with a hostname outside the apps domain whether its registry:DNSStatus is pointing (registry:Host, registry:DNSStatus on rows the pass already lists). No mark under the apps domain, on a wildcard row, or with no apps domain set. A report the issuer cert warm reads to leave a not-yet-pointing custom name out of its set, not a root decision; it publishes the same names as before. No record, /data, release or claim read added; no new registry query; F,J1 authority retained. One-off cost: the first pass after the upgrade writes once on a box homing a custom name.;rev3=census-ruling-held-floor-capability;basis=held floor capability (region HA §25.9, agent manager 8a3d302, 2026-11-10): sets the constant ha_handover=1 on the box's own edges file on every pass, whatever its capabilities (this build understands the held-requests headers and the drain acknowledgement); the group roll floor reads it. Not from config or any read; ha_take unchanged; a report other tools read, not a root decision; no read added; F,J1 authority retained. One-off cost: the first pass after the upgrade writes once per box.;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: fleetArmInputs now returns edge.ForwardOwners (this box's fleets table and its active links, registry LinkOwners, read only where tunnels are on), passed to edge.FleetArmVerdict as before, so the hub's eligible link-placed forward rows are published for backhaul like fleet rows; same listing and verdict, no read added in the unit;rev3=census-ruling-path-routes-across-boxes;basis=#186 spec 5.1: publishes route_account, route_app, path_front, path_target (registry.PathFront/PathTarget over the route row) on exact real route rows only (never a platform alias or a '*.' row); additive omitempty fields read from the registry route rows already loaded; adds reads of Route.Host and Route.App;rev3=census-ruling-alias-publish-precert-1293;basis=the box agent (root) writing its own control/edges/<box>.json: an alias not yet stamped pointing is also published (marked dns_pointing false) when edge.DNS01Scope allows its name and account and domains.UsablePerHostCert finds a usable per-host certificate for it. New inputs: CARLOS_DNS01_ZONES and CARLOS_DNS01_ACCOUNTS from the agent environment (root-owned host.env, operator-only), and ident.AcmeDir, set once at arm by runAgent from edgeAcmeDir (the agent's own -acme-cache flag, else $CARLOS_DATA_DIR/acme, the same derivation the domains sweep uses); empty publishes nothing early. New read, via domains.UsablePerHostCert: <AcmeDir>/<alias> for an alias inside the operator scope only, where the name must pass validHostShape (lowercase DNS labels, so one file directly under acme/, no separators or dot segments); Lstat first and only a regular file under 64 KiB is opened (a symlink is not followed); the bytes are only parsed by tls.X509KeyPair and reduced to a boolean, never executed, followed or written. That directory is the edge cache (written by carlos-edge, user carlos) the agent already reads as root in domains hostCertExpiry; same read sites otherwise. registry:Account@11361,registry:Account@18525,registry:Alias@10737,registry:Alias@10756,registry:Alias@10855,registry:Alias@11134,registry:Alias@11169,registry:Alias@11231,registry:Alias@11352,registry:Alias@11410,registry:Alias@11752,registry:Alias@11909,registry:Alias@11979,registry:Alias@12011,registry:Alias@12915,registry:Alias@13006,registry:Alias@15998,registry:Alias@16048,registry:App@18537,registry:App@6228,registry:DNSStatus@11285,registry:DNSStatus@11918,registry:DNSStatus@5744,registry:Host@10782,registry:Host@10830,registry:Host@15901,registry:Host@15921,registry:Host@16186,registry:Host@16266,registry:Host@16301,registry:Host@16350,registry:Host@16812,registry:Host@16847,registry:Host@17955,registry:Host@4189,registry:Host@4292,registry:Host@4338,registry:Host@4397,registry:Host@5736,registry:Host@6155,registry:Host@6323,registry:Host@7293,registry:Incarnation@5943,registry:Platform@5251,registry:Pool@4252,registry:Provisioned@5265,registry:Replica@5289,registry:ServingSeq@5958,registry:Status@2953,whole:Route@1026,whole:Route@1839,whole:Route@19995,whole:Route@20820,whole:Route@20995,whole:Route@2323,whole:Route@6224,whole:Route@6284,whole:Route@6308,whole:Route@7378,whole:Route@750,whole:RouteAlias@10620,whole:RouteAlias@10702,whole:RouteAlias@11119,whole:RouteAlias@15952,whole:RouteAlias@20017,whole:RouteAlias@21010,whole:RoutePath@20010,whole:RoutePath@21003,whole:RoutePath@7162,whole:RoutePath@7194,whole:RoutePath@7241,whole:RoutePath@7269,whole:RoutePath@7307,whole:RoutePath@7327,whole:RoutePath@7339,whole:RoutePath@7393,whole:WildcardDomain@15879,whole:WildcardDomain@16255 b0273836ab317d59baed4021281a6dee9e596e83437f8fb86a57b05017e2a9ac |
| +@remove internal/host/agent.go domainsTickConfig |
| +@removed internal/host/agent.go domainsTickConfig H3 census-ruling-alias-publish-precert-1293;basis=its AcmeDir default now comes from edgeAcmeDir(getenv, "") instead of the inline /data + acme join: the same value (pinned by TestEdgeAcmeDirIsTheSweepsDefault); its two data literals moved to edgeAcmeDir, so it reads nothing now. |
| @coverage internal/domains de77b6ec665cd5bbc0a4e42fbb57b0b0116b116648bf7c52939c93587007d720 |
| @coverage internal/edge 08ea555047a9b3cdb042cf2d34a463e64f8fbbb5d22cf31f7137a7024f04b64a |
| -@coverage internal/host 8578454a53ffbd06d1d07025b17c9969b9e2a8478fa82a60ad06f3a7fe495cce |
| +@coverage internal/host 58f7d962983162a0defbed94f14d8658e81c01bc006659adb42ebdb37420ff07 |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 2b18ec88e..2c03b270f 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -284,4 +284,4 @@ plan14-root-reads-egress-allow-cidr-console.tsv 9fb6041c2fe2f33edf7cc2a0fb6dc050 |
| plan14-root-reads-ha-departure-evidence.tsv 924ffc4037d32d7b46af1e373bad1476fc7305833fc6c06d50d5c8c3ab5ac177 |
| plan14-root-reads-stateless-scale-2-fleet-sizes.tsv 00fe607a04674579005013fae1e275cb0434ce54493b1efbe678aed59a12366b |
| plan14-root-reads-store-versioning.tsv 841361b89e20c3763149e8784cdebb037dcc4b828b24196a01d3e300ff319661 |
| -plan14-root-reads-alias-publish-precert-1293.tsv b5696bb882d8a58c05efb62574a7de96804e30fe78686d6ce54409167f9459f0 |
| +plan14-root-reads-alias-publish-precert-1293.tsv 5115b6b1ed19c0acc648f068e17a291f8c2da0137c6c5f321f533713fbfb4d31 |