spec: CLI registry Astra round 2 findings (NOT READY)
Three P1s: tripwire rejects kept value checks (R1-2 family, rule 2), guard-exec fallback reorders root checks, one audience per leaf vs the status rows. One P2: positional scope bindings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/specs/CODEX-FINDINGS-cli-registry-R2.md+59 −0
CI cancelled — superseded by a newer push — run details
Intent
<task-notification> <task-id>bqfwafcx2</task-id> <tool-use-id>toolu_013aRfRj3UFyRSchLcfATo49</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/bqfwafcx2.output</output-file> <status>completed</status> <summary>Background command "Wait for Astra round 2" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 7.41 g CO₂e (879,184 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-cli-registry, 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-cli-registry-R2.md b/docs/superpowers/specs/CODEX-FINDINGS-cli-registry-R2.md| new file mode 100644 |
| index 000000000..0259d6c9b |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-FINDINGS-cli-registry-R2.md |
| @@ -0,0 +1,59 @@ |
| +- **R1-1: Resolved** — B6 now declares the missing raw-parser descendants, including `demos reports resolve`. |
| +- **R1-2: Partly resolved** — the accepted completeness limitation is explicit, but E3 still rejects preserved value validation. |
| +- **R1-3: Resolved** — alias, transparent-path and conditional cases, controlled environments, and failing timeouts are specified. |
| +- **R1-4: Resolved** — leaf-level `Sensitive` metadata and named regression checks cover secret input and credential output. |
| +- **R1-5: Resolved** — repeatability metadata and accumulation checks address collection-shaped flags. |
| + |
| +Reviewed checkout `3df51abac189439d86a62fb2200f6d834f676f88`, with the spec unchanged from `ece49d77`. |
| + |
| +1. **P1 — E3/B6: The tripwire still rejects correct, preserved parsers.** |
| + |
| + [E3, lines 514–538](docs/superpowers/specs/2026-11-09-cli-registry-design.md:514) flags argument-derived strings compared with literals. Its permanent exceptions cover positional enums, raw flag spellings and fallback help. |
| + |
| + Existing checks fall outside all three: the reports parser rejects an empty flag value with `args[1] == ""` at [system_demos.go:184](system_demos.go:184); `instance-stop` accepts an empty PID argument at [stop_linux.go:52](internal/instanceexec/stop_linux.go:52). B6 explicitly preserves both parsers. |
| + |
| + **Failure:** Once `pending` is forbidden, the tripwire fails on unchanged value validation. Neither argument is a closed positional enum, and an empty string is not a flag spelling. |
| + |
| + **Fix:** Add a narrowly checked allowance for ordinary value validation, with these two positive fixtures. Keep the separate prohibition on handler-owned command dispatch. |
| + |
| + **Fault family:** Enforcement of the registry as the sole command inventory. This carries R1-2 forward; it concerns false positives, not evasion of the tripwire. |
| + |
| +2. **P1 — A2/B6: The specified `guard-exec` fallback changes existing errors and root-side ordering.** |
| + |
| + [B6:373](docs/superpowers/specs/2026-11-09-cli-registry-design.md:373) specifies an immediate `log.Fatal(hostfloor.ErrFloor)` fallback. |
| + |
| + Today, any nonempty argument list first calls `floorDisk`, loads the policy and performs applicable policy checks, before reaching the unknown-word arm: [guardexec.go:27](internal/host/guardexec.go:27), [guardexec.go:70](internal/host/guardexec.go:70). |
| + |
| + **Failure:** With `CARLOS_RELEASE_PUBKEY` unset, `carlos system guard-exec unknown` currently reports the public-key parsing error from [release.go:721](internal/release/release.go:721). The proposed fallback instead reports `hostfloor: authenticated floor required`. With valid configuration, it also skips the preceding policy reads and checks. |
| + |
| + **Fix:** Preserve the common pre-dispatch checks for nonempty unmatched arguments before emitting the existing fallback. Keep the bare-command refusal separate. Add compatibility fixtures for both configuration states and describe the affected root checks explicitly in the census claims. |
| + |
| + **Fault family:** Byte-for-byte compatibility and preservation of root validation order. |
| + |
| +3. **P1 — D5/F1: One leaf audience cannot satisfy the existing `status` rows.** |
| + |
| + [D5:468](docs/superpowers/specs/2026-11-09-cli-registry-design.md:468) requires the matching outside status while preserving today’s statuses. |
| + |
| + The same `status` leaf appears in operator rows at [parity.tsv:191](parity/parity.tsv:191) and a box-local row at [parity.tsv:226](parity/parity.tsv:226). These are flag-selected modes of one handler, as verified at [cli.go:3945](cli.go:3945). |
| + |
| + **Failure:** Assigning `Audience: operator` rejects the box-local row; assigning `box-local` rejects the operator rows. Assigning `customer` violates the rule against a customer leaf appearing only in outside rows. Step 1 introduces this guard immediately. |
| + |
| + **Fix:** Specify qualifier-aware audience classification, or permit these distinctions among outside rows while retaining the customer-coverage check. Add the existing three `status` rows as a positive fixture. |
| + |
| + **Fault family:** Agreement between leaf metadata and capability-level parity classification. |
| + |
| +4. **P2 — C2: Scope bindings omit positional app and instance targets.** |
| + |
| + [C2:405](docs/superpowers/specs/2026-11-09-cli-registry-design.md:405) binds app scope through `--app` and instance scope through `--host`; only fleet scope explicitly permits a positional binding. |
| + |
| + `apps delete` takes its app positionally and registers no `--app`: [apps.go:243](apps.go:243). `instances set` takes its host through the leading positional or `fs.Arg(0)` and registers no `--host`: [instances_updates.go:96](instances_updates.go:96). |
| + |
| + **Failure:** Correct scope annotations cannot pass the specified flag-existence check for these leaves. Project 2 would need an additional mapping or unnecessarily exclude them. |
| + |
| + **Fix:** Let each scope binding reference either a registered flag or a declared positional, including the leading positional. Validate both forms and their precedence. |
| + |
| + **Fault family:** Faithful argument-schema and target-scope projection. |
| + |
| +R1-2’s fault family has recurred in consecutive rounds; stopping rule 2 applies before another fix cycle. No files were edited, subagents spawned, or tests run. |
| + |
| +**NOT READY** |
| \ No newline at end of file |