carlos / platform Public

review: parity guard Task 2 Astra round 1 findings (one P1)

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

Intent

Human

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

Attributed to this commit: 6.51 g CO₂e (821,487 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.md b/docs/superpowers/reviews/CODEX-FINDINGS-parity-guard-T2.md
new file mode 100644
index 000000000..6bd4c7abb
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-parity-guard-T2.md
@@ -0,0 +1,24 @@
+1. **P1 — Mux aliases bypass the security scanners.** Spec B2/B5; Task 2, scanner rewrite.
+
+ At [svcroutes_test.go:1175](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/internal/console/svcroutes_test.go:1175), `registrarViolations` checks `Handle` and `HandleFunc` only when `isMuxRegistration` recognizes a receiver field named `mux`. Consequently, this addition to `NewServer` escapes the check:
+
+ ```go
+ mux := s.mux
+ mux.HandleFunc("GET /api/cli/unlisted", s.handleHome)
+ ```
+
+ The old registrar test rejected this call regardless of receiver spelling. The old `scanCLISource` also rejected its literal `/api/cli/` pattern. The new scanner reads only declarations, so neither check detects it.
+
+ The equality test does not compensate: [routedecls_test.go:136](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/internal/console/routedecls_test.go:136) reads `claimEntries`, which direct mux registrations never populate. An undeclared API route can therefore bypass the registration wrappers and remain invisible to both security scanning and equality checks.
+
+ **Fix:** Restore rejection of all `Handle`/`HandleFunc` registrations outside `registerRoute`, without requiring the receiver spelling `*.mux`. Add an alias-registration negative fixture exercising `registrarViolations`.
+
+ **Fault family:** Registration completeness—the scanners and runtime inventory must account for every served route.
+
+No P2 or P3 findings.
+
+Static comparison confirmed all 420 routes retain their patterns, handlers, wrappers, role sets, scope targets, refusal hooks, and configuration gates. Handler bodies are unchanged; `sourceAdmission`, team-role panics, and initialization ordering are preserved. The census changes only relocate the three registration units. I also checked the equality fixtures and mutation checks 1, 6, 8, 9, and 10 against their test code.
+
+Targeted Go tests could not start: the read-only sandbox prevented creation of Go’s work directory. No files were edited.
+
+**NOT READY**
\ No newline at end of file