carlos / platform Public

Region HA P1b-2: census proposal (census-ruling-region-ha-p1b2) and the branch review records

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 23717929f70e28be853b8aa35e9c53d538604ba0 parent 9ffce8d
5 files changed, +103 −0
  • docs/superpowers/notes/census-proposal-region-ha-p1b2.md +39 −0
  • docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1-RECHECK.md +9 −0
  • docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1.md +23 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-region-ha-p1b2.tsv +31 −0

CI failed — run details

Intent

Human

<task-notification> <task-id>a2c8cf94f002a27be</task-id> <tool-use-id>toolu_01VVWoHWzs7U4HM1qNZZGLtY</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/953e7524-2e06-4308-b9ce-fd1b38579971/tasks/a2c8cf94f002a27be.output</output-file> <status>completed</status> <summary>Agent "Implement Task 3: activator holder cache" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE. Each holder lookup's lock read is now capped at 2 s, so a stalled store can no longer hold visitor requests indefinitely. Commit: 9ffce8d7 `region-ha p1b-2: holder discovery's lock read is bounded at 2 s`. Git printed the same `packed-refs.lock` message again, but the commit landed. - **The fix:** the read now runs under `holderReadTimeout = 2 * time.Second`. It is detached from the first visitor's cancellation on purpose, so one visitor hanging up doesn't fail the requests queued on the same read. A timeout caches nothing and ends the flight. - **TDD:** I added the new stalled-read test first and it failed (requests were still waiting after 4.0 s). After the fix it passes in about 2.0 s. All 10 concurrent lookups return "", nothing is cached, no flight is left, and the next lookup returns "b" with one GET. - **Tests:** the brief's command and `HA|SameBox|Takeover|Lease` pass, gofmt and vet are clean, and the linux, darwin and windows builds succeed. Concerns: none new. The review's P3 (a holder that can't be reached costs one GET plus up to a 2 s dial per request until its lease expires) stays a follow-up. An untracked file I didn't create, `docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1.md`, is in the worktree. I left it alone. Report (fix round 2 appended): /home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/.superpowers/sdd/2026-10-29-region-ha-p1b2-forwarding/task-3-report.md</result> <usage><subagent_tokens>164264</subagent_tokens><tool_uses>8</tool_uses><duration_ms>187890</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>bg34lebgq</task-id> <tool-use-id>toolu_01Huyhq4Nc84V8gKkpM6vtBE</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/953e7524-2e06-4308-b9ce-fd1b38579971/tasks/bg34lebgq.output</output-file> <status>completed</status> <summary>Background command "Run the scoped re-review of the branch fix" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 62.1 g CO₂e (8,111,511 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on region-ha-p1b2-forwarding, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/notes/census-proposal-region-ha-p1b2.md b/docs/superpowers/notes/census-proposal-region-ha-p1b2.md
new file mode 100644
index 000000000..397976df7
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-region-ha-p1b2.md
@@ -0,0 +1,39 @@
+# Census approval: region-ha-p1b2
+
+Ruling `census-ruling-region-ha-p1b2`. The independent reviewer approves or rejects every change below, 9 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.doWake` | body | unchanged (84) | region HA P1b-2: a successful acquire drops the host's holder-cache entry; same reads |
+| `internal/activator/activator.go` `type Service` | body | unchanged (0) | region HA P1b-2: gains the holder cache and its single-flight state; no read |
+| `internal/edge/cookiescope.go` `Edge.responseModifier` | body | unchanged (2) | region HA P1b-2: strips an app-supplied X-Carlos-Holder (header, announced trailer name, trailer values at body close) so only the platform names a lease holder; same reads |
+| `internal/edge/edge.go` `Edge.ServeHTTP` | body | unchanged (27) | region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads |
+| `internal/activator/activator.go` `Service.serve` | sites | +whole:Route ×2 | region HA P1b-2: a verified HA hop this box cannot serve gets the holder diagnostic; two new whole:Route sites pass the route to answerForwarded/noteNoHolder; no new kind of read |
+
+Envelopes re-pinned: `internal/activator`, `internal/edge`.
+
+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.doWake`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census ruling 292's legacy start mark and lease give-back; census ruling owed's pending record) with the seeded change ruled under census-ruling-seeded-instances (the refreshed row checked against the row the wake began from, twice; the seed's first upload recorded after the wake), and now one more line on a failed start: a start its pre-exec gate refused (launchNotStarted: the exec gate, the pending record or its recheck answered no before root was asked) is recorded as known not started (stopObservation.notStarted) instead of uncertain, only when the wake has started nothing else (wakeStartedNothing); otherwise it goes through cleanupFailedWake and its proofs. A refusal before its lease (step 1), which has started nothing, is recorded the same way. Read sites unchanged; no new read and no root decision;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=marks the end of each wake step on the woken instance's journal timer (wakeSteps: a.now() and a slice append, journal only); no read added, no step reordered;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: (1) after the restore it asks the backend for the replication class an HA restore imported from the host's published wake state (restoredReplication(rt)) and, if it differs, logs it and sets rt.Replication and the entry's route to it; (2) an HA lease of the stream class replicates with a 1 s monitor interval (SetMonitorInterval); (3) after Replicate, an HA replica opens the entry's files publisher (openEntryFiles(ctx, e, rt)) and starts it, and a publisher that will not open fails the wake through cleanupFailedWake; (4) every cleanupFailedWake call passes e; (5) final fix F1: the two start-error arms that gave the lease straight back (a start its pre-exec gate refused with nothing started, and the default arm) now call giveBackAfterStart(ctx, rt, w, lease), which gives a legacy lease back exactly as before and an HA one only over an empty host slice. New sites: registry:Replication x5 (the class compare, the log line, the assignment and the HA sync-interval check) and whole:Route x6 (rt handed to restoredReplication, openEntryFiles, the cleanup calls and giveBackAfterStart); no file read in this body; only adds a condition before an HA release, no check removed;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: the rootfs admission runs before the claim path and before Acquire on the refreshed row (rootfsWakeRefusal), again in full if a re-read under the lock changed any gate field, and a resident wake re-checks residentRunnable; for a rootfs row a held lease or refused config is an ownership refusal; a rootfs first boot (no good version, fresh) places the empty database under the lease (placeRootfsDB) and uploads it once (syncRootfsPlaceholder), while fresh with a good version is refused as a lost database; declared processes are logged after the wake (rootfsProcessesHook); binary rows unchanged; fix wave 1 and 2 (6189a9db, then the r2 ruling "refuse interrupted init"): a fresh rootfs first boot goes through rootfsFirstBoot (rootfsmarker.go) instead of placeRootfsDB alone: under the lease it reads the lifetime's first-boot marker from the hibernate bucket (present or unreadable refuses, present as errRootfsReplicaMissing), writes it create-only, reads it back (only a read back that finds it confirms it; a write conflict proves nothing), and only then places the database; a warm wake does nothing with the marker (fix wave 1's settleRootfsFirstBoot call and its whole:Route site are gone, no local pending record); adds refusals only, binary rows unchanged;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: (1) refuses (errWakeUnproven) while another entry's release record of the host is open; (2) a rootfs row with a plan or a pin reads its declared processes before the lease (declaredProcesses(rt, g): the existing staged-manifest read of ExecBackend.Processes, the manifest root's staging wrote, checked against the identity's path and digest) and refuses before Acquire on an error; (3) the staged-identity start runs releaseInWake(ctx, e, rt, id, lease) before startGenExe, under this wake's lease, and a release that did not pass fails the wake; (4) a rootfs row with no plan, no pin and no staged identity is refused, the lease given back, nothing started; (5) a start error whose release is not proven stopped hands the lease to the release record (oweWakeLeaseToRelease) instead of giving it back. New sites +whole:Route x2 (rt to declaredProcesses and releaseInWake); no new file read beyond the existing staged-manifest read; binary rows unchanged;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: step 7 no longer calls rootfsProcessesHook (log only); it calls declareRootfsWorkers(e, rt, w), which registers the workers the wake's generation declares as pending and starts nothing (the resident tick starts them once the entry is awake under its lease watch); a worker is never a failure of the wake; the read of the declaration is the existing staged-manifest read (see registerRootfsWorkers); the same read sites in this body, no new read
+- `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
+- `internal/edge/cookiescope.go` `Edge.responseModifier`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-3;basis=the ModifyResponse hook now also strips any asset cache header or trailer the app set (stripAssetResponseHeaders, stripAssetTrailers: X-Carlos-Asset-Fill, X-Carlos-Asset-Fill-Ack, X-Carlos-Asset-Expires, Carlos-Cache) between the purge channel and the cookie scoping; it deletes response headers only; read sites unchanged (2); no read added
+- `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
+- `internal/activator/activator.go` `Service.serve`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-hotfix281;basis=Startup repeats the existing Kind and Hibernate checks; error logging moved to serveWakeError. A request held through startup re-reads its own route's Socket and Addr and can only refuse (wake-timeout 503) when recovery moved them; agent-side, deny-only, no root decision.;rev3=census-ruling-edge-request-records;basis=passes the member request r to begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance is the activator's; same deploy-safety for binary rows
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/activator/haforward.go:ExecBackend.readHolderView`: reads +registry:Host; written legacy, accepted-legacy, frozen
+- new `internal/activator/haforward.go:Service.ForwardTarget`: reads +registry:HA, +registry:Host ×4, +whole:Route ×2; written legacy, accepted-legacy, frozen
+- new `internal/activator/haforward.go:Service.answerForwarded`: reads +whole:Route; written legacy, accepted-legacy, frozen
+- new `internal/activator/haforward.go:boxSelfRef`: reads +file:Exec; written legacy, accepted-legacy, frozen
+- new `internal/activator/haforward.go:forwardedHA`: reads +registry:HA; written legacy, accepted-legacy, frozen
+- new `internal/activator/haforward.go:holderReaderFor`: reads +whole:Route ×2; written legacy, accepted-legacy, frozen
+- new `internal/activator/haforward.go:noteNoHolder`: reads +whole:Route; written legacy, accepted-legacy, frozen
+- new `internal/edge/forwardha.go:Edge.frontForwardHA`: reads +registry:HA, +registry:Host, +whole:Route ×3; written legacy, accepted-legacy, frozen
+- reads `internal/activator/activator.go:Service.serveWakeError`: +whole:Route; keeps diagnostic, task C,J4
+
+Seal: `94b8ccf921f64be24a4773f72d55a8e24ceba3acfb40eefe3b56af6f5b008138` → `b8341530f4a5e8101746f610ee8eb25bd273bed6f45bf6a2ff279e9b8c20c0b1`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-region-ha-p1b2.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1-RECHECK.md b/docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1-RECHECK.md
new file mode 100644
index 000000000..069d00ffe
--- /dev/null
+++ b/docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1-RECHECK.md
@@ -0,0 +1,9 @@
+**P2 — ADDRESSED.** The complete holder read now runs under a two-second timeout, with deferred cancellation: [haforward.go:130](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/internal/activator/haforward.go:130).
+
+Detaching from visitor cancellation introduces no background read goroutine. The bounded context reaches `GetObject` and remains active through body consumption and closure: [legacytake.go:113](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/internal/lease/legacytake.go:113). On timeout, the result is not cached. Deferred cleanup removes the flight and releases waiters; waiters also retain their own cancellation path: [hacache.go:150](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/internal/activator/hacache.go:150), [hacache.go:167](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/internal/activator/hacache.go:167).
+
+The new witness checks concurrent callers return, nothing is cached, the flight disappears, and a subsequent lookup succeeds: [haforward_test.go:478](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/internal/activator/haforward_test.go:478). It covers stalled headers; body-stall and cancellation behavior were checked by source inspection.
+
+No new Critical/Important breakage found in `cc508a8d..9ffce8d7`. `git diff --check` passed. The targeted test could not start because the read-only sandbox rejected Go’s work directory. No files were edited, subagents spawned, or full suites run.
+
+**All findings addressed: yes**
\ No newline at end of file
diff --git a/docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1.md b/docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1.md
new file mode 100644
index 000000000..6b2126855
--- /dev/null
+++ b/docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B2-BRANCH-1.md
@@ -0,0 +1,23 @@
+No P1 found. Two findings:
+
+1. **P2 — Bound the holder lookup’s duration.** Task 3, [haforward.go:120](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/internal/activator/haforward.go:120).
+
+ `ForwardTarget` passes the visitor’s context directly to `ReadLock`, before entering the activator’s bounded wake path. If the store accepts the connection but stalls its headers or body, the initiating request can wait indefinitely. Concurrent requests for that host join the same unfinished flight ([hacache.go:150](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/internal/activator/hacache.go:150)). The production HTTP server supplies no request deadline.
+
+ **Fix:** give holder discovery an explicit timeout, covering the complete read. On timeout, cache nothing and release the flight. Add a stalled-read witness proving that the initiator and waiters return, and a subsequent lookup can proceed.
+
+ **Fault family:** bounded request waiting during holder discovery.
+
+2. **P3 — Keep the dead-holder amplification as a follow-up.** Task 3, [haforward.go:155](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b2/internal/activator/haforward.go:155).
+
+ After a failed dial, the entry is dropped. The next request reads the unchanged, unexpired lease and attempts the same dead holder again: one GET plus up to two seconds dialing per sequential request.
+
+ **Disposition:** this need not block merge. It follows the agreed invalidation rules, preserves single-writer safety, and ends when the lease expires or the holder leaves view. A later bounded suspect/backoff state could reduce repeated work while preserving lease fencing.
+
+ **Fault family:** request and storage amplification during holder failure.
+
+Source inspection found no additional production wiring gap, onward-forward path, or duplicate per-request processing on the forwarding box. The tests contain meaningful witnesses for those claims, including `SplitBackend` discovery.
+
+Targeted tests could not start: the read-only sandbox rejected creation of Go’s work directory. `git diff --check` passed. No files were edited; no subagents or full suites were run. Census remains the separately scheduled step.
+
+READY AFTER FIXES
\ No newline at end of file
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 8d944141b..dbafce313 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -34,3 +34,4 @@ plan14-root-reads-static-dir-slash.tsv fb7cd756f7c3eb2dc019c8fd55fea5475e2df7ee3
plan14-root-reads-named-unit-delivery-114.tsv d92c9d40eb2a9e66c859e2fe6df3af10a1b9d3a83b1d717ec928cb432eebb1aa
plan14-root-reads-fleet-secrets-key.tsv 9df7f5aca9a502966c9643b7062829c1c25bfbd86fa20e92d764d66f676d2cd6
plan14-root-reads-static-headers.tsv 94b8ccf921f64be24a4773f72d55a8e24ceba3acfb40eefe3b56af6f5b008138
+plan14-root-reads-region-ha-p1b2.tsv b8341530f4a5e8101746f610ee8eb25bd273bed6f45bf6a2ff279e9b8c20c0b1
diff --git a/internal/provision/testdata/plan14-root-reads-region-ha-p1b2.tsv b/internal/provision/testdata/plan14-root-reads-region-ha-p1b2.tsv
new file mode 100644
index 000000000..ab83fbc33
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-region-ha-p1b2.tsv
@@ -0,0 +1,31 @@
+# Census overlay region-ha-p1b2, written by census-propose (#369). census-ruling-region-ha-p1b2, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-region-ha-p1b2.md.
+# 4 body, 1 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 9 new dispositions: 1 reads re-frozen at their disposition with the claim, 8 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
+@legacy 0efe3f2cef14579266e38109d984be44f66b6cc04a228b18267aa0abdd9059a6 internal/activator/activator.go Service.doWake legacy accepted-legacy accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census ruling 292's legacy start mark and lease give-back; census ruling owed's pending record) with the seeded change ruled under census-ruling-seeded-instances (the refreshed row checked against the row the wake began from, twice; the seed's first upload recorded after the wake), and now one more line on a failed start: a start its pre-exec gate refused (launchNotStarted: the exec gate, the pending record or its recheck answered no before root was asked) is recorded as known not started (stopObservation.notStarted) instead of uncertain, only when the wake has started nothing else (wakeStartedNothing); otherwise it goes through cleanupFailedWake and its proofs. A refusal before its lease (step 1), which has started nothing, is recorded the same way. Read sites unchanged; no new read and no root decision;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=marks the end of each wake step on the woken instance's journal timer (wakeSteps: a.now() and a slice append, journal only); no read added, no step reordered;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: (1) after the restore it asks the backend for the replication class an HA restore imported from the host's published wake state (restoredReplication(rt)) and, if it differs, logs it and sets rt.Replication and the entry's route to it; (2) an HA lease of the stream class replicates with a 1 s monitor interval (SetMonitorInterval); (3) after Replicate, an HA replica opens the entry's files publisher (openEntryFiles(ctx, e, rt)) and starts it, and a publisher that will not open fails the wake through cleanupFailedWake; (4) every cleanupFailedWake call passes e; (5) final fix F1: the two start-error arms that gave the lease straight back (a start its pre-exec gate refused with nothing started, and the default arm) now call giveBackAfterStart(ctx, rt, w, lease), which gives a legacy lease back exactly as before and an HA one only over an empty host slice. New sites: registry:Replication x5 (the class compare, the log line, the assignment and the HA sync-interval check) and whole:Route x6 (rt handed to restoredReplication, openEntryFiles, the cleanup calls and giveBackAfterStart); no file read in this body; only adds a condition before an HA release, no check removed;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: the rootfs admission runs before the claim path and before Acquire on the refreshed row (rootfsWakeRefusal), again in full if a re-read under the lock changed any gate field, and a resident wake re-checks residentRunnable; for a rootfs row a held lease or refused config is an ownership refusal; a rootfs first boot (no good version, fresh) places the empty database under the lease (placeRootfsDB) and uploads it once (syncRootfsPlaceholder), while fresh with a good version is refused as a lost database; declared processes are logged after the wake (rootfsProcessesHook); binary rows unchanged; fix wave 1 and 2 (6189a9db, then the r2 ruling "refuse interrupted init"): a fresh rootfs first boot goes through rootfsFirstBoot (rootfsmarker.go) instead of placeRootfsDB alone: under the lease it reads the lifetime's first-boot marker from the hibernate bucket (present or unreadable refuses, present as errRootfsReplicaMissing), writes it create-only, reads it back (only a read back that finds it confirms it; a write conflict proves nothing), and only then places the database; a warm wake does nothing with the marker (fix wave 1's settleRootfsFirstBoot call and its whole:Route site are gone, no local pending record); adds refusals only, binary rows unchanged;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: (1) refuses (errWakeUnproven) while another entry's release record of the host is open; (2) a rootfs row with a plan or a pin reads its declared processes before the lease (declaredProcesses(rt, g): the existing staged-manifest read of ExecBackend.Processes, the manifest root's staging wrote, checked against the identity's path and digest) and refuses before Acquire on an error; (3) the staged-identity start runs releaseInWake(ctx, e, rt, id, lease) before startGenExe, under this wake's lease, and a release that did not pass fails the wake; (4) a rootfs row with no plan, no pin and no staged identity is refused, the lease given back, nothing started; (5) a start error whose release is not proven stopped hands the lease to the release record (oweWakeLeaseToRelease) instead of giving it back. New sites +whole:Route x2 (rt to declaredProcesses and releaseInWake); no new file read beyond the existing staged-manifest read; binary rows unchanged;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: step 7 no longer calls rootfsProcessesHook (log only); it calls declareRootfsWorkers(e, rt, w), which registers the workers the wake's generation declares as pending and starts nothing (the resident tick starts them once the entry is awake under its lease watch); a worker is never a failure of the wake; the read of the declaration is the existing staged-manifest read (see registerRootfsWorkers); the same read sites in this body, no new read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a successful acquire drops the host's holder-cache entry; same reads registry:DBPath@1703,registry:DBPath@1719,registry:DBPath@1846,registry:DBPath@1857,registry:DBPath@28633,registry:GoodVersion@13796,registry:Host@1532,registry:Host@1607,registry:Host@1685,registry:Host@1837,registry:Host@2171,registry:Host@4121,registry:Host@577,registry:Host@6378,registry:Replication@12419,registry:Replication@12548,registry:Replication@12567,registry:Replication@12648,registry:Replication@28536,registry:Replication@28668,registry:Seed@17354,registry:Socket@1732,registry:Socket@1748,registry:Socket@1871,registry:Socket@1882,whole:Route@10640,whole:Route@11521,whole:Route@12399,whole:Route@12650,whole:Route@13999,whole:Route@15288,whole:Route@15480,whole:Route@16170,whole:Route@1630,whole:Route@17455,whole:Route@17526,whole:Route@19942,whole:Route@2066,whole:Route@2071,whole:Route@2125,whole:Route@2131,whole:Route@21800,whole:Route@2197,whole:Route@2205,whole:Route@22446,whole:Route@23753,whole:Route@23907,whole:Route@24406,whole:Route@24476,whole:Route@25063,whole:Route@26148,whole:Route@26579,whole:Route@26787,whole:Route@26841,whole:Route@27770,whole:Route@27955,whole:Route@28745,whole:Route@29157,whole:Route@29206,whole:Route@29584,whole:Route@30806,whole:Route@30901,whole:Route@3156,whole:Route@31742,whole:Route@3250,whole:Route@3317,whole:Route@357,whole:Route@4011,whole:Route@562,whole:Route@5747,whole:Route@6006,whole:Route@6268,whole:Route@6273,whole:Route@6330,whole:Route@6336,whole:Route@6405,whole:Route@6413,whole:Route@6729,whole:Route@6790,whole:Route@6888,whole:Route@7712,whole:Route@8695,whole:Route@9269,whole:Route@9570 0c6a4433c75c5cf7277a9a152786f05d3bb4f8861233aca9f8989f54a10a9e2d
+@legacy d6643307417f8b6ddb679f7705c5c97c69ae2d1bd9a1db07a0d326e9ddaa5633 internal/edge/cookiescope.go Edge.responseModifier legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-3;basis=the ModifyResponse hook now also strips any asset cache header or trailer the app set (stripAssetResponseHeaders, stripAssetTrailers: X-Carlos-Asset-Fill, X-Carlos-Asset-Fill-Ack, X-Carlos-Asset-Expires, Carlos-Cache) between the purge channel and the cookie scoping; it deletes response headers only; read sites unchanged (2); no read added;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: strips an app-supplied X-Carlos-Holder (header, announced trailer name, trailer values at body close) so only the platform names a lease holder; same reads whole:Route@106,whole:Route@316 05398b07ec0baf2e2dd8aa392aae67042c75460702949c24af8561f0cc0d6b33
+@legacy 024972c1934ce7da23d4bf009eb0d6795f783842bc12a514908b9e4982a5e2bc 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 registry:Gate@18885,registry:Gate@18945,registry:Gate@19003,registry:Host@18988,registry:ImportGate@24478,registry:Kind@14548,registry:Kind@17018,registry:Kind@24420,registry:Kind@24449,whole:Route@12356,whole:Route@12568,whole:Route@12760,whole:Route@14551,whole:Route@15854,whole:Route@15949,whole:Route@16025,whole:Route@16069,whole:Route@17021,whole:Route@18888,whole:Route@18948,whole:Route@18991,whole:Route@19006,whole:Route@20639,whole:Route@24423,whole:Route@24452,whole:Route@24481,whole:Route@26313 4f3393d0cb4e933510ee989fc0df016abe68adc051ce6a7bf9043f43e567b31d
+@legacy e9e68d4e9c9350499718dc6a23858fcec02221a16428a3befa64f656e38be2de internal/activator/haforward.go ExecBackend.readHolderView legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): one read of the host's lock.json in the box's own hibernate bucket and prefix (lease.ReadLock), keyed by the registry row's host; root never calls it registry:Host@165 a1ee59ca0b934426126623eb5ec37f00432efa66b6b37506cdad1637b1bf6f3a
+@legacy 56805a2f8dc664a9997d271e16c6359098712cc5dceff2641006a3d4f2dcf4f8 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 registry:HA@86,registry:Host@1022,registry:Host@208,registry:Host@307,registry:Host@405,whole:Route@142,whole:Route@763 8ac8312bc8d45c3bad6a3df01b6f546bd4106278cb9e70794294f6893443bc4d
+@legacy d02f9af3822f3c372d32df5819c451da8665e5dbdda991258c6675c431e6ad40 internal/activator/haforward.go Service.answerForwarded legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): writes the 503 Retry-After 1 with X-Carlos-Holder for a held lease on a verified HA hop; reads the route only to check HA; root never calls it whole:Route@131 f8b4616f37070cf2ce8069e78d48cbbe49ed8fa0366a25ad1469e52ad99b3d3e
+@legacy 644205a2a3ba78aa3065543226224c83be75fc92cfce83b902a2cc18dceba19a internal/activator/haforward.go boxSelfRef legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): this box's lease reference from the exec backend's configured identity (lease.CurrentSelf through Config.Self); the census's file:Exec is the SplitBackend.Exec field, not an exec; no I/O; root never calls it file:Exec@109 e182b10a0f0ddb061488e4eab8060d0bb87bd79bf927900c92a5841c9b8eedeb
+@legacy 7bdcaba2d7b794cc15d897d357f68cd65ab7548d172d82f367fd2c40f4941cf5 internal/activator/haforward.go forwardedHA legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): true for a verified hop on an HA route (the route's HA flag and edge.HopVerified); no I/O; root never calls it registry:HA@79 8bf49c41eab02be063ed9325369903bfb8cca8bce3a5e0d6ceb08b5924613e63
+@legacy 39f51ba95193af6c8f0a67d2f3000f890b5c60c615e88ce6fabfd32f63d45cdb internal/activator/haforward.go holderReaderFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): picks the backend half that serves the route (SplitBackend.pick), as every other call does; no I/O; root never calls it whole:Route@147,whole:Route@152 3c31fb2add1f0933ee27263081a183bdc86bb32e83cc51f3e70e2eb659af7477
+@legacy 2b51d58bc7ab1ac8afd9fe271d00d51cc5c5509c833525119b4d5945709752f6 internal/activator/haforward.go noteNoHolder legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): adds X-Carlos-Holder: none to a refusal of a verified HA hop; reads the route only to check HA; root never calls it whole:Route@109 2a8ed0a11264e58758644ef4042c795a21b66c1b406903339f09ae6808d85c4e
+@legacy 285996d7717640e97d1fe357a38122df70264e05e17a6166c6d2063a659c8605 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 registry:HA@225,registry:Host@501,whole:Route@228,whole:Route@407,whole:Route@504 2c9936721e996db822dca79af3597ed2c0fd29aa29e40fa6fc1f7512b3867106
+@legacy 3d59041197161742f3878b0d7d0f2cd97a80375f5244f07e8a84aca9ea06828e internal/activator/activator.go Service.serve legacy accepted-legacy accepted-legacy;rev3=census-ruling-hotfix281;basis=Startup repeats the existing Kind and Hibernate checks; error logging moved to serveWakeError. A request held through startup re-reads its own route's Socket and Addr and can only refuse (wake-timeout 503) when recovery moved them; agent-side, deny-only, no root decision.;rev3=census-ruling-edge-request-records;basis=passes the member request r to begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance is the activator's; same deploy-safety for binary rows;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a verified HA hop this box cannot serve gets the holder diagnostic; two new whole:Route sites pass the route to answerForwarded/noteNoHolder; no new kind of read registry:Addr@934,registry:Addr@948,registry:Host@1059,registry:Host@859,registry:Socket@905,registry:Socket@921,whole:Route@1127,whole:Route@2676,whole:Route@2777,whole:Route@329,whole:Route@3497,whole:Route@3560,whole:Route@884,whole:Route@993 d788f023e71cf3bc6bdadf106da3ed981b96e06a2a3408220b48dcf65fba419d
+internal/activator/activator.go Service.doWake legacy accepted-legacy accepted-legacy;rev3=census-ruling-292fix;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body (census ruling 292's legacy start mark and lease give-back; census ruling owed's pending record) with the seeded change ruled under census-ruling-seeded-instances (the refreshed row checked against the row the wake began from, twice; the seed's first upload recorded after the wake), and now one more line on a failed start: a start its pre-exec gate refused (launchNotStarted: the exec gate, the pending record or its recheck answered no before root was asked) is recorded as known not started (stopObservation.notStarted) instead of uncertain, only when the wake has started nothing else (wakeStartedNothing); otherwise it goes through cleanupFailedWake and its proofs. A refusal before its lease (step 1), which has started nothing, is recorded the same way. Read sites unchanged; no new read and no root decision;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=marks the end of each wake step on the woken instance's journal timer (wakeSteps: a.now() and a slice append, journal only); no read added, no step reordered;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: (1) after the restore it asks the backend for the replication class an HA restore imported from the host's published wake state (restoredReplication(rt)) and, if it differs, logs it and sets rt.Replication and the entry's route to it; (2) an HA lease of the stream class replicates with a 1 s monitor interval (SetMonitorInterval); (3) after Replicate, an HA replica opens the entry's files publisher (openEntryFiles(ctx, e, rt)) and starts it, and a publisher that will not open fails the wake through cleanupFailedWake; (4) every cleanupFailedWake call passes e; (5) final fix F1: the two start-error arms that gave the lease straight back (a start its pre-exec gate refused with nothing started, and the default arm) now call giveBackAfterStart(ctx, rt, w, lease), which gives a legacy lease back exactly as before and an HA one only over an empty host slice. New sites: registry:Replication x5 (the class compare, the log line, the assignment and the HA sync-interval check) and whole:Route x6 (rt handed to restoredReplication, openEntryFiles, the cleanup calls and giveBackAfterStart); no file read in this body; only adds a condition before an HA release, no check removed;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: the rootfs admission runs before the claim path and before Acquire on the refreshed row (rootfsWakeRefusal), again in full if a re-read under the lock changed any gate field, and a resident wake re-checks residentRunnable; for a rootfs row a held lease or refused config is an ownership refusal; a rootfs first boot (no good version, fresh) places the empty database under the lease (placeRootfsDB) and uploads it once (syncRootfsPlaceholder), while fresh with a good version is refused as a lost database; declared processes are logged after the wake (rootfsProcessesHook); binary rows unchanged; fix wave 1 and 2 (6189a9db, then the r2 ruling "refuse interrupted init"): a fresh rootfs first boot goes through rootfsFirstBoot (rootfsmarker.go) instead of placeRootfsDB alone: under the lease it reads the lifetime's first-boot marker from the hibernate bucket (present or unreadable refuses, present as errRootfsReplicaMissing), writes it create-only, reads it back (only a read back that finds it confirms it; a write conflict proves nothing), and only then places the database; a warm wake does nothing with the marker (fix wave 1's settleRootfsFirstBoot call and its whole:Route site are gone, no local pending record); adds refusals only, binary rows unchanged;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R3: (1) refuses (errWakeUnproven) while another entry's release record of the host is open; (2) a rootfs row with a plan or a pin reads its declared processes before the lease (declaredProcesses(rt, g): the existing staged-manifest read of ExecBackend.Processes, the manifest root's staging wrote, checked against the identity's path and digest) and refuses before Acquire on an error; (3) the staged-identity start runs releaseInWake(ctx, e, rt, id, lease) before startGenExe, under this wake's lease, and a release that did not pass fails the wake; (4) a rootfs row with no plan, no pin and no staged identity is refused, the lease given back, nothing started; (5) a start error whose release is not proven stopped hands the lease to the release record (oweWakeLeaseToRelease) instead of giving it back. New sites +whole:Route x2 (rt to declaredProcesses and releaseInWake); no new file read beyond the existing staged-manifest read; binary rows unchanged;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1: step 7 no longer calls rootfsProcessesHook (log only); it calls declareRootfsWorkers(e, rt, w), which registers the workers the wake's generation declares as pending and starts nothing (the resident tick starts them once the entry is awake under its lease watch); a worker is never a failure of the wake; the read of the declaration is the existing staged-manifest read (see registerRootfsWorkers); the same read sites in this body, no new read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a successful acquire drops the host's holder-cache entry; same reads registry:DBPath@1703,registry:DBPath@1719,registry:DBPath@1846,registry:DBPath@1857,registry:DBPath@28633,registry:GoodVersion@13796,registry:Host@1532,registry:Host@1607,registry:Host@1685,registry:Host@1837,registry:Host@2171,registry:Host@4121,registry:Host@577,registry:Host@6378,registry:Replication@12419,registry:Replication@12548,registry:Replication@12567,registry:Replication@12648,registry:Replication@28536,registry:Replication@28668,registry:Seed@17354,registry:Socket@1732,registry:Socket@1748,registry:Socket@1871,registry:Socket@1882,whole:Route@10640,whole:Route@11521,whole:Route@12399,whole:Route@12650,whole:Route@13999,whole:Route@15288,whole:Route@15480,whole:Route@16170,whole:Route@1630,whole:Route@17455,whole:Route@17526,whole:Route@19942,whole:Route@2066,whole:Route@2071,whole:Route@2125,whole:Route@2131,whole:Route@21800,whole:Route@2197,whole:Route@2205,whole:Route@22446,whole:Route@23753,whole:Route@23907,whole:Route@24406,whole:Route@24476,whole:Route@25063,whole:Route@26148,whole:Route@26579,whole:Route@26787,whole:Route@26841,whole:Route@27770,whole:Route@27955,whole:Route@28745,whole:Route@29157,whole:Route@29206,whole:Route@29584,whole:Route@30806,whole:Route@30901,whole:Route@3156,whole:Route@31742,whole:Route@3250,whole:Route@3317,whole:Route@357,whole:Route@4011,whole:Route@562,whole:Route@5747,whole:Route@6006,whole:Route@6268,whole:Route@6273,whole:Route@6330,whole:Route@6336,whole:Route@6405,whole:Route@6413,whole:Route@6729,whole:Route@6790,whole:Route@6888,whole:Route@7712,whole:Route@8695,whole:Route@9269,whole:Route@9570 0c6a4433c75c5cf7277a9a152786f05d3bb4f8861233aca9f8989f54a10a9e2d
+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 6a76d768e4d999fc6e280cdd1d775881fec148c6722b974c3c03085dfc7dec5d
+internal/edge/cookiescope.go Edge.responseModifier legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-3;basis=the ModifyResponse hook now also strips any asset cache header or trailer the app set (stripAssetResponseHeaders, stripAssetTrailers: X-Carlos-Asset-Fill, X-Carlos-Asset-Fill-Ack, X-Carlos-Asset-Expires, Carlos-Cache) between the purge channel and the cookie scoping; it deletes response headers only; read sites unchanged (2); no read added;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: strips an app-supplied X-Carlos-Holder (header, announced trailer name, trailer values at body close) so only the platform names a lease holder; same reads whole:Route@106,whole:Route@316 05398b07ec0baf2e2dd8aa392aae67042c75460702949c24af8561f0cc0d6b33
+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 registry:Gate@18885,registry:Gate@18945,registry:Gate@19003,registry:Host@18988,registry:ImportGate@24478,registry:Kind@14548,registry:Kind@17018,registry:Kind@24420,registry:Kind@24449,whole:Route@12356,whole:Route@12568,whole:Route@12760,whole:Route@14551,whole:Route@15854,whole:Route@15949,whole:Route@16025,whole:Route@16069,whole:Route@17021,whole:Route@18888,whole:Route@18948,whole:Route@18991,whole:Route@19006,whole:Route@20639,whole:Route@24423,whole:Route@24452,whole:Route@24481,whole:Route@26313 4f3393d0cb4e933510ee989fc0df016abe68adc051ce6a7bf9043f43e567b31d
+internal/activator/haforward.go ExecBackend.readHolderView legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): one read of the host's lock.json in the box's own hibernate bucket and prefix (lease.ReadLock), keyed by the registry row's host; root never calls it registry:Host@165 a1ee59ca0b934426126623eb5ec37f00432efa66b6b37506cdad1637b1bf6f3a
+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 registry:HA@86,registry:Host@1022,registry:Host@208,registry:Host@307,registry:Host@405,whole:Route@142,whole:Route@763 8ac8312bc8d45c3bad6a3df01b6f546bd4106278cb9e70794294f6893443bc4d
+internal/activator/haforward.go Service.answerForwarded legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): writes the 503 Retry-After 1 with X-Carlos-Holder for a held lease on a verified HA hop; reads the route only to check HA; root never calls it whole:Route@131 f8b4616f37070cf2ce8069e78d48cbbe49ed8fa0366a25ad1469e52ad99b3d3e
+internal/activator/haforward.go boxSelfRef legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): this box's lease reference from the exec backend's configured identity (lease.CurrentSelf through Config.Self); the census's file:Exec is the SplitBackend.Exec field, not an exec; no I/O; root never calls it file:Exec@109 e182b10a0f0ddb061488e4eab8060d0bb87bd79bf927900c92a5841c9b8eedeb
+internal/activator/haforward.go forwardedHA legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): true for a verified hop on an HA route (the route's HA flag and edge.HopVerified); no I/O; root never calls it registry:HA@79 8bf49c41eab02be063ed9325369903bfb8cca8bce3a5e0d6ceb08b5924613e63
+internal/activator/haforward.go holderReaderFor legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): picks the backend half that serves the route (SplitBackend.pick), as every other call does; no I/O; root never calls it whole:Route@147,whole:Route@152 3c31fb2add1f0933ee27263081a183bdc86bb32e83cc51f3e70e2eb659af7477
+internal/activator/haforward.go noteNoHolder legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b2;basis=new (region HA P1b-2): adds X-Carlos-Holder: none to a refusal of a verified HA hop; reads the route only to check HA; root never calls it whole:Route@109 2a8ed0a11264e58758644ef4042c795a21b66c1b406903339f09ae6808d85c4e
+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 registry:HA@225,registry:Host@501,whole:Route@228,whole:Route@407,whole:Route@504 2c9936721e996db822dca79af3597ed2c0fd29aa29e40fa6fc1f7512b3867106
+internal/activator/activator.go Service.serveWakeError diagnostic C,J4 rev3=PROPOSED-seed; incarnation-keyed missing-files diagnostics and indexed retry results; throttles output only and grants no retry, stop or launch;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more case, errLeaseRefused (a born-HA host outside the nested layout or an HA acquire's refusal): logged at most once per diagnostic window (allowFilesDiagnostic(rt.Host, ...)) and answered 503 with Retry-After: 10; the other cases unchanged; +registry:Host x2 are rt.Host in that call and the log line; it only answers;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: two new answers, a resident inside its backoff gets 503 with Retry-After (RFS-3-C16), and a rootfs row refused before the lease (errRootfsNotAdmitted) gets the existing wake-failed 503; no read added;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: for a verified HA hop, a held lease answers 503 Retry-After 1 with X-Carlos-Holder (answerForwarded) and every other refusal adds X-Carlos-Holder: none (noteNoHolder); legacy routes and cancellation unchanged; same reads registry:Host@1070,registry:Host@1134,registry:Host@2836,registry:Host@2900,whole:Route@204 a8834927132e29ac5cdf44b5caced8dc010d538f6552979f90b226a09fd13c2f
+internal/activator/activator.go Service.serve legacy accepted-legacy accepted-legacy;rev3=census-ruling-hotfix281;basis=Startup repeats the existing Kind and Hibernate checks; error logging moved to serveWakeError. A request held through startup re-reads its own route's Socket and Addr and can only refuse (wake-timeout 503) when recovery moved them; agent-side, deny-only, no root decision.;rev3=census-ruling-edge-request-records;basis=passes the member request r to begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance is the activator's; same deploy-safety for binary rows;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a verified HA hop this box cannot serve gets the holder diagnostic; two new whole:Route sites pass the route to answerForwarded/noteNoHolder; no new kind of read registry:Addr@934,registry:Addr@948,registry:Host@1059,registry:Host@859,registry:Socket@905,registry:Socket@921,whole:Route@1127,whole:Route@2676,whole:Route@2777,whole:Route@329,whole:Route@3497,whole:Route@3560,whole:Route@884,whole:Route@993 d788f023e71cf3bc6bdadf106da3ed981b96e06a2a3408220b48dcf65fba419d
+@coverage internal/activator d5e9cdd31f858c89c15724600c2363663349cbf387bfb65a37dedc7773d38437
+@coverage internal/edge fa1a9346be25056af127a10080582c20bae1407c7fba98ddce52e79b99c0b8de