carlos / platform Public

spec: parity guard round 3 findings (NOT READY)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev e6db522eba33df819636bbcd53c30b08edb7b9a8 parent 2ad9b6e
1 file changed, +67 −0
  • docs/superpowers/specs/CODEX-FINDINGS-parity-guard-R3.md +67 −0

CI cancelled — superseded by a newer push — run details

Intent

Human

<task-notification> <task-id>b54t42s2b</task-id> <tool-use-id>toolu_015EYjypS7iRxoDoHMsiNp9Z</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/b861c3de-27b4-4218-be6e-b0c328c57779/tasks/b54t42s2b.output</output-file> <status>completed</status> <summary>Background command "timeout 1500 codex exec -m gpt-6-astra -c model_reasoning_effort="high" -s read-only -c 'sandbox_permissions=["disk-full-read-access"]' -o $TMPDIR/r3.md "Repo root is $PWD. Read docs/superpowers/specs/CODEX-REVIEW-BRIEF-parity-guard-R3.md and follow it exactly. Review commit 2ad9b6e40943f1ecb570176ca7338e8fae680110, spec docs/superpowers/specs/2026-11-09-parity-guard-design.md. Write your findings as markdown, ending with exactly one verdict line." &lt;/dev/null &gt; $TMPDIR/r3.log 2&gt;&amp;1; echo exit $?; cat $TMPDIR/r3.md" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 17.2 g CO₂e (2,202,483 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/specs/CODEX-FINDINGS-parity-guard-R3.md b/docs/superpowers/specs/CODEX-FINDINGS-parity-guard-R3.md
new file mode 100644
index 000000000..d217ad8ba
--- /dev/null
+++ b/docs/superpowers/specs/CODEX-FINDINGS-parity-guard-R3.md
@@ -0,0 +1,67 @@
+- R2-1: **Partly resolved** — production dispatch uses the registry, but argument handling and legacy conformance remain incomplete.
+- R2-2: **Partly resolved** — flag qualifiers support `apps set`, but cannot represent all existing capability distinctions.
+- R2-3: **Resolved** — per-configuration equality and mandatory exercise of every declaration address disconnected registrations.
+- R2-4: **Resolved** — declarations establish the forwarding boundary.
+- Census/docsite closing note: **Resolved in principle** — census approval is required for CLI migrations, and the docsite projection moves explicitly. Actual census classifications remain the independent reviewer’s decision.
+
+Recurring families: **CLI enumeration remains open; console enumeration is closed; capability granularity remains open.**
+
+Reviewed commit `2ad9b6e40943f1ecb570176ca7338e8fae680110`, round 3 of 3.
+
+1. **P1 — Dispatch cannot preserve existing argument handling under the specified contract.**
+
+ [A1](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/docs/superpowers/specs/2026-11-09-parity-guard-design.md:99) says dispatch consumes `Params`, then calls `Run(args []string)` with what remains. No argument or invocation object carries the consumed values to the handler.
+
+ For example, `config destinations add tito --console <origin>` needs `tito` inside [destinationsAdd](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/config_cli.go:398). Consuming its declared positional leaves the handler without the destination name. Existing configuration commands also accept flags on either side of positionals through `parseInterspersed`.
+
+ Likewise, A5 requires full migration of commands whose action words follow flags, but A1 only dispatches the next raw word and A4 leaves flag parsing inside handlers. Existing [steering](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/instances_cli.go:944) selects `latency|off` after parsing flags. Moving it out of `Legacy` does not supply the missing parsing mechanism.
+
+ Define how dispatch distinguishes flags, their values, action words and positionals, and how handlers receive consumed values. Require compatibility fixtures for positional-first, flags-first and interspersed forms. Otherwise implementation must either change supported syntax or retain argument-based dispatch outside the registry.
+
+ **Fault family:** CLI argument routing and complete enumeration — recurring.
+
+2. **P2 — Legacy leaves contradict validation and lack an explicit coverage rule.**
+
+ [A5](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/docs/superpowers/specs/2026-11-09-parity-guard-design.md:145) requires declared legacy descendants to have no `Run`. Their terminal nodes therefore have neither `Run` nor children, which A2 explicitly rejects at initialization.
+
+ C1 then requires coverage of “every runnable registry node.” Without a separate definition of executable legacy terminals, an implementation using `Run != nil` covers the parent dispatcher while omitting its individual commands—the precise coverage the adapter must preserve.
+
+ Define legacy terminals explicitly, including their metadata, validation exception and inclusion in parity coverage. Add fixtures proving that removing the row for a legacy leaf fails while its parent row remains.
+
+ **Fault family:** completeness of CLI enumeration during migration — recurring.
+
+3. **P2 — String presence does not prove a declared legacy path exists.**
+
+ [A5’s second pin](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/docs/superpowers/specs/2026-11-09-parity-guard-design.md:157) checks function hashes and whether each declared word occurs as a string constant. It does not check the word’s position or dispatch relationship.
+
+ A legacy `apps` declaration could incorrectly contain `apps source delete`: `source` and `delete` both occur in [RunApps](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/apps.go:156), while [runAppsSource](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/apps_source.go:26) accepts only `pull`. The function hashes remain unchanged, every declared word passes the string-presence check, and the registry gate admits a path the legacy dispatcher rejects.
+
+ Require path-level conformance, including aliases and defaults, or an independently reviewed binding of the complete legacy declaration tree to its pinned implementation. Include the wrong-parent example as a negative fixture.
+
+ **Fault family:** CLI declaration-to-dispatch agreement — recurring.
+
+4. **P2 — Disjoint flag-name qualifiers cannot preserve the seed inventory’s distinctions.**
+
+ [C2](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/docs/superpowers/specs/2026-11-09-parity-guard-design.md:246) requires every shared reference to have pairwise-disjoint flag qualifiers.
+
+ The [seed inventory](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/docs/superpowers/notes/2026-11-09-parity-inventory.md:66) separates editing an existing environment (`both`) from creating a new named environment (`gap`). Both use `env set --environment`; flag-name sets cannot distinguish them. Leaving the existing-environment row unqualified is also forbidden once the node appears twice.
+
+ Permit explicit capability qualifiers describing modes or conditions, including default behavior and flag values. Keep command coverage at node level and validate qualifier identities separately. Do not require these rows to collapse into one `partial` classification.
+
+ **Fault family:** capability granularity and faithful parity reporting — recurring.
+
+5. **P2 — Step 0 omits migration of existing console security scanners.**
+
+ [B5](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/docs/superpowers/specs/2026-11-09-parity-guard-design.md:233) describes the console move as mechanical, but `scanCLISource` in [svcroutes_test.go](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-parity-guard/internal/console/svcroutes_test.go:875) requires literal patterns at registration calls. The declaration loop necessarily supplies variables, so the scanner reports errors.
+
+ Merely exempting that loop would remove its discoveries. `TestEveryCLIDoorNamesItsRoles` depends on those discoveries, and `TestAuthCLIFamilyResolvesOnlyPersons` additionally checks handler bodies and named route presence.
+
+ Explicitly migrate these security checks in step 0. Preserve role-gate bypass detection, plain-handler authentication checks, and their non-vacuity assertions. Pattern equality alone cannot replace them. This part needs security review under the repository’s existing rules.
+
+ **Fault family:** preservation of security gates during registration migration — new.
+
+There is one P1: the dispatch contract lacks the argument-parsing and value-delivery mechanism needed to preserve current commands. Rejecting those supported forms up front would violate the stated compatibility constraint. Removing the adapter alone would not fix it. A scope cut that removes this blocker is to land the stock and console guard first, deferring production CLI dispatch changes and automated CLI coverage until that contract is settled.
+
+No files changed, subagents used, or tests run. This completes round 3; no further review round was initiated.
+
+NOT READY
\ No newline at end of file