P1a census review brief round 2 (scoped to the final-fix delta)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+88
−0
docs/superpowers/notes/census-region-ha-p1a-delta-r2.md+51 −0docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-region-ha-p1a-census-R2.md+37 −0
CI failed — run details
diff --git a/docs/superpowers/notes/census-region-ha-p1a-delta-r2.md b/docs/superpowers/notes/census-region-ha-p1a-delta-r2.md| new file mode 100644 |
| index 000000000..002de6386 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-region-ha-p1a-delta-r2.md |
| @@ -0,0 +1,51 @@ |
| +# Census delta since 48a6412a (region HA P1a, round 2) |
| + |
| +Source: `make census-card` run against the chain that already holds the approved round-1 overlay (`census-card-r2.txt` beside this file). It covers the final fix wave: 9c7b537a (F1), 2ea08e52 (F2), a55b70fd (F3), c0d7ddfa (F5). Only these rows changed. Every other row of `docs/superpowers/notes/census-proposal-region-ha-p1a.md` is what Astra approved in round 1. The claim for each row below is in `docs/superpowers/notes/census-region-ha-p1a-claims.md`. |
| + |
| +## Root-read census (21 units, 3 envelopes) |
| + |
| +body (3): |
| +- `internal/activator/admintoken.go` `ensureAdminToken`: takes a mint guard, asked only in its missing-token branch. |
| +- `internal/activator/instancekey.go` `ensureInstanceKey`: the same, for the key. |
| +- `internal/activator/harelease.go` `Service.releaseHAClean`: its slice check moved into `haHostEmpty`. |
| + |
| +sites (10): |
| +- `internal/activator/activator.go` `Service.doWake`: +whole:Route x2, the two `giveBackAfterStart` calls. |
| +- `internal/activator/backend_exec.go` `ExecBackend.seedChild`: -whole:Route. |
| +- `internal/activator/backend_exec.go` `ExecBackend.spawnChildFrom`: -whole:Route. |
| +- `internal/activator/claim_snapshot.go` `ExecBackend.EnsureClaimAdminToken`: -registry:Host. |
| +- `internal/activator/hasecrets.go` `ExecBackend.haSecretsReady`: -whole:Route. It takes the captured env bytes and no longer classifies the host. |
| +- `internal/activator/instancekey.go` `ExecBackend.BackfillInstanceKey`: -whole:Route. Back to main's body. |
| +- `internal/activator/instancekey.go` `ExecBackend.ensureInstanceKeyAt`: +whole:Route, `haMintGuard`. |
| +- `internal/activator/maintenance.go` `Service.cleanupFailedWake`: +registry:Host, +whole:Route x3, the HA host-slice proof. |
| +- `internal/activator/opset.go` `Service.reapUnprovenWake`: +whole:Route, the HA host-slice proof. |
| +- `internal/activator/prepare.go` `ExecBackend.prepareKeyedAt`: -registry:Host x3, -whole:Route. |
| + |
| +new (7), each written legacy, accepted-legacy: |
| +- `internal/activator/harelease.go` `Service.haHostEmpty` |
| +- `internal/activator/hasecrets.go` `ExecBackend.captureLaunchEnv`: +file:ReadFile on the flat arm only. |
| +- `internal/activator/hasecrets.go` `ExecBackend.ensureAdminTokenFor` |
| +- `internal/activator/hasecrets.go` `ExecBackend.haMintGuard` |
| +- `internal/activator/hasecrets.go` `ExecBackend.launchEnvLayer` |
| +- `internal/activator/maintenance.go` `Service.giveBackAfterStart` |
| +- `internal/activator/maintenance.go` `Service.retainUnprovenWake` |
| + |
| +removed (1): |
| +- `internal/activator/hasecrets.go` `ExecBackend.haMintGate`: replaced by `haMintGuard`. It was new on this branch, so it does not appear on the full card against main. |
| + |
| +Envelopes re-pinned: |
| +- `internal/activator`: also covers `haHeld` and the `unprovenWake.sliceOnly` field, which are not units. |
| +- `internal/lease`: `ProcessStateForTest`, a test helper that production never calls. |
| +- `internal/provision`: `SetRecordRegion` and `HAMoveError`. |
| + |
| +## Record-write census (8 re-pins, new layer `internal/provision/region_ha_p1a_census_test.go`) |
| + |
| +Class and kinds are unchanged for all eight; only the digests move. Six of these were already failing before the fix wave. |
| +- `internal/console/apiinstanceimport.go` `Server.handleAPIImportStopped`: record-writer. |
| +- `internal/console/apiinstancemove.go` `Server.handleAPIInstanceMoveRequest`: record-writer. |
| +- `internal/console/domainattach.go` `Server.attachDomainAs`: record-writer. |
| +- `internal/console/fleets.go` `Server.placeAppTarget`: record-writer. F3 adds the `haMoveConflict` answer. |
| +- `internal/host/bootstrap.go` `bootstrapWith`: key-site. |
| +- `internal/hostfiles/publisher.go` `Publisher.Commit`: nonrecord. |
| +- `internal/provision/provision.go` `SetRecordRegion`: record-writer. F3 adds the `HAMoveError` refusal under the CAS. |
| +- `internal/provision/reconcile.go` `Reconcile`: key-site. |
diff --git a/docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-region-ha-p1a-census-R2.md b/docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-region-ha-p1a-census-R2.md| new file mode 100644 |
| index 000000000..da9bfbdb2 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-region-ha-p1a-census-R2.md |
| @@ -0,0 +1,37 @@ |
| +# Review brief: census approval for region HA P1a, round 2 of 3 |
| + |
| +Repo carlos/platform, branch `design-region-ha-no-claims` on the amadan.net remote, the commit named in the reviewer's prompt. |
| +Under review (SCOPED): only the units, envelopes and record-write re-pins listed in `docs/superpowers/notes/census-region-ha-p1a-delta-r2.md` (changed since the approved proposal 48a6412a by the final fix wave 9c7b537a..c0d7ddfa and commit 709ba857), in the re-proposed card `docs/superpowers/notes/census-proposal-region-ha-p1a.md`, overlay `internal/provision/testdata/plan14-root-reads-region-ha-p1a.tsv`, and the new record-write layer `internal/provision/region_ha_p1a_census_test.go`. Round 1 approved every other unit (`docs/superpowers/notes/census-review-region-ha-p1a-r1.md`); do not re-review those. |
| +Authorities: AGENTS.md "The census: the reviewer decides" on this branch (main's process, C2 re-base 7c9e9d6). The approved design is `docs/superpowers/specs/2026-10-26-region-ha-without-claims-design.md`; do not review against other unmerged branches. |
| + |
| +You are the independent census reviewer (Astra, other family than the Claude author). Paul does not rule on census units; you decide every class. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- The design (spec §2.1 rulings, P1a scope N-HA7) and the P0 removal of joining mode, the enrolment pass and the claim arm of beginExecutableChange. |
| + |
| +## What to check |
| + |
| +For every unit and envelope on the card, a verdict citing the lines you read. Reject, as a finding, if the change: |
| +1. 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; |
| +2. weakens a check, refusal, validation, argument or environment root relies on; |
| +3. gives a new unit a disposition wrong for its reads; |
| +4. shows a removed or left unit that moved rather than went; |
| +5. or the diff cannot settle any of these. |
| +Look hardest at: the seven new units (haHostEmpty, captureLaunchEnv, ensureAdminTokenFor, haMintGuard, launchEnvLayer, giveBackAfterStart, retainUnprovenWake); prepareKeyedAt now bounding the instance-key bucket read at 30 s; captureLaunchEnv reading the env file uncapped on the flat layout (HA hosts are nested-only); haLaunchHooks test hooks in production code (nil in production); the eight record-write re-pins (classes and site kinds must be unchanged). |
| + |
| +## Severity |
| + |
| +- **P1**: unsafe for root, or the census would not pass. Blocks merge. |
| +- **P2**: wrong or missing claim/disposition. Fixed without reopening this review. |
| +- **P3**: clarity. Follow-up list only. |
| + |
| +## Output |
| + |
| +A table: unit or envelope, class, verdict (APPROVE / REJECT), lines read. Then findings ranked P1, P2, P3 with evidence and a fix. End with exactly one verdict: |
| + |
| +- **READY**: approve all; 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. Leave GOCACHE unset. |