carlos / platform Public

Region HA P1b-1: census proposal (census-ruling-region-ha-p1b1) and the branch review round 1 findings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 3c49284581e664ef023363203ef616f518018a88 parent 5d58453
4 files changed, +86 −0
  • docs/superpowers/notes/census-proposal-region-ha-p1b1.md +34 −0
  • docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B1-BRANCH-1.md +33 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-region-ha-p1b1.tsv +18 −0

CI passed — run details

diff --git a/docs/superpowers/notes/census-proposal-region-ha-p1b1.md b/docs/superpowers/notes/census-proposal-region-ha-p1b1.md
new file mode 100644
index 000000000..9351d53e7
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-region-ha-p1b1.md
@@ -0,0 +1,34 @@
+# Census approval: region-ha-p1b1
+
+Ruling `census-ruling-region-ha-p1b1`. 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/agent.go` `runAgent` | body | unchanged (6) | region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites |
+| `internal/activator/hawake.go` `ExecBackend.acquireClassified` | sites | +whole:Route | region HA P1b-1: the HA acquire's Proofs gain OwnerTerminated (b.ownerTerminated(ctx, rt)) beside SameBoxEmpty; one more whole:Route site passes the route to ownerTerminated; nothing new is read; the proof is consulted only by hafresh.DecideAcquire for another box's expired HA lock |
+
+Envelopes re-pinned: `internal/activator`, `internal/hafresh`, `internal/host`, `internal/lease`, `internal/termfence`.
+
+Removed units: the scan finds neither the declaration nor any of its sites.
+
+| unit | recorded disposition | basis | what changed |
+|---|---|---|---|
+| `internal/host/haself.go` `readInstanceID` | legacy, task accepted-legacy | accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new (region HA P1a), the agent as carlos, at RunAgent's start and its one-minute retry (haSelfNow, haSelfRetry): reads this instance's id from IMDSv2 (PUT /latest/api/token, then the identity document), each body through io.ReadAll capped at 64 KiB (the +file:ReadAll site), within 2 s; the id names the box as owner of the lease locks it writes (lease.SetSelf); IMDS answers only for this instance, no tenant or app input; root never calls it | removed: replaced by readIdentity (same reads, two more decoded fields) |
+
+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. Escalate 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. An escalation goes to the census owner as a decision.
+
+A removed unit's recorded disposition and basis are in its table above. For a removed unit or a retired envelope, confirm from the diff that the code is deleted and not moved: a read that moved shows on this card as a change to the unit that took it, and a unit moved whole shows as a new unit, a decision. Escalate if a check, refusal or validation that root relies on goes with the deleted code and its callers' changes on this card do not account for that.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `internal/host/agent.go` `runAgent`: authority, task B,C,D,F. Basis: rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above
+- `internal/activator/hawake.go` `ExecBackend.acquireClassified`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: the acquire's classification: a legacy route (sidecar, hand-added or not an instance) takes lease.Acquire and refuses on an HA-format lock; otherwise isHA (a record read error fails the wake, never falls back to legacy); not HA takes lease.Acquire, and an HA-format lock there marks the host HA for good and continues; HA requires haContained before any lock request, then lease.AcquireHA with the same-box proof; held and refused leases map to errLeaseHeld and errLeaseRefused (leaseError); +registry:Host, +whole:Route x7
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/activator/hatakeover.go:ExecBackend.ownerTerminated`: reads +registry:Host ×2; written legacy, accepted-legacy, frozen
+- new `internal/host/haself.go:readIdentity`: reads +file:ReadAll; written legacy, accepted-legacy, frozen
+
+Seal: `f5afdacd495705841fcc8441eaefe0efb9db7056de281bb06d1714960a5575b7` → `185170fe393cb565d18a3359dee5ace12676b3e1adecb8b638199d25ceeb779f`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-region-ha-p1b1.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B1-BRANCH-1.md b/docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B1-BRANCH-1.md
new file mode 100644
index 000000000..3871d25f5
--- /dev/null
+++ b/docs/superpowers/plans/CODEX-REVIEW-REGION-HA-P1B1-BRANCH-1.md
@@ -0,0 +1,33 @@
+No P1 found in `42f9f091..7305110c`. One P2 needs fixing before merge.
+
+1. **P2 — SDK retries exceed the describe budget.**
+ [hatakeover.go:39](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b1/internal/host/hatakeover.go:39) constructs the EC2 client with its default retry policy. [DescribeInstance:159](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b1/internal/termfence/fence.go:159) overrides only the region. The pinned SDK defaults to [three attempts](/home/paulca/go/pkg/mod/github.com/aws/aws-sdk-go-v2@v1.44.0/aws/retry/standard.go:27), including retries for HTTP 503 and `RequestLimitExceeded`.
+
+ **Failure scenario:** a throttled describe can send three requests before the confirmer caches its error for ten seconds. Concurrent callers share that operation, but its internal retries bypass the stated request budget. The single log entry also understates requests made.
+
+ **Fix:** disable SDK retries on this takeover client, preserving the method-value wrapper. Add a transport-level test returning a retryable error: assert one HTTP request, no additional request during the negative-cache interval, then one after expiry.
+
+ **Fault family:** termination-confirmation request budget and observability.
+
+2. **P3 — Existing timing prose contradicts N-HA9.**
+ [Spec:78](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b1/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:78) still promises immediate takeover; [spec:436](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b1/docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md:436) says expiry matters only for same-box recovery.
+
+ **Failure scenario:** an operator reads those passages and expects recovery before expiry. **Fix:** mark N-HA3’s timing superseded and update §9.7 for cross-box expiry. **Fault family:** documented takeover contract. Remains a follow-up, as already classified in the ledger.
+
+3. **P3 — Leader cancellation lacks its deferred regression test.**
+ [confirm_test.go:281](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p1b1/internal/termfence/confirm_test.go:281) tests cancellation of a waiting caller, not the caller performing the describe.
+
+ **Failure scenario:** a future change could mishandle the leader’s cancellation without this test detecting it. I found no present implementation failure. **Fix:** deterministically cancel the leader, verify remaining waiters receive its error, and check cache suppression followed by retry after ten seconds. **Fault family:** concurrent confirmation and cancellation. Remains a follow-up.
+
+The other review checks produced no additional findings:
+
+- Conditional acquires, legacy refusal, same-box recovery and release obligations preserve the single-writer boundary under N-HA9’s accepted timing assumption.
+- Task 3 retries partial identities until complete; HA acquisition refuses incomplete identity. Legacy acquisition does not gain that refusal.
+- The simulation retains P1a’s paths, captures the dead writer’s PID, and bases termination liveness checks on world truth. The parked difference in even-seed random walks does not require a pre-merge fix.
+- The EC2 method-value wrapper avoids retaining the whole client method set. The reported binary measurement leaves **112,286 bytes** of headroom; I did not independently rebuild it.
+
+`git diff --check` passed. The targeted Go test could not start because the sandbox denied creation of its work directory. No files were edited, no subagents were spawned, and no full suites or simulation sweep ran. Census remains the separate next step.
+
+Fix the P2 without reopening this review, retaining the required census and scoped termination-change checks.
+
+READY AFTER FIXES
\ No newline at end of file
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 3bef53d39..e13249873 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -13,3 +13,4 @@ plan14-root-reads-ha-p1a-433.tsv f8acbc0dd8828636e3f73d9afd0e539d3dfd1346e0232d9
plan14-root-reads-rollup-tenant-tags.tsv f8acbc0dd8828636e3f73d9afd0e539d3dfd1346e0232d91903c33d6eb27d820
plan14-root-reads-alias-wake-338.tsv deeddee1bf22a18562acda97cc34c6d73ee0dff1825100c73fa0be4c6a3f3e7b
plan14-root-reads-analytics-onramp.tsv f5afdacd495705841fcc8441eaefe0efb9db7056de281bb06d1714960a5575b7
+plan14-root-reads-region-ha-p1b1.tsv 185170fe393cb565d18a3359dee5ace12676b3e1adecb8b638199d25ceeb779f
diff --git a/internal/provision/testdata/plan14-root-reads-region-ha-p1b1.tsv b/internal/provision/testdata/plan14-root-reads-region-ha-p1b1.tsv
new file mode 100644
index 000000000..40df3bfb7
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-region-ha-p1b1.tsv
@@ -0,0 +1,18 @@
+# Census overlay region-ha-p1b1, written by census-propose (#369). census-ruling-region-ha-p1b1, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-region-ha-p1b1.md.
+# 1 body, 1 sites, 5 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 1 removed: each unit's declaration, or each envelope's directory, is absent from the scanned tree, so its row goes, a frozen declaration is retired as absent, and an envelope is retired.
+# 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 4e5587abf5fca2ac92c28ced3e51c8840af979581eb8732c3071829fde22eaa8 internal/activator/hatakeover.go ExecBackend.ownerTerminated legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b1;basis=new (region HA P1b-1): returns nil without eb.OwnerTerminated; else a closure calling it with the lock owner's instance id (from the HA lock, written by a box agent) and logging rt.Host on a takeover and, at most once a minute per host, on an error; the id goes only to EC2 DescribeInstances in this box's own account and region and is checked against the reply (termfence.SameAccountTerminated); root never calls it registry:Host@280,registry:Host@446 453ee2e95d0effb965bcb0f0e405d0da765e746806c77b975042dafbc89f8a8d
+@legacy d57c3b6770686a97af4963b0e83fe62e2a796f93af9d65d2879b0ea2776b5137 internal/host/haself.go readIdentity legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b1;basis=replaces readInstanceID (region HA P1b-1): the same IMDSv2 token and identity-document read within 2 s, each body io.ReadAll capped at 64 KiB, now decoding accountId and region beside instanceId; IMDS answers only for this instance; no tenant or app input; root never calls it file:ReadAll@537 acfe205becd4143144071a52dac849f574eb5a249a49488d3f2cfb6dbbf9dcb0
+@legacy 111e0388bdc64f3beca31e29a26c1fb42c990d9ae0a08581c7bf6936e8f6cc1a internal/activator/hawake.go ExecBackend.acquireClassified legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: the acquire's classification: a legacy route (sidecar, hand-added or not an instance) takes lease.Acquire and refuses on an HA-format lock; otherwise isHA (a record read error fails the wake, never falls back to legacy); not HA takes lease.Acquire, and an HA-format lock there marks the host HA for good and continues; HA requires haContained before any lock request, then lease.AcquireHA with the same-box proof; held and refused leases map to errLeaseHeld and errLeaseRefused (leaseError); +registry:Host, +whole:Route x7;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: the HA acquire's Proofs gain OwnerTerminated (b.ownerTerminated(ctx, rt)) beside SameBoxEmpty; one more whole:Route site passes the route to ownerTerminated; nothing new is read; the proof is consulted only by hafresh.DecideAcquire for another box's expired HA lock registry:Host@106,whole:Route@1199,whole:Route@1318,whole:Route@1363,whole:Route@1657,whole:Route@195,whole:Route@564,whole:Route@615,whole:Route@896 9cd7938fd864876b89fd093ccfbe8c88ae8c2b7d2dbac7910c86e2d25abf5089
+internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites file:Exec@17043,file:Open@1150,file:Statfs@42964,registry:App@11199,whole:Route@11191,whole:Route@27219 20f83bd9ac4a8f5ccbdce95ceb6560633d517340eee5a266d13d353d1c281e06
+internal/activator/hatakeover.go ExecBackend.ownerTerminated legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b1;basis=new (region HA P1b-1): returns nil without eb.OwnerTerminated; else a closure calling it with the lock owner's instance id (from the HA lock, written by a box agent) and logging rt.Host on a takeover and, at most once a minute per host, on an error; the id goes only to EC2 DescribeInstances in this box's own account and region and is checked against the reply (termfence.SameAccountTerminated); root never calls it registry:Host@280,registry:Host@446 453ee2e95d0effb965bcb0f0e405d0da765e746806c77b975042dafbc89f8a8d
+internal/host/haself.go readIdentity legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1b1;basis=replaces readInstanceID (region HA P1b-1): the same IMDSv2 token and identity-document read within 2 s, each body io.ReadAll capped at 64 KiB, now decoding accountId and region beside instanceId; IMDS answers only for this instance; no tenant or app input; root never calls it file:ReadAll@537 acfe205becd4143144071a52dac849f574eb5a249a49488d3f2cfb6dbbf9dcb0
+internal/activator/hawake.go ExecBackend.acquireClassified legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: the acquire's classification: a legacy route (sidecar, hand-added or not an instance) takes lease.Acquire and refuses on an HA-format lock; otherwise isHA (a record read error fails the wake, never falls back to legacy); not HA takes lease.Acquire, and an HA-format lock there marks the host HA for good and continues; HA requires haContained before any lock request, then lease.AcquireHA with the same-box proof; held and refused leases map to errLeaseHeld and errLeaseRefused (leaseError); +registry:Host, +whole:Route x7;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: the HA acquire's Proofs gain OwnerTerminated (b.ownerTerminated(ctx, rt)) beside SameBoxEmpty; one more whole:Route site passes the route to ownerTerminated; nothing new is read; the proof is consulted only by hafresh.DecideAcquire for another box's expired HA lock registry:Host@106,whole:Route@1199,whole:Route@1318,whole:Route@1363,whole:Route@1657,whole:Route@195,whole:Route@564,whole:Route@615,whole:Route@896 9cd7938fd864876b89fd093ccfbe8c88ae8c2b7d2dbac7910c86e2d25abf5089
+@remove internal/host/haself.go readInstanceID
+@removed internal/host/haself.go readInstanceID H3 census-ruling-region-ha-p1b1;absent;basis=removed: replaced by readIdentity (same reads, two more decoded fields)
+@coverage internal/activator f56620f1f876769e5cd956b2598c4ed9adcc412fd253ee4a88ce074c9f2ea9cc
+@coverage internal/hafresh 5a01361dc342f9684a7cc37778803722f61099cbbb03324512121e4c1a044351
+@coverage internal/host 444688eeb31ffeaa52ebbdc1f4775fe88c89f737fcf7ce4a227781d80d0e33b3
+@coverage internal/lease 45c526aff79916c93bb855048ba71c45867e45146414c2f1525d5600cdd9d632
+@coverage internal/termfence 53ee9d49ba33d6594cbc1479c69909fec9023ca9bdb6ba645f85d7aa7fe1d85b