review brief: parity guard final fix diff check
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-parity-guard-fixes.md+6 −0
Intent
<task-notification> <task-id>a1f0482034841246c</task-id> <tool-use-id>toolu_01CLL1FHLJ5ygr4nh7q5b9hX</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2185be7a-bc2c-4a32-953d-1ee7721363e3/tasks/a1f0482034841246c.output</output-file> <status>completed</status> <summary>Agent "Implement Task 2: console routeDecls" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>**Status: all three parts are done, in 1299721b (registrar guard) and 162cc203 (parity table).** The targeted tests pass, and the replies are posted on discussions 734, 735 and 737. **1. Scope ruling (1299721b).** The doc comments on `registrarViolations` and `TestClaimConsoleMuxHasOneRegistrar` now state what the guard covers. It catches a route added outside `routeDecls` by any ordinary means. It does not defend against code inside the package written to evade it (shadowing, reflection, unsafe); code review covers that. The spec's "Review findings, where they went" section has a new "Build review, Task 2 (rounds T2, T2-R2, T2-R3)" item saying the same and parking R3's two P1s with this ruling. **2. Three checks (1299721b), each with negative fixtures in `TestRegistrarViolationsRefusesAliases`:** - **Construction:** the `mux:` field may be set only in `NewServer`, and only to exactly `http.NewServeMux()`. - **Middleware wrap:** it is exempt only as the one `s.handler` assignment in `NewServer`. That file must import `internal/perf` as `perf`, and no identifier named `perf` may be declared anywhere in the package's non-test code. - **Served handler:** `s.handler` is assigned exactly once, in `NewServer`, and never set in a struct literal. - **Embedded fields:** `Server` may not embed a `ServeMux` or `http.Handler`. **Mutations 13 and 14** (`mux: m` with `m` mounted elsewhere, and a second `s.handler` assignment) are in the mutations note. Both fail `TestClaimConsoleMuxHasOneRegistrar` and every scanner test, and both were reverted. **3. Table P2s (162cc203):** - **`canary-list` split in three:** - `canary-list` (both): pairs `canary ls` with the releases page. - `canary-rm` (gap, `wp-instances`): it deletes the instance and leaves the channel, and the console has no instance delete. - `canary-retire` (console-only): it retires the channel and refuses while a host follows it. - **Operator rows:** `apps-show` and `email-pause` are now `operator`, with no package and a note giving each restriction. - **Page and replies:** `make parity-doc` regenerated `docs/parity.md`. Each reply says which row moved and why: 735 (`wp-settings`), 737 (`wp-email-storage`) and 734 (`wp-instances`, which gained `canary-rm`). **Tests:** - `go test ./internal/parity/ -count=1`: ok. - `go test ./internal/console/ -count=1 -run 'Parity|Registrar|MuxHasOneRegistrar|CLIDoor|AuthCLI'`: ok in 16.9s. - `go vet` and `gofmt` are clean. The fix report is appended to `task-2-report.md`. Still open: the record-write census update in 22012e0a needs the reviewer's approval.</result> <usage><subagent_tokens>331419</subagent_tokens><tool_uses>19</tool_uses><duration_ms>349310</duration_ms></usage> </task-notification>
Attributed to this commit: 9.83 g CO₂e (1,207,880 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-parity-guard, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-parity-guard-fixes.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-parity-guard-fixes.md| new file mode 100644 |
| index 000000000..f49157767 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-parity-guard-fixes.md |
| @@ -0,0 +1,6 @@ |
| +# Review brief: parity guard slice 3, check of the final fix diff |
| + |
| +Repo carlos/platform, branch `design-parity-guard`. Under review: `git diff 924969c2..162cc203` only. |
| +This is not a new review round. AGENTS.md stopping rule 1: a P2 fix diff that changes security behaviour is still checked inside the same budget. Context: Task 2 rounds T2, T2-R2, T2-R3 and the whole-branch round (`docs/superpowers/reviews/CODEX-FINDINGS-parity-guard-*.md`). The coordinator's ruling under stopping rule 2: the registrar guard's scope is ordinary drift, not deliberately evasive code; R3's P1s are parked with that ruling, so do not re-raise evasion techniques. |
| + |
| +Check only: (1) the whole-branch P2s (canary-list; apps-show and email-pause as operator) are resolved and the table rows match the code; (2) the new registrar checks (fresh mux at construction, perf resolves to the import, one s.handler assignment, no embedded ServeMux/Handler) are correct, have negative fixtures, and produce no false positive on today's tree; (3) nothing in the diff weakens a check that existed at 924969c2. Report P1/P2 only with file:line evidence, then one verdict: READY or NOT READY. Do not edit files, spawn subagents or run full suites. |