carlos / platform Public

review brief: nearest-region-a whole branch and census approval, round 1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 7eb8354c2d23523c545cb10f34255f57b7c2472a parent 15f0ba0
1 file changed, +87 −0
  • docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-a-branch.md +87 −0

CI failed — run details

diff --git a/docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-a-branch.md b/docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-a-branch.md
new file mode 100644
index 000000000..0bdad1dc5
--- /dev/null
+++ b/docs/superpowers/notes/reviews/CODEX-REVIEW-BRIEF-nearest-region-a-branch.md
@@ -0,0 +1,87 @@
+# Review brief: branch nearest-region-a (merge A of the nearest-region never-reuse plan), round 1 of 3
+
+Repo carlos/platform, branch `nearest-region-a`, commit 15f0ba08 (the brief's own commit follows it; review the code at that commit).
+Under review: the diff `b1d00ca7..15f0ba08` (`git diff b1d00ca7 15f0ba08`; b1d00ca7 is `origin/main`).
+Authorities: the accepted spec `docs/superpowers/specs/2026-10-26-nearest-region-without-claims-design.md`
+(rev 5, accepted by Paul 2026-10-26) and the plan `docs/superpowers/plans/2026-10-26-nearest-region-never-reuse.md`,
+Tasks 2, 3 and 4 (merge A in its "Delivery and review sizing" table). Both are carried unchanged on this
+branch from `design-nearest-region-199` and land with it; treat them as fixed authorities, not unmerged
+work. Approved copy: `docs/superpowers/notes/copy/nearest-region-never-reuse.md`. AGENTS.md on main.
+
+You are an independent reviewer. Read the document, then the code it
+names, and check every claim against that code.
+
+## Fixed: do not re-argue
+
+- Paul's rulings in the spec (§1-§5, §3a). Report only mechanisms that fail to honour them.
+- Tasks 2 and 3 had their own reviews and are closed: Task 2 round 1 NOT READY (one P1, fixed), round 2
+ READY (`ASTRA-FINDINGS-nearest-region-a-task2-r1.md`, `-r2.md`); Task 3 round 1 READY AFTER FIXES (one
+ P2, applied in 15f0ba08; `ASTRA-FINDINGS-nearest-region-a-task3-r1.md`). Raise something in their code
+ again only with new evidence, such as an interaction with Task 4 or a merge-level effect.
+- Merge A scope: nothing changes what a user sees on create beyond Tasks 2-4, and the nearest-region
+ switch stays off (`appRegionsOn` is untouched). Merge B work (the activation window, inventory,
+ enforcement in recovery, tripwire, `apps place` and `accounts migrate` cuts, README) is out of scope.
+- The `carlos system hosts-used status` output lines and usage text are drafts; their copy review comes
+ with merge B. Report wording only if it is wrong about what the code does.
+- The status door answers `inflight_creates` and `unfinished_moves` as null until Task 5 can count them
+ (a deliberate deviation from the plan's "0 until then": a zero would claim a drain the console cannot
+ see).
+
+## What to check
+
+1. Task 4: the door is operator-only (`apiSystemRoller`), closed to every service credential, read-only,
+ and leaks no store error text. The mark count counts marks only (not `@mode`, `@floor` or anything
+ else under the prefix). Request cost: one listing of the prefix plus SQLite reads, per call.
+2. The CLI verb is wired into `systemVerb`/`runSystem`, uses the operator session, and prints only what
+ the door answered.
+3. Merge-level: the branch as a whole keeps every create door's existing answers in `incomplete` mode,
+ apart from the unwritable-bucket case (503 S2), and the root-read census changes (`runSystem`,
+ `systemVerb`: body) add no root read.
+4. Tests: each new witness goes through a real entry point and would fail without its implementation.
+5. Anything in the branch that would fail CI: build on linux, darwin and windows, vet, gofmt, the
+ record-write and root-read censuses, the route inventories (`claim_invariant_*`, `svcroutes_test.go`).
+
+## Census approval (separate from the verdict above)
+
+AGENTS.md, "The census: an approval, not a decision". The card is
+`docs/superpowers/notes/census-proposal-nearest-region-a.md`. For every unit on it (`system.go`
+`runSystem`, `system.go` `systemVerb`) and every re-pinned envelope (`.`, `internal/console`,
+`internal/provision`), give APPROVE or ESCALATE, citing the lines you read: compare a unit with its
+recorded disposition and basis on the card; for an envelope, read every changed function in that
+package in the diff 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. Put these verdicts in their own section after the findings.
+
+## 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. (The
+ census, and review of any newly changed security, root, termination
+ or production-storage behaviour, still check the fix; see AGENTS.md,
+ "Stopping rules".)
+- **P3**: clarity or polish. Goes on a 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 section or task, the problem,
+the evidence (file:line, verified), the failure scenario, a concrete
+fix and the invariant or trust boundary it breaks (that is its fault
+family). 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.
+
+In round 3, a NOT READY also says whether the P1s share one cause, and
+whether refusing the case up front or cutting the feature would remove
+them.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites.