census: edge-held streams proposal (#432)
Human
Prompt
prepare the root-read census proposal for edge-held streams.
From this commit's own message. The prompt ledger has no entries for it — which is what a squashed, rebased or amended commit looks like, and what every commit looks like in a repo without a ledger.
Summary
CLAIMS file for every card unit and re-pinned envelope, the overlay, the chain line and the proposal card census-propose wrote.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+173
−0
docs/superpowers/notes/census-edge-held-streams-claims.md+36 −0docs/superpowers/notes/census-proposal-edge-held-streams.md+70 −0internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-edge-held-streams.tsv+66 −0
CI failed — run details
diff --git a/docs/superpowers/notes/census-edge-held-streams-claims.md b/docs/superpowers/notes/census-edge-held-streams-claims.md| new file mode 100644 |
| index 000000000..cbff3b18a |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-edge-held-streams-claims.md |
| @@ -0,0 +1,36 @@ |
| +# CLAIMS for the root-read census, branch edge-held-streams-432 (edge-held event streams, #432). |
| +# Format (AGENTS.md "The census"): <file>:<unit><TAB><what changed>. Lines starting with # are ignored. |
| +# Envelopes re-pinned without a unit row: internal/activator (new heldlegs.go: held-leg admission, registration and cancellation in memory under a.mu, the wake-hook callback; hacache.go: holderCache.peek, an in-memory lookup under the cache's own mutex; test files only otherwise), internal/edge (new heldstream.go: the held-stream set, task, per-leg proxy run and in-memory counters; sse.go: a size-bounded SSE block reader over a pipe; heldleg.go: the HeldLeg interface; homemap.go: ArmHomeMap, lifted from RunWithActivatorReady; assetcatch.go: three markedRequest early returns that pass a marked request on; usagemeter.go: Unwrap on the counting writer; test files), internal/host (new activator_seam.go: a compile-time assertion that *activator.Service implements edge.Activator; test files), internal/status (snapshot.go: the HeldStreams type and json field held_streams, additive; snapshot_test.go). |
| +# Counters are in memory and published in the status snapshot; held legs are admitted in memory under a.mu with no bucket, registry or S3 read on the hold path. |
| +internal/activator/activator.go:Service.finishStop the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) under a.mu just before the entry is deleted; it only calls the legs' context cancel functions. No read added, none removed. |
| +internal/activator/activator.go:Service.installProcLocked the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): when the installed generation number differs from the current one, calls a.cancelHeldLegsLocked(e, e.gen.N) under a.mu before the switch, cancelling only the legs admitted on the generation that stops being current. Cancel funcs only; no read added. |
| +internal/activator/activator.go:Service.wake the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) on the failed-wake path before the entry is deleted, and after close(e.ready) on success calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback, outside a.mu. No read added. |
| +internal/activator/activator.go:type Service the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds the heldLegs map to actEntry (legs by id, under a.mu) and heldWakeHook (atomic pointer to a callback) and heldLegSeq (atomic counter) to Service. State only, in memory; no read of tenant, app or box-agent-writable input. |
| +internal/activator/activator.go:Service.BeginSidecarRequest the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the admission loop moves out unchanged in its decisions into admitPassThrough (heldlegs.go) and the body now calls a.admitPassThrough(ctx, rt, nil). The reads it had are now reached through admitPassThrough: the in-memory entry, fence and state checks under a.mu; no registry, bucket or S3 read, and none added. |
| +internal/activator/claimwake.go:Service.startAdmitted the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the one call p.bindProducer(producer) becomes a.bindClaimProducer(e, p, producer), which adds a pre-stop step (refuseHeldLegsOn: under a.mu mark the process as taking no held leg and cancel its entry's legs) before the producer cleanup's first Stop. Cancel funcs and an atomic flag only; no read added. |
| +internal/activator/maintenance.go:Service.LiftFence the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): releases a.mu explicitly instead of by defer, and after a successful lift calls a.noteHeldAdmissible(host), the non-blocking held wake callback, outside a.mu. Decision and state unchanged; no read added. |
| +internal/activator/maintenance.go:Service.LiftFenceAs the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): releases a.mu explicitly instead of by defer, and after a successful lift calls a.noteHeldAdmissible(host), the non-blocking held wake callback, outside a.mu. Decision and state unchanged; no read added. |
| +internal/activator/recoveryprobe.go:Service.finishRecoveryProbe the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) under a.mu before the entry is deleted on the stop path. Cancel funcs only; no read added. |
| +internal/activator/recoveryprobe.go:Service.reviewRecoveryHold the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a released flag, set where the probe hold is released, and a defer that runs after a.mu is unlocked and calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback. The registry read it already did is unchanged; no read added. |
| +internal/activator/seed_exclusion.go:SeedExclusion.Release the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): releases a.mu explicitly instead of by defer, and after a successful release calls a.noteHeldAdmissible(t.host), the non-blocking held wake callback, outside a.mu. No read added. |
| +internal/activator/swaphold.go:Service.holdWakeLocked the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(next, 0) on the pinCheck failure path before the just-installed entry is deleted. Cancel funcs only; no read added. |
| +internal/activator/haforward.go:Service.ForwardTarget the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): becomes a thin wrapper: it calls a.forwardTarget(ctx, rt, snapshot, false) and returns the decision. The holder-lock read (holders.resolve with the read closure) and the HA/Host reads it had are now made in forwardTarget, holderReadFor and decideForward with the same arguments, in the same order; the read set is moved, not widened. |
| +internal/activator/haforward.go:Service.ForwardTargetFromMemory the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the HA holder decision for a marked held-stream request from memory only. It calls forwardTarget with memoryOnly, which uses the holder cache's peek (an in-memory map under its own mutex) and answers ok=false on a miss instead of reading the lock. No bucket, registry or S3 read on this path; the route is the already-loaded Route, as in ForwardTarget. |
| +internal/activator/haforward.go:Service.forwardTarget the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: ForwardTarget's body with a memoryOnly flag. With false it does exactly what ForwardTarget did (resolve reads the holder lock through holderReadFor); with true it peeks the holder cache and never reads. Same reads as the old ForwardTarget body, moved here; none added for the memory-only path. |
| +internal/activator/haforward.go:Service.decideForward the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the second half of the old ForwardTarget body, moved unchanged: turns a holder resolution into the edge's ForwardDecision (the HA view and host reads it already made). Moved, not widened; no new read. |
| +internal/activator/haforward.go:Service.holderReadFor the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the read closure the old ForwardTarget passed to holders.resolve, moved unchanged (the detached, bounded read of the host's HA lock through the holder reader). Reached only from the non-memory path; the memory-only path never calls it. |
| +internal/activator/heldlegs.go:Service.AdmitHeldLeg the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: admits one upstream leg of an edge-held stream. Runs admitPassThrough with an onAdmit that, under a.mu, checks heldAdmissibleLocked and ctx.Err and registers the leg on the entry (registerHeldLegLocked). All in memory; no bucket, registry or S3 read, no wake, no activity stamp. The route is the caller's already-loaded Route. |
| +internal/activator/heldlegs.go:Service.admitPassThrough the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the admission loop moved from BeginSidecarRequest with its decisions unchanged (admit when passThroughAdmissibleLocked; join a waking entry; refuse fenced, probe-held, asleep, stopping; start the stop for a lost lease or dead child), plus an onAdmit callback run under a.mu. In-memory entry, fence and lease-serving checks only; the reads are the ones BeginSidecarRequest had, no read added. |
| +internal/edge/edge.go:Edge.holdsHost the edge in the agent (carlos-edge.service, user carlos): new; reports from the already-published upstream map (e.upstreams.Load) whether the host is a hibernating route this edge holds streams for. In-memory map lookup of a loaded Route; no registry or bucket read. |
| +internal/edge/edge.go:classifyHold the edge in the agent (carlos-edge.service, user carlos): new; classifies a request by the carlos_hold mark ServeHTTP recorded in the request context (never re-parsing the query) against the already-loaded upstream (up.hibernating, up.route.Hibernate, up.viaTunnel). Answers 400 for a marked non-stream request, or strips the marker from the query. No registry, bucket or file read; the only input is the visitor's request. |
| +internal/edge/edge.go:Edge.ServeHTTP the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added. |
| +internal/edge/edge.go:Edge.Reload the edge in the agent (carlos-edge.service, user carlos): after the new upstream map is published, closes the held streams of any host the new map no longer holds (absent, not hibernating, route no longer Hibernate). Reads the freshly built in-memory map m and the in-memory held set; no read added beyond the rebuild Reload already does. |
| +internal/edge/edge.go:RunWithActivatorReady 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. |
| +internal/edge/heldstream.go:Edge.serveHeld the edge in the agent (carlos-edge.service, user carlos): new; runs one held stream. Registers it in the in-memory held set, checks holdsHost against the published map, and runs the heldTask, which opens legs through the activator's AdmitHeldLeg and the route's own proxy. Reads only the request and in-memory state; no bucket, registry or file read of tenant-writable input. |
| +internal/edge/heldstream.go:heldTask.startAdmit the edge in the agent (carlos-edge.service, user carlos): new; starts a goroutine calling act.AdmitHeldLeg for the route (the held leg is admitted in memory under the activator's a.mu). No read added; the Route is the one already loaded. |
| +internal/edge/heldstream.go:readHeldLeg the edge in the agent (carlos-edge.service, user carlos): new; reads the leg's response from an in-memory io.Pipe (pr.Read, the +file:Read site), parsing SSE blocks with the size-bounded sseReader. The pipe is fed by the route's own proxy writing into it; not a file, socket or bucket read of its own. |
| +internal/edge/forwardha.go:Edge.frontForwardHA the edge in the agent (carlos-edge.service, user carlos): for a marked request to a hibernating HA route it uses the new HAForwarderFromMemory (ForwardTargetFromMemory) instead of ForwardTarget, so the hold path makes no holder-lock read; a non-stream marked request is left to this box's classification, and a holder not known from memory is answered with the one-retry event. The unmarked path is unchanged. Reads only the request mark and the already-loaded route and home map; no read added. |
| +internal/host/agent.go:runAgent 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. |
| +internal/host/agent.go:statusLoop the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's Probes gain HeldStreams: heldStreamsState(), which calls the edge's in-memory counters function (nil until the edge is ready). No file, bucket or registry access added. |
| +internal/status/snapshot.go:CollectBox copies Probes.HeldStreams into BoxMetrics.HeldStreams (json held_streams, omitempty, additive) and counts it in the condition that builds Metrics; the same 28 sites, no read added. |
| +internal/edge/assetcatch.go:Edge.serveAssetFar the edge in the agent (carlos-edge.service, user carlos): returns false at the top when markedRequest(r) is true, so a request that arrived with carlos_hold=1 is not treated as an asset request and goes on to the backhaul and the home edge classification. Reads the mark in the request context; no read added. |
diff --git a/docs/superpowers/notes/census-proposal-edge-held-streams.md b/docs/superpowers/notes/census-proposal-edge-held-streams.md| new file mode 100644 |
| index 000000000..62b5d91af |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-edge-held-streams.md |
| @@ -0,0 +1,70 @@ |
| +# Census approval: edge-held-streams |
| + |
| +Ruling `census-ruling-edge-held-streams`. The independent reviewer approves or rejects every change below, 14 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/activator/activator.go` `Service.finishStop` | body | unchanged (5) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) under a.mu just before the entry is deleted; it only calls the legs' context cancel functions. No read added, none removed. | |
| +| `internal/activator/activator.go` `Service.installProcLocked` | body | unchanged (1) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): when the installed generation number differs from the current one, calls a.cancelHeldLegsLocked(e, e.gen.N) under a.mu before the switch, cancelling only the legs admitted on the generation that stops being current. Cancel funcs only; no read added. | |
| +| `internal/activator/activator.go` `Service.wake` | body | unchanged (16) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) on the failed-wake path before the entry is deleted, and after close(e.ready) on success calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback, outside a.mu. No read added. | |
| +| `internal/activator/activator.go` `type Service` | body | unchanged (0) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds the heldLegs map to actEntry (legs by id, under a.mu) and heldWakeHook (atomic pointer to a callback) and heldLegSeq (atomic counter) to Service. State only, in memory; no read of tenant, app or box-agent-writable input. | |
| +| `internal/activator/claimwake.go` `Service.startAdmitted` | body | unchanged (10) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the one call p.bindProducer(producer) becomes a.bindClaimProducer(e, p, producer), which adds a pre-stop step (refuseHeldLegsOn: under a.mu mark the process as taking no held leg and cancel its entry's legs) before the producer cleanup's first Stop. Cancel funcs and an atomic flag only; no read added. | |
| +| `internal/activator/maintenance.go` `Service.LiftFence` | body | unchanged (0) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): releases a.mu explicitly instead of by defer, and after a successful lift calls a.noteHeldAdmissible(host), the non-blocking held wake callback, outside a.mu. Decision and state unchanged; no read added. | |
| +| `internal/activator/maintenance.go` `Service.LiftFenceAs` | body | unchanged (0) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): releases a.mu explicitly instead of by defer, and after a successful lift calls a.noteHeldAdmissible(host), the non-blocking held wake callback, outside a.mu. Decision and state unchanged; no read added. | |
| +| `internal/activator/recoveryprobe.go` `Service.finishRecoveryProbe` | body | unchanged (1) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) under a.mu before the entry is deleted on the stop path. Cancel funcs only; no read added. | |
| +| `internal/activator/recoveryprobe.go` `Service.reviewRecoveryHold` | body | unchanged (7) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a released flag, set where the probe hold is released, and a defer that runs after a.mu is unlocked and calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback. The registry read it already did is unchanged; no read added. | |
| +| `internal/activator/seed_exclusion.go` `SeedExclusion.Release` | body | unchanged (0) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): releases a.mu explicitly instead of by defer, and after a successful release calls a.noteHeldAdmissible(t.host), the non-blocking held wake callback, outside a.mu. No read added. | |
| +| `internal/activator/swaphold.go` `Service.holdWakeLocked` | body | unchanged (2) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(next, 0) on the pinCheck failure path before the just-installed entry is deleted. Cancel funcs only; no read added. | |
| +| `internal/edge/assetcatch.go` `Edge.serveAssetFar` | body | unchanged (7) | the edge in the agent (carlos-edge.service, user carlos): returns false at the top when markedRequest(r) is true, so a request that arrived with carlos_hold=1 is not treated as an asset request and goes on to the backhaul and the home edge classification. Reads the mark in the request context; no read added. | |
| +| `internal/edge/edge.go` `RunWithActivatorReady` | body | unchanged (5) | 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. | |
| +| `internal/host/agent.go` `runAgent` | body | unchanged (6) | 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. | |
| +| `internal/host/agent.go` `statusLoop` | body | unchanged (6) | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's Probes gain HeldStreams: heldStreamsState(), which calls the edge's in-memory counters function (nil until the edge is ready). No file, bucket or registry access added. | |
| +| `internal/status/snapshot.go` `CollectBox` | body | unchanged (28) | copies Probes.HeldStreams into BoxMetrics.HeldStreams (json held_streams, omitempty, additive) and counts it in the condition that builds Metrics; the same 28 sites, no read added. | |
| +| `internal/activator/haforward.go` `Service.ForwardTarget` | sites | -registry:HA, -registry:Host ×8, -whole:Route ×3 | the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): becomes a thin wrapper: it calls a.forwardTarget(ctx, rt, snapshot, false) and returns the decision. The holder-lock read (holders.resolve with the read closure) and the HA/Host reads it had are now made in forwardTarget, holderReadFor and decideForward with the same arguments, in the same order; the read set is moved, not widened. | |
| +| `internal/edge/edge.go` `Edge.ServeHTTP` | sites | +whole:Route | the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added. | |
| + |
| +Envelopes re-pinned: `internal/activator`, `internal/edge`, `internal/host`, `internal/status`. |
| + |
| +Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner. |
| + |
| +Recorded dispositions, which each change must still satisfy: |
| + |
| +- `internal/activator/activator.go` `Service.finishStop`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with a run's settle checked before replication closes, which keeps the stop pending until the run is proven stopped; read sites unchanged, offsets moved;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: an HA entry (its replica is an HA one, haEntryRep) now releases through releaseHAClean (a new unit on this card) instead of e.rep.Close; when that answers errHostSliceUnproven the stop is kept pending (keepPendingLocked) with the lease held and renewing, and the sweep finishes it once proven; a non-HA entry is unchanged; the same five sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: a forgotten entry's stop is noted for its resident (noteResidentStopLocked: crash or lost lease backs off, any other stop restarts on the next tick) and its ownerDone channel is closed; no read added;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: while the host has a release command's record (a.releaseOps[e.host], running or not proven stopped), replication and the lease stay and the stop is kept pending (keepPendingLocked) until the record's proof; the same five read sites, no read added; only holds a release back;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.20: while a rootfs worker may run or is a stray (rootfsWorkersLiveLocked, in-memory, read under a.mu), replication and the lease stay and the stop is kept pending (keepPendingLocked) until the workers are proven stopped; the same five read sites, no read added; only holds a release back;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1 (Astra P1): beside the worker check, under the same lock, a stop with a lease stop of its commands outstanding (e.leaseStops) is kept pending, the replica and lease held, and the sweep finishes it once they have returned; the entry is never released while a kill captured for it may still reach its unit; the same five read sites, no read added Task 9 (PF-3): the count is pendingLeaseStopsLocked(e), the sum of e.leaseStops over both one-shot roles (now a map per role, cmd and tty), so a session's lease stop of the tty unit keeps the stop pending, the replica and lease held, as a run's does; the same five read sites, no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Retain command, worker, release and cgroup proofs. For an actual stateless generation no replica needs closing; close local lifecycle ownership only once those proofs finish. |
| +- `internal/activator/activator.go` `Service.installProcLocked`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: the one place a process, its generation and the lease replica are installed on an entry; a resident is put under its lease watch (watchResidentLeaseLocked) at that moment; reads only the entry's route;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1, Astra R1 P1-1): the lease watch is installed for every rootfs row (e.route.Rootfs()), not only a resident, so a hibernating rootfs row's run or session is reached at the lease's loss; the same one read of the entry's route; installs nothing else;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Install the local lifecycle channel with the actual generation. The serving-lease watch remains separate and is skipped for stateless generations; command/worker/stop ownership remains local. |
| +- `internal/activator/activator.go` `Service.wake`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=logs that timer's breakdown to the journal after a successful wake (w.steps.String(), e.host, w.wakeTook); no read added;rev3=census-ruling-plans-4d-lapse;basis=cancels a wake whose row the turned-off hook names, like a fence, unless it is a move's active probe (plans 4d). One more whole-row read: the row handed to the hook (a.disabled). Only refuses.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: a refusal before the lease is reported once per change (noteRootfsRefusal) instead of a wake-failure event; the proc, generation and replica are installed through installProcLocked (which puts a resident under its lease watch before the fence); residency notes the outcome (noteResidentWakeLocked); same generation values;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R [pf R3.5]: the wake's context ceiling is wakeCeilingFor(e.route): the old 5 minutes for a binary row, 5 minutes plus runs.MaxTimeout for a rootfs row (room for a release inside the wake); new site +whole:Route (e.route to wakeCeilingFor, which reads Runtime only); no other change;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1): the wake's context is also cancelled before doWake when RetireExcept has marked the entry retired (e.retired, in memory under a.mu), as it is for a fence or a shutdown. Read sites unchanged (13). Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry successful hold preparation into its wake, preserve actual mode in the generation and OnWake projection, and project serving version/mode through the narrow registry writer before releasing wake waiters. Final review I1: SetServingMode only for non-worker successful wakes with a nonempty spawned version and either a stateless generation or a mode transition from the route. Ordinary stateful wakes leave rollout status and the wake critical path unchanged. |
| +- `internal/activator/activator.go` `type Service`: authority, task B,C,D,F,J4. Basis: rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): one field, Fleet (activator.FleetWake: the box's fleet state, not on a fleet by default, on a fleet with a known label and a record reader, or on a fleet with an invalid identity), set by the agent before Start and read only by routeCurrentUnderLease. No read in the declaration. Agent, not root.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1: one field, drainBudget (time.Duration), which New copies from residentDrainBudget and a rootfs entry's lease watch reads in its place, so a test's change of the package var never races a watch goroutine; declaration only, reads nothing; merge of origin/main 6f1f6ca6: main's one field, Fleet (activator.FleetWake), is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b3a;basis=Add bounded placement peer and diagnostic state and the over-capacity callback; no read in this declaration and no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Add coordinator, existing-record observation callback and per-host preparation locks; no read in the declaration. Task 3a: Add optional canonical storage-selection and durable deploy-ID callbacks; declaration only, no read or authority in these fields. |
| +- `internal/activator/claimwake.go` `Service.startAdmitted`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-ci-speed-activator;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=value-identical: the start backoff time.Second << attempt reads package var claimStartBackoff (1 s, changed only by tests) << attempt; the same 1, 2, 4, 8 s waits; read sites and offsets unchanged; no root decision |
| +- `internal/activator/maintenance.go` `Service.LiftFence`: authority, task B,C,D,F,J4. Basis: rev3=PROPOSED-seed; shared activator state and opaque owner token; waits existing request, scheduled-token and stop preparations before fencing; exact owner alone may resume or release |
| +- `internal/activator/maintenance.go` `Service.LiftFenceAs`: authority, task B,C,D,F,J4. Basis: rev3=PROPOSED-seed; shared activator state and opaque owner token; waits existing request, scheduled-token and stop preparations before fencing; exact owner alone may resume or release |
| +- `internal/activator/recoveryprobe.go` `Service.finishRecoveryProbe`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: installs the probed proc and generation through installProcLocked instead of assigning them inline; same values, no read added |
| +- `internal/activator/recoveryprobe.go` `Service.reviewRecoveryHold`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved |
| +- `internal/activator/seed_exclusion.go` `SeedExclusion.Release`: authority, task B,C,D,F,J4. Basis: rev3=PROPOSED-seed; shared activator state and opaque owner token; waits existing request, scheduled-token and stop preparations before fencing; exact owner alone may resume or release |
| +- `internal/activator/swaphold.go` `Service.holdWakeLocked`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked; no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Pass the successful attempt-local stateless preparation to the pinned wake only after the existing stop and ownership proofs. |
| +- `internal/edge/assetcatch.go` `Edge.serveAssetFar`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-edge-asset-cache-3;basis=in the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new (asset cache plan 3 Task 6): the far catch on a box with no route row for the host. It answers from this box's asset store, or fills over the backhaul from the home box under a signed fill assertion (carlos-asset-fill-v1) and stores only an acknowledged response. Its three sites are one synthetic row, registry.Route{Host, Account, App, Kind: instance}, built from the request host and the owner the home box's edges file publishes, passed to the usage meter and to the account throttle (planThrottleAdmit), so a far delivery is metered and throttled under the published owner (drift D8). No registry row is read; nothing local is dialled; no root decision. Since then: runs the hard and probe checks before the store is read, as ServeHTTP runs them (final review F1): edgeguard.Check, a pure in-memory matcher on r.URL.Path and RawQuery, through guardDecide, unless protection is off or the request came over a tunnel; a block is answered with the block page and metered under the synthetic row; a matched request is recorded through observeRecords(rt, false, r, ...) whenever this edge wrote the answer itself: a hit, the block page, a throttle refusal, or any answer written before a hop reached the home (a backhaul refusal, the no-key 503, a failed dial's 502; arrival is seen by an httptrace WroteHeaders hook on the request's context, a callback that reads nothing); a request a hop delivered to the home is judged and recorded there under the home's own mode, as for any backhauled request (fix waves 4 and 5: ordinary-backhaul parity); refusals and forwards write through the counting writer so the record carries the client's status; the one added site is that observeRecords pass of the same synthetic registry.Route{Host, Account, App, Kind: instance} (+whole:Route); no new kind of read;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: one call to observeRegional("asset-fill", host), a test hook that is a nil atomic pointer in production; no read added, no behaviour changed;rev3=census-ruling-console-protection-tab;basis=the far catch's defer now also calls observeGuardCount(rt, out) for the same synthetic registry.Route{Host, Account, App, Kind: instance} it already hands the meter and observeRecords (+whole:Route), under the same "this edge answered it" condition (billed, or a hop never reached the home), whether or not the guard matched; observeRecords still runs only on a match, as before. A count in memory only; no new kind of read; the guard check, block page and backhaul are unchanged.;rev3=census-ruling-probe-burst-limit;basis=the far catch's guard state is built for the same synthetic registry.Route{Host, Account, App, Kind: instance} (newGuardState(rt), for the owner's record-only switch), and its defer counts the request toward the probe-burst limit (noteBurst(rt, ...), in memory) when this edge answered it or the home acknowledged a fill; an httptrace WroteHeaders hook on an ordinary forward marks the request as the home's to count; the two added sites are that same synthetic route (+whole:Route x2); no new root read or write kind |
| +- `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 |
| +- `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. |
| +- `internal/host/agent.go` `statusLoop`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's context carries the box's lifetime judge; read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 953b9fda (its later changes, regional box names and self-serve moves plan 1 among them, under main's own census rulings), where the tick fills rootfs_ready and rootfs_blocked from armedRootfs.Load().probe, which each tick runs NestedOK's checks and asks the control socket's GET /ready/rootfs (never the store); the same four direct sites;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 11 and #329 plan 3 Task 7: takes root's GET /egress reader and fills p.Egress = egressStatusProbe(egressStatus, routes, provision.PolicyReadStates()) and p.SizeCommittedMiB = sizeCommittedMiB(armedSizeSource.Load(), routes); the two added whole:Route sites are the tick's own registry list handed to those two units (decision rows), which read root's control socket and the activator's memory; no store request added; the four existing sites unchanged, offsets moved.;rev3=census-ruling-fleet-alerts-1;basis=the agent (carlos-edge.service, user carlos): the status tick passes os.Geteuid() to alertDeliveryProbe, which fills AlertDelivery.EngineBeat/EngineBeatWhy from engineBeatArmed (the env value and the euid only, no file access, root refused before the path is looked at), and fills Probes.DiskFullETAHours from diskETAProbe(&processDiskTrend, now), a Theil-Sen fit over the metrics loop's in-memory ring of disk readings; the same six sites, no read added, no store request added |
| +- `internal/status/snapshot.go` `CollectBox`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;basis=copies Probes.RootfsReady and RootfsBlocked into BoxMetrics (private, like Layout); the same 28 sites, no read added;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 11 and #329 plan 3 Task 7: copies Probes.Egress and Probes.SizeCommittedMiB into BoxMetrics (private, like Layout) and counts them in the condition that builds Metrics; the same 28 sites, no read added.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3: comment only, the Hibernate count is left as is (display);rev3=census-ruling-regional-domains-447;basis=#447 Task 7: copies Probes.AliasesRead into BoxMetrics.AliasesRead (json aliases_read, omitempty) and counts it in the condition that builds Metrics; the same 28 sites, no read added;rev3=census-ruling-fleet-alerts-1;basis=copies Probes.DiskFullETAHours into BoxMetrics.DiskFullETAHours (json disk_full_eta_hours, omitempty; private, like Layout) and counts it in the condition that builds Metrics; the same 28 sites, no read added |
| +- `internal/activator/haforward.go` `Service.ForwardTarget`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): the agent's activator answers the edge with a holder box ref for an HA route not awake here, from its in-memory holder cache or one bounded (2 s) lock.json read through readHolderView; reads the route's HA flag and host from its own registry row; root never calls it;rev3=census-ruling-region-ha-dead-holder-backoff;basis=Returns edge.ForwardDecision (Ref, Refuse, Gen) from holderCache.resolve, in memory only: a suspect holder refuses; a positive entry forwards under its generation; a failed read that revalidates an expired suspect keeps it suspect and refuses. The round-1 cache connection gate is removed. The same single bounded (2 s) lock.json read through readHolderView on a miss; no new read and no new S3 request; root never calls it.;rev3=census-ruling-region-ha-p1b3a;basis=Retain immutable lock observations and evaluate the pure placement rule after all existing bypass and positive-holder/suspect checks. Fix round 1: decide and reserve under one peer mutex using only current serving candidates, and log the final Base/Refuse decision if attempt tagging loses a race. Reads in-memory route Host and the Route passed to the pure rule; same bounded lock read, no new store or filesystem operation and no acquire authority. |
| +- `internal/edge/edge.go` `Edge.ServeHTTP`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6).;rev3=census-ruling-console-protection-tab;basis=one more call in the observer defer, observeGuardCount(up.route, out), beside the observeRecords call that files the guard Match: it passes on the route row the defer already holds (+whole:Route) and the request outcome to the usage meter, which counts the check in memory. Called whether or not the request was unbilled, as observeRecords is. Nothing is opened, read or followed; no new kind of read; no check, refusal or serving decision changes.;rev3=census-ruling-probe-burst-limit;basis=answers a probe-burst notice POST (serveBurstNotice) ahead of every route for a non-door caller; builds the guard state for up.route and stamps its account and app (RouteAccount, App) for the cool-down's this-app/other-app label; for a catalogue match on a non-static or tunnelled route, offers the burst rule (in-memory limiter, burstDecide: 429 or a watch verdict, never a block for a fleet or forward row); the observer defer calls noteBurst(up.route, ...); the added sites are the route value already in hand (+registry:App, +whole:Route x5); no new root read or write kind |
| + |
| +New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| + |
| +- new `internal/activator/haforward.go:Service.ForwardTargetFromMemory`: reads +whole:Route; written legacy, accepted-legacy, frozen |
| +- new `internal/activator/haforward.go:Service.decideForward`: reads +registry:Host ×5, +whole:Route ×2; written legacy, accepted-legacy, frozen |
| +- new `internal/activator/haforward.go:Service.forwardTarget`: reads +registry:HA, +registry:Host ×3, +whole:Route ×3; written legacy, accepted-legacy, frozen |
| +- new `internal/activator/haforward.go:Service.holderReadFor`: reads +registry:Host, +whole:Route; written legacy, accepted-legacy, frozen |
| +- new `internal/activator/heldlegs.go:Service.AdmitHeldLeg`: reads +whole:Route; written legacy, accepted-legacy, frozen |
| +- new `internal/activator/heldlegs.go:Service.admitPassThrough`: reads +registry:Host ×2; written legacy, accepted-legacy, frozen |
| +- new `internal/edge/edge.go:Edge.holdsHost`: reads +registry:Hibernate, +whole:Route; written legacy, accepted-legacy, frozen |
| +- new `internal/edge/edge.go:classifyHold`: reads +registry:Hibernate, +whole:Route; written legacy, accepted-legacy, frozen |
| +- new `internal/edge/heldstream.go:Edge.serveHeld`: reads +registry:Host ×3, +whole:Route ×2; written legacy, accepted-legacy, frozen |
| +- new `internal/edge/heldstream.go:heldTask.startAdmit`: reads +whole:Route ×2; written legacy, accepted-legacy, frozen |
| +- new `internal/edge/heldstream.go:readHeldLeg`: reads +file:Read; written legacy, accepted-legacy, frozen |
| +- reads `internal/activator/activator.go:Service.BeginSidecarRequest`: -registry:Host ×2, +whole:Route; keeps legacy, task accepted-legacy |
| +- reads `internal/edge/edge.go:Edge.Reload`: +registry:Hibernate, +whole:Route; keeps legacy, task accepted-legacy |
| +- reads `internal/edge/forwardha.go:Edge.frontForwardHA`: +registry:Hibernate, +whole:Route ×2; keeps legacy, task accepted-legacy |
| + |
| +Seal: `8e7126042fef8cc99899a29e9e06c22763a24b6677110144035ec57fcc2de23e` → `aad3ae3e7576f3ae1c4a2cb99fa5c940c336d03e31519d5870541c3ccfa77db6`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-edge-held-streams.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index a387baaa0..33f5e2be8 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -59,3 +59,4 @@ plan14-root-reads-probe-burst-limit.tsv 5f805400717bad7726bd9d62744b8103a40eb5f5 |
| plan14-root-reads-region-ha-p1b3a.tsv 5d20b3777026e43906bfba301186bce0ae58daa9d8ad5019879b7833f14dc6ff |
| plan14-root-reads-stateless-replicas-1.tsv df8bf8056d80b9d78edc957fe7f2adbc75885e15f581e58167768346c4e05771 |
| plan14-root-reads-domain-registration-1.tsv 8e7126042fef8cc99899a29e9e06c22763a24b6677110144035ec57fcc2de23e |
| +plan14-root-reads-edge-held-streams.tsv aad3ae3e7576f3ae1c4a2cb99fa5c940c336d03e31519d5870541c3ccfa77db6 |
diff --git a/internal/provision/testdata/plan14-root-reads-edge-held-streams.tsv b/internal/provision/testdata/plan14-root-reads-edge-held-streams.tsv| new file mode 100644 |
| index 000000000..abeab1724 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-edge-held-streams.tsv |
| @@ -0,0 +1,66 @@ |
| +# Census overlay edge-held-streams, written by census-propose (#369). census-ruling-edge-held-streams, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-edge-held-streams.md. |
| +# 16 body, 2 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 14 new dispositions: 3 reads re-frozen at their disposition with the claim, 11 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 7c98be451d9db2deef14b85fb210b2913ad2e970c7a9677fe23709d7353cdb09 internal/activator/activator.go Service.finishStop legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with a run's settle checked before replication closes, which keeps the stop pending until the run is proven stopped; read sites unchanged, offsets moved;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: an HA entry (its replica is an HA one, haEntryRep) now releases through releaseHAClean (a new unit on this card) instead of e.rep.Close; when that answers errHostSliceUnproven the stop is kept pending (keepPendingLocked) with the lease held and renewing, and the sweep finishes it once proven; a non-HA entry is unchanged; the same five sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: a forgotten entry's stop is noted for its resident (noteResidentStopLocked: crash or lost lease backs off, any other stop restarts on the next tick) and its ownerDone channel is closed; no read added;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: while the host has a release command's record (a.releaseOps[e.host], running or not proven stopped), replication and the lease stay and the stop is kept pending (keepPendingLocked) until the record's proof; the same five read sites, no read added; only holds a release back;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.20: while a rootfs worker may run or is a stray (rootfsWorkersLiveLocked, in-memory, read under a.mu), replication and the lease stay and the stop is kept pending (keepPendingLocked) until the workers are proven stopped; the same five read sites, no read added; only holds a release back;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1 (Astra P1): beside the worker check, under the same lock, a stop with a lease stop of its commands outstanding (e.leaseStops) is kept pending, the replica and lease held, and the sweep finishes it once they have returned; the entry is never released while a kill captured for it may still reach its unit; the same five read sites, no read added Task 9 (PF-3): the count is pendingLeaseStopsLocked(e), the sum of e.leaseStops over both one-shot roles (now a map per role, cmd and tty), so a session's lease stop of the tty unit keeps the stop pending, the replica and lease held, as a run's does; the same five read sites, no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Retain command, worker, release and cgroup proofs. For an actual stateless generation no replica needs closing; close local lifecycle ownership only once those proofs finish.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) under a.mu just before the entry is deleted; it only calls the legs' context cancel functions. No read added, none removed. registry:Socket@4223,registry:Socket@4328,whole:Route@4173,whole:Route@4225,whole:Route@4330 45d194cdfbcca626e362e619988942a16ee67575a4b0258c9787656717adede1 |
| +@legacy ffae64fa08c73cdc48f80709ce67b792a66a01162f70d1d6568a3a58e5b645a2 internal/activator/activator.go Service.installProcLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: the one place a process, its generation and the lease replica are installed on an entry; a resident is put under its lease watch (watchResidentLeaseLocked) at that moment; reads only the entry's route;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1, Astra R1 P1-1): the lease watch is installed for every rootfs row (e.route.Rootfs()), not only a resident, so a hibernating rootfs row's run or session is reached at the lease's loss; the same one read of the entry's route; installs nothing else;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Install the local lifecycle channel with the actual generation. The serving-lease watch remains separate and is skipped for stateless generations; command/worker/stop ownership remains local.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): when the installed generation number differs from the current one, calls a.cancelHeldLegsLocked(e, e.gen.N) under a.mu before the switch, cancelling only the legs admitted on the generation that stops being current. Cancel funcs only; no read added. whole:Route@515 0529c9812e777f9aff47f97784751077be952d62d797d8d36a973e587ece3944 |
| +@legacy fc84c858b4b10866893028c88b7f5c7b758f0d98a66e83622fca36641835a314 internal/activator/activator.go Service.wake legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=logs that timer's breakdown to the journal after a successful wake (w.steps.String(), e.host, w.wakeTook); no read added;rev3=census-ruling-plans-4d-lapse;basis=cancels a wake whose row the turned-off hook names, like a fence, unless it is a move's active probe (plans 4d). One more whole-row read: the row handed to the hook (a.disabled). Only refuses.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: a refusal before the lease is reported once per change (noteRootfsRefusal) instead of a wake-failure event; the proc, generation and replica are installed through installProcLocked (which puts a resident under its lease watch before the fence); residency notes the outcome (noteResidentWakeLocked); same generation values;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R [pf R3.5]: the wake's context ceiling is wakeCeilingFor(e.route): the old 5 minutes for a binary row, 5 minutes plus runs.MaxTimeout for a rootfs row (room for a release inside the wake); new site +whole:Route (e.route to wakeCeilingFor, which reads Runtime only); no other change;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1): the wake's context is also cancelled before doWake when RetireExcept has marked the entry retired (e.retired, in memory under a.mu), as it is for a fence or a shutdown. Read sites unchanged (13). Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry successful hold preparation into its wake, preserve actual mode in the generation and OnWake projection, and project serving version/mode through the narrow registry writer before releasing wake waiters. Final review I1: SetServingMode only for non-worker successful wakes with a nonempty spawned version and either a stateless generation or a mode transition from the route. Ordinary stateful wakes leave rollout status and the wake critical path unchanged.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) on the failed-wake path before the entry is deleted, and after close(e.ready) on success calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback, outside a.mu. No read added. registry:Socket@7808,registry:Socket@7969,registry:Stateless@10051,registry:Stateless@9303,whole:Route@10053,whole:Route@1047,whole:Route@2558,whole:Route@2649,whole:Route@2706,whole:Route@417,whole:Route@6056,whole:Route@7761,whole:Route@7810,whole:Route@7971,whole:Route@9294,whole:Route@9349 eaff43fec4c24ac12ae447b3869a2d56b522cb5343bc32debfab1c400977e6db |
| +@legacy c9c1c3f22464fdb68abf0c1d9731f6e667c9a18abb38856952330cbb03f99166 internal/activator/claimwake.go Service.startAdmitted legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-ci-speed-activator;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=value-identical: the start backoff time.Second << attempt reads package var claimStartBackoff (1 s, changed only by tests) << attempt; the same 1, 2, 4, 8 s waits; read sites and offsets unchanged; no root decision;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the one call p.bindProducer(producer) becomes a.bindClaimProducer(e, p, producer), which adds a pre-stop step (refuseHeldLegsOn: under a.mu mark the process as taking no held leg and cancel its entry's legs) before the producer cleanup's first Stop. Cancel funcs and an atomic flag only; no read added. file:Prepare@1038,file:Prepare@213,file:Read@196,file:Read@812,file:Read@8383,whole:Route@1055,whole:Route@5087,whole:Route@5163,whole:Route@5795,whole:Route@5858 ca76062d6cf36dd82c3083127acd81d62bf3a4cafb5821f64a4b8c1b32c0a22f |
| +@legacy f94234fa7f5f9bee29e26ea9376998ae40a892301e47546bf5a7abd8de4ac8a8 internal/activator/recoveryprobe.go Service.finishRecoveryProbe legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: installs the probed proc and generation through installProcLocked instead of assigning them inline; same values, no read added;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) under a.mu before the entry is deleted on the stop path. Cancel funcs only; no read added. whole:Route@840 16c8caaf35fca6bbc8468297c3021bbb8f31a24353d6001517a005e4a0165c05 |
| +@legacy 83170c9e994d4fb9141d171c884c731c9881a42132ea0e2fecd35c16ae96408e internal/activator/recoveryprobe.go Service.reviewRecoveryHold legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a released flag, set where the probe hold is released, and a defer that runs after a.mu is unlocked and calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback. The registry read it already did is unchanged; no read added. file:Read@207,file:Read@379,registry:Socket@1964,registry:Socket@2125,whole:Route@1917,whole:Route@1966,whole:Route@2127 7ed3631a8976a4ae29efaa14255500fe0cabccc119a28316b6b6af34697f3000 |
| +@legacy 323509532daa1d547f86f87805d7d194928627c8b2152e9f79c1f7509058c373 internal/activator/swaphold.go Service.holdWakeLocked legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked; no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Pass the successful attempt-local stateless preparation to the pinned wake only after the existing stop and ownership proofs.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(next, 0) on the pinCheck failure path before the just-installed entry is deleted. Cancel funcs only; no read added. whole:Route@127,whole:Route@136 5be2cca308be0371729682dd5023effa61046f69165a85f005b976f1e2cfcb90 |
| +@legacy b806721aee8e0f2062a8b26278d8b95c87d5448d6a6a68a3fad4e2bb96f9daa2 internal/edge/assetcatch.go Edge.serveAssetFar legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;basis=in the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new (asset cache plan 3 Task 6): the far catch on a box with no route row for the host. It answers from this box's asset store, or fills over the backhaul from the home box under a signed fill assertion (carlos-asset-fill-v1) and stores only an acknowledged response. Its three sites are one synthetic row, registry.Route{Host, Account, App, Kind: instance}, built from the request host and the owner the home box's edges file publishes, passed to the usage meter and to the account throttle (planThrottleAdmit), so a far delivery is metered and throttled under the published owner (drift D8). No registry row is read; nothing local is dialled; no root decision. Since then: runs the hard and probe checks before the store is read, as ServeHTTP runs them (final review F1): edgeguard.Check, a pure in-memory matcher on r.URL.Path and RawQuery, through guardDecide, unless protection is off or the request came over a tunnel; a block is answered with the block page and metered under the synthetic row; a matched request is recorded through observeRecords(rt, false, r, ...) whenever this edge wrote the answer itself: a hit, the block page, a throttle refusal, or any answer written before a hop reached the home (a backhaul refusal, the no-key 503, a failed dial's 502; arrival is seen by an httptrace WroteHeaders hook on the request's context, a callback that reads nothing); a request a hop delivered to the home is judged and recorded there under the home's own mode, as for any backhauled request (fix waves 4 and 5: ordinary-backhaul parity); refusals and forwards write through the counting writer so the record carries the client's status; the one added site is that observeRecords pass of the same synthetic registry.Route{Host, Account, App, Kind: instance} (+whole:Route); no new kind of read;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: one call to observeRegional("asset-fill", host), a test hook that is a nil atomic pointer in production; no read added, no behaviour changed;rev3=census-ruling-console-protection-tab;basis=the far catch's defer now also calls observeGuardCount(rt, out) for the same synthetic registry.Route{Host, Account, App, Kind: instance} it already hands the meter and observeRecords (+whole:Route), under the same "this edge answered it" condition (billed, or a hop never reached the home), whether or not the guard matched; observeRecords still runs only on a match, as before. A count in memory only; no new kind of read; the guard check, block page and backhaul are unchanged.;rev3=census-ruling-probe-burst-limit;basis=the far catch's guard state is built for the same synthetic registry.Route{Host, Account, App, Kind: instance} (newGuardState(rt), for the owner's record-only switch), and its defer counts the request toward the probe-burst limit (noteBurst(rt, ...), in memory) when this edge answered it or the home acknowledged a fill; an httptrace WroteHeaders hook on an ordinary forward marks the request as the home's to count; the two added sites are that same synthetic route (+whole:Route x2); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): returns false at the top when markedRequest(r) is true, so a request that arrived with carlos_hold=1 is not treated as an asset request and goes on to the backhaul and the home edge classification. Reads the mark in the request context; no read added. whole:Route@1550,whole:Route@2315,whole:Route@2366,whole:Route@3079,whole:Route@3683,whole:Route@4656,whole:Route@4663 b6a7be1b60ac2bada8169652f5c72ec0f79afeb636071ccabcfb9fdd08f9050b |
| +@legacy c5a13c1bb8c2325f49469826d7cc057eecf18331a724e5089f6e5e146f34d246 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. data-literal@129,data-literal@148,data-literal@284,data-literal@417,file:Open@1013 b1a8ec0515474804004532931235135678d65531648e39a1dc76acbf70b6263f |
| +@legacy 17da384b5d5063beed451a629337a716c8d86d5e6f9ddee0deb45ea9d9c36490 internal/host/agent.go statusLoop legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's context carries the box's lifetime judge; read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 953b9fda (its later changes, regional box names and self-serve moves plan 1 among them, under main's own census rulings), where the tick fills rootfs_ready and rootfs_blocked from armedRootfs.Load().probe, which each tick runs NestedOK's checks and asks the control socket's GET /ready/rootfs (never the store); the same four direct sites;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 11 and #329 plan 3 Task 7: takes root's GET /egress reader and fills p.Egress = egressStatusProbe(egressStatus, routes, provision.PolicyReadStates()) and p.SizeCommittedMiB = sizeCommittedMiB(armedSizeSource.Load(), routes); the two added whole:Route sites are the tick's own registry list handed to those two units (decision rows), which read root's control socket and the activator's memory; no store request added; the four existing sites unchanged, offsets moved.;rev3=census-ruling-fleet-alerts-1;basis=the agent (carlos-edge.service, user carlos): the status tick passes os.Geteuid() to alertDeliveryProbe, which fills AlertDelivery.EngineBeat/EngineBeatWhy from engineBeatArmed (the env value and the euid only, no file access, root refused before the path is looked at), and fills Probes.DiskFullETAHours from diskETAProbe(&processDiskTrend, now), a Theil-Sen fit over the metrics loop's in-memory ring of disk readings; the same six sites, no read added, no store request added;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's Probes gain HeldStreams: heldStreamsState(), which calls the edge's in-memory counters function (nil until the edge is ready). No file, bucket or registry access added. whole:Route@11737,whole:Route@12018,whole:Route@6404,whole:Route@6431,whole:Route@7739,whole:Route@9923 fd710e01d5e3c07a36f0ca7e3c5f5d2d1f3934cf8b84d7732a63f9923da4b8c0 |
| +@legacy 361d6398a92963d04dbd85bbd0ddee33c1b87f13588a71ee13c8038f7e3d3a1f internal/status/snapshot.go CollectBox legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;basis=copies Probes.RootfsReady and RootfsBlocked into BoxMetrics (private, like Layout); the same 28 sites, no read added;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 11 and #329 plan 3 Task 7: copies Probes.Egress and Probes.SizeCommittedMiB into BoxMetrics (private, like Layout) and counts them in the condition that builds Metrics; the same 28 sites, no read added.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3: comment only, the Hibernate count is left as is (display);rev3=census-ruling-regional-domains-447;basis=#447 Task 7: copies Probes.AliasesRead into BoxMetrics.AliasesRead (json aliases_read, omitempty) and counts it in the condition that builds Metrics; the same 28 sites, no read added;rev3=census-ruling-fleet-alerts-1;basis=copies Probes.DiskFullETAHours into BoxMetrics.DiskFullETAHours (json disk_full_eta_hours, omitempty; private, like Layout) and counts it in the condition that builds Metrics; the same 28 sites, no read added;rev3=census-ruling-edge-held-streams;basis=copies Probes.HeldStreams into BoxMetrics.HeldStreams (json held_streams, omitempty, additive) and counts it in the condition that builds Metrics; the same 28 sites, no read added. registry:Alias@4543,registry:CertExpiresAt@3160,registry:CertExpiresAt@3396,registry:CertExpiresAt@4658,registry:DBPath@2495,registry:DBPath@2553,registry:DNSCheckedAt@3365,registry:DNSCheckedAt@4627,registry:DNSStatus@3139,registry:DNSStatus@3334,registry:DNSStatus@4597,registry:Hibernate@3853,registry:Host@2295,registry:Host@2437,registry:Host@2666,registry:Host@3280,registry:Host@3315,registry:Host@4578,registry:Kind@2473,registry:Kind@3807,registry:Platform@2152,registry:ServingVersion@2324,registry:ServingVersion@2447,registry:Socket@4066,registry:Version@2186,registry:Version@2305,whole:Route@1581,whole:RouteAlias@4440 cce87ffa8233039f952f30a35254fb162690c1825040dad811a03323c533f5ea |
| +@legacy c0f8a8ecbdfe37ab9466464722eac4903256298e56c04f17ef3075c6f136f833 internal/activator/haforward.go Service.ForwardTargetFromMemory legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the HA holder decision for a marked held-stream request from memory only. It calls forwardTarget with memoryOnly, which uses the holder cache's peek (an in-memory map under its own mutex) and answers ok=false on a miss instead of reading the lock. No bucket, registry or S3 read on this path; the route is the already-loaded Route, as in ForwardTarget. whole:Route@178 4ebfc82ed36b0c38ebffcc47b9728c73a22f35393777a5c484dea6f21829ca7e |
| +@legacy 86b9d32e39a55feca1493539e47b94038010a82cb072b4bc1b3fe8491757ae66 internal/activator/haforward.go Service.decideForward legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the second half of the old ForwardTarget body, moved unchanged: turns a holder resolution into the edge's ForwardDecision (the HA view and host reads it already made). Moved, not widened; no new read. registry:Host@1127,registry:Host@1300,registry:Host@1570,registry:Host@1693,registry:Host@979,whole:Route@1518,whole:Route@742 b59874cda37bacb8fc5821b0f1d26648988222d3dccc7735e841f74ae7ebaad5 |
| +@legacy c2c5964e6e153cb4ada2504cc58b3324bf6895a029aa7bd17dcb11adcfb589db internal/activator/haforward.go Service.forwardTarget legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: ForwardTarget's body with a memoryOnly flag. With false it does exactly what ForwardTarget did (resolve reads the holder lock through holderReadFor); with true it peeks the holder cache and never reads. Same reads as the old ForwardTarget body, moved here; none added for the memory-only path. registry:HA@165,registry:Host@339,registry:Host@521,registry:Host@628,whole:Route@247,whole:Route@658,whole:Route@693 92c21277da4a61b80649a2294efc430c0d3699508d58b746e6240701c9698e58 |
| +@legacy 5036c0d0e009766ce21c1df944d850c761413eceb097ece83e22b450c71f7207 internal/activator/haforward.go Service.holderReadFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the read closure the old ForwardTarget passed to holders.resolve, moved unchanged (the detached, bounded read of the host's HA lock through the holder reader). Reached only from the non-memory path; the memory-only path never calls it. registry:Host@724,whole:Route@465 3028fe29c548fb04fd16cf3ef40f70d51333f1f049ba7a4a9458d16ce368f989 |
| +@legacy c497fdeec363c10888cf811f9466ea507b81de541ec7191e949ac01e098c629c internal/activator/heldlegs.go Service.AdmitHeldLeg legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: admits one upstream leg of an edge-held stream. Runs admitPassThrough with an onAdmit that, under a.mu, checks heldAdmissibleLocked and ctx.Err and registers the leg on the entry (registerHeldLegLocked). All in memory; no bucket, registry or S3 read, no wake, no activity stamp. The route is the caller's already-loaded Route. whole:Route@145 2c96354066b272bd58ae4c60771fd7b7510e2ad531e4ebd2ebe0bd015008b02a |
| +@legacy 6706d70a9b447d996f900afd23b22364cb407a10f311f9e74fa5b4cb4fc7f382 internal/activator/heldlegs.go Service.admitPassThrough legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the admission loop moved from BeginSidecarRequest with its decisions unchanged (admit when passThroughAdmissibleLocked; join a waking entry; refuse fenced, probe-held, asleep, stopping; start the stop for a lost lease or dead child), plus an onAdmit callback run under a.mu. In-memory entry, fence and lease-serving checks only; the reads are the ones BeginSidecarRequest had, no read added. registry:Host@290,registry:Host@454 d2bf227dc0c0c04d8499b4764d0de5b615197a715a19b8d9a576f335f2171c05 |
| +@legacy ce065e9d8387b99cf4e8eff35bee896724b8262b40d7533e50edb5f9153b303b internal/edge/edge.go Edge.holdsHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): new; reports from the already-published upstream map (e.upstreams.Load) whether the host is a hibernating route this edge holds streams for. In-memory map lookup of a loaded Route; no registry or bucket read. registry:Hibernate@154,whole:Route@156 54f9cf815633ffa8fd2a21a9204db62c1d01b8f79d007320a94d83a2127bb228 |
| +@legacy 19ccd2f90dbb37286cd67eae0cc3e6882c3d80e1166fa9911b13877b409fac7e internal/edge/edge.go classifyHold legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): new; classifies a request by the carlos_hold mark ServeHTTP recorded in the request context (never re-parsing the query) against the already-loaded upstream (up.hibernating, up.route.Hibernate, up.viaTunnel). Answers 400 for a marked non-stream request, or strips the marker from the query. No registry, bucket or file read; the only input is the visitor's request. registry:Hibernate@210,whole:Route@213 d3e8d00becec52ae9196befa7d6438fc301803ad82cee75075c457cc5897c6c2 |
| +@legacy 3a1b61cb44f1b9061001e31243c71445f8bd74aa4b43510ea778a1cc5d89bcd5 internal/edge/heldstream.go Edge.serveHeld legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): new; runs one held stream. Registers it in the in-memory held set, checks holdsHost against the published map, and runs the heldTask, which opens legs through the activator's AdmitHeldLeg and the route's own proxy. Reads only the request and in-memory state; no bucket, registry or file read of tenant-writable input. registry:Host@245,registry:Host@738,registry:Host@889,whole:Route@898,whole:Route@902 49000bc54f59bd5c264ed8eaeb05568112c94923466e63f41de89374b10d80ae |
| +@legacy b661ed3874260c7d5aef59b2ebee666b1510ceb0ab2bc0422e57cccf321888f9 internal/edge/heldstream.go heldTask.startAdmit legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): new; starts a goroutine calling act.AdmitHeldLeg for the route (the held leg is admitted in memory under the activator's a.mu). No read added; the Route is the one already loaded. whole:Route@128,whole:Route@190 d68f3241edb948ff47d39eb93ada8f7ed141bc6683282922e66533d910e2233f |
| +@legacy 41aec94d17364f517b40614aee3495973ce82efc7bebeb8dc4bb088d686f75e0 internal/edge/heldstream.go readHeldLeg legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): new; reads the leg's response from an in-memory io.Pipe (pr.Read, the +file:Read site), parsing SSE blocks with the size-bounded sseReader. The pipe is fed by the route's own proxy writing into it; not a file, socket or bucket read of its own. file:Read@884 de165c33679fcf9f178bda9a30b985b675ff6a021b2e586771a4c346179553a5 |
| +@legacy ba085d972764d013485568e56280fac2f92826bfe1b363dc217683ea6ef50101 internal/activator/activator.go Service.BeginSidecarRequest legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Read serving lease health through servingError: stateless generations use local lifecycle/process supervision, while stateful generations keep the existing lease checks. No new I/O.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the admission loop moves out unchanged in its decisions into admitPassThrough (heldlegs.go) and the body now calls a.admitPassThrough(ctx, rt, nil). The reads it had are now reached through admitPassThrough: the in-memory entry, fence and state checks under a.mu; no registry, bucket or S3 read, and none added. whole:Route@229 7c177c8a70d432022a1a221bbd9d49c3724b3fbf984b48e7e5deda37fbafe84b |
| +@legacy 296715244f06104e22735bf9f0e3659c630e4c0cb05a8c00717801382222326b internal/edge/edge.go Edge.Reload legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test (generation proxy, hib, no-activator 404) is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance goes through the activator; binary rows unchanged;rev3=census-ruling-edge-roll-blip;basis=the tcpProxy and multiProxy calls pass e.hold (the per-Edge localHold set once in newEdge): a loopback TCP upstream that refuses is redialled for up to 13 s and a probed route with a local upstream waits for prober readmission instead of answering 502/503 (#434 part B); edge-side dial policy only, no read added, same 52 sites;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: after the alias fold, reads the regional_domains rows (e.reg.ListRegional; an error aborts the reload as every registry read here does) and applies them with foldRegional against the routes slice the same reload read; the added reads are that one registry list and the routes already read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. Review R2: the switch is on DispatchArm(t, viaFleet, tunnels) (the order moved there unchanged: forward only when in Arm, own Tunnel, fleet, socket, addrs, static, status, else continue), the fleet cases read verdict.Arm (renamed from Served), and the platform-alias fold is foldPlatformAliases with the same take (source entry, own paths, alias marks) and the same refusal log (-registry:Kind x2, -registry:Socket, -registry:Tunnel, +whole:Route: those reads moved into DispatchArm); same rows, same arms, same entries; no read added.;rev3=census-ruling-fleet-routes-followups;basis=the owners map is now e.reg.FleetOwners() instead of ListFleets folded inline: the same fresh-connection ListFleets read and the same name->account map (-registry:Account, -registry:Name, -whole:Fleet x2 move into Registry.FleetOwners); no read added; same error path (abort the reload);rev3=census-ruling-tunnel-websockets;basis=The ArmTunnel arm now records its tenancy (Account, App, Tunnel) copied from the row t that Reload already lists; no new registry query, no file read. Also the reload mutex taken first and held to return, five nil-in-production test hooks, and the sweepUpgrades call after the swap, which reads only the map Reload has just built (spec 7, Tasks 3 and 4).;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5, rule 3): the two fleet proxy builds pass the row to fleetBoxOf(t) instead of reading t.FleetBox (-registry:FleetBox x2, +whole:Route x2); fleetBoxOf answers FleetLabel as authoritative when set, else FleetBox; an authoritative box has no fallback to another of the fleet's channels (503 errFleetDark instead). The edge in the agent, not root; it routes to fewer channels, never more.;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): after the new upstream map is published, closes the held streams of any host the new map no longer holds (absent, not hibernating, route no longer Hibernate). Reads the freshly built in-memory map m and the in-memory held set; no read added beyond the rebuild Reload already does. registry:Account@9444,registry:Alias@24246,registry:Alias@24333,registry:Alias@24913,registry:App@9460,registry:Health@13185,registry:Health@13311,registry:Hibernate@28433,registry:Host@10771,registry:Host@10828,registry:Host@10864,registry:Host@11607,registry:Host@13794,registry:Host@13889,registry:Host@14177,registry:Host@14203,registry:Host@14255,registry:Host@18708,registry:Host@20615,registry:Host@20923,registry:Host@20950,registry:Host@21765,registry:Host@22337,registry:Host@24667,registry:Host@24716,registry:Host@4701,registry:Host@4755,registry:Host@4805,registry:Host@5826,registry:Kind@17044,registry:Kind@17066,registry:Prefix@22312,registry:Socket@11671,registry:Socket@20931,registry:Status@4626,registry:Target@22324,registry:Tunnel@9304,registry:Tunnel@9475,registry:Version@17025,registry:Version@17127,whole:RegionalDomain@25555,whole:Route@10919,whole:Route@11027,whole:Route@11727,whole:Route@14328,whole:Route@14392,whole:Route@14443,whole:Route@20983,whole:Route@20990,whole:Route@21086,whole:Route@22200,whole:Route@23368,whole:Route@25547,whole:Route@28435,whole:Route@294,whole:Route@3381,whole:Route@3439,whole:Route@5855,whole:Route@6731,whole:Route@6839,whole:Route@9366,whole:RouteAlias@24217,whole:RoutePath@21743 45fe4a8274770840369b09678e642c3c40ca61411ffe2d8a8b687e168376f111 |
| +@legacy 948b47b7cf533ac2e0b26157c8f0ae5f65c3f25827f8fa50d607d57e19e21076 internal/edge/forwardha.go Edge.frontForwardHA legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): the agent's edge decides at the front door whether to forward a visitor request: reads the route's HA flag and host from the box's own registry row and asks the activator; forwards only to a box in view over the existing signed hop; root never calls it;rev3=census-ruling-region-ha-dead-holder-backoff;basis=ForwardTarget returns a ForwardDecision (Ref, Refuse, Gen); a Refuse is answered at the front door with the existing unreachable answer (503, Retry-After: 10, same body, via answerHolderUnreachable), with no forward, dial, note or per-request step. A forward passes the decision to forwardHA and NoteForward carries Ref and Gen back. The round-1 connection callback (NoteConnected) is gone: the dial bound now lives in forwardTransport's forwardDialGate, which coalesces TCP dials per holder address in memory. The same 5 read sites; no new read; root never calls it.;rev3=census-ruling-region-ha-p1b3a;basis=Pass the existing route to a lazy cached wakeSnapshot closure, handle explicit local denial before all accounting, and refuse a disappeared Placement choice rather than falling through locally; whole Route read only, no new store or filesystem operation and no root authority.;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): for a marked request to a hibernating HA route it uses the new HAForwarderFromMemory (ForwardTargetFromMemory) instead of ForwardTarget, so the hold path makes no holder-lock read; a non-stream marked request is left to this box's classification, and a holder not known from memory is answered with the one-retry event. The unmarked path is unchanged. Reads only the request mark and the already-loaded route and home map; no read added. registry:HA@225,registry:Hibernate@584,registry:Host@1745,whole:Route@1244,whole:Route@1368,whole:Route@1748,whole:Route@228,whole:Route@515,whole:Route@587 beb95a0e9c7f561de27536cb7042ff5af3f04387275ed3049f8797066f1d1656 |
| +@legacy 43c1d3d9e4bc8bac0264fa7f4e0fb03b267f33bec2e84d1a661c44c9339fdf12 internal/activator/haforward.go Service.ForwardTarget legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): the agent's activator answers the edge with a holder box ref for an HA route not awake here, from its in-memory holder cache or one bounded (2 s) lock.json read through readHolderView; reads the route's HA flag and host from its own registry row; root never calls it;rev3=census-ruling-region-ha-dead-holder-backoff;basis=Returns edge.ForwardDecision (Ref, Refuse, Gen) from holderCache.resolve, in memory only: a suspect holder refuses; a positive entry forwards under its generation; a failed read that revalidates an expired suspect keeps it suspect and refuses. The round-1 cache connection gate is removed. The same single bounded (2 s) lock.json read through readHolderView on a miss; no new read and no new S3 request; root never calls it.;rev3=census-ruling-region-ha-p1b3a;basis=Retain immutable lock observations and evaluate the pure placement rule after all existing bypass and positive-holder/suspect checks. Fix round 1: decide and reserve under one peer mutex using only current serving candidates, and log the final Base/Refuse decision if attempt tagging loses a race. Reads in-memory route Host and the Route passed to the pure rule; same bounded lock read, no new store or filesystem operation and no acquire authority.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): becomes a thin wrapper: it calls a.forwardTarget(ctx, rt, snapshot, false) and returns the decision. The holder-lock read (holders.resolve with the read closure) and the HA/Host reads it had are now made in forwardTarget, holderReadFor and decideForward with the same arguments, in the same order; the read set is moved, not widened. whole:Route@165 ddfb37ce959ca4f9b1ae5741cb6e5c82b13498e8134fe2875e7f2ce903a4f6a7 |
| +@legacy 9644b57f7d5a43781c05d1b89b5127102e51ad0d2605d4a0f364e64920b280f0 internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6).;rev3=census-ruling-console-protection-tab;basis=one more call in the observer defer, observeGuardCount(up.route, out), beside the observeRecords call that files the guard Match: it passes on the route row the defer already holds (+whole:Route) and the request outcome to the usage meter, which counts the check in memory. Called whether or not the request was unbilled, as observeRecords is. Nothing is opened, read or followed; no new kind of read; no check, refusal or serving decision changes.;rev3=census-ruling-probe-burst-limit;basis=answers a probe-burst notice POST (serveBurstNotice) ahead of every route for a non-door caller; builds the guard state for up.route and stamps its account and app (RouteAccount, App) for the cool-down's this-app/other-app label; for a catalogue match on a non-static or tunnelled route, offers the burst rule (in-memory limiter, burstDecide: 429 or a watch verdict, never a block for a fleet or forward row); the observer defer calls noteBurst(up.route, ...); the added sites are the route value already in hand (+registry:App, +whole:Route x5); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added. file:ReadAll@14985,registry:App@21083,registry:Gate@13959,registry:Gate@25474,registry:Gate@25534,registry:Gate@25592,registry:Host@25577,registry:ImportGate@32977,registry:Kind@19945,registry:Kind@23383,registry:Kind@32919,registry:Kind@32948,whole:Route@13854,whole:Route@13965,whole:Route@17507,whole:Route@17965,whole:Route@18157,whole:Route@19948,whole:Route@21009,whole:Route@21075,whole:Route@21086,whole:Route@21339,whole:Route@21434,whole:Route@21510,whole:Route@21554,whole:Route@21856,whole:Route@21886,whole:Route@23386,whole:Route@23671,whole:Route@25477,whole:Route@25537,whole:Route@25580,whole:Route@25595,whole:Route@26513,whole:Route@28576,whole:Route@32922,whole:Route@32951,whole:Route@32980,whole:Route@33012,whole:Route@34860 41ae49543e1e31ae8060fc973b478b8aa85e2961da1f3280fde3f2a983dd4ea4 |
| +internal/activator/activator.go Service.finishStop legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with a run's settle checked before replication closes, which keeps the stop pending until the run is proven stopped; read sites unchanged, offsets moved;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: an HA entry (its replica is an HA one, haEntryRep) now releases through releaseHAClean (a new unit on this card) instead of e.rep.Close; when that answers errHostSliceUnproven the stop is kept pending (keepPendingLocked) with the lease held and renewing, and the sweep finishes it once proven; a non-HA entry is unchanged; the same five sites, no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: a forgotten entry's stop is noted for its resident (noteResidentStopLocked: crash or lost lease backs off, any other stop restarts on the next tick) and its ownerDone channel is closed; no read added;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: while the host has a release command's record (a.releaseOps[e.host], running or not proven stopped), replication and the lease stay and the stop is kept pending (keepPendingLocked) until the record's proof; the same five read sites, no read added; only holds a release back;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.20: while a rootfs worker may run or is a stray (rootfsWorkersLiveLocked, in-memory, read under a.mu), replication and the lease stay and the stop is kept pending (keepPendingLocked) until the workers are proven stopped; the same five read sites, no read added; only holds a release back;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1 (Astra P1): beside the worker check, under the same lock, a stop with a lease stop of its commands outstanding (e.leaseStops) is kept pending, the replica and lease held, and the sweep finishes it once they have returned; the entry is never released while a kill captured for it may still reach its unit; the same five read sites, no read added Task 9 (PF-3): the count is pendingLeaseStopsLocked(e), the sum of e.leaseStops over both one-shot roles (now a map per role, cmd and tty), so a session's lease stop of the tty unit keeps the stop pending, the replica and lease held, as a run's does; the same five read sites, no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Retain command, worker, release and cgroup proofs. For an actual stateless generation no replica needs closing; close local lifecycle ownership only once those proofs finish.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) under a.mu just before the entry is deleted; it only calls the legs' context cancel functions. No read added, none removed. registry:Socket@4223,registry:Socket@4328,whole:Route@4173,whole:Route@4225,whole:Route@4330 45d194cdfbcca626e362e619988942a16ee67575a4b0258c9787656717adede1 |
| +internal/activator/activator.go Service.installProcLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: the one place a process, its generation and the lease replica are installed on an entry; a resident is put under its lease watch (watchResidentLeaseLocked) at that moment; reads only the entry's route;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a (Call A1, Astra R1 P1-1): the lease watch is installed for every rootfs row (e.route.Rootfs()), not only a resident, so a hibernating rootfs row's run or session is reached at the lease's loss; the same one read of the entry's route; installs nothing else;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Install the local lifecycle channel with the actual generation. The serving-lease watch remains separate and is skipped for stateless generations; command/worker/stop ownership remains local.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): when the installed generation number differs from the current one, calls a.cancelHeldLegsLocked(e, e.gen.N) under a.mu before the switch, cancelling only the legs admitted on the generation that stops being current. Cancel funcs only; no read added. whole:Route@515 0529c9812e777f9aff47f97784751077be952d62d797d8d36a973e587ece3944 |
| +internal/activator/activator.go Service.wake legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=logs that timer's breakdown to the journal after a successful wake (w.steps.String(), e.host, w.wakeTook); no read added;rev3=census-ruling-plans-4d-lapse;basis=cancels a wake whose row the turned-off hook names, like a fence, unless it is a move's active probe (plans 4d). One more whole-row read: the row handed to the hook (a.disabled). Only refuses.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: a refusal before the lease is reported once per change (noteRootfsRefusal) instead of a wake-failure event; the proc, generation and replica are installed through installProcLocked (which puts a resident under its lease watch before the fence); residency notes the outcome (noteResidentWakeLocked); same generation values;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R [pf R3.5]: the wake's context ceiling is wakeCeilingFor(e.route): the old 5 minutes for a binary row, 5 minutes plus runs.MaxTimeout for a rootfs row (room for a release inside the wake); new site +whole:Route (e.route to wakeCeilingFor, which reads Runtime only); no other change;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1): the wake's context is also cancelled before doWake when RetireExcept has marked the entry retired (e.retired, in memory under a.mu), as it is for a fence or a shutdown. Read sites unchanged (13). Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry successful hold preparation into its wake, preserve actual mode in the generation and OnWake projection, and project serving version/mode through the narrow registry writer before releasing wake waiters. Final review I1: SetServingMode only for non-worker successful wakes with a nonempty spawned version and either a stateless generation or a mode transition from the route. Ordinary stateful wakes leave rollout status and the wake critical path unchanged.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) on the failed-wake path before the entry is deleted, and after close(e.ready) on success calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback, outside a.mu. No read added. registry:Socket@7808,registry:Socket@7969,registry:Stateless@10051,registry:Stateless@9303,whole:Route@10053,whole:Route@1047,whole:Route@2558,whole:Route@2649,whole:Route@2706,whole:Route@417,whole:Route@6056,whole:Route@7761,whole:Route@7810,whole:Route@7971,whole:Route@9294,whole:Route@9349 eaff43fec4c24ac12ae447b3869a2d56b522cb5343bc32debfab1c400977e6db |
| +internal/activator/activator.go type Service authority B,C,D,F,J4 rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): one field, Fleet (activator.FleetWake: the box's fleet state, not on a fleet by default, on a fleet with a known label and a record reader, or on a fleet with an invalid identity), set by the agent before Start and read only by routeCurrentUnderLease. No read in the declaration. Agent, not root.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1: one field, drainBudget (time.Duration), which New copies from residentDrainBudget and a rootfs entry's lease watch reads in its place, so a test's change of the package var never races a watch goroutine; declaration only, reads nothing; merge of origin/main 6f1f6ca6: main's one field, Fleet (activator.FleetWake), is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b3a;basis=Add bounded placement peer and diagnostic state and the over-capacity callback; no read in this declaration and no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Add coordinator, existing-record observation callback and per-host preparation locks; no read in the declaration. Task 3a: Add optional canonical storage-selection and durable deploy-ID callbacks; declaration only, no read or authority in these fields.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds the heldLegs map to actEntry (legs by id, under a.mu) and heldWakeHook (atomic pointer to a callback) and heldLegSeq (atomic counter) to Service. State only, in memory; no read of tenant, app or box-agent-writable input. f2862b017a26f4c71466fe3fd8ee43d133df3926190f5486872faeed71757581 |
| +internal/activator/claimwake.go Service.startAdmitted legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-ci-speed-activator;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=value-identical: the start backoff time.Second << attempt reads package var claimStartBackoff (1 s, changed only by tests) << attempt; the same 1, 2, 4, 8 s waits; read sites and offsets unchanged; no root decision;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the one call p.bindProducer(producer) becomes a.bindClaimProducer(e, p, producer), which adds a pre-stop step (refuseHeldLegsOn: under a.mu mark the process as taking no held leg and cancel its entry's legs) before the producer cleanup's first Stop. Cancel funcs and an atomic flag only; no read added. file:Prepare@1038,file:Prepare@213,file:Read@196,file:Read@812,file:Read@8383,whole:Route@1055,whole:Route@5087,whole:Route@5163,whole:Route@5795,whole:Route@5858 ca76062d6cf36dd82c3083127acd81d62bf3a4cafb5821f64a4b8c1b32c0a22f |
| +internal/activator/maintenance.go Service.LiftFence authority B,C,D,F,J4 rev3=PROPOSED-seed; shared activator state and opaque owner token; waits existing request, scheduled-token and stop preparations before fencing; exact owner alone may resume or release;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): releases a.mu explicitly instead of by defer, and after a successful lift calls a.noteHeldAdmissible(host), the non-blocking held wake callback, outside a.mu. Decision and state unchanged; no read added. f20eed4c4a9875c1b8ebc0fba697e89a1ef7662d1dfb0b4628d9b68de4e27c2d |
| +internal/activator/maintenance.go Service.LiftFenceAs authority B,C,D,F,J4 rev3=PROPOSED-seed; shared activator state and opaque owner token; waits existing request, scheduled-token and stop preparations before fencing; exact owner alone may resume or release;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): releases a.mu explicitly instead of by defer, and after a successful lift calls a.noteHeldAdmissible(host), the non-blocking held wake callback, outside a.mu. Decision and state unchanged; no read added. 76d9bce1ebda8d6cd7a18202425f6861a0314a41ed56744a5d0f27a690c875b7 |
| +internal/activator/recoveryprobe.go Service.finishRecoveryProbe legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 8: installs the probed proc and generation through installProcLocked instead of assigning them inline; same values, no read added;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) under a.mu before the entry is deleted on the stop path. Cancel funcs only; no read added. whole:Route@840 16c8caaf35fca6bbc8468297c3021bbb8f31a24353d6001517a005e4a0165c05 |
| +internal/activator/recoveryprobe.go Service.reviewRecoveryHold legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a released flag, set where the probe hold is released, and a defer that runs after a.mu is unlocked and calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback. The registry read it already did is unchanged; no read added. file:Read@207,file:Read@379,registry:Socket@1964,registry:Socket@2125,whole:Route@1917,whole:Route@1966,whole:Route@2127 7ed3631a8976a4ae29efaa14255500fe0cabccc119a28316b6b6af34697f3000 |
| +internal/activator/seed_exclusion.go SeedExclusion.Release authority B,C,D,F,J4 rev3=PROPOSED-seed; shared activator state and opaque owner token; waits existing request, scheduled-token and stop preparations before fencing; exact owner alone may resume or release;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): releases a.mu explicitly instead of by defer, and after a successful release calls a.noteHeldAdmissible(t.host), the non-blocking held wake callback, outside a.mu. No read added. 231abdcbaa6e30d45360fbb17105511bbf03aba08fee4bce4928a285ba1e8469 |
| +internal/activator/swaphold.go Service.holdWakeLocked legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked; no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Pass the successful attempt-local stateless preparation to the pinned wake only after the existing stop and ownership proofs.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(next, 0) on the pinCheck failure path before the just-installed entry is deleted. Cancel funcs only; no read added. whole:Route@127,whole:Route@136 5be2cca308be0371729682dd5023effa61046f69165a85f005b976f1e2cfcb90 |
| +internal/edge/assetcatch.go Edge.serveAssetFar legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-3;basis=in the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new (asset cache plan 3 Task 6): the far catch on a box with no route row for the host. It answers from this box's asset store, or fills over the backhaul from the home box under a signed fill assertion (carlos-asset-fill-v1) and stores only an acknowledged response. Its three sites are one synthetic row, registry.Route{Host, Account, App, Kind: instance}, built from the request host and the owner the home box's edges file publishes, passed to the usage meter and to the account throttle (planThrottleAdmit), so a far delivery is metered and throttled under the published owner (drift D8). No registry row is read; nothing local is dialled; no root decision. Since then: runs the hard and probe checks before the store is read, as ServeHTTP runs them (final review F1): edgeguard.Check, a pure in-memory matcher on r.URL.Path and RawQuery, through guardDecide, unless protection is off or the request came over a tunnel; a block is answered with the block page and metered under the synthetic row; a matched request is recorded through observeRecords(rt, false, r, ...) whenever this edge wrote the answer itself: a hit, the block page, a throttle refusal, or any answer written before a hop reached the home (a backhaul refusal, the no-key 503, a failed dial's 502; arrival is seen by an httptrace WroteHeaders hook on the request's context, a callback that reads nothing); a request a hop delivered to the home is judged and recorded there under the home's own mode, as for any backhauled request (fix waves 4 and 5: ordinary-backhaul parity); refusals and forwards write through the counting writer so the record carries the client's status; the one added site is that observeRecords pass of the same synthetic registry.Route{Host, Account, App, Kind: instance} (+whole:Route); no new kind of read;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: one call to observeRegional("asset-fill", host), a test hook that is a nil atomic pointer in production; no read added, no behaviour changed;rev3=census-ruling-console-protection-tab;basis=the far catch's defer now also calls observeGuardCount(rt, out) for the same synthetic registry.Route{Host, Account, App, Kind: instance} it already hands the meter and observeRecords (+whole:Route), under the same "this edge answered it" condition (billed, or a hop never reached the home), whether or not the guard matched; observeRecords still runs only on a match, as before. A count in memory only; no new kind of read; the guard check, block page and backhaul are unchanged.;rev3=census-ruling-probe-burst-limit;basis=the far catch's guard state is built for the same synthetic registry.Route{Host, Account, App, Kind: instance} (newGuardState(rt), for the owner's record-only switch), and its defer counts the request toward the probe-burst limit (noteBurst(rt, ...), in memory) when this edge answered it or the home acknowledged a fill; an httptrace WroteHeaders hook on an ordinary forward marks the request as the home's to count; the two added sites are that same synthetic route (+whole:Route x2); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): returns false at the top when markedRequest(r) is true, so a request that arrived with carlos_hold=1 is not treated as an asset request and goes on to the backhaul and the home edge classification. Reads the mark in the request context; no read added. whole:Route@1550,whole:Route@2315,whole:Route@2366,whole:Route@3079,whole:Route@3683,whole:Route@4656,whole:Route@4663 b6a7be1b60ac2bada8169652f5c72ec0f79afeb636071ccabcfb9fdd08f9050b |
| +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. data-literal@129,data-literal@148,data-literal@284,data-literal@417,file:Open@1013 b1a8ec0515474804004532931235135678d65531648e39a1dc76acbf70b6263f |
| +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. file:Exec@17719,file:Open@1150,file:Statfs@45793,registry:App@11474,whole:Route@11466,whole:Route@29433 85ed9ab371cfab12173c9547142874252a34f2bf064d971fee83fee884947d35 |
| +internal/host/agent.go statusLoop legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's context carries the box's lifetime judge; read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 953b9fda (its later changes, regional box names and self-serve moves plan 1 among them, under main's own census rulings), where the tick fills rootfs_ready and rootfs_blocked from armedRootfs.Load().probe, which each tick runs NestedOK's checks and asks the control socket's GET /ready/rootfs (never the store); the same four direct sites;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 11 and #329 plan 3 Task 7: takes root's GET /egress reader and fills p.Egress = egressStatusProbe(egressStatus, routes, provision.PolicyReadStates()) and p.SizeCommittedMiB = sizeCommittedMiB(armedSizeSource.Load(), routes); the two added whole:Route sites are the tick's own registry list handed to those two units (decision rows), which read root's control socket and the activator's memory; no store request added; the four existing sites unchanged, offsets moved.;rev3=census-ruling-fleet-alerts-1;basis=the agent (carlos-edge.service, user carlos): the status tick passes os.Geteuid() to alertDeliveryProbe, which fills AlertDelivery.EngineBeat/EngineBeatWhy from engineBeatArmed (the env value and the euid only, no file access, root refused before the path is looked at), and fills Probes.DiskFullETAHours from diskETAProbe(&processDiskTrend, now), a Theil-Sen fit over the metrics loop's in-memory ring of disk readings; the same six sites, no read added, no store request added;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's Probes gain HeldStreams: heldStreamsState(), which calls the edge's in-memory counters function (nil until the edge is ready). No file, bucket or registry access added. whole:Route@11737,whole:Route@12018,whole:Route@6404,whole:Route@6431,whole:Route@7739,whole:Route@9923 fd710e01d5e3c07a36f0ca7e3c5f5d2d1f3934cf8b84d7732a63f9923da4b8c0 |
| +internal/status/snapshot.go CollectBox legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-rootfs-apps-2;basis=copies Probes.RootfsReady and RootfsBlocked into BoxMetrics (private, like Layout); the same 28 sites, no read added;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 11 and #329 plan 3 Task 7: copies Probes.Egress and Probes.SizeCommittedMiB into BoxMetrics (private, like Layout) and counts them in the condition that builds Metrics; the same 28 sites, no read added.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3: comment only, the Hibernate count is left as is (display);rev3=census-ruling-regional-domains-447;basis=#447 Task 7: copies Probes.AliasesRead into BoxMetrics.AliasesRead (json aliases_read, omitempty) and counts it in the condition that builds Metrics; the same 28 sites, no read added;rev3=census-ruling-fleet-alerts-1;basis=copies Probes.DiskFullETAHours into BoxMetrics.DiskFullETAHours (json disk_full_eta_hours, omitempty; private, like Layout) and counts it in the condition that builds Metrics; the same 28 sites, no read added;rev3=census-ruling-edge-held-streams;basis=copies Probes.HeldStreams into BoxMetrics.HeldStreams (json held_streams, omitempty, additive) and counts it in the condition that builds Metrics; the same 28 sites, no read added. registry:Alias@4543,registry:CertExpiresAt@3160,registry:CertExpiresAt@3396,registry:CertExpiresAt@4658,registry:DBPath@2495,registry:DBPath@2553,registry:DNSCheckedAt@3365,registry:DNSCheckedAt@4627,registry:DNSStatus@3139,registry:DNSStatus@3334,registry:DNSStatus@4597,registry:Hibernate@3853,registry:Host@2295,registry:Host@2437,registry:Host@2666,registry:Host@3280,registry:Host@3315,registry:Host@4578,registry:Kind@2473,registry:Kind@3807,registry:Platform@2152,registry:ServingVersion@2324,registry:ServingVersion@2447,registry:Socket@4066,registry:Version@2186,registry:Version@2305,whole:Route@1581,whole:RouteAlias@4440 cce87ffa8233039f952f30a35254fb162690c1825040dad811a03323c533f5ea |
| +internal/activator/haforward.go Service.ForwardTargetFromMemory legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the HA holder decision for a marked held-stream request from memory only. It calls forwardTarget with memoryOnly, which uses the holder cache's peek (an in-memory map under its own mutex) and answers ok=false on a miss instead of reading the lock. No bucket, registry or S3 read on this path; the route is the already-loaded Route, as in ForwardTarget. whole:Route@178 4ebfc82ed36b0c38ebffcc47b9728c73a22f35393777a5c484dea6f21829ca7e |
| +internal/activator/haforward.go Service.decideForward legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the second half of the old ForwardTarget body, moved unchanged: turns a holder resolution into the edge's ForwardDecision (the HA view and host reads it already made). Moved, not widened; no new read. registry:Host@1127,registry:Host@1300,registry:Host@1570,registry:Host@1693,registry:Host@979,whole:Route@1518,whole:Route@742 b59874cda37bacb8fc5821b0f1d26648988222d3dccc7735e841f74ae7ebaad5 |
| +internal/activator/haforward.go Service.forwardTarget legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: ForwardTarget's body with a memoryOnly flag. With false it does exactly what ForwardTarget did (resolve reads the holder lock through holderReadFor); with true it peeks the holder cache and never reads. Same reads as the old ForwardTarget body, moved here; none added for the memory-only path. registry:HA@165,registry:Host@339,registry:Host@521,registry:Host@628,whole:Route@247,whole:Route@658,whole:Route@693 92c21277da4a61b80649a2294efc430c0d3699508d58b746e6240701c9698e58 |
| +internal/activator/haforward.go Service.holderReadFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the read closure the old ForwardTarget passed to holders.resolve, moved unchanged (the detached, bounded read of the host's HA lock through the holder reader). Reached only from the non-memory path; the memory-only path never calls it. registry:Host@724,whole:Route@465 3028fe29c548fb04fd16cf3ef40f70d51333f1f049ba7a4a9458d16ce368f989 |
| +internal/activator/heldlegs.go Service.AdmitHeldLeg legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: admits one upstream leg of an edge-held stream. Runs admitPassThrough with an onAdmit that, under a.mu, checks heldAdmissibleLocked and ctx.Err and registers the leg on the entry (registerHeldLegLocked). All in memory; no bucket, registry or S3 read, no wake, no activity stamp. The route is the caller's already-loaded Route. whole:Route@145 2c96354066b272bd58ae4c60771fd7b7510e2ad531e4ebd2ebe0bd015008b02a |
| +internal/activator/heldlegs.go Service.admitPassThrough legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): new: the admission loop moved from BeginSidecarRequest with its decisions unchanged (admit when passThroughAdmissibleLocked; join a waking entry; refuse fenced, probe-held, asleep, stopping; start the stop for a lost lease or dead child), plus an onAdmit callback run under a.mu. In-memory entry, fence and lease-serving checks only; the reads are the ones BeginSidecarRequest had, no read added. registry:Host@290,registry:Host@454 d2bf227dc0c0c04d8499b4764d0de5b615197a715a19b8d9a576f335f2171c05 |
| +internal/edge/edge.go Edge.holdsHost legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): new; reports from the already-published upstream map (e.upstreams.Load) whether the host is a hibernating route this edge holds streams for. In-memory map lookup of a loaded Route; no registry or bucket read. registry:Hibernate@154,whole:Route@156 54f9cf815633ffa8fd2a21a9204db62c1d01b8f79d007320a94d83a2127bb228 |
| +internal/edge/edge.go classifyHold legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): new; classifies a request by the carlos_hold mark ServeHTTP recorded in the request context (never re-parsing the query) against the already-loaded upstream (up.hibernating, up.route.Hibernate, up.viaTunnel). Answers 400 for a marked non-stream request, or strips the marker from the query. No registry, bucket or file read; the only input is the visitor's request. registry:Hibernate@210,whole:Route@213 d3e8d00becec52ae9196befa7d6438fc301803ad82cee75075c457cc5897c6c2 |
| +internal/edge/heldstream.go Edge.serveHeld legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): new; runs one held stream. Registers it in the in-memory held set, checks holdsHost against the published map, and runs the heldTask, which opens legs through the activator's AdmitHeldLeg and the route's own proxy. Reads only the request and in-memory state; no bucket, registry or file read of tenant-writable input. registry:Host@245,registry:Host@738,registry:Host@889,whole:Route@898,whole:Route@902 49000bc54f59bd5c264ed8eaeb05568112c94923466e63f41de89374b10d80ae |
| +internal/edge/heldstream.go heldTask.startAdmit legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): new; starts a goroutine calling act.AdmitHeldLeg for the route (the held leg is admitted in memory under the activator's a.mu). No read added; the Route is the one already loaded. whole:Route@128,whole:Route@190 d68f3241edb948ff47d39eb93ada8f7ed141bc6683282922e66533d910e2233f |
| +internal/edge/heldstream.go readHeldLeg legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): new; reads the leg's response from an in-memory io.Pipe (pr.Read, the +file:Read site), parsing SSE blocks with the size-bounded sseReader. The pipe is fed by the route's own proxy writing into it; not a file, socket or bucket read of its own. file:Read@884 de165c33679fcf9f178bda9a30b985b675ff6a021b2e586771a4c346179553a5 |
| +internal/activator/activator.go Service.BeginSidecarRequest legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Read serving lease health through servingError: stateless generations use local lifecycle/process supervision, while stateful generations keep the existing lease checks. No new I/O.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the admission loop moves out unchanged in its decisions into admitPassThrough (heldlegs.go) and the body now calls a.admitPassThrough(ctx, rt, nil). The reads it had are now reached through admitPassThrough: the in-memory entry, fence and state checks under a.mu; no registry, bucket or S3 read, and none added. whole:Route@229 7c177c8a70d432022a1a221bbd9d49c3724b3fbf984b48e7e5deda37fbafe84b |
| +internal/edge/edge.go Edge.Reload legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test (generation proxy, hib, no-activator 404) is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance goes through the activator; binary rows unchanged;rev3=census-ruling-edge-roll-blip;basis=the tcpProxy and multiProxy calls pass e.hold (the per-Edge localHold set once in newEdge): a loopback TCP upstream that refuses is redialled for up to 13 s and a probed route with a local upstream waits for prober readmission instead of answering 502/503 (#434 part B); edge-side dial policy only, no read added, same 52 sites;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: after the alias fold, reads the regional_domains rows (e.reg.ListRegional; an error aborts the reload as every registry read here does) and applies them with foldRegional against the routes slice the same reload read; the added reads are that one registry list and the routes already read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Tasks 4 and 6: the forward case (fleetProxy toward the binding's FleetBox, throttled refusal); one refusal check before the switch from FleetArmVerdict (sidecar not judged; a non-ready forward row refused; a forward row always judged by FleetServeEligible, any other row only where tunnels are on; an alias of a refused source refused with it); the accountless note; path rows of a forward host not folded; no alias folded onto a refused row; refusedHosts held through every fold. ListFleets and FleetChannelAuth read before the loop (+registry:FleetBox, +registry:Host x7, +whole:Route x3). Serving only; the hub's agent, not root. Review R1 finding 2: the switch reads verdict.Served (FleetArmVerdict) by host; the forward case and the fleet-placed case take their fleet from it (served.Fleet) instead of FleetPlacement(t.Region), and an admitted forward row not Served continues rather than falling through (+registry:Host, -registry:Region); the same rows take the same arms; no read added. Review R2: the switch is on DispatchArm(t, viaFleet, tunnels) (the order moved there unchanged: forward only when in Arm, own Tunnel, fleet, socket, addrs, static, status, else continue), the fleet cases read verdict.Arm (renamed from Served), and the platform-alias fold is foldPlatformAliases with the same take (source entry, own paths, alias marks) and the same refusal log (-registry:Kind x2, -registry:Socket, -registry:Tunnel, +whole:Route: those reads moved into DispatchArm); same rows, same arms, same entries; no read added.;rev3=census-ruling-fleet-routes-followups;basis=the owners map is now e.reg.FleetOwners() instead of ListFleets folded inline: the same fresh-connection ListFleets read and the same name->account map (-registry:Account, -registry:Name, -whole:Fleet x2 move into Registry.FleetOwners); no read added; same error path (abort the reload);rev3=census-ruling-tunnel-websockets;basis=The ArmTunnel arm now records its tenancy (Account, App, Tunnel) copied from the row t that Reload already lists; no new registry query, no file read. Also the reload mutex taken first and held to return, five nil-in-production test hooks, and the sweepUpgrades call after the swap, which reads only the map Reload has just built (spec 7, Tasks 3 and 4).;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5, rule 3): the two fleet proxy builds pass the row to fleetBoxOf(t) instead of reading t.FleetBox (-registry:FleetBox x2, +whole:Route x2); fleetBoxOf answers FleetLabel as authoritative when set, else FleetBox; an authoritative box has no fallback to another of the fleet's channels (503 errFleetDark instead). The edge in the agent, not root; it routes to fewer channels, never more.;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): after the new upstream map is published, closes the held streams of any host the new map no longer holds (absent, not hibernating, route no longer Hibernate). Reads the freshly built in-memory map m and the in-memory held set; no read added beyond the rebuild Reload already does. registry:Account@9444,registry:Alias@24246,registry:Alias@24333,registry:Alias@24913,registry:App@9460,registry:Health@13185,registry:Health@13311,registry:Hibernate@28433,registry:Host@10771,registry:Host@10828,registry:Host@10864,registry:Host@11607,registry:Host@13794,registry:Host@13889,registry:Host@14177,registry:Host@14203,registry:Host@14255,registry:Host@18708,registry:Host@20615,registry:Host@20923,registry:Host@20950,registry:Host@21765,registry:Host@22337,registry:Host@24667,registry:Host@24716,registry:Host@4701,registry:Host@4755,registry:Host@4805,registry:Host@5826,registry:Kind@17044,registry:Kind@17066,registry:Prefix@22312,registry:Socket@11671,registry:Socket@20931,registry:Status@4626,registry:Target@22324,registry:Tunnel@9304,registry:Tunnel@9475,registry:Version@17025,registry:Version@17127,whole:RegionalDomain@25555,whole:Route@10919,whole:Route@11027,whole:Route@11727,whole:Route@14328,whole:Route@14392,whole:Route@14443,whole:Route@20983,whole:Route@20990,whole:Route@21086,whole:Route@22200,whole:Route@23368,whole:Route@25547,whole:Route@28435,whole:Route@294,whole:Route@3381,whole:Route@3439,whole:Route@5855,whole:Route@6731,whole:Route@6839,whole:Route@9366,whole:RouteAlias@24217,whole:RoutePath@21743 45fe4a8274770840369b09678e642c3c40ca61411ffe2d8a8b687e168376f111 |
| +internal/edge/forwardha.go Edge.frontForwardHA legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): the agent's edge decides at the front door whether to forward a visitor request: reads the route's HA flag and host from the box's own registry row and asks the activator; forwards only to a box in view over the existing signed hop; root never calls it;rev3=census-ruling-region-ha-dead-holder-backoff;basis=ForwardTarget returns a ForwardDecision (Ref, Refuse, Gen); a Refuse is answered at the front door with the existing unreachable answer (503, Retry-After: 10, same body, via answerHolderUnreachable), with no forward, dial, note or per-request step. A forward passes the decision to forwardHA and NoteForward carries Ref and Gen back. The round-1 connection callback (NoteConnected) is gone: the dial bound now lives in forwardTransport's forwardDialGate, which coalesces TCP dials per holder address in memory. The same 5 read sites; no new read; root never calls it.;rev3=census-ruling-region-ha-p1b3a;basis=Pass the existing route to a lazy cached wakeSnapshot closure, handle explicit local denial before all accounting, and refuse a disappeared Placement choice rather than falling through locally; whole Route read only, no new store or filesystem operation and no root authority.;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): for a marked request to a hibernating HA route it uses the new HAForwarderFromMemory (ForwardTargetFromMemory) instead of ForwardTarget, so the hold path makes no holder-lock read; a non-stream marked request is left to this box's classification, and a holder not known from memory is answered with the one-retry event. The unmarked path is unchanged. Reads only the request mark and the already-loaded route and home map; no read added. registry:HA@225,registry:Hibernate@584,registry:Host@1745,whole:Route@1244,whole:Route@1368,whole:Route@1748,whole:Route@228,whole:Route@515,whole:Route@587 beb95a0e9c7f561de27536cb7042ff5af3f04387275ed3049f8797066f1d1656 |
| +internal/activator/haforward.go Service.ForwardTarget legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): the agent's activator answers the edge with a holder box ref for an HA route not awake here, from its in-memory holder cache or one bounded (2 s) lock.json read through readHolderView; reads the route's HA flag and host from its own registry row; root never calls it;rev3=census-ruling-region-ha-dead-holder-backoff;basis=Returns edge.ForwardDecision (Ref, Refuse, Gen) from holderCache.resolve, in memory only: a suspect holder refuses; a positive entry forwards under its generation; a failed read that revalidates an expired suspect keeps it suspect and refuses. The round-1 cache connection gate is removed. The same single bounded (2 s) lock.json read through readHolderView on a miss; no new read and no new S3 request; root never calls it.;rev3=census-ruling-region-ha-p1b3a;basis=Retain immutable lock observations and evaluate the pure placement rule after all existing bypass and positive-holder/suspect checks. Fix round 1: decide and reserve under one peer mutex using only current serving candidates, and log the final Base/Refuse decision if attempt tagging loses a race. Reads in-memory route Host and the Route passed to the pure rule; same bounded lock read, no new store or filesystem operation and no acquire authority.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): becomes a thin wrapper: it calls a.forwardTarget(ctx, rt, snapshot, false) and returns the decision. The holder-lock read (holders.resolve with the read closure) and the HA/Host reads it had are now made in forwardTarget, holderReadFor and decideForward with the same arguments, in the same order; the read set is moved, not widened. whole:Route@165 ddfb37ce959ca4f9b1ae5741cb6e5c82b13498e8134fe2875e7f2ce903a4f6a7 |
| +internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6).;rev3=census-ruling-console-protection-tab;basis=one more call in the observer defer, observeGuardCount(up.route, out), beside the observeRecords call that files the guard Match: it passes on the route row the defer already holds (+whole:Route) and the request outcome to the usage meter, which counts the check in memory. Called whether or not the request was unbilled, as observeRecords is. Nothing is opened, read or followed; no new kind of read; no check, refusal or serving decision changes.;rev3=census-ruling-probe-burst-limit;basis=answers a probe-burst notice POST (serveBurstNotice) ahead of every route for a non-door caller; builds the guard state for up.route and stamps its account and app (RouteAccount, App) for the cool-down's this-app/other-app label; for a catalogue match on a non-static or tunnelled route, offers the burst rule (in-memory limiter, burstDecide: 429 or a watch verdict, never a block for a fleet or forward row); the observer defer calls noteBurst(up.route, ...); the added sites are the route value already in hand (+registry:App, +whole:Route x5); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added. file:ReadAll@14985,registry:App@21083,registry:Gate@13959,registry:Gate@25474,registry:Gate@25534,registry:Gate@25592,registry:Host@25577,registry:ImportGate@32977,registry:Kind@19945,registry:Kind@23383,registry:Kind@32919,registry:Kind@32948,whole:Route@13854,whole:Route@13965,whole:Route@17507,whole:Route@17965,whole:Route@18157,whole:Route@19948,whole:Route@21009,whole:Route@21075,whole:Route@21086,whole:Route@21339,whole:Route@21434,whole:Route@21510,whole:Route@21554,whole:Route@21856,whole:Route@21886,whole:Route@23386,whole:Route@23671,whole:Route@25477,whole:Route@25537,whole:Route@25580,whole:Route@25595,whole:Route@26513,whole:Route@28576,whole:Route@32922,whole:Route@32951,whole:Route@32980,whole:Route@33012,whole:Route@34860 41ae49543e1e31ae8060fc973b478b8aa85e2961da1f3280fde3f2a983dd4ea4 |
| +@coverage internal/activator 5a31f076ffdb657262bc40eda52738e3fc0988dbcaef73b7993a14941827cbfb |
| +@coverage internal/edge d4e27b667e0f3135063f961eff22baa283581307452d667c089649bec452b544 |
| +@coverage internal/host f8fbac36f9f684459af815265270e1a124af8720cf2dd394310a7fb61cc4ba6c |
| +@coverage internal/status c2d07367b1557b9e7e009e5ed2e453426acc6462b0d730dab6faaf54b1037a32 |