review: config receipts plan 1 branch R3 findings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/reviews/CODEX-FINDINGS-config-receipts-branch-3.md+40 −0
Intent
<task-notification> <task-id>b3p555uk7</task-id> <tool-use-id>toolu_01Ca7Lq4p98nvrzUkuQtZSm4</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/4c585ebb-d953-40f5-8f58-fbd337832024/tasks/b3p555uk7.output</output-file> <status>completed</status> <summary>Background command "Wait for Astra branch round 3" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 16.9 g CO₂e (2,166,021 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on config-receipts-1, 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-config-receipts-branch-3.md b/docs/superpowers/reviews/CODEX-FINDINGS-config-receipts-branch-3.md| new file mode 100644 |
| index 000000000..ece31e6ff |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-config-receipts-branch-3.md |
| @@ -0,0 +1,40 @@ |
| +Round-2 P1 — **Partly resolved.** Null, duplicate members and case variants are handled, but a precondition after the first JSON object still disappears. |
| + |
| +Round-2 P2 — **Resolved.** [cli.md:1064](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/docs/site/cli.md:1064) now describes byte equality and explicitly excludes detecting A → B → A. |
| + |
| +Reviewed `cc383c76a3ce19e30c0de4deeb7317a81f72e9a1`, round 3 of 3. |
| + |
| +**P1 — Trailing JSON can still turn a supplied precondition into an unconditional write.** |
| + |
| +At [apiconfig.go:1064](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/internal/console/apiconfig.go:1064), `configIfVersionMember` scans only the first object. It returns success at line 1089 without consuming the closing delimiter or requiring EOF. The preceding [decodeJSONBody:1305](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/internal/console/authcli.go:1305) likewise performs one `Decode` and accepts the remaining body unchecked. |
| + |
| +For example, this malformed request is accepted: |
| + |
| +```text |
| +{"set":{"A":{"kind":"env","value":"old"}}} |
| +{"if_version":"cv1:stale"} |
| +``` |
| + |
| +The first object supplies the mutation. The second object’s precondition is ignored. The handler passes an empty version to `ApplyIf` at [apiconfig.go:653](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/internal/console/apiconfig.go:653), allowing it to overwrite another writer’s value instead of returning 400. |
| + |
| +**Fix:** require exactly one JSON object followed only by whitespace and EOF, before store access. Validate the complete capped request stream: checking only the tee’s captured bytes is insufficient because the first decoder may leave subsequent chunks unread. Extend the guard test with trailing-object and trailing-garbage cases, including delivery in separate reader chunks; assert 400, zero store Gets, unchanged bytes and unchanged generation. |
| + |
| +**Fault family:** a supplied precondition must never disappear during parsing—the same invariant as R1 and R2. |
| + |
| +No new P2 or P3 findings. Previously deferred P3s remain deferred. |
| + |
| +Census verdicts apply against amadan’s merge base `5394c7f958e4c10f93c94f923211c0814680ff4d`: |
| + |
| +| Unit or envelope | Verdict and evidence | |
| +|---|---| |
| +| `appconfig_cli.go:const envUsage` | **APPROVE.** [Line 176](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/appconfig_cli.go:176): help text only; no additional read or authority. Existing `legacy / accepted-legacy` remains appropriate. | |
| +| `appconfig_cli.go:envDigest` | **APPROVE.** [Line 1745](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/appconfig_cli.go:1745): reads the envelope file explicitly supplied to the CLI. No new automated root read of a tenant-selected path. Proposed `legacy / accepted-legacy` is appropriate. | |
| +| Envelope `.` | **APPROVE.** Reviewed dispatch, conditional-write flags, listings, receipts, effective view and digest command, including [appconfig_cli.go:329](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/appconfig_cli.go:329) and [apimode.go:3008](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/apimode.go:3008). Existing path validation and operator invocation remain intact; no expanded root authority. | |
| +| Envelope `internal/appconfig` | **APPROVE.** Versioned reads and writes retain schema validation and CAS protection at [store.go:106](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/internal/appconfig/store.go:106). Owned writes retain ownership checks at [owned.go:124](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/internal/appconfig/owned.go:124). Shared merge and observation preserve owned-environment isolation and validated storage keys at [environments.go:240](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/internal/appconfig/environments.go:240) and [observe.go:236](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/internal/appconfig/observe.go:236). | |
| +| Envelope `internal/release` | **APPROVE.** [store.go:133](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/config-receipts-1/internal/release/store.go:133) forwards capability discovery through prefix stores. S3 conditional headers remain enforced at line 1019. No weakened storage check or expanded root authority. | |
| + |
| +Changed Go files pass `gofmt`. The focused guard test could not start because the read-only sandbox prevented creation of Go’s work directory; executable census checks were not verified. The finding is established by code inspection. No files were edited. |
| + |
| +There is one remaining P1, continuing the same fault family across all three rounds. Refusing bodies with trailing content up front removes this failure without cutting conditional writes. The review budget is exhausted; a fourth round requires Paul’s approval. |
| + |
| +**NOT READY** |
| \ No newline at end of file |