region labels: whole-branch Astra review brief, round 1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+124
−0
docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-LABELS-BRANCH.md+124 −0
CI cancelled — superseded by a newer push — run details
diff --git a/docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-LABELS-BRANCH.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-LABELS-BRANCH.md| new file mode 100644 |
| index 000000000..91077635f |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-REGION-LABELS-BRANCH.md |
| @@ -0,0 +1,124 @@ |
| +# Review brief: region labels, the built branch, round 1 of 3 |
| + |
| +Repo carlos/platform, branch `region-labels`, commit <tip named in the prompt>. |
| +Under review: the diff `ed03ca7d..<tip>` (`git diff ed03ca7d...HEAD`; ed03ca7d |
| +is the merge base with main). Ignore the plan, spec and findings files the |
| +first commit brought over, the Luna files, and `docs/superpowers/notes/`. |
| +Authorities: the spec `docs/superpowers/specs/2026-10-25-region-labels-design.md` |
| +(rev 5) and plans `docs/superpowers/plans/2026-10-25-region-labels-1-console.md` |
| +and `-2-cli.md`, all on this branch as they were approved for the build |
| +(Paul approved the build, 2026-10-26), and main as merged at ed03ca7d (which |
| +includes console-remote-instances, 93425891, and the console navigation |
| +round, ed03ca7d). Do not review against unmerged branches. |
| + |
| +You are an independent reviewer. Read the diff, then the code it names, and |
| +check every claim against that code. |
| + |
| +## Round history |
| + |
| +This design and change have had: spec rounds 1 to 4 (`CODEX-FINDINGS-REGION-LABELS.md`, |
| +`-R2`, `-R3`, `-R4`, accepted at round 4) and one plan round |
| +(`CODEX-FINDINGS-REGION-LABELS-PLANS.md`, answered in the plans). This is the |
| +first review of the built code, round 1 of 3 for the branch. AGENTS.md |
| +"Stopping rules" bind: the review stops at the first round with no P1. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Paul's ruling (2026-10-25, Q1): the label reads "London (uk)". |
| +- The spec's mechanisms (a name map rebuilt from edges files at most every |
| + 10 minutes; labels from records the pages already hold and SQLite; no |
| + `appDefault` caller added; additive wire fields; codes kept in printed |
| + commands) and the plans' declined findings (plan 1 "Declined plan |
| + findings": #2 pages surviving an unreadable registry, #8 labels without a |
| + release store). |
| +- Copy text: reviewed by Luna under Paul's delegation |
| + (`LUNA-COPY-REVIEW-REGION-LABELS-1.md`, `-2.md`). Report a string only if |
| + it states a wrong fact. |
| + |
| +## Where the build departed from the plans (judge these) |
| + |
| +The plans were written against the console-remote-instances branch before it |
| +merged; main changed after. The build follows main: |
| + |
| +1. Remote facts go through `remoteFacts` only (`TestRemoteFactsOneAccessor`); |
| + the labels add no box-report read. Row labels come from the records |
| + `pageRecords` already holds (`addRemoteRows`) and the registry rows |
| + `Assemble` already listed. |
| +2. The Deployments tab became Releases (ed03ca7d): RC-20's counts sit in Live |
| + now's Instances cell; the budget baseline (`regionbudget_test.go`) was |
| + re-measured at ed03ca7d. |
| +3. The placement form moved to Settings' Placement section: RC-14 "Change |
| + fleet" is applied there. The Region section stays in Settings, General. |
| +4. `TestInstancesTabRegionLines` and `TestInstancesTabRegionLineForAHomeApp` |
| + (main's) now expect labels, the C7 line for a home app with no sibling |
| + (labels 9), and a pooled app's RC-18c/RC-18e line. |
| +5. RC-8 drops "Use --region to choose another." when fewer than two regions |
| + are available (Luna's ruling), keeping it otherwise. |
| +6. The census: eight decision rows written by hand |
| + (`internal/provision/testdata/plan14-root-reads-region-labels-decisions.tsv`) |
| + pending Paul; the record-write census re-pins six handlers |
| + (`internal/provision/region_labels_census_test.go`). |
| + |
| +## What to check |
| + |
| +1. **Request budget (spec §7; Paul: S3 requests cost money).** No page view |
| + or API call makes a store request it did not make at ed03ca7d; `/list` |
| + makes none; the name map reads `control/edges/` only from |
| + `RunRegionNames`/`refreshRegionNames`, at most every 10 minutes on a |
| + generation change, else the jittered backstop; no new per-box polling. |
| + `TestPerfSessionS3Requests` (ceiling 1000) and `TestRegionLabelsAddNoStoreReads` |
| + must hold. Does anything reach `edgesfile.ReadSnapshot`, `liveEdges` or a |
| + store from a render path? |
| +2. **The name map (a cache, `internal/console/regionnames.go`).** A failed or |
| + incomplete read keeps the old map (codes before the first success); |
| + concurrency (the loop and readers); the generation it reads is the record |
| + view's watch, never its own poll; `cmd/console/main.go` wiring when the |
| + change index is off (nil watch: backstop only). |
| +3. **Label correctness (`internal/regionlabel`).** §3.1's table in order |
| + (fleet, pool of the everywhere class, every region, home, place, code); |
| + one predicate with the reconciler (`ServedEverywhere`, |
| + `RouteServedEverywhere`); §3.3's move phrases by state, with an unknown |
| + state saying nothing; the home folding in `NamesFrom`. |
| +4. **Tenant boundaries.** `elsewhereCounts` counts only the viewed account's |
| + rows; `/list` and `regionFactsFor` read only the account's own apps; |
| + `fleetAppRegions` (operator /fleet) folds names across accounts and must |
| + not show one account's region for another's app (a dash when holders |
| + disagree); `fleetFromRoutes` keeps `appPlacement`'s raw account compare. |
| +5. **Terminal safety in the CLI.** Every label the console sends passes |
| + `cleanPlace` before printing (`placeOr`); commands printed for pasting keep |
| + codes (`--to`, `--region`); `fwdPlace` and `dbMovingLine`. |
| +6. **Older consoles.** Every CLI surface prints today's bytes when the |
| + console sends no label field (C9 to C12, codes, `region uk`). |
| +7. **The census rows** in the decisions overlay: does each basis say what the |
| + code does, and does any of them let root read something it did not? |
| + |
| +## 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. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of |
| +your own. Do not run the full test suites. You may run targeted tests |
| +(`go test ./internal/console/ -run '<names>'`, `go test . -run '<names>'`) |
| +with `TMPDIR=/home/paulca/.cache/region-labels-tmp` and `GOFLAGS=-buildvcs=false`. |