Merge remote-tracking branch 'origin/main' into ha-departure-evidence
# Conflicts: # internal/provision/testdata/plan14-root-reads-chain.tsv
17 files changed,
+503
−71
.amadan/code-health.tsv+1 −1docs/site/rails.md+4 −0docs/site/rootfs.md+6 −0docs/superpowers/notes/census-proposal-fleet-client-address-1348.md+19 −0docs/superpowers/notes/census-proposal-ha-departure-evidence.md+0 −26docs/superpowers/notes/copy-luna-brief-fleet-client-address-1348.md+18 −0docs/superpowers/notes/copy-luna-fleet-client-address-1348.md+13 −0docs/superpowers/reviews/CODEX-FINDINGS-fleet-client-address-1348.md+17 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-client-address-1348.md+78 −0internal/edge/edge.go+31 −16internal/edge/homemap.go+14 −2internal/edge/linkpin_test.go+23 −9internal/edge/tunnel_client_addr_test.go+268 −0internal/gate/gate.go+4 −3internal/provision/testdata/plan14-root-reads-chain.tsv+1 −1internal/provision/testdata/plan14-root-reads-fleet-client-address-1348.tsv+6 −0internal/provision/testdata/plan14-root-reads-ha-departure-evidence.tsv+0 −13
diff --git a/.amadan/code-health.tsv b/.amadan/code-health.tsv| index 7b99e06ea..653e5c781 100644 |
| --- a/.amadan/code-health.tsv |
| +++ b/.amadan/code-health.tsv |
| @@ -2186,7 +2186,7 @@ func-lines internal/console (*Store).migrate - 335 |
| func-lines internal/console TestDemoProtectionsSourceToLimitAndTakedown - 412 |
| func-lines internal/console TestDemoSourceToLiveAndUpdate - 383 |
| func-lines internal/console TestHAP2ProductionDoors - 304 |
| -func-lines internal/edge (*Edge).ServeHTTP - 384 |
| +func-lines internal/edge (*Edge).ServeHTTP - 379 |
| func-lines internal/edge TestDemoAPIAliasBoundary - 360 |
| func-lines internal/edge TestRegionalNameNeverLeavesItsRegion - 330 |
| func-lines internal/edge TestTunnelWebSocketEndToEnd - 327 |
diff --git a/docs/site/rails.md b/docs/site/rails.md| index 9a53ffa1e..80cbd2005 100644 |
| --- a/docs/site/rails.md |
| +++ b/docs/site/rails.md |
| @@ -87,6 +87,10 @@ Then set config.active_storage.service = :carlos in production.rb, and add the a |
| Instances run with memory that cannot be written and executed at once, unless the release is shipped with carlos ship --jit, so YJIT cannot start without it. Rails 7.2 and later turn YJIT on by default. This app turns it off in production.rb with config.yjit = false. To keep YJIT, ship with --jit instead. |
| +### The visitor's address |
| + |
| +Rails request.remote_ip and Rack::Attack see the visitor's address without configuring which proxies to trust. [The visitor's address](/docs/rootfs#the-visitor-s-address) explains where it comes from. |
| + |
| ## The image |
| Build the image for arm64, which is what the boxes run. buildx does that on any machine, an Intel laptop included. When the image runs, its root filesystem is read-only, and only /tmp and the directory CARLOS_DB is in can be written. |
diff --git a/docs/site/rootfs.md b/docs/site/rootfs.md| index d1b4aa9a6..c01f2f9d9 100644 |
| --- a/docs/site/rootfs.md |
| +++ b/docs/site/rootfs.md |
| @@ -75,6 +75,12 @@ carlos ship --check warns when a process runs Node, Bun or Deno and the release |
| An instance can reach public addresses, such as an object store or a managed database's public endpoint. It cannot reach a private address unless a system operator allows it for the app with carlos apps set --egress-allow, and it never reaches the box it runs on or the cloud's metadata service. |
| +## The visitor's address |
| + |
| +Requests reach the web process with the visitor's address as the last entry of X-Forwarded-For. The platform writes that header itself and removes anything the visitor sent, so the last entry is always the address the platform saw. This also holds on a fleet box, where the request came in through the hub. |
| + |
| +Rails request.remote_ip and Rack::Request#ip, which Rack::Attack uses, both return it with no setup. |
| + |
| ## Commands and consoles |
| carlos run runs a one-off command on an instance: a data fix, a rake task, an artisan or manage.py command. It runs inside the instance's image, in web's working_dir, with web's environment and the same database. Its output comes back to your terminal, and carlos exits with the command's own status. |
diff --git a/docs/superpowers/notes/census-proposal-fleet-client-address-1348.md b/docs/superpowers/notes/census-proposal-fleet-client-address-1348.md| new file mode 100644 |
| index 000000000..117e168cb |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-fleet-client-address-1348.md |
| @@ -0,0 +1,19 @@ |
| +# Census approval: fleet-client-address-1348 |
| + |
| +Ruling `census-ruling-fleet-client-address-1348`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/edge/edge.go` `Edge.ServeHTTP` | body | unchanged (53) | hop acceptance moved into acceptIngress (pinned: dropHopHeaders; else acceptHop), which then, for a request a tunnel delivered (tunnelclient mark) whose X-Forwarded-For hubVisitor accepts (every entry an IP), carries its last entry as the gate attempt key (gate.WithClientAddr), as ServeLinked does (#1348); a context value on the request, memory only, no read, dial or store access added; no check weakened | |
| + |
| +Envelopes re-pinned: `internal/edge`, `internal/gate`. |
| + |
| +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/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;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.;rev3=census-ruling-region-ha-p3a;basis=Complete the P3a cut: an exact peer name with no dial target answers the approved admission 503 before local wildcard dispatch or asset serving. ExactHome and lookupHome stop fallback at a present non-dial entry; backhaulTo refuses an empty target before signing or dialing. Retain Task 3 local admission and fixed platform/unit exemptions. Two added whole Route uses feed the local in-memory admission predicate; existing Route values and store/path reads are unchanged.;rev3=census-ruling-stateless-coordinator-route;basis=P24/P25: POST only, exact /api/fleet/replicas/ prefix on the reserved tunnel host calls the existing local console proxy only for an unescaped, already-clean path; malformed forms remain on the hub. No new read sites relative to origin/main. Merge with main 3487d6f6 retains its region HA admission checks before routing and after login target lookup, its empty-home refusal, and their two existing whole:Route reads; these change this unit's digest relative to the previously approved branch tip 92b24a7d.;rev3=census-ruling-stateless-replicas-3;basis=Task 1a: pass the already-resolved Route to the reserved replica-probe handler after acceptHop and existing admissionRefuses, requiring tunnel context plus private marker and refusing door/backhaul ingress. Added whole Route use only; scrub marker before forwarding; HA calls remain unchanged.;rev3=census-ruling-region-ha-p3b;basis=Resolve local aliases/catch-alls with cached peer name ownership before serving. Add registry Account/App/ClaimStamp/Host/Incarnation/ServingSeq and six whole Route references for NameClaim; inputs are agent registry rows/edges publications used by unprivileged edge, not root permits. Closed owners retain names and return 503; aware remote owner cannot fall through on missing transport, while legacy hop/door behavior remains. Merge 45cebde4 retains authenticated replica probes after local admission and before ordinary name resolution; probe authentication still requires the tunnel context.;rev3=census-ruling-agent-start-demo-2;basis=edge.go:1901 enters the protected demo path before ordinary exits; :2012-2015 rechecks the selected marked Route after lookup. Added whole Route use routes demos through serving checks, counters and policy; no new registry query or file open in this unit.;rev3=census-ruling-demo-api-site-route;basis=Reserve the configured site API namespace after hop verification and control-header scrubbing, before ordinary static, cache, billing and tenant dispatch. Validate hop field shape and delegate only allowlisted operations to the dedicated console path with verified client attribution and console admission. The alias helper enables HTTP/1.1 full duplex so an early console refusal does not wait for upload EOF. Existing 56 read sites unchanged; no new registry, bucket or file read.;rev3=census-ruling-region-ha-g2-fixes;basis=Consult HA ingress after region admission and before miss/alias backhaul; no new direct read; routing-only metadata does not create an upstream.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3/W4: backhaul and door calls pass the owner the door checked into backhaulTo; the §6.5 holder follow (once, GET/HEAD or an unswitched upgrade, no body) and one connect-failure fallback dial only boxes in the holder region's view (same Region/Placement/DataBucket, HomeEligible, fresh) for that owner. Holder name comes only from the TLS-verified signed hop answer; app-set X-Carlos-Holder stays stripped. Routing only; the receiving box still re-checks the lease. No new read site.;rev3=census-ruling-edge-page-cache-1;basis=attaches an in-memory page mark holder to every request to an instance route (the +registry:Kind check of up.route.Kind), wraps the hold and upgrade branches in pageDiagnostics, asks servePage after the plan throttle (a hit answered from the page index over the asset store), keeps an opted-in instance out of the LRU (pagesOptedIn), wraps the response in the page writer, and wraps the proxy's writer in assetInformationalScrub on the remaining arms; the page reads are in the new pagecache.go units;rev3=census-ruling-region-ha-held-build;basis=first branch: a request for the reserved control paths /.carlos/ha-drain and /.carlos/ha-take goes to serveHAControl and returns (refused unless a signed ask); no request on those paths reaches a route, a forward or an app; no read added here. region HA held-requests Task 2: X-Carlos-Replayable is read from verified hops only and deleted from every request; just before frontForwardHA, moveGate runs for an HA hibernating route (route HA, Host and the whole Route passed in memory) and can only hold, refuse with an existing answer or front-forward to the confirmed holder; ReleaseMoveTicket before serveHeld; no store or filesystem read added; region HA held-requests Task 5: after the HA control-path branch, every request is counted by the connection drain (conns.track: a cancellable request context, and Connection: close only while draining); memory only; no read added; Task 5 fix 1: after the drain's final barrier a new request is refused at once through handoverExit with the existing answerHolderUnreachable, never forwarded; the tracked request also carries its connection (from ConnContext) so the drain can close it at its bound; memory only; no read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: the inbound strip also deletes tunnelclient.LinkAppHeader (Carlos-Link-App) from every client request, beside Carlos-Tunnel-Upgrade; a header delete, no read added; linked deployments slice 1 Task 8: a request carrying a link pin (ServeLinked, set only by the home agent's link handler from its own registry's published set) skips the edge's own handlers (HA control, demo handling, the steering probe, the tunnel hub, hop acceptance, the burst notice, the demo API alias, the replica probe), takes its upstream from selectUpstream (the pinned exact entry or a 502), never enters the alias/catch-all backhaul block, the HA front forward, the local asset catch, the page cache or the response LRU; the two lookupUpstreamPath calls become selectUpstream; no read added;rev3=census-ruling-stateless-replicas-4-r28;basis=R28 (#511): for a request whose host has no entry (the lookup miss), after the replica-probe branch, calls refuseRetiredCopy(r, host): within the grace of a host whose replica copy this box retired, the fleet tunnel stream is refused with REFUSED_STREAM (tunnelclient.Refuse) and nothing is written; any other miss gets the unknown-host answer as before; memory only, a refusal only, no read added;rev3=census-ruling-static-site-geo-962;basis=discussion #962: after planDisabledAdmit and before the page mark holder and the observer, a request whose cleaned path is /.carlos/geo (not a linked request) is answered by serveGeoAnswer from the request's geo answer already on the context (decideGeo), 200 JSON no-store or 405, and returns; merged with main (no new read);rev3=census-ruling-fleet-unrouted-503;basis=a request the hub tunnel delivered (tunnelclient mark, not a link channel) for a host this box neither routes nor backhauls answers 503 Retry-After 2 instead of the unknown-host 404; no new read, dial or store access; unmarked requests unchanged (#1008);rev3=census-ruling-fleet-unrouted-503-fix1;basis=a request the hub delivered over this fleet box's channel (MarkFleetChannel, set by the box's own tunnel loop for a "<fleet>/<label>" channel, plus the tunnel client mark) for a host this box neither routes nor backhauls, and not under a platform domain, answers 503 Retry-After 2 instead of the unknown-host 404; fixed log key; no new read, dial or store access; every other request unchanged (#1008);rev3=census-ruling-fix-dbforward-reuse-1032;basis=the drain tracking call now takes withDeclaredBodyEnd(r) instead of r: an HTTP/1 request with a declared Content-Length is served from there on with a body that answers EOF itself after those bytes (#1032), so a proxy transport's confirming read after sending the body upstream no longer lands on the server's closed request body and tears down the upstream connection; HTTP/2 requests are left as they are (Astra r1 P2); memory only, no read, dial or store access added;rev3=census-ruling-fleet-seeded-create-2;basis=The hub's door routing asks boxConsolePath(r) instead of the inline /api/fleet/replicas/ test, so POST /api/fleet/seeds/ goes to the local console by the same rule (POST only, clean path, no RawPath) as the replica doors. Serving only; no read of a path a tenant names; the same 65 read sites.;rev3=census-ruling-path-routes-across-boxes;basis=#186: selection returns requestSelection; a Remote selection is dispatched by servePathRemote (one signed hop, never from a verified hop, door call or pin); the ownership block moved to serveNameOwner/nameOwnerVerdict (pathhop.go), so its route reads left; login re-selection via loginLookupPath plus refuseLoginAcross; LRU also requires pathLRUAllowed; no read added |
| + |
| +Seal: `b2f039a12bb284c9a36b391339e25e3f77ec94a3d4e38389ec9ef75261d7873f` → `9fb6041c2fe2f33edf7cc2a0fb6dc05092015414b89cab3610ebcfc04c21d5b0`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-fleet-client-address-1348.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/docs/superpowers/notes/census-proposal-ha-departure-evidence.md b/docs/superpowers/notes/census-proposal-ha-departure-evidence.md| deleted file mode 100644 |
| index ca320c936..000000000 |
| --- a/docs/superpowers/notes/census-proposal-ha-departure-evidence.md |
| +++ /dev/null |
| @@ -1,26 +0,0 @@ |
| -# Census approval: ha-departure-evidence |
| - |
| -Ruling `census-ruling-ha-departure-evidence`. The independent reviewer approves or rejects every change below, 2 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| - |
| -| unit | change | read sites | what changed | |
| -|---|---|---|---| |
| -| `internal/host/hadepartures.go` `Controller.step` | sites | +whole:HAPendingTermination ×2 | A pending hint whose bound identity has an unknown or placement-null observation gets code evidence_no_observation: no enqueue, no enrollment, no completion or takeover authority. It claims a page through the new retry_hint_once op (falling back to the ordinary hourly retry if the server refuses it) and marks the hint paged only after PageIdentity succeeds. Reads only the local journal. | |
| -| `internal/registry/ha_journal.go` `Registry.haJournal` | sites | +file:QueryRowContext, +registry:Account ×4, +registry:At ×5, +registry:Code ×8, +registry:Found ×2, +registry:Hint ×2, +registry:IID ×4, +registry:Region ×4, +registry:sql, +whole:HAPendingTermination ×2, +whole:haJournalResponse ×8 | New ops retry_hint_once (reads the hint's own last_error, claims the existing global hourly page slot, writes next_attempt/last_page/last_error) and hint_paged (sets last_error to code plus paged when it still equals code). Same tables, same transaction helper, no new authority. | |
| - |
| -Envelopes re-pinned: `internal/host`, `internal/registry`. |
| - |
| -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/host/hadepartures.go` `Controller.step`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B3b: resolve bound same-scope identities, persist validated termination proof before enrollment, and replay bounded pending work outside consumer/fold locks. Existing regional data client and shared cache; inventory only restricts completion, never lifecycle. B3 fix r1: Describe before proof access on suspicion paths. Normalize validated legacy inbox entries in atomic transactions, process bounded per-iid pending pages, and persist hourly escalation. Delete unrelated rows only after complete applicable walks and guarded received timestamps. Acquire/completion authority unchanged. B4: Count unresolved durable hints for the globally throttled summary and call the bounded scanner outside the fold. Acknowledge unrelated hints only after complete applicable discovery; complete departure acknowledgment reads durable state. B4 fix r3: Include refused fixed-box replacements in the existing structured receiver summary, sharing its persisted hourly page claim with pending hints. Read only local refusal state and registry page state; no additional cloud request or completion authority.;rev3=census-ruling-region-ha-p3b;basis=Register admitted departure work and cancel/join it during closure before existing confirmation/import processing. Existing 23 read sites and lease/termination proofs remain; no new root input or takeover permission.;rev3=census-ruling-region-ha-g2-fixes;basis=Include identity and underlying paging errors in existing failure logs; new IID field read only, no new external read or termination authority.;rev3=census-ruling-region-ha-dr5;basis=DR-5: scans every due departure per step (at most 8), reading departure rows from the local journal (PendingDepartures) to detect progress; same ScanPass per departure, no new remote read. |
| -- `internal/registry/ha_journal.go` `Registry.haJournal`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B3b: read/write bounded termination inbox, pending departures, verified identity cache and retry/cursor state in the existing SQLite registry with remote parity. No reusable receipt, arbitrary path, import/completion/start authority; retries and page times survive replay. B3 fix r1: Add atomic compact hint enrollment, bounded due reads, received-time guarded removal and hourly page claims. Retain old inbox APIs for migration, no queue receipt or authority bit. All reads/writes stay in the existing SQLite registry with remote parity. B4: Extend the existing registry journal/schema/RPC with scan state, guarded completion phases, durable bounded retry count and one receiver-wide identity summary claim/count. All state stays in the existing database; no queue receipt is persisted and no import/start authority is granted by an inbox entry. B4 fix r2: Delegate existing identity RPC operations to historical storage helpers. Remote interface unchanged; historical ref/iid lookups retain the old binding and ref-only lookups return the latest incarnation. B4 fix r3: Inventory-only waiting resets RetryCount like scan/pending and retains the caller 30-second schedule. Add an atomic claim against the existing singleton identity-page row, shared with retry_hint. Existing database and HAJournal RPC only; no filesystem path or identity authority added. B5: Stream pending departure bodies from the existing registry to count all incomplete rows and find oldest enrollment, including delayed retries. Additive enrollment timestamp retains age when evidence is reobserved. No new path or execution input. |
| - |
| -New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| - |
| -- new `internal/registry/ha_journal.go:Registry.MarkPendingTerminationPaged`: reads +whole:HAPendingTermination ×2; written legacy, accepted-legacy, frozen |
| -- new `internal/registry/ha_journal.go:Registry.RetryPendingTerminationOnce`: reads +registry:Found, +whole:HAPendingTermination ×2; written legacy, accepted-legacy, frozen |
| - |
| -Seal: `b2f039a12bb284c9a36b391339e25e3f77ec94a3d4e38389ec9ef75261d7873f` → `818b5c40f261f18576c3ad4f0fbc7ad1e316cef86b515aa487f23852b5eb6bcf`. |
| - |
| -Overlay: `internal/provision/testdata/plan14-root-reads-ha-departure-evidence.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/docs/superpowers/notes/copy-luna-brief-fleet-client-address-1348.md b/docs/superpowers/notes/copy-luna-brief-fleet-client-address-1348.md| new file mode 100644 |
| index 000000000..3b9b15aba |
| --- /dev/null |
| +++ b/docs/superpowers/notes/copy-luna-brief-fleet-client-address-1348.md |
| @@ -0,0 +1,18 @@ |
| +You are the copy-review gate itself for this set. Paul delegated copy review to you on 2026-10-25; your verdicts ARE the review. Do NOT run the copy-review skill or start any server. You are writing a review report. |
| + |
| +House rules (Paul's): plain, direct, short sentences; no jargon left undefined; no em dashes or en dashes; curly quotes are not needed in Markdown docs; no throat-clearing; second person ("you") is fine; facts must stay exactly as given (do not add or drop technical claims). Code identifiers (request.remote_ip, X-Forwarded-For, Rack::Attack) stay as written. |
| + |
| +Context: CARLOS platform docs. A fleet box serves apps behind a hub that faces the internet. The platform's edge proxy reaches the app's web process on a unix socket and writes X-Forwarded-For itself, removing anything the client sent; the last entry is the client address the platform saw. This was just fixed for fleet boxes (before, fleet apps saw the hub's address). Rails request.remote_ip and Rack::Request#ip return that entry with default settings (verified against the source). |
| + |
| +Strings (key: text): |
| + |
| +S1 (docs/site/rootfs.md, new section "## The visitor's address", paragraph 1): |
| +Requests reach web with the visitor's address as the last entry of X-Forwarded-For. The platform writes that header itself and drops whatever the visitor sent, so the last entry is always the address the platform saw. That holds on a fleet box too, where the request came in through the hub. |
| + |
| +S2 (same section, paragraph 2): |
| +Most frameworks read it with no setup. Rails' request.remote_ip and Rack's request.ip, which Rack::Attack uses, both return it. |
| + |
| +S3 (docs/site/rails.md, new subsection "### The visitor's address"; the bracketed text is a link to S1's section): |
| +request.remote_ip and Rack::Attack see the visitor's address with no trusted-proxy setup. [The visitor's address](/docs/rootfs#the-visitor-s-address) says where it comes from. |
| + |
| +Answer ONLY with a Markdown table: key | verdict (keep/change) | new text (full, if changed) | why. Then a "Flags" list for any fact conflict or unclear term (or "none"). |
diff --git a/docs/superpowers/notes/copy-luna-fleet-client-address-1348.md b/docs/superpowers/notes/copy-luna-fleet-client-address-1348.md| new file mode 100644 |
| index 000000000..5170c3ffb |
| --- /dev/null |
| +++ b/docs/superpowers/notes/copy-luna-fleet-client-address-1348.md |
| @@ -0,0 +1,13 @@ |
| +# Luna copy pass, #1348 (delegated review, Paul 2026-10-25) |
| + |
| +| key | verdict (keep/change) | new text (full, if changed) | why | |
| +|---|---|---|---| |
| +| S1 | change | Requests reach the web process with the visitor's address as the last entry of X-Forwarded-For. The platform writes that header itself and removes anything the visitor sent, so the last entry is always the address the platform saw. This also holds on a fleet box, where the request came in through the hub. | “Web” is unclear. “Removes” is plainer than “drops,” and the final sentence reads more directly. | |
| +| S2 | change | Most frameworks read it with no setup. Rails request.remote_ip and Rack::Request#ip, which Rack::Attack uses, both return it. | Uses the exact Rack identifier and avoids the ambiguous “Rack's request.ip.” | |
| +| S3 | change | Rails request.remote_ip and Rack::Attack see the visitor's address without configuring which proxies to trust. [The visitor's address](/docs/rootfs#the-visitor-s-address) explains where it comes from. | Names Rails explicitly and explains “trusted-proxy setup” in plain language. | |
| + |
| +Flags |
| + |
| +- S2: “Most frameworks” is broader than the specific framework behavior established in the brief. |
| +- none |
| +Applied verbatim except S2: per Luna's flag, "Most frameworks read it with no setup." was dropped and "with no setup" moved onto the Rails/Rack sentence, which the source check supports. |
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-fleet-client-address-1348.md b/docs/superpowers/reviews/CODEX-FINDINGS-fleet-client-address-1348.md| new file mode 100644 |
| index 000000000..0cd28377a |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-fleet-client-address-1348.md |
| @@ -0,0 +1,17 @@ |
| +Reviewed `origin/main...69f84d5c`, round 1. |
| + |
| +No P1, P2, or P3 findings. |
| + |
| +The tunnel senders reconstruct forwarding headers before dispatch. The box preserves validated chains through its app proxies and onward mesh hop; `signForwarded` signs the final outbound chain. Gate-key assignment follows hop acceptance and leaves linked requests’ existing key intact. The test’s `fromTunnel` override is restored during cleanup and does not overlap parallel tests. |
| + |
| +Census verdicts: |
| + |
| +| Unit or envelope | Verdict | Evidence | |
| +|---|---|---| |
| +| `Edge.ServeHTTP` | **Approve** | `internal/edge/edge.go:2265–2276`: validated request metadata becomes an in-memory gate key; no new filesystem, registry, or storage access. | |
| +| `internal/edge` | **Approve** | `edge.go:1954–1993`, `homemap.go:1714–1759`: transport-scoped header trust, malformed-chain fallback, and final-chain signing preserve the existing checks. | |
| +| `internal/gate` | **Approve** | `internal/gate/gate.go:212–219`: documentation change only; executable behavior unchanged. | |
| + |
| +Validation limits: targeted Go tests could not start because the sandbox forbids filesystem writes. The amadan discussions were inaccessible because networking was blocked; I used the brief and local specs. `git diff --check` passed. No files changed. |
| + |
| +**READY** |
| \ No newline at end of file |
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-client-address-1348.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-client-address-1348.md| new file mode 100644 |
| index 000000000..e353a8735 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-client-address-1348.md |
| @@ -0,0 +1,78 @@ |
| +# Review brief: branch fleet-client-address-1348 (#1348), round 1 of 3 |
| + |
| +Repo carlos/platform, branch `fleet-client-address-1348`, commit 387a5e379d2f82a45fc5259b13e24181379a189f. |
| +Under review: the diff `origin/main...fleet-client-address-1348` (base d3266e8e). |
| +Authorities: amadan discussion #1348 (the ask and the design note posted there), #476 (the earlier |
| +trust sketch), and the linked deployments behaviour already on main (internal/edge/edge.go |
| +ServeLinked, docs/site/linked-deployments.md). |
| + |
| +You are an independent reviewer. Read the diff, then the code it touches and the code around it, |
| +and check every claim against that code. |
| + |
| +## The change |
| + |
| +Fleet and -tunnel apps behind a hub saw the hub's address as the client. The box's edge, for a |
| +request that arrived over a tunnel it dialled (tunnelclient's context mark), now passes the hub's |
| +X-Forwarded-For chain to the app when every entry is an IP (hubVisitor, formerly linkVisitor), and |
| +keys the password gate's attempt limiter on the chain's last entry. Off a tunnel nothing changes. |
| +Docs: docs/site/rootfs.md "The visitor's address", docs/site/rails.md pointer. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Trust rule (#476, #1348 design note): a request on a tunnel this box dialled to its configured |
| + hub is the hub's; on a plaintext tunnel URL an on-path attacker can already inject any request |
| + (geoip spec D2 makes the same call for geo headers). |
| +- Scope: the box only; the hub is unchanged. The platform's own analytics, rate limit, guard and |
| + request records skip tunnelled requests on the box and stay that way. |
| + |
| +## What to check |
| + |
| +1. Trust boundary: can a request reach the box edge's setForwarded or the new gate-key code with |
| + fromTunnel true but an X-Forwarded-For the hub did not write? Check every hub-to-channel sender |
| + (tunnelRewrite users, linkProxy, replica proxy/replicaRoundTrip, the replica prober, upgrades via |
| + roundTripUpgrade, the -tunnel login pass-through) and anything on the box that serves tunnelled |
| + requests outside ServeHTTP's normal path. Could a client-sent XFF survive into a hub's outbound |
| + tunnel request on any path? |
| +2. Hub chain correctness: does the hub's outbound chain always end with the client it saw (PPv2 |
| + listener, hairpin, verified hop, door call, devbox front)? Any case where the box now shows the |
| + app an address that is worse than the hub's address (e.g. a platform-internal address)? |
| +3. Box onward paths: a tunnelled request the box then backhauls to a sibling (mesh hop), proxies via |
| + the activator, serves via genproxy/multiProxy, or that is a linked request (pinned) - is the chain |
| + right in each, and is the forwarded-for proof (signForwarded) still signing what is sent? |
| +4. setForwarded ordering: link pin, door, tunnel, hop. Any case where a request is both tunnelled |
| + and a verified hop or door call, and the new branch changes the answer wrongly? |
| +5. The gate key in ServeHTTP: placed after acceptHop; is any gate attempt reachable earlier, or does |
| + a linked request get keyed twice differently? |
| +6. Tests: internal/edge/tunnel_client_addr_test.go - do they prove the end-to-end property (real |
| + tunnelclient loop, hub edge, box edge) and the fallbacks? The fromTunnel override is a package |
| + var; is the test safe under the package's parallelism? |
| +7. Docs accuracy (rootfs.md, rails.md): "the last entry is always the address the platform saw", |
| + "This also holds on a fleet box". True on every path to a rootfs app's web process? Rails |
| + request.remote_ip / Rack::Request#ip claims were checked against Puma 8 / actionpack 8.1 / rack |
| + 3.2 source: rightmost non-trusted entry; REMOTE_ADDR on a unix socket is blank or loopback. |
| +8. Census: docs/superpowers/notes/census-proposal-fleet-client-address-1348.md. Give a verdict for |
| + the Edge.ServeHTTP unit and for the internal/edge and internal/gate envelopes: reject if root now |
| + opens, runs, queries or follows anything new from a path or input a tenant, app or box agent can |
| + create, write or name, or if a check the basis relies on is weakened. |
| + |
| +## Severity |
| + |
| +- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks merge. |
| +- **P2**: wrong or missing. Fixed without reopening this review. |
| +- **P3**: clarity or polish. Follow-up list; never a reason for another round. |
| + |
| +A P1 states its failure scenario and the evidence (file:line). Do not raise a P2 to P1 to keep the |
| +review open. |
| + |
| +## Output |
| + |
| +Findings ranked P1, P2, P3. Each gives the area, the problem, the evidence (file:line, verified), |
| +the failure scenario, a concrete fix and the invariant or trust boundary it breaks. Then the census |
| +verdicts (approve/reject per unit and envelope). End with exactly one verdict: |
| + |
| +- **READY**: no P1 and no P2. |
| +- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another round. |
| +- **NOT READY**: one or more P1s, listed. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the |
| +full test suites; targeted `go test ./internal/edge/ -run <pattern>` is fine (leave GOCACHE unset). |
diff --git a/internal/edge/edge.go b/internal/edge/edge.go| index d204ab19e..52501ce1c 100644 |
| --- a/internal/edge/edge.go |
| +++ b/internal/edge/edge.go |
| @@ -1937,7 +1937,7 @@ func linkedRequest(ctx context.Context) bool { |
| // Host and X-Forwarded-Host want.PublicHost with X-Forwarded-Proto |
| // https (linkedBackend, setForwarded). |
| // - The visitor: when the hub's X-Forwarded-For is well formed |
| -// (linkVisitor: every entry an IP), the chain goes to the app |
| +// (hubVisitor: every entry an IP), the chain goes to the app |
| // (setForwarded) and the gate's attempt limiter keys on its last entry, |
| // the client the hub observed (gate.WithClientAddr), not on the |
| // tunnel's address every visitor shares. A malformed or missing header |
| @@ -1953,7 +1953,7 @@ func linkedRequest(ctx context.Context) bool { |
| // the request. |
| func (e *Edge) ServeLinked(w http.ResponseWriter, r *http.Request, want LinkedTarget) { |
| ctx := gate.WithPublicHost(withLinkPin(r.Context(), want), want.PublicHost) |
| - if visitor, _, ok := linkVisitor(r.Header); ok { |
| + if visitor, _, ok := hubVisitor(r.Header); ok { |
| ctx = gate.WithClientAddr(ctx, visitor) |
| } |
| r = r.WithContext(ctx) |
| @@ -1961,16 +1961,38 @@ func (e *Edge) ServeLinked(w http.ResponseWriter, r *http.Request, want LinkedTa |
| e.ServeHTTP(w, r) |
| } |
| -// linkVisitor is a linked request's visitor: the last X-Forwarded-For entry, |
| -// the client address the hub observed and appended (the hub never passes a |
| -// client's own X-Forwarded-For on), and the whole chain, normalized. Only a |
| -// linked request is read this way (ServeLinked, setForwarded): on every |
| -// other ingress the header is the client's to forge. It accepts the header |
| +// acceptIngress is ServeHTTP's hop acceptance and its tunnel visitor. A |
| +// linked request (pinned) is never a hop: its hop vocabulary is dropped |
| +// unread, as acceptHop drops a client's. Any other request goes through |
| +// acceptHop. Then a request a tunnel delivered is keyed by the gate's |
| +// attempt limiter on the client the hub observed, not on the tunnel's |
| +// address every visitor shares (#1348), as ServeLinked keys a linked one. |
| +func (e *Edge) acceptIngress(r *http.Request, host string, pinned bool) (*http.Request, bool) { |
| + if pinned { |
| + dropHopHeaders(r) |
| + return r, false |
| + } |
| + r, hopped := e.acceptHop(r, host) |
| + if fromTunnel(r.Context()) { |
| + if visitor, _, ok := hubVisitor(r.Header); ok { |
| + r = r.WithContext(gate.WithClientAddr(r.Context(), visitor)) |
| + } |
| + } |
| + return r, hopped |
| +} |
| + |
| +// hubVisitor is the visitor of a request a hub delivered over a tunnel, a |
| +// linked one included: the last X-Forwarded-For entry, the client address |
| +// the hub observed (the hub writes the chain itself in tunnelRewrite and |
| +// never passes a client's own X-Forwarded-For on), and the whole chain, |
| +// normalized. Only a tunnelled request is read this way (ServeLinked, |
| +// ServeHTTP's gate key, setForwarded; #1348): on every other ingress the |
| +// header is the client's to forge. It accepts the header |
| // only when every entry, on every line, is an IP address; anything else |
| // (no header, an empty one, an empty or malformed entry anywhere) is false, |
| // and the request keeps the connection peer as its client, as any request |
| // does. |
| -func linkVisitor(h http.Header) (visitor, chain string, ok bool) { |
| +func hubVisitor(h http.Header) (visitor, chain string, ok bool) { |
| lines := h.Values("X-Forwarded-For") |
| if len(lines) == 0 { |
| return "", "", false |
| @@ -2255,14 +2277,7 @@ func (e *Edge) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
| demoHopPresent = len(markers) != 0 || len(proofs) != 0 |
| demoHopWellFormed = !demoHopPresent || (len(markers) == 1 && markers[0] == "1" && len(proofs) == 1 && proofs[0] != "") |
| } |
| - // A linked request is never a hop: its hop vocabulary is dropped |
| - // unread, as acceptHop drops a client's. |
| - hopped := false |
| - if pinned { |
| - dropHopHeaders(r) |
| - } else { |
| - r, hopped = e.acceptHop(r, host) |
| - } |
| + r, hopped := e.acceptIngress(r, host, pinned) |
| // A probe-burst notice from another edge (burst_notice.go) is answered |
| // here, ahead of every route, so it never reaches a tenant's app. Only a |
| // POST to its path carrying its header is one: anything else, that path |
diff --git a/internal/edge/homemap.go b/internal/edge/homemap.go| index faa6375b9..85c360ca9 100644 |
| --- a/internal/edge/homemap.go |
| +++ b/internal/edge/homemap.go |
| @@ -1719,12 +1719,12 @@ func setForwarded(pr *httputil.ProxyRequest) { |
| // A linked request (ServeLinked) reaches its app as the visitor sent it |
| // to the serving side: the public host (linkedBackend has already made |
| // it pr.In.Host, so Host and the proof agree) over https, and, when |
| - // linkVisitor accepts it, the hub's X-Forwarded-For chain (normalized), |
| + // hubVisitor accepts it, the hub's X-Forwarded-For chain (normalized), |
| // whose last entry is the client the hub observed. A chain it refuses |
| // never reaches the app: SetXForwarded's value, the connection peer, |
| // stays. It is never a door call or a hop. |
| if want, pinned := linkPinFrom(pr.In.Context()); pinned { |
| - if _, chain, ok := linkVisitor(pr.In.Header); ok { |
| + if _, chain, ok := hubVisitor(pr.In.Header); ok { |
| pr.Out.Header.Set("X-Forwarded-For", chain) |
| } |
| pr.Out.Header.Set("X-Forwarded-Host", want.PublicHost) |
| @@ -1739,6 +1739,18 @@ func setForwarded(pr *httputil.ProxyRequest) { |
| pr.Out.Header.Set("X-Forwarded-Proto", "https") |
| return |
| } |
| + // A request a tunnel delivered (#1348) came from the hub this box |
| + // dialled, whose own setForwarded wrote the chain (tunnelRewrite): its |
| + // last entry is the client the hub observed, and the tunnel's peer, the |
| + // hub, is nobody's client. So the app gets the hub's chain, as a linked |
| + // request's app does, when hubVisitor accepts it; a chain it refuses |
| + // leaves SetXForwarded's value, the peer. Upgrades ride this proxy too. |
| + if fromTunnel(pr.In.Context()) { |
| + if _, chain, ok := hubVisitor(pr.In.Header); ok { |
| + pr.Out.Header.Set("X-Forwarded-For", chain) |
| + } |
| + return |
| + } |
| if !hopVerified(pr.In.Context()) { |
| return |
| } |
diff --git a/internal/edge/linkpin_test.go b/internal/edge/linkpin_test.go| index c1775ae79..fd3758fd4 100644 |
| --- a/internal/edge/linkpin_test.go |
| +++ b/internal/edge/linkpin_test.go |
| @@ -471,15 +471,29 @@ func TestLinkPinForwardedFallback(t *testing.T) { |
| } |
| wrong := url.Values{"password": {"nope-nope-nope"}, "next": {"/"}}.Encode() |
| login := func(chain string) int { return serve("POST", gate.LoginPath, chain, wrong).Code } |
| - // Ten malformed or missing chains from one peer share the peer's bucket. |
| - bad := []string{"198.51.100.7, invalid", "", "-", "x", "invalid, 198.51.100.8"} |
| - for i := 0; i < 10; i++ { |
| - if code := login(bad[i%len(bad)]); code != http.StatusUnauthorized { |
| - t.Fatalf("attempt %d: %d, want 401", i+1, code) |
| - } |
| - } |
| - if code := login("198.51.100.7, also-invalid"); code != http.StatusTooManyRequests { |
| - t.Fatalf("an 11th malformed attempt from the peer: %d, want 429 (the peer's bucket)", code) |
| + // Eleven malformed or missing chains from one peer share the peer's |
| + // bucket of ten: exactly one is refused. They run at once: the bucket |
| + // refills a token every six seconds, and eleven bcrypts in a row under |
| + // -race take long enough to refill one (#1348). The bucket is spent |
| + // before bcrypt runs, so concurrent attempts reach it together. |
| + bad := []string{"198.51.100.7, invalid", "", "-", "x", "invalid, 198.51.100.8", "198.51.100.7, also-invalid"} |
| + codes := make(chan int, 11) |
| + var wg sync.WaitGroup |
| + for i := 0; i < 11; i++ { |
| + wg.Add(1) |
| + go func() { |
| + defer wg.Done() |
| + codes <- login(bad[i%len(bad)]) |
| + }() |
| + } |
| + wg.Wait() |
| + close(codes) |
| + count := map[int]int{} |
| + for c := range codes { |
| + count[c]++ |
| + } |
| + if count[http.StatusUnauthorized] != 10 || count[http.StatusTooManyRequests] != 1 { |
| + t.Fatalf("eleven malformed attempts from the peer answered %v, want ten 401s and one 429 (the peer's bucket)", count) |
| } |
| if code := login("198.51.100.9"); code != http.StatusUnauthorized { |
| t.Fatalf("a well-formed visitor through the same peer: %d, want its own 401", code) |
diff --git a/internal/edge/tunnel_client_addr_test.go b/internal/edge/tunnel_client_addr_test.go| new file mode 100644 |
| index 000000000..45ed50545 |
| --- /dev/null |
| +++ b/internal/edge/tunnel_client_addr_test.go |
| @@ -0,0 +1,268 @@ |
| +package edge |
| + |
| +import ( |
| + "bufio" |
| + "context" |
| + "fmt" |
| + "io" |
| + "net" |
| + "net/http" |
| + "net/http/httptest" |
| + "net/url" |
| + "strings" |
| + "sync" |
| + "testing" |
| + |
| + "github.com/carlosframework/platform/internal/gate" |
| + "github.com/carlosframework/platform/internal/registry" |
| +) |
| + |
| +// #1348: an app behind a tunnel sees the client the hub saw, as a shared-box |
| +// app sees its own client. The hub writes X-Forwarded-For fresh for every |
| +// request it sends down a tunnel (tunnelRewrite); the box passes that chain |
| +// to the app instead of the tunnel's peer, which is the hub. |
| + |
| +// hubSeenClient is the address the hub's listener reports for a visitor in |
| +// these tests: on loopback, the visitor, the hub and the tunnel's peer are |
| +// all 127.0.0.1, so the hub is told a distinct one, as the PPv2 listener |
| +// would tell it the real client's. |
| +const hubSeenClient = "198.51.100.7" |
| + |
| +// tunnelAddrScene is a hub edge serving demo.example over a real |
| +// tunnelclient connection to a box whose own Edge proxies to a TCP app. |
| +// wrap is applied to the box's edge as the box's agent would apply its |
| +// channel handler. It returns the hub's URL and what the app saw. |
| +func tunnelAddrScene(t *testing.T, wrap func(http.Handler) http.Handler) (hubURL string, seen func() []string) { |
| + t.Helper() |
| + var mu sync.Mutex |
| + var xff []string |
| + app := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| + got := strings.Join(r.Header.Values("X-Forwarded-For"), ", ") |
| + mu.Lock() |
| + xff = append(xff, got) |
| + mu.Unlock() |
| + if r.Header.Get("Upgrade") == "websocket" { |
| + conn, rw, err := http.NewResponseController(w).Hijack() |
| + if err != nil { |
| + t.Errorf("hijack: %v", err) |
| + return |
| + } |
| + defer conn.Close() |
| + fmt.Fprintf(rw, "HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nX-Seen-For: %s\r\n\r\n", got) |
| + rw.Flush() |
| + return |
| + } |
| + io.WriteString(w, "app") |
| + })) |
| + t.Cleanup(app.Close) |
| + boxReg := openReg(t) |
| + if err := boxReg.Upsert(registry.Route{Host: "demo.example", Kind: "service", Addr: app.Listener.Addr().String(), Status: "ready"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + box, err := New(boxReg, nil) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + t.Cleanup(box.probers.Stop) |
| + |
| + hubReg := tunnelRoute(t, registry.Route{Host: "demo.example", Kind: "instance", Status: "ready", Tunnel: "pi-box"}) |
| + hub, err := New(hubReg, nil) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + t.Cleanup(hub.probers.Stop) |
| + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| + if r.Host == "demo.example" { |
| + r.RemoteAddr = net.JoinHostPort(hubSeenClient, "40000") |
| + } |
| + hub.ServeHTTP(w, r) |
| + })) |
| + t.Cleanup(srv.Close) |
| + u, _ := url.Parse(srv.URL) |
| + th := NewTunnelHub(u.Hostname(), map[string]string{"pi-box": "sekrit"}) |
| + hub.EnableTunnels(th) |
| + if err := hub.Reload(); err != nil { |
| + t.Fatal(err) |
| + } |
| + t.Cleanup(startFakeRemoteHost(t, srv.URL, "pi-box", "sekrit", wrap(box))) |
| + waitForTunnelState(t, th, "pi-box", "connected", e2eReconnectBound) |
| + return srv.URL, func() []string { |
| + mu.Lock() |
| + defer mu.Unlock() |
| + return append([]string(nil), xff...) |
| + } |
| +} |
| + |
| +func TestTunnelledAppSeesTheClientTheHubSaw(t *testing.T) { |
| + for _, c := range []struct { |
| + name string |
| + wrap func(http.Handler) http.Handler |
| + }{ |
| + {"static channel", func(h http.Handler) http.Handler { return h }}, |
| + {"fleet channel", MarkFleetChannel}, |
| + } { |
| + t.Run(c.name, func(t *testing.T) { |
| + hubURL, seen := tunnelAddrScene(t, c.wrap) |
| + req, _ := http.NewRequest("GET", hubURL+"/", nil) |
| + req.Host = "demo.example" |
| + req.Header.Set("X-Forwarded-For", "6.6.6.6") // a visitor's forgery at the hub |
| + resp, err := http.DefaultClient.Do(req) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + io.Copy(io.Discard, resp.Body) |
| + resp.Body.Close() |
| + if resp.StatusCode != 200 { |
| + t.Fatalf("through the tunnel: %d", resp.StatusCode) |
| + } |
| + if got := seen(); len(got) != 1 || got[0] != hubSeenClient { |
| + t.Fatalf("the app saw X-Forwarded-For %q, want exactly %q (the client the hub saw)", got, hubSeenClient) |
| + } |
| + }) |
| + } |
| +} |
| + |
| +// A WebSocket upgrade rides the same proxy on the box, so it carries the |
| +// same address (#471's upgrades, #1348). |
| +func TestTunnelledUpgradeSeesTheClientTheHubSaw(t *testing.T) { |
| + hubURL, _ := tunnelAddrScene(t, MarkFleetChannel) |
| + u, _ := url.Parse(hubURL) |
| + conn, err := net.Dial("tcp", u.Host) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + defer conn.Close() |
| + fmt.Fprintf(conn, "GET /cable HTTP/1.1\r\nHost: demo.example\r\nConnection: Upgrade\r\nUpgrade: websocket\r\n"+ |
| + "Sec-WebSocket-Version: 13\r\nSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\nX-Forwarded-For: 6.6.6.6\r\n\r\n") |
| + resp, err := http.ReadResponse(bufio.NewReader(conn), nil) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if resp.StatusCode != http.StatusSwitchingProtocols { |
| + t.Fatalf("upgrade through the tunnel: %d", resp.StatusCode) |
| + } |
| + if got := resp.Header.Get("X-Seen-For"); got != hubSeenClient { |
| + t.Fatalf("the app saw X-Forwarded-For %q on the upgrade, want %q", got, hubSeenClient) |
| + } |
| +} |
| + |
| +// What the box believes of the hub's chain, and what the gate keys on: a |
| +// well-formed chain goes to the app whole and its last entry is the |
| +// visitor; anything else falls back to the connection's peer, as for any |
| +// request. Off a tunnel the chain is the client's and is never believed. |
| +func TestTunnelledForwardedFallback(t *testing.T) { |
| + var mu sync.Mutex |
| + var xff []string |
| + app := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| + mu.Lock() |
| + xff = append(xff, strings.Join(r.Header.Values("X-Forwarded-For"), ", ")) |
| + mu.Unlock() |
| + io.WriteString(w, "app") |
| + })) |
| + t.Cleanup(app.Close) |
| + const host = "demo.example" |
| + reg := openReg(t) |
| + if err := reg.Upsert(registry.Route{Host: host, Kind: "service", Addr: app.Listener.Addr().String(), Status: "ready"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + e, err := New(reg, nil) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + t.Cleanup(e.probers.Stop) |
| + tunnelled := true |
| + saved := fromTunnel |
| + fromTunnel = func(context.Context) bool { return tunnelled } |
| + t.Cleanup(func() { fromTunnel = saved }) |
| + |
| + const peer = "192.0.2.10" |
| + serve := func(method, path, chain, body string) *httptest.ResponseRecorder { |
| + req := httptest.NewRequest(method, "http://"+host+path, strings.NewReader(body)) |
| + req.RemoteAddr = peer + ":40000" |
| + if chain != "-" { |
| + req.Header.Set("X-Forwarded-For", chain) |
| + } |
| + if body != "" { |
| + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") |
| + } |
| + rec := httptest.NewRecorder() |
| + e.ServeHTTP(rec, req) |
| + return rec |
| + } |
| + cases := []struct { |
| + tunnelled bool |
| + chain, app string |
| + }{ |
| + {true, "198.51.100.7", "198.51.100.7"}, |
| + {true, "203.0.113.5, 198.51.100.7", "203.0.113.5, 198.51.100.7"}, |
| + {true, " 198.51.100.7 ", "198.51.100.7"}, |
| + {true, "2001:db8::1", "2001:db8::1"}, |
| + {true, "198.51.100.7, invalid", peer}, |
| + {true, "invalid, 198.51.100.7", peer}, |
| + {true, "", peer}, |
| + {true, "-", peer}, |
| + {true, "198.51.100.7,", peer}, |
| + {false, "198.51.100.7", peer}, |
| + } |
| + for _, c := range cases { |
| + tunnelled = c.tunnelled |
| + mu.Lock() |
| + xff = nil |
| + mu.Unlock() |
| + if rec := serve("GET", "/", c.chain, ""); rec.Code != 200 { |
| + t.Fatalf("tunnelled=%v X-Forwarded-For %q: %d", c.tunnelled, c.chain, rec.Code) |
| + } |
| + mu.Lock() |
| + got := strings.Join(xff, "|") |
| + mu.Unlock() |
| + if got != c.app { |
| + t.Errorf("tunnelled=%v X-Forwarded-For %q: the app saw %q, want %q", c.tunnelled, c.chain, got, c.app) |
| + } |
| + } |
| + |
| + tunnelled = true |
| + hash, err := gate.Hash("shop-password") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := reg.SetGate(host, hash); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := e.Reload(); err != nil { |
| + t.Fatal(err) |
| + } |
| + wrong := url.Values{"password": {"nope-nope-nope"}, "next": {"/"}}.Encode() |
| + login := func(chain string) int { return serve("POST", gate.LoginPath, chain, wrong).Code } |
| + // Eleven attempts from one visitor the hub saw share that visitor's |
| + // bucket of ten: exactly one is refused. They run at once because the |
| + // bucket refills a token every six seconds and each refused password |
| + // costs a bcrypt, which under -race takes long enough to refill; the |
| + // bucket is spent before bcrypt runs (gate.Admit), so concurrent |
| + // attempts reach it within milliseconds. |
| + codes := make(chan int, 11) |
| + var wg sync.WaitGroup |
| + for i := 0; i < 11; i++ { |
| + wg.Add(1) |
| + go func() { |
| + defer wg.Done() |
| + codes <- login("198.51.100.7") |
| + }() |
| + } |
| + wg.Wait() |
| + close(codes) |
| + count := map[int]int{} |
| + for c := range codes { |
| + count[c]++ |
| + } |
| + if count[http.StatusUnauthorized] != 10 || count[http.StatusTooManyRequests] != 1 { |
| + t.Fatalf("eleven attempts from one visitor answered %v, want ten 401s and one 429", count) |
| + } |
| + // Another visitor through the same hub has its own bucket. |
| + if code := login("198.51.100.9"); code != http.StatusUnauthorized { |
| + t.Fatalf("another visitor through the same hub: %d, want its own 401", code) |
| + } |
| + // A malformed chain is keyed on the peer, which nobody has spent. |
| + if code := login("x"); code != http.StatusUnauthorized { |
| + t.Fatalf("a malformed chain: %d, want 401 in the peer's bucket", code) |
| + } |
| +} |
diff --git a/internal/gate/gate.go b/internal/gate/gate.go| index 5d9c9e474..39334aa23 100644 |
| --- a/internal/gate/gate.go |
| +++ b/internal/gate/gate.go |
| @@ -211,9 +211,10 @@ type clientAddrKey struct{} |
| // WithClientAddr marks ctx's request as one from the visitor at addr, |
| // whatever its RemoteAddr says, for the attempt limiter. The edge sets it |
| -// only for a request a linked deployment's hub delivered (linked |
| -// deployments spec §6.2), whose RemoteAddr is the tunnel's, shared by every |
| -// visitor: addr is the client address the hub observed. |
| +// only for a request a hub delivered over a tunnel, a linked deployment's |
| +// included (linked deployments spec §6.2, #1348), whose RemoteAddr is the |
| +// tunnel's, shared by every visitor: addr is the client address the hub |
| +// observed. |
| func WithClientAddr(ctx context.Context, addr string) context.Context { |
| return context.WithValue(ctx, clientAddrKey{}, addr) |
| } |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 4cf0568b5..721bc6e11 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -277,4 +277,4 @@ plan14-root-reads-headers-security-allowlist.tsv f959a3626e83650aaad1880eecc3fed |
| plan14-root-reads-stateless-scale-1-memory-env.tsv 47ebd73418bcbe1bdf9cf34a2b94e3393a1279aea58f9ee0aca3f0cfe42b9132 |
| plan14-root-reads-group-revoke-readback-1255.tsv 47ebd73418bcbe1bdf9cf34a2b94e3393a1279aea58f9ee0aca3f0cfe42b9132 |
| plan14-root-reads-precert-dns01-1293.tsv b2f039a12bb284c9a36b391339e25e3f77ec94a3d4e38389ec9ef75261d7873f |
| -plan14-root-reads-ha-departure-evidence.tsv 818b5c40f261f18576c3ad4f0fbc7ad1e316cef86b515aa487f23852b5eb6bcf |
| +plan14-root-reads-fleet-client-address-1348.tsv 9fb6041c2fe2f33edf7cc2a0fb6dc05092015414b89cab3610ebcfc04c21d5b0 |
diff --git a/internal/provision/testdata/plan14-root-reads-fleet-client-address-1348.tsv b/internal/provision/testdata/plan14-root-reads-fleet-client-address-1348.tsv| new file mode 100644 |
| index 000000000..6683186c4 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-fleet-client-address-1348.tsv |
| @@ -0,0 +1,6 @@ |
| +# Census overlay fleet-client-address-1348, written by census-propose (#369). census-ruling-fleet-client-address-1348, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-fleet-client-address-1348.md. |
| +# 1 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +@legacy 19e4b3a3e14be4028f087fd216f52fb871bf0d59bcd9ba1c6efd5934897d5a67 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.;rev3=census-ruling-region-ha-p3a;basis=Complete the P3a cut: an exact peer name with no dial target answers the approved admission 503 before local wildcard dispatch or asset serving. ExactHome and lookupHome stop fallback at a present non-dial entry; backhaulTo refuses an empty target before signing or dialing. Retain Task 3 local admission and fixed platform/unit exemptions. Two added whole Route uses feed the local in-memory admission predicate; existing Route values and store/path reads are unchanged.;rev3=census-ruling-stateless-coordinator-route;basis=P24/P25: POST only, exact /api/fleet/replicas/ prefix on the reserved tunnel host calls the existing local console proxy only for an unescaped, already-clean path; malformed forms remain on the hub. No new read sites relative to origin/main. Merge with main 3487d6f6 retains its region HA admission checks before routing and after login target lookup, its empty-home refusal, and their two existing whole:Route reads; these change this unit's digest relative to the previously approved branch tip 92b24a7d.;rev3=census-ruling-stateless-replicas-3;basis=Task 1a: pass the already-resolved Route to the reserved replica-probe handler after acceptHop and existing admissionRefuses, requiring tunnel context plus private marker and refusing door/backhaul ingress. Added whole Route use only; scrub marker before forwarding; HA calls remain unchanged.;rev3=census-ruling-region-ha-p3b;basis=Resolve local aliases/catch-alls with cached peer name ownership before serving. Add registry Account/App/ClaimStamp/Host/Incarnation/ServingSeq and six whole Route references for NameClaim; inputs are agent registry rows/edges publications used by unprivileged edge, not root permits. Closed owners retain names and return 503; aware remote owner cannot fall through on missing transport, while legacy hop/door behavior remains. Merge 45cebde4 retains authenticated replica probes after local admission and before ordinary name resolution; probe authentication still requires the tunnel context.;rev3=census-ruling-agent-start-demo-2;basis=edge.go:1901 enters the protected demo path before ordinary exits; :2012-2015 rechecks the selected marked Route after lookup. Added whole Route use routes demos through serving checks, counters and policy; no new registry query or file open in this unit.;rev3=census-ruling-demo-api-site-route;basis=Reserve the configured site API namespace after hop verification and control-header scrubbing, before ordinary static, cache, billing and tenant dispatch. Validate hop field shape and delegate only allowlisted operations to the dedicated console path with verified client attribution and console admission. The alias helper enables HTTP/1.1 full duplex so an early console refusal does not wait for upload EOF. Existing 56 read sites unchanged; no new registry, bucket or file read.;rev3=census-ruling-region-ha-g2-fixes;basis=Consult HA ingress after region admission and before miss/alias backhaul; no new direct read; routing-only metadata does not create an upstream.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3/W4: backhaul and door calls pass the owner the door checked into backhaulTo; the §6.5 holder follow (once, GET/HEAD or an unswitched upgrade, no body) and one connect-failure fallback dial only boxes in the holder region's view (same Region/Placement/DataBucket, HomeEligible, fresh) for that owner. Holder name comes only from the TLS-verified signed hop answer; app-set X-Carlos-Holder stays stripped. Routing only; the receiving box still re-checks the lease. No new read site.;rev3=census-ruling-edge-page-cache-1;basis=attaches an in-memory page mark holder to every request to an instance route (the +registry:Kind check of up.route.Kind), wraps the hold and upgrade branches in pageDiagnostics, asks servePage after the plan throttle (a hit answered from the page index over the asset store), keeps an opted-in instance out of the LRU (pagesOptedIn), wraps the response in the page writer, and wraps the proxy's writer in assetInformationalScrub on the remaining arms; the page reads are in the new pagecache.go units;rev3=census-ruling-region-ha-held-build;basis=first branch: a request for the reserved control paths /.carlos/ha-drain and /.carlos/ha-take goes to serveHAControl and returns (refused unless a signed ask); no request on those paths reaches a route, a forward or an app; no read added here. region HA held-requests Task 2: X-Carlos-Replayable is read from verified hops only and deleted from every request; just before frontForwardHA, moveGate runs for an HA hibernating route (route HA, Host and the whole Route passed in memory) and can only hold, refuse with an existing answer or front-forward to the confirmed holder; ReleaseMoveTicket before serveHeld; no store or filesystem read added; region HA held-requests Task 5: after the HA control-path branch, every request is counted by the connection drain (conns.track: a cancellable request context, and Connection: close only while draining); memory only; no read added; Task 5 fix 1: after the drain's final barrier a new request is refused at once through handoverExit with the existing answerHolderUnreachable, never forwarded; the tracked request also carries its connection (from ConnContext) so the drain can close it at its bound; memory only; no read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: the inbound strip also deletes tunnelclient.LinkAppHeader (Carlos-Link-App) from every client request, beside Carlos-Tunnel-Upgrade; a header delete, no read added; linked deployments slice 1 Task 8: a request carrying a link pin (ServeLinked, set only by the home agent's link handler from its own registry's published set) skips the edge's own handlers (HA control, demo handling, the steering probe, the tunnel hub, hop acceptance, the burst notice, the demo API alias, the replica probe), takes its upstream from selectUpstream (the pinned exact entry or a 502), never enters the alias/catch-all backhaul block, the HA front forward, the local asset catch, the page cache or the response LRU; the two lookupUpstreamPath calls become selectUpstream; no read added;rev3=census-ruling-stateless-replicas-4-r28;basis=R28 (#511): for a request whose host has no entry (the lookup miss), after the replica-probe branch, calls refuseRetiredCopy(r, host): within the grace of a host whose replica copy this box retired, the fleet tunnel stream is refused with REFUSED_STREAM (tunnelclient.Refuse) and nothing is written; any other miss gets the unknown-host answer as before; memory only, a refusal only, no read added;rev3=census-ruling-static-site-geo-962;basis=discussion #962: after planDisabledAdmit and before the page mark holder and the observer, a request whose cleaned path is /.carlos/geo (not a linked request) is answered by serveGeoAnswer from the request's geo answer already on the context (decideGeo), 200 JSON no-store or 405, and returns; merged with main (no new read);rev3=census-ruling-fleet-unrouted-503;basis=a request the hub tunnel delivered (tunnelclient mark, not a link channel) for a host this box neither routes nor backhauls answers 503 Retry-After 2 instead of the unknown-host 404; no new read, dial or store access; unmarked requests unchanged (#1008);rev3=census-ruling-fleet-unrouted-503-fix1;basis=a request the hub delivered over this fleet box's channel (MarkFleetChannel, set by the box's own tunnel loop for a "<fleet>/<label>" channel, plus the tunnel client mark) for a host this box neither routes nor backhauls, and not under a platform domain, answers 503 Retry-After 2 instead of the unknown-host 404; fixed log key; no new read, dial or store access; every other request unchanged (#1008);rev3=census-ruling-fix-dbforward-reuse-1032;basis=the drain tracking call now takes withDeclaredBodyEnd(r) instead of r: an HTTP/1 request with a declared Content-Length is served from there on with a body that answers EOF itself after those bytes (#1032), so a proxy transport's confirming read after sending the body upstream no longer lands on the server's closed request body and tears down the upstream connection; HTTP/2 requests are left as they are (Astra r1 P2); memory only, no read, dial or store access added;rev3=census-ruling-fleet-seeded-create-2;basis=The hub's door routing asks boxConsolePath(r) instead of the inline /api/fleet/replicas/ test, so POST /api/fleet/seeds/ goes to the local console by the same rule (POST only, clean path, no RawPath) as the replica doors. Serving only; no read of a path a tenant names; the same 65 read sites.;rev3=census-ruling-path-routes-across-boxes;basis=#186: selection returns requestSelection; a Remote selection is dispatched by servePathRemote (one signed hop, never from a verified hop, door call or pin); the ownership block moved to serveNameOwner/nameOwnerVerdict (pathhop.go), so its route reads left; login re-selection via loginLookupPath plus refuseLoginAcross; LRU also requires pathLRUAllowed; no read added;rev3=census-ruling-fleet-client-address-1348;basis=hop acceptance moved into acceptIngress (pinned: dropHopHeaders; else acceptHop), which then, for a request a tunnel delivered (tunnelclient mark) whose X-Forwarded-For hubVisitor accepts (every entry an IP), carries its last entry as the gate attempt key (gate.WithClientAddr), as ServeLinked does (#1348); a context value on the request, memory only, no read, dial or store access added; no check weakened file:ReadAll@19091,registry:App@26368,registry:Gate@18065,registry:Gate@30759,registry:Gate@30819,registry:Gate@30877,registry:HA@13809,registry:HA@14151,registry:Host@14190,registry:Host@30862,registry:ImportGate@39754,registry:Kind@23402,registry:Kind@25230,registry:Kind@28668,registry:Kind@39696,registry:Kind@39725,whole:Route@13812,whole:Route@13906,whole:Route@14154,whole:Route@14193,whole:Route@17960,whole:Route@18071,whole:Route@20370,whole:Route@21154,whole:Route@21612,whole:Route@21804,whole:Route@23405,whole:Route@25233,whole:Route@26294,whole:Route@26360,whole:Route@26371,whole:Route@26624,whole:Route@26719,whole:Route@26795,whole:Route@26839,whole:Route@27141,whole:Route@27171,whole:Route@28671,whole:Route@28956,whole:Route@30762,whole:Route@30822,whole:Route@30865,whole:Route@30880,whole:Route@32091,whole:Route@34379,whole:Route@39699,whole:Route@39728,whole:Route@39757,whole:Route@39789,whole:Route@42256,whole:Route@8405,whole:Route@8504,whole:Route@8610 3b450b21a2e2b49ccac127eb9917fdc5a2dfdec1c490ccf89151f443f8b37825 |
| +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.;rev3=census-ruling-region-ha-p3a;basis=Complete the P3a cut: an exact peer name with no dial target answers the approved admission 503 before local wildcard dispatch or asset serving. ExactHome and lookupHome stop fallback at a present non-dial entry; backhaulTo refuses an empty target before signing or dialing. Retain Task 3 local admission and fixed platform/unit exemptions. Two added whole Route uses feed the local in-memory admission predicate; existing Route values and store/path reads are unchanged.;rev3=census-ruling-stateless-coordinator-route;basis=P24/P25: POST only, exact /api/fleet/replicas/ prefix on the reserved tunnel host calls the existing local console proxy only for an unescaped, already-clean path; malformed forms remain on the hub. No new read sites relative to origin/main. Merge with main 3487d6f6 retains its region HA admission checks before routing and after login target lookup, its empty-home refusal, and their two existing whole:Route reads; these change this unit's digest relative to the previously approved branch tip 92b24a7d.;rev3=census-ruling-stateless-replicas-3;basis=Task 1a: pass the already-resolved Route to the reserved replica-probe handler after acceptHop and existing admissionRefuses, requiring tunnel context plus private marker and refusing door/backhaul ingress. Added whole Route use only; scrub marker before forwarding; HA calls remain unchanged.;rev3=census-ruling-region-ha-p3b;basis=Resolve local aliases/catch-alls with cached peer name ownership before serving. Add registry Account/App/ClaimStamp/Host/Incarnation/ServingSeq and six whole Route references for NameClaim; inputs are agent registry rows/edges publications used by unprivileged edge, not root permits. Closed owners retain names and return 503; aware remote owner cannot fall through on missing transport, while legacy hop/door behavior remains. Merge 45cebde4 retains authenticated replica probes after local admission and before ordinary name resolution; probe authentication still requires the tunnel context.;rev3=census-ruling-agent-start-demo-2;basis=edge.go:1901 enters the protected demo path before ordinary exits; :2012-2015 rechecks the selected marked Route after lookup. Added whole Route use routes demos through serving checks, counters and policy; no new registry query or file open in this unit.;rev3=census-ruling-demo-api-site-route;basis=Reserve the configured site API namespace after hop verification and control-header scrubbing, before ordinary static, cache, billing and tenant dispatch. Validate hop field shape and delegate only allowlisted operations to the dedicated console path with verified client attribution and console admission. The alias helper enables HTTP/1.1 full duplex so an early console refusal does not wait for upload EOF. Existing 56 read sites unchanged; no new registry, bucket or file read.;rev3=census-ruling-region-ha-g2-fixes;basis=Consult HA ingress after region admission and before miss/alias backhaul; no new direct read; routing-only metadata does not create an upstream.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3/W4: backhaul and door calls pass the owner the door checked into backhaulTo; the §6.5 holder follow (once, GET/HEAD or an unswitched upgrade, no body) and one connect-failure fallback dial only boxes in the holder region's view (same Region/Placement/DataBucket, HomeEligible, fresh) for that owner. Holder name comes only from the TLS-verified signed hop answer; app-set X-Carlos-Holder stays stripped. Routing only; the receiving box still re-checks the lease. No new read site.;rev3=census-ruling-edge-page-cache-1;basis=attaches an in-memory page mark holder to every request to an instance route (the +registry:Kind check of up.route.Kind), wraps the hold and upgrade branches in pageDiagnostics, asks servePage after the plan throttle (a hit answered from the page index over the asset store), keeps an opted-in instance out of the LRU (pagesOptedIn), wraps the response in the page writer, and wraps the proxy's writer in assetInformationalScrub on the remaining arms; the page reads are in the new pagecache.go units;rev3=census-ruling-region-ha-held-build;basis=first branch: a request for the reserved control paths /.carlos/ha-drain and /.carlos/ha-take goes to serveHAControl and returns (refused unless a signed ask); no request on those paths reaches a route, a forward or an app; no read added here. region HA held-requests Task 2: X-Carlos-Replayable is read from verified hops only and deleted from every request; just before frontForwardHA, moveGate runs for an HA hibernating route (route HA, Host and the whole Route passed in memory) and can only hold, refuse with an existing answer or front-forward to the confirmed holder; ReleaseMoveTicket before serveHeld; no store or filesystem read added; region HA held-requests Task 5: after the HA control-path branch, every request is counted by the connection drain (conns.track: a cancellable request context, and Connection: close only while draining); memory only; no read added; Task 5 fix 1: after the drain's final barrier a new request is refused at once through handoverExit with the existing answerHolderUnreachable, never forwarded; the tracked request also carries its connection (from ConnContext) so the drain can close it at its bound; memory only; no read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: the inbound strip also deletes tunnelclient.LinkAppHeader (Carlos-Link-App) from every client request, beside Carlos-Tunnel-Upgrade; a header delete, no read added; linked deployments slice 1 Task 8: a request carrying a link pin (ServeLinked, set only by the home agent's link handler from its own registry's published set) skips the edge's own handlers (HA control, demo handling, the steering probe, the tunnel hub, hop acceptance, the burst notice, the demo API alias, the replica probe), takes its upstream from selectUpstream (the pinned exact entry or a 502), never enters the alias/catch-all backhaul block, the HA front forward, the local asset catch, the page cache or the response LRU; the two lookupUpstreamPath calls become selectUpstream; no read added;rev3=census-ruling-stateless-replicas-4-r28;basis=R28 (#511): for a request whose host has no entry (the lookup miss), after the replica-probe branch, calls refuseRetiredCopy(r, host): within the grace of a host whose replica copy this box retired, the fleet tunnel stream is refused with REFUSED_STREAM (tunnelclient.Refuse) and nothing is written; any other miss gets the unknown-host answer as before; memory only, a refusal only, no read added;rev3=census-ruling-static-site-geo-962;basis=discussion #962: after planDisabledAdmit and before the page mark holder and the observer, a request whose cleaned path is /.carlos/geo (not a linked request) is answered by serveGeoAnswer from the request's geo answer already on the context (decideGeo), 200 JSON no-store or 405, and returns; merged with main (no new read);rev3=census-ruling-fleet-unrouted-503;basis=a request the hub tunnel delivered (tunnelclient mark, not a link channel) for a host this box neither routes nor backhauls answers 503 Retry-After 2 instead of the unknown-host 404; no new read, dial or store access; unmarked requests unchanged (#1008);rev3=census-ruling-fleet-unrouted-503-fix1;basis=a request the hub delivered over this fleet box's channel (MarkFleetChannel, set by the box's own tunnel loop for a "<fleet>/<label>" channel, plus the tunnel client mark) for a host this box neither routes nor backhauls, and not under a platform domain, answers 503 Retry-After 2 instead of the unknown-host 404; fixed log key; no new read, dial or store access; every other request unchanged (#1008);rev3=census-ruling-fix-dbforward-reuse-1032;basis=the drain tracking call now takes withDeclaredBodyEnd(r) instead of r: an HTTP/1 request with a declared Content-Length is served from there on with a body that answers EOF itself after those bytes (#1032), so a proxy transport's confirming read after sending the body upstream no longer lands on the server's closed request body and tears down the upstream connection; HTTP/2 requests are left as they are (Astra r1 P2); memory only, no read, dial or store access added;rev3=census-ruling-fleet-seeded-create-2;basis=The hub's door routing asks boxConsolePath(r) instead of the inline /api/fleet/replicas/ test, so POST /api/fleet/seeds/ goes to the local console by the same rule (POST only, clean path, no RawPath) as the replica doors. Serving only; no read of a path a tenant names; the same 65 read sites.;rev3=census-ruling-path-routes-across-boxes;basis=#186: selection returns requestSelection; a Remote selection is dispatched by servePathRemote (one signed hop, never from a verified hop, door call or pin); the ownership block moved to serveNameOwner/nameOwnerVerdict (pathhop.go), so its route reads left; login re-selection via loginLookupPath plus refuseLoginAcross; LRU also requires pathLRUAllowed; no read added;rev3=census-ruling-fleet-client-address-1348;basis=hop acceptance moved into acceptIngress (pinned: dropHopHeaders; else acceptHop), which then, for a request a tunnel delivered (tunnelclient mark) whose X-Forwarded-For hubVisitor accepts (every entry an IP), carries its last entry as the gate attempt key (gate.WithClientAddr), as ServeLinked does (#1348); a context value on the request, memory only, no read, dial or store access added; no check weakened file:ReadAll@19091,registry:App@26368,registry:Gate@18065,registry:Gate@30759,registry:Gate@30819,registry:Gate@30877,registry:HA@13809,registry:HA@14151,registry:Host@14190,registry:Host@30862,registry:ImportGate@39754,registry:Kind@23402,registry:Kind@25230,registry:Kind@28668,registry:Kind@39696,registry:Kind@39725,whole:Route@13812,whole:Route@13906,whole:Route@14154,whole:Route@14193,whole:Route@17960,whole:Route@18071,whole:Route@20370,whole:Route@21154,whole:Route@21612,whole:Route@21804,whole:Route@23405,whole:Route@25233,whole:Route@26294,whole:Route@26360,whole:Route@26371,whole:Route@26624,whole:Route@26719,whole:Route@26795,whole:Route@26839,whole:Route@27141,whole:Route@27171,whole:Route@28671,whole:Route@28956,whole:Route@30762,whole:Route@30822,whole:Route@30865,whole:Route@30880,whole:Route@32091,whole:Route@34379,whole:Route@39699,whole:Route@39728,whole:Route@39757,whole:Route@39789,whole:Route@42256,whole:Route@8405,whole:Route@8504,whole:Route@8610 3b450b21a2e2b49ccac127eb9917fdc5a2dfdec1c490ccf89151f443f8b37825 |
| +@coverage internal/edge 13acd10c5bca7a338a898c90d1677fcddd35b4a5d0f58d64d9b18a59f27d15c3 |
| +@coverage internal/gate 7b140d60ca2a8c62fa47279c0a747c076bc755595680c97037736f555ae40fbf |
diff --git a/internal/provision/testdata/plan14-root-reads-ha-departure-evidence.tsv b/internal/provision/testdata/plan14-root-reads-ha-departure-evidence.tsv| deleted file mode 100644 |
| index 6753ab2f7..000000000 |
| --- a/internal/provision/testdata/plan14-root-reads-ha-departure-evidence.tsv |
| +++ /dev/null |
| @@ -1,13 +0,0 @@ |
| -# Census overlay ha-departure-evidence, written by census-propose (#369). census-ruling-ha-departure-evidence, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-ha-departure-evidence.md. |
| -# 0 body, 2 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| -# 2 new dispositions: 0 reads re-frozen at their disposition with the claim, 2 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| -@legacy de5290a2011654dd25871ee9b7dfbb95045989f5b944dc01f1165095dc1ebf24 internal/registry/ha_journal.go Registry.MarkPendingTerminationPaged legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-departure-evidence;basis=New wrapper over the hint_paged op; local journal only. whole:HAPendingTermination@176,whole:HAPendingTermination@182 d45e190a96beaf27eeadc9800ac113e51cedb36a3a395d0a67128911d60cc6bc |
| -@legacy c7456932708add3564c8741b2a12a3bd09b44e04c8559c21ff2e80cd822770fa internal/registry/ha_journal.go Registry.RetryPendingTerminationOnce legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-departure-evidence;basis=New wrapper over the retry_hint_once op; local journal only. registry:Found@243,whole:HAPendingTermination@205,whole:HAPendingTermination@211 61ae470c9b622b0dfd3906278bb4b121b22a43c0ab98712738a0685dbbedb311 |
| -@legacy 62d62e395fe09b5233aa5a33b508678a158c373d3c1da530f5dad05af1890587 internal/host/hadepartures.go Controller.step legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B3b: resolve bound same-scope identities, persist validated termination proof before enrollment, and replay bounded pending work outside consumer/fold locks. Existing regional data client and shared cache; inventory only restricts completion, never lifecycle. B3 fix r1: Describe before proof access on suspicion paths. Normalize validated legacy inbox entries in atomic transactions, process bounded per-iid pending pages, and persist hourly escalation. Delete unrelated rows only after complete applicable walks and guarded received timestamps. Acquire/completion authority unchanged. B4: Count unresolved durable hints for the globally throttled summary and call the bounded scanner outside the fold. Acknowledge unrelated hints only after complete applicable discovery; complete departure acknowledgment reads durable state. B4 fix r3: Include refused fixed-box replacements in the existing structured receiver summary, sharing its persisted hourly page claim with pending hints. Read only local refusal state and registry page state; no additional cloud request or completion authority.;rev3=census-ruling-region-ha-p3b;basis=Register admitted departure work and cancel/join it during closure before existing confirmation/import processing. Existing 23 read sites and lease/termination proofs remain; no new root input or takeover permission.;rev3=census-ruling-region-ha-g2-fixes;basis=Include identity and underlying paging errors in existing failure logs; new IID field read only, no new external read or termination authority.;rev3=census-ruling-region-ha-dr5;basis=DR-5: scans every due departure per step (at most 8), reading departure rows from the local journal (PendingDepartures) to detect progress; same ScanPass per departure, no new remote read.;rev3=census-ruling-ha-departure-evidence;basis=A pending hint whose bound identity has an unknown or placement-null observation gets code evidence_no_observation: no enqueue, no enrollment, no completion or takeover authority. It claims a page through the new retry_hint_once op (falling back to the ordinary hourly retry if the server refuses it) and marks the hint paged only after PageIdentity succeeds. Reads only the local journal. file:Walk@2717,registry:Body@1979,registry:IID@2554,registry:IID@2971,registry:IID@3757,registry:IID@3790,registry:IID@4736,registry:IID@4894,registry:Key@2081,registry:Key@2317,registry:LastBlocked@2872,registry:NextAttempt@6456,registry:NextAttempt@6481,registry:ReceivedAt@2300,registry:ReceivedAt@3688,whole:HADeparture@6346,whole:HADeparture@6432,whole:HADeparture@6456,whole:HADeparture@6519,whole:HADeparture@6526,whole:HADeparture@6734,whole:HADeparture@7702,whole:HADeparture@8025,whole:HAPendingTermination@2495,whole:HAPendingTermination@2912,whole:HAPendingTermination@3599,whole:HAPendingTermination@3882,whole:HAPendingTermination@4110,whole:HAPendingTermination@4251,whole:HAPendingTermination@4812,whole:HAPendingTermination@4995,whole:HAPendingTermination@5566,whole:HATerminationInbox@1939 23e9712dcf7767ed2657a16736a9214d153ca614039a5674207c9ed29cd377f1 |
| -@legacy 5fe23589bbdc7284705ca00509168de124ef3eb23dcfa7e0ecbcff6b2cd4e535 internal/registry/ha_journal.go Registry.haJournal legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B3b: read/write bounded termination inbox, pending departures, verified identity cache and retry/cursor state in the existing SQLite registry with remote parity. No reusable receipt, arbitrary path, import/completion/start authority; retries and page times survive replay. B3 fix r1: Add atomic compact hint enrollment, bounded due reads, received-time guarded removal and hourly page claims. Retain old inbox APIs for migration, no queue receipt or authority bit. All reads/writes stay in the existing SQLite registry with remote parity. B4: Extend the existing registry journal/schema/RPC with scan state, guarded completion phases, durable bounded retry count and one receiver-wide identity summary claim/count. All state stays in the existing database; no queue receipt is persisted and no import/start authority is granted by an inbox entry. B4 fix r2: Delegate existing identity RPC operations to historical storage helpers. Remote interface unchanged; historical ref/iid lookups retain the old binding and ref-only lookups return the latest incarnation. B4 fix r3: Inventory-only waiting resets RetryCount like scan/pending and retains the caller 30-second schedule. Add an atomic claim against the existing singleton identity-page row, shared with retry_hint. Existing database and HAJournal RPC only; no filesystem path or identity authority added. B5: Stream pending departure bodies from the existing registry to count all incomplete rows and find oldest enrollment, including delayed retries. Additive enrollment timestamp retains age when evidence is reobserved. No new path or execution input.;rev3=census-ruling-ha-departure-evidence;basis=New ops retry_hint_once (reads the hint's own last_error, claims the existing global hourly page slot, writes next_attempt/last_page/last_error) and hint_paged (sets last_error to code plus paged when it still equals code). Same tables, same transaction helper, no new authority. file:QueryContext@10790,file:QueryContext@2354,file:QueryContext@291,file:QueryContext@8926,file:QueryRowContext@11660,file:QueryRowContext@1271,file:QueryRowContext@13545,file:QueryRowContext@4616,file:QueryRowContext@6283,file:QueryRowContext@7125,file:QueryRowContext@8203,file:QueryRowContext@8403,file:Walk@13181,file:Walk@13204,file:Walk@13225,file:Walk@13245,file:Walk@13318,file:Walk@13741,registry:Account@1498,registry:Account@1978,registry:Account@2744,registry:Account@3169,registry:Account@3537,registry:Account@4279,registry:Account@4729,registry:Account@5505,registry:Account@5724,registry:Account@6096,registry:At@10977,registry:At@1098,registry:At@1117,registry:At@12106,registry:At@12609,registry:At@12634,registry:At@2571,registry:At@3530,registry:At@3577,registry:At@3918,registry:At@3937,registry:At@4244,registry:At@5082,registry:At@5101,registry:At@5453,registry:At@5492,registry:At@5691,registry:At@6517,registry:At@6534,registry:At@6675,registry:At@7337,registry:At@7721,registry:At@7938,registry:At@866,registry:At@8748,registry:At@8767,registry:At@9116,registry:Body@7900,registry:Body@8059,registry:Body@8728,registry:Body@9309,registry:Code@11872,registry:Code@11900,registry:Code@11920,registry:Code@11943,registry:Code@12935,registry:Code@4271,registry:Code@4404,registry:Code@4437,registry:Code@4890,registry:Code@5266,registry:Code@5852,registry:Code@5885,registry:Code@6087,registry:Code@6124,registry:Code@9774,registry:Count@1352,registry:Count@623,registry:Departure@9812,registry:Departures@11437,registry:Departures@11461,registry:EnrolledAt@652,registry:EnrolledAt@6599,registry:EnrolledAt@6626,registry:EnrolledAt@9989,registry:Found@1208,registry:Found@12770,registry:Found@13101,registry:Found@3705,registry:Found@4072,registry:Found@5237,registry:Found@5282,registry:Found@7817,registry:HAJournal@225,registry:Hint@1482,registry:Hint@3034,registry:Hint@3251,registry:Hint@4392,registry:Hint@5840,registry:Hints@2950,registry:Hints@2969,registry:ID@11729,registry:ID@12398,registry:ID@12616,registry:ID@12943,registry:ID@13140,registry:ID@6374,registry:ID@6896,registry:ID@7222,registry:ID@7703,registry:ID@7862,registry:ID@7880,registry:ID@8048,registry:ID@8722,registry:IID@1566,registry:IID@1585,registry:IID@1999,registry:IID@2767,registry:IID@3190,registry:IID@3558,registry:IID@4300,registry:IID@4750,registry:IID@5526,registry:IID@5745,registry:IID@6117,registry:Identity@13055,registry:Identity@13087,registry:Inbox@9460,registry:Inbox@9479,registry:InventoryGeneration@6682,registry:Key@10532,registry:Key@10627,registry:Key@13146,registry:Key@2098,registry:Key@2193,registry:Key@9283,registry:Key@9616,registry:Key@9782,registry:Keys@13181,registry:Keys@13245,registry:LastError@10068,registry:LastError@11344,registry:LastError@2794,registry:LastError@9332,registry:LastPage@10041,registry:LastPage@11403,registry:LastPage@2916,registry:Limit@10715,registry:Limit@10730,registry:Limit@10984,registry:Limit@2279,registry:Limit@2294,registry:Limit@2578,registry:Limit@8851,registry:Limit@8866,registry:Limit@9123,registry:MessageID@9293,registry:Next@12162,registry:Next@12177,registry:Next@12926,registry:Next@9765,registry:NextAttempt@10087,registry:NextAttempt@10478,registry:NextAttempt@11366,registry:NextAttempt@2879,registry:NextAttempt@9421,registry:Offset@13204,registry:Offset@13225,registry:Oldest@718,registry:Oldest@759,registry:Oldest@785,registry:Op@254,registry:Page@12448,registry:Phase@10019,registry:Phase@11325,registry:Phase@6711,registry:ProofDigest@9888,registry:ProofKey@9868,registry:ReceivedAt@1599,registry:ReceivedAt@2018,registry:ReceivedAt@2045,registry:ReceivedAt@2845,registry:ReceivedAt@3209,registry:ReceivedAt@9385,registry:Region@1522,registry:Region@1544,registry:Region@1989,registry:Region@2756,registry:Region@3180,registry:Region@3548,registry:Region@4290,registry:Region@4740,registry:Region@5516,registry:Region@5735,registry:Region@6107,registry:RetryCount@11971,registry:RetryCount@12125,registry:RetryCount@12201,registry:RetryCount@12220,registry:Summary@623,registry:Summary@718,registry:Summary@759,registry:Summary@785,registry:Walk@13181,registry:Walk@13204,registry:Walk@13225,registry:Walk@13245,registry:Walk@13318,registry:Walk@13741,registry:remote@111,registry:remote@142,registry:sql@10790,registry:sql@1271,registry:sql@13374,registry:sql@13545,registry:sql@2354,registry:sql@291,registry:sql@3052,registry:sql@5943,registry:sql@8926,registry:sql@926,registry:sql@9545,registry:sql@9655,whole:HABoxIdentity@13057,whole:HABoxIdentity@13091,whole:HADeparture@10142,whole:HADeparture@11284,whole:HADeparture@11441,whole:HADeparture@11465,whole:HADeparture@11477,whole:HADeparture@11831,whole:HADeparture@12270,whole:HADeparture@582,whole:HADeparture@6476,whole:HADeparture@6756,whole:HADeparture@9814,whole:HADepartureSummary@627,whole:HADepartureSummary@722,whole:HADepartureSummary@763,whole:HADepartureSummary@789,whole:HAIdentityWalk@13183,whole:HAIdentityWalk@13206,whole:HAIdentityWalk@13227,whole:HAIdentityWalk@13247,whole:HAIdentityWalk@13320,whole:HAIdentityWalk@13745,whole:HAPendingTermination@1484,whole:HAPendingTermination@2954,whole:HAPendingTermination@2973,whole:HAPendingTermination@2980,whole:HAPendingTermination@3036,whole:HAPendingTermination@3253,whole:HAPendingTermination@4394,whole:HAPendingTermination@5842,whole:HATerminationInbox@9464,whole:HATerminationInbox@9483,whole:HATerminationInbox@9490,whole:haJournalRequest@1458,whole:haJournalRequest@196,whole:haJournalRequest@207,whole:haJournalResponse@10171,whole:haJournalResponse@10254,whole:haJournalResponse@10516,whole:haJournalResponse@10657,whole:haJournalResponse@10755,whole:haJournalResponse@11019,whole:haJournalResponse@11240,whole:haJournalResponse@11310,whole:haJournalResponse@11600,whole:haJournalResponse@1166,whole:haJournalResponse@11769,whole:haJournalResponse@11856,whole:haJournalResponse@12301,whole:haJournalResponse@1236,whole:haJournalResponse@12427,whole:haJournalResponse@12685,whole:haJournalResponse@12755,whole:haJournalResponse@12971,whole:haJournalResponse@13270,whole:haJournalResponse@13352,whole:haJournalResponse@13679,whole:haJournalResponse@1372,whole:haJournalResponse@13774,whole:haJournalResponse@13803,whole:haJournalResponse@1633,whole:haJournalResponse@1727,whole:haJournalResponse@2082,whole:haJournalResponse@2223,whole:haJournalResponse@230,whole:haJournalResponse@2319,whole:haJournalResponse@2613,whole:haJournalResponse@2830,whole:haJournalResponse@3330,whole:haJournalResponse@3626,whole:haJournalResponse@3692,whole:haJournalResponse@3988,whole:haJournalResponse@399,whole:haJournalResponse@4057,whole:haJournalResponse@4329,whole:haJournalResponse@4462,whole:haJournalResponse@4556,whole:haJournalResponse@4828,whole:haJournalResponse@4852,whole:haJournalResponse@5152,whole:haJournalResponse@518,whole:haJournalResponse@5222,whole:haJournalResponse@5782,whole:haJournalResponse@5910,whole:haJournalResponse@608,whole:haJournalResponse@6223,whole:haJournalResponse@6414,whole:haJournalResponse@6501,whole:haJournalResponse@6572,whole:haJournalResponse@6785,whole:haJournalResponse@6924,whole:haJournalResponse@7050,whole:haJournalResponse@7309,whole:haJournalResponse@7362,whole:haJournalResponse@7784,whole:haJournalResponse@7964,whole:haJournalResponse@8144,whole:haJournalResponse@8325,whole:haJournalResponse@8365,whole:haJournalResponse@8507,whole:haJournalResponse@8569,whole:haJournalResponse@8800,whole:haJournalResponse@8891,whole:haJournalResponse@892,whole:haJournalResponse@9158,whole:haJournalResponse@9370,whole:haJournalResponse@9965,whole:remoteClient@113,whole:remoteClient@144 a80082cbe79d8f9f5f0cf09d6d83b7bbf169c14fed3a694cca4a26845d1cd36e |
| -internal/registry/ha_journal.go Registry.MarkPendingTerminationPaged legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-departure-evidence;basis=New wrapper over the hint_paged op; local journal only. whole:HAPendingTermination@176,whole:HAPendingTermination@182 d45e190a96beaf27eeadc9800ac113e51cedb36a3a395d0a67128911d60cc6bc |
| -internal/registry/ha_journal.go Registry.RetryPendingTerminationOnce legacy accepted-legacy accepted-legacy;rev3=census-ruling-ha-departure-evidence;basis=New wrapper over the retry_hint_once op; local journal only. registry:Found@243,whole:HAPendingTermination@205,whole:HAPendingTermination@211 61ae470c9b622b0dfd3906278bb4b121b22a43c0ab98712738a0685dbbedb311 |
| -internal/host/hadepartures.go Controller.step legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B3b: resolve bound same-scope identities, persist validated termination proof before enrollment, and replay bounded pending work outside consumer/fold locks. Existing regional data client and shared cache; inventory only restricts completion, never lifecycle. B3 fix r1: Describe before proof access on suspicion paths. Normalize validated legacy inbox entries in atomic transactions, process bounded per-iid pending pages, and persist hourly escalation. Delete unrelated rows only after complete applicable walks and guarded received timestamps. Acquire/completion authority unchanged. B4: Count unresolved durable hints for the globally throttled summary and call the bounded scanner outside the fold. Acknowledge unrelated hints only after complete applicable discovery; complete departure acknowledgment reads durable state. B4 fix r3: Include refused fixed-box replacements in the existing structured receiver summary, sharing its persisted hourly page claim with pending hints. Read only local refusal state and registry page state; no additional cloud request or completion authority.;rev3=census-ruling-region-ha-p3b;basis=Register admitted departure work and cancel/join it during closure before existing confirmation/import processing. Existing 23 read sites and lease/termination proofs remain; no new root input or takeover permission.;rev3=census-ruling-region-ha-g2-fixes;basis=Include identity and underlying paging errors in existing failure logs; new IID field read only, no new external read or termination authority.;rev3=census-ruling-region-ha-dr5;basis=DR-5: scans every due departure per step (at most 8), reading departure rows from the local journal (PendingDepartures) to detect progress; same ScanPass per departure, no new remote read.;rev3=census-ruling-ha-departure-evidence;basis=A pending hint whose bound identity has an unknown or placement-null observation gets code evidence_no_observation: no enqueue, no enrollment, no completion or takeover authority. It claims a page through the new retry_hint_once op (falling back to the ordinary hourly retry if the server refuses it) and marks the hint paged only after PageIdentity succeeds. Reads only the local journal. file:Walk@2717,registry:Body@1979,registry:IID@2554,registry:IID@2971,registry:IID@3757,registry:IID@3790,registry:IID@4736,registry:IID@4894,registry:Key@2081,registry:Key@2317,registry:LastBlocked@2872,registry:NextAttempt@6456,registry:NextAttempt@6481,registry:ReceivedAt@2300,registry:ReceivedAt@3688,whole:HADeparture@6346,whole:HADeparture@6432,whole:HADeparture@6456,whole:HADeparture@6519,whole:HADeparture@6526,whole:HADeparture@6734,whole:HADeparture@7702,whole:HADeparture@8025,whole:HAPendingTermination@2495,whole:HAPendingTermination@2912,whole:HAPendingTermination@3599,whole:HAPendingTermination@3882,whole:HAPendingTermination@4110,whole:HAPendingTermination@4251,whole:HAPendingTermination@4812,whole:HAPendingTermination@4995,whole:HAPendingTermination@5566,whole:HATerminationInbox@1939 23e9712dcf7767ed2657a16736a9214d153ca614039a5674207c9ed29cd377f1 |
| -internal/registry/ha_journal.go Registry.haJournal legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b3b-t;basis=B3b: read/write bounded termination inbox, pending departures, verified identity cache and retry/cursor state in the existing SQLite registry with remote parity. No reusable receipt, arbitrary path, import/completion/start authority; retries and page times survive replay. B3 fix r1: Add atomic compact hint enrollment, bounded due reads, received-time guarded removal and hourly page claims. Retain old inbox APIs for migration, no queue receipt or authority bit. All reads/writes stay in the existing SQLite registry with remote parity. B4: Extend the existing registry journal/schema/RPC with scan state, guarded completion phases, durable bounded retry count and one receiver-wide identity summary claim/count. All state stays in the existing database; no queue receipt is persisted and no import/start authority is granted by an inbox entry. B4 fix r2: Delegate existing identity RPC operations to historical storage helpers. Remote interface unchanged; historical ref/iid lookups retain the old binding and ref-only lookups return the latest incarnation. B4 fix r3: Inventory-only waiting resets RetryCount like scan/pending and retains the caller 30-second schedule. Add an atomic claim against the existing singleton identity-page row, shared with retry_hint. Existing database and HAJournal RPC only; no filesystem path or identity authority added. B5: Stream pending departure bodies from the existing registry to count all incomplete rows and find oldest enrollment, including delayed retries. Additive enrollment timestamp retains age when evidence is reobserved. No new path or execution input.;rev3=census-ruling-ha-departure-evidence;basis=New ops retry_hint_once (reads the hint's own last_error, claims the existing global hourly page slot, writes next_attempt/last_page/last_error) and hint_paged (sets last_error to code plus paged when it still equals code). Same tables, same transaction helper, no new authority. file:QueryContext@10790,file:QueryContext@2354,file:QueryContext@291,file:QueryContext@8926,file:QueryRowContext@11660,file:QueryRowContext@1271,file:QueryRowContext@13545,file:QueryRowContext@4616,file:QueryRowContext@6283,file:QueryRowContext@7125,file:QueryRowContext@8203,file:QueryRowContext@8403,file:Walk@13181,file:Walk@13204,file:Walk@13225,file:Walk@13245,file:Walk@13318,file:Walk@13741,registry:Account@1498,registry:Account@1978,registry:Account@2744,registry:Account@3169,registry:Account@3537,registry:Account@4279,registry:Account@4729,registry:Account@5505,registry:Account@5724,registry:Account@6096,registry:At@10977,registry:At@1098,registry:At@1117,registry:At@12106,registry:At@12609,registry:At@12634,registry:At@2571,registry:At@3530,registry:At@3577,registry:At@3918,registry:At@3937,registry:At@4244,registry:At@5082,registry:At@5101,registry:At@5453,registry:At@5492,registry:At@5691,registry:At@6517,registry:At@6534,registry:At@6675,registry:At@7337,registry:At@7721,registry:At@7938,registry:At@866,registry:At@8748,registry:At@8767,registry:At@9116,registry:Body@7900,registry:Body@8059,registry:Body@8728,registry:Body@9309,registry:Code@11872,registry:Code@11900,registry:Code@11920,registry:Code@11943,registry:Code@12935,registry:Code@4271,registry:Code@4404,registry:Code@4437,registry:Code@4890,registry:Code@5266,registry:Code@5852,registry:Code@5885,registry:Code@6087,registry:Code@6124,registry:Code@9774,registry:Count@1352,registry:Count@623,registry:Departure@9812,registry:Departures@11437,registry:Departures@11461,registry:EnrolledAt@652,registry:EnrolledAt@6599,registry:EnrolledAt@6626,registry:EnrolledAt@9989,registry:Found@1208,registry:Found@12770,registry:Found@13101,registry:Found@3705,registry:Found@4072,registry:Found@5237,registry:Found@5282,registry:Found@7817,registry:HAJournal@225,registry:Hint@1482,registry:Hint@3034,registry:Hint@3251,registry:Hint@4392,registry:Hint@5840,registry:Hints@2950,registry:Hints@2969,registry:ID@11729,registry:ID@12398,registry:ID@12616,registry:ID@12943,registry:ID@13140,registry:ID@6374,registry:ID@6896,registry:ID@7222,registry:ID@7703,registry:ID@7862,registry:ID@7880,registry:ID@8048,registry:ID@8722,registry:IID@1566,registry:IID@1585,registry:IID@1999,registry:IID@2767,registry:IID@3190,registry:IID@3558,registry:IID@4300,registry:IID@4750,registry:IID@5526,registry:IID@5745,registry:IID@6117,registry:Identity@13055,registry:Identity@13087,registry:Inbox@9460,registry:Inbox@9479,registry:InventoryGeneration@6682,registry:Key@10532,registry:Key@10627,registry:Key@13146,registry:Key@2098,registry:Key@2193,registry:Key@9283,registry:Key@9616,registry:Key@9782,registry:Keys@13181,registry:Keys@13245,registry:LastError@10068,registry:LastError@11344,registry:LastError@2794,registry:LastError@9332,registry:LastPage@10041,registry:LastPage@11403,registry:LastPage@2916,registry:Limit@10715,registry:Limit@10730,registry:Limit@10984,registry:Limit@2279,registry:Limit@2294,registry:Limit@2578,registry:Limit@8851,registry:Limit@8866,registry:Limit@9123,registry:MessageID@9293,registry:Next@12162,registry:Next@12177,registry:Next@12926,registry:Next@9765,registry:NextAttempt@10087,registry:NextAttempt@10478,registry:NextAttempt@11366,registry:NextAttempt@2879,registry:NextAttempt@9421,registry:Offset@13204,registry:Offset@13225,registry:Oldest@718,registry:Oldest@759,registry:Oldest@785,registry:Op@254,registry:Page@12448,registry:Phase@10019,registry:Phase@11325,registry:Phase@6711,registry:ProofDigest@9888,registry:ProofKey@9868,registry:ReceivedAt@1599,registry:ReceivedAt@2018,registry:ReceivedAt@2045,registry:ReceivedAt@2845,registry:ReceivedAt@3209,registry:ReceivedAt@9385,registry:Region@1522,registry:Region@1544,registry:Region@1989,registry:Region@2756,registry:Region@3180,registry:Region@3548,registry:Region@4290,registry:Region@4740,registry:Region@5516,registry:Region@5735,registry:Region@6107,registry:RetryCount@11971,registry:RetryCount@12125,registry:RetryCount@12201,registry:RetryCount@12220,registry:Summary@623,registry:Summary@718,registry:Summary@759,registry:Summary@785,registry:Walk@13181,registry:Walk@13204,registry:Walk@13225,registry:Walk@13245,registry:Walk@13318,registry:Walk@13741,registry:remote@111,registry:remote@142,registry:sql@10790,registry:sql@1271,registry:sql@13374,registry:sql@13545,registry:sql@2354,registry:sql@291,registry:sql@3052,registry:sql@5943,registry:sql@8926,registry:sql@926,registry:sql@9545,registry:sql@9655,whole:HABoxIdentity@13057,whole:HABoxIdentity@13091,whole:HADeparture@10142,whole:HADeparture@11284,whole:HADeparture@11441,whole:HADeparture@11465,whole:HADeparture@11477,whole:HADeparture@11831,whole:HADeparture@12270,whole:HADeparture@582,whole:HADeparture@6476,whole:HADeparture@6756,whole:HADeparture@9814,whole:HADepartureSummary@627,whole:HADepartureSummary@722,whole:HADepartureSummary@763,whole:HADepartureSummary@789,whole:HAIdentityWalk@13183,whole:HAIdentityWalk@13206,whole:HAIdentityWalk@13227,whole:HAIdentityWalk@13247,whole:HAIdentityWalk@13320,whole:HAIdentityWalk@13745,whole:HAPendingTermination@1484,whole:HAPendingTermination@2954,whole:HAPendingTermination@2973,whole:HAPendingTermination@2980,whole:HAPendingTermination@3036,whole:HAPendingTermination@3253,whole:HAPendingTermination@4394,whole:HAPendingTermination@5842,whole:HATerminationInbox@9464,whole:HATerminationInbox@9483,whole:HATerminationInbox@9490,whole:haJournalRequest@1458,whole:haJournalRequest@196,whole:haJournalRequest@207,whole:haJournalResponse@10171,whole:haJournalResponse@10254,whole:haJournalResponse@10516,whole:haJournalResponse@10657,whole:haJournalResponse@10755,whole:haJournalResponse@11019,whole:haJournalResponse@11240,whole:haJournalResponse@11310,whole:haJournalResponse@11600,whole:haJournalResponse@1166,whole:haJournalResponse@11769,whole:haJournalResponse@11856,whole:haJournalResponse@12301,whole:haJournalResponse@1236,whole:haJournalResponse@12427,whole:haJournalResponse@12685,whole:haJournalResponse@12755,whole:haJournalResponse@12971,whole:haJournalResponse@13270,whole:haJournalResponse@13352,whole:haJournalResponse@13679,whole:haJournalResponse@1372,whole:haJournalResponse@13774,whole:haJournalResponse@13803,whole:haJournalResponse@1633,whole:haJournalResponse@1727,whole:haJournalResponse@2082,whole:haJournalResponse@2223,whole:haJournalResponse@230,whole:haJournalResponse@2319,whole:haJournalResponse@2613,whole:haJournalResponse@2830,whole:haJournalResponse@3330,whole:haJournalResponse@3626,whole:haJournalResponse@3692,whole:haJournalResponse@3988,whole:haJournalResponse@399,whole:haJournalResponse@4057,whole:haJournalResponse@4329,whole:haJournalResponse@4462,whole:haJournalResponse@4556,whole:haJournalResponse@4828,whole:haJournalResponse@4852,whole:haJournalResponse@5152,whole:haJournalResponse@518,whole:haJournalResponse@5222,whole:haJournalResponse@5782,whole:haJournalResponse@5910,whole:haJournalResponse@608,whole:haJournalResponse@6223,whole:haJournalResponse@6414,whole:haJournalResponse@6501,whole:haJournalResponse@6572,whole:haJournalResponse@6785,whole:haJournalResponse@6924,whole:haJournalResponse@7050,whole:haJournalResponse@7309,whole:haJournalResponse@7362,whole:haJournalResponse@7784,whole:haJournalResponse@7964,whole:haJournalResponse@8144,whole:haJournalResponse@8325,whole:haJournalResponse@8365,whole:haJournalResponse@8507,whole:haJournalResponse@8569,whole:haJournalResponse@8800,whole:haJournalResponse@8891,whole:haJournalResponse@892,whole:haJournalResponse@9158,whole:haJournalResponse@9370,whole:haJournalResponse@9965,whole:remoteClient@113,whole:remoteClient@144 a80082cbe79d8f9f5f0cf09d6d83b7bbf169c14fed3a694cca4a26845d1cd36e |
| -@coverage internal/host 24eb7bac37c5c2c95eb112e3ac343885377fd8f3c0c48798150bd279b22ec78f |
| -@coverage internal/registry aafbb8b28884b13ccc7d81bd049e5f53e2a512c3e40fc21f9b64fd6fb9f512f9 |