carlos / platform Public

review: parity guard Task 2 Astra round 2 findings (rule 2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev db2410ca9a1dc9da7408a709f4e4ffa86a47deb5 parent 9b5b669
1 file changed, +32 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-parity-guard-T2-R2.md +32 −0

CI cancelled — superseded by a newer push — run details

Intent

Human

<task-notification> <task-id>bo9ayv1iz</task-id> <tool-use-id>toolu_01LaeP6tXFQK5LfJx7kgRAEf</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2185be7a-bc2c-4a32-953d-1ee7721363e3/tasks/bo9ayv1iz.output</output-file> <status>completed</status> <summary>Background command "~/.cache/parity-build/review-t2r2.sh; echo exit=$?" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>ab551543fb177d431</task-id> <tool-use-id>toolu_017X33ieXvecGx144y7vtUbM</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2185be7a-bc2c-4a32-953d-1ee7721363e3/tasks/ab551543fb177d431.output</output-file> <status>completed</status> <summary>Agent "Implement Task 3: seed parity table" 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:** Done. Task 3 is built and the tests pass. The working tree is clean, and the scratch directory `$TMPDIR/parity-build-t3` is removed. **Commit:** `9b5b6696` "parity: seed the table, page and coverage tests". Its parent is `ac12be00`, a review-brief commit someone else made on the branch while I was working. **Tests:** - `go test ./internal/parity/ -count=1` and `go test ./internal/console/ -count=1 -run 'Parity'` both pass. - `gofmt` and `go vet` are clean. - `go list -deps . | grep -c internal/parity` gives 0, so the root binary does not depend on the new package. - `make census-card`: "Nothing to approve: the census is clean". - I ran 7 deliberate breakages, one per failure path (missing route, wrong route, `/api/cli` door, missing command, unknown command, stale page, unknown package). Each test failed with the message the brief asks for. **What the table holds:** 226 rows, 146 of them customer rows: 42 both, 9 partial, 64 gap, 15 cli-only, 16 console-only. All 198 non-cli console routes are covered, and every top-level word in `main.go` starts at least one row. **Concerns:** - **Report not committed:** `.superpowers` is gitignored, so the report is on disk only at `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/.superpowers/sdd/2026-11-09-parity-guard/task-3-report.md`. I did not force-add it. - **Status calls a reviewer may want to revisit:** - The alert email links are `operator`, not console-only, because they belong to fleet alerts. - Accepting a team invite is `console-only`, because the invite arrives as an email link. - Account default error level, account default analytics and the plan-lapse "keep" page go to `wp-cli-verbs`. - The ledger rows go to `wp-settings`. - **Where the inventory was wrong against the code** (all in the report): - `instances set-pages` and `ops hibernate-verify` were missing. - `email domains` has no `verify` verb. - The `move offline` and `system` sub-verbs are now written out as typed. - About 20 console routes the inventory never listed are now classified. - **Not checked line by line:** I spot-checked the inventory's statuses against the handlers rather than re-verifying every one. Only two console commits have landed since the inventory was taken, and neither touches those pages. - **Full console suite not run here:** I ran only the new parity test locally, as instructed; CI runs the rest.</result> <usage><subagent_tokens>160540</subagent_tokens><tool_uses>62</tool_uses><duration_ms>542835</duration_ms></usage> </task-notification>

Attributed to this commit: 14.7 g CO₂e (1,719,837 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-FINDINGS-parity-guard-T2-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-parity-guard-T2-R2.md
new file mode 100644
index 000000000..fba7ed935
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-parity-guard-T2-R2.md
@@ -0,0 +1,32 @@
+Round-1 P1: **partly resolved**. The alias and method-value cases are now rejected at [svcroutes_test.go:1178](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/internal/console/svcroutes_test.go:1178), but registration completeness still has a bypass.
+
+1. **P1 — An external mounting helper can register unseen routes.** Spec B2/B5; Task 2.
+
+ `registrarViolations` checks selector names against four registration helpers and `Handle`/`HandleFunc`. It does not prevent passing the mux to another package. The source walk covers only `internal/console` ([svcroutes_test.go:914](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/internal/console/svcroutes_test.go:914)).
+
+ For example, importing the existing `internal/instanceupdates` package and adding this to `NewServer` escapes those checks:
+
+ ```go
+ instanceupdates.Mount(s.mux, "probe",
+ func() (string, error) { return "probe", nil },
+ func(string) (instanceupdates.Report, error) {
+ return instanceupdates.Report{}, nil
+ },
+ )
+ ```
+
+ `Mount` registers `GET /updates` directly through `mux.HandleFunc` at [control.go:36](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/internal/instanceupdates/control.go:36). That route never passes through `registerRoute`, receives no `claimEntries` entry, and has no declaration for the security scanners to inspect. The equality test also misses it because its runtime inventory comes exclusively from `claimEntries` ([routedecls_test.go:136](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/internal/console/routedecls_test.go:136)).
+
+ **Concrete fix:** Enforce a boundary around raw mux access: permit only the reviewed initialization, serving wrapper, and registrar uses; reject aliases, escapes to other functions, and replacements. Add an external-mount negative fixture exercising that enforcement.
+
+ **Fault family:** Registration completeness. Every served route must pass through the registrar and appear in the scanned inventory. This is a remaining bypass, not new production behavior introduced by `acfe4a88`.
+
+No additional P1/P2 breakage found in the fix commit.
+
+**Census re-pin: approved.** [parity_guard_census_test.go:23](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/internal/provision/parity_guard_census_test.go:23) replaces the three relocated registration units with `var routeDecls`, preserving the `key-site` classification and `lit:instances,lit:sidecars` coverage. No record-write site is added or dropped.
+
+This is the second round finding the same fault family. AGENTS.md stopping rule 2 applies: before another fix, choose an up-front refusal of mux escapes, cut the completeness guarantee, or enforce one mux-access boundary with a guard test. I recommend the last option.
+
+Verification was static. The targeted registrar tests could not start because the read-only sandbox prevented Go from creating its work directory. No files were edited.
+
+**NOT READY**
\ No newline at end of file