review brief: config receipts plan 1 branch review + census (#522)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+73
−0
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-config-receipts-branch-1.md+36 −0docs/superpowers/reviews/config-receipts-1-ledger-minors.md+37 −0
CI failed — run details
Intent
Attributed to this commit: 40.4 g CO₂e (5,097,270 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-REVIEW-BRIEF-config-receipts-branch-1.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-config-receipts-branch-1.md| new file mode 100644 |
| index 000000000..70510ce6d |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-config-receipts-branch-1.md |
| @@ -0,0 +1,36 @@ |
| +# Review brief: config receipts Plan 1 branch, round 1 of 3, plus census |
| + |
| +Repo carlos/platform, branch `config-receipts-1`, commit d39015d3ab591324537159f30333cf77d949f8a5. |
| +Under review: the diff `5394c7f958e4c10f93c94f923211c0814680ff4d..HEAD` (Go code, tests, docs/site/cli.md, census overlay). Spec and plan are part of the branch but already reviewed; review the implementation against them. |
| +Authorities: `docs/superpowers/specs/2026-11-02-config-receipts-design.md` (APPROVED rev 6, §4 is Plan 1) and `docs/superpowers/plans/2026-11-03-config-receipts-plan-1.md`. Code on main at 5394c7f958e4c10f93c94f923211c0814680ff4d. |
| + |
| +You are an independent reviewer (Astra; the author is Claude). Read the plan and spec §4, then the diff, and check every claim against the code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- Paul's rulings in the spec (§7, revisions list). The controller's rulings in `docs/superpowers/reviews/config-receipts-1-ledger-minors.md` (lines starting "Ruling:"); report only a mechanism that fails to honour one, or new evidence that one is unsafe. |
| +- Copy wording: a separate copy pass is running. Judge whether a string is true, not how it reads. |
| + |
| +## What to check |
| + |
| +1. The conditional write: one read guards the Put on both paths (applyAt, owned path); CAS loss with a precondition is a 412; nothing written on any refusal; no credential minting on a refused team write. |
| +2. Authority: cross-account and unknown hosts are the gate's byte-identical 404 on GET, PUT and config/effective; team credentials never see default or overlay information. |
| +3. Confidentiality: no envelope, plain value, version or digest in any log line, audit row or error; a secret's envelope never in a response, including the CLI's --json outputs. |
| +4. Compatibility: existing callers of Apply/ApplyEnvironment/ApplyEnvironmentOwned/ApplyInstance/SetExecDeliveryAt and the unconditional PUT behave exactly as before; older consoles and older CLIs interoperate (absent fields, ignored if_version guarded by the CLI). |
| +5. The effective view equals the box merge (owned standalone, overlay on top). |
| +6. Triage the deferred minors in `docs/superpowers/reviews/config-receipts-1-ledger-minors.md`: say which must be fixed before merge (as P2) and which can wait (P3). |
| +7. **Census:** the card is `docs/superpowers/notes/census-proposal-config-receipts-1.md`. Give a verdict (approve or reject) for every unit and every re-pinned envelope it lists, by its review question: does any change let root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name, or weaken a check the basis relies on? |
| + |
| +## Severity |
| + |
| +- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks merge. |
| +- **P2**: wrong or missing. Fixed without reopening this review. |
| +- **P3**: clarity or polish. Follow-up list; never a reason for another round. |
| + |
| +A P1 states its failure scenario and the evidence (file:line). Do not raise a P2 to P1 to keep the review open. |
| + |
| +## Output |
| + |
| +Findings ranked P1, P2, P3, each with section/file:line, problem, evidence, failure scenario, fix, and fault family. Then the census verdicts, one line per unit and envelope. End with exactly one verdict: **READY**, **READY AFTER FIXES** (no P1; listed P2s fixed without another round) or **NOT READY**. |
| + |
| +Do not edit files. Do not spawn subagents. Do not run the full test suites; focused `go test -run` is fine. |
diff --git a/docs/superpowers/reviews/config-receipts-1-ledger-minors.md b/docs/superpowers/reviews/config-receipts-1-ledger-minors.md| new file mode 100644 |
| index 000000000..bbcb0347b |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/config-receipts-1-ledger-minors.md |
| @@ -0,0 +1,37 @@ |
| +| T2 self | HasAtomicConditionalPut true only for S3Store/wrappers | gap: production console store may be wrapped (see Ruling 1) | |
| +| T3 self | effective host via instance record | hand-routed hosts with no record answer 404 (see Ruling 2) | |
| +| T5 self | "existing subprocess/exit-capture helper" may not exist | see Ruling 3 | |
| +| T5/T6 copy review | copy-review needs Paul's interaction mid-plan | see Ruling 4 | |
| +| T6 self | census + branch review are controller work | see Ruling 5 | |
| +Ruling 1: T2 must also prove the store the console builds in production for an S3 deployment reports HasAtomicConditionalPut true (whatever wrapper it is) — otherwise production refuses every if_version — cost if wrong: feature dead in production, caught only on dev. |
| +Ruling 2: config/effective resolves host through the instance record only; a hand-routed host with no record is 404 — spec says host must be a route of this app; records are the console's authority for that — cost if wrong: owners of hand-routed apps can't use effective; additive later. |
| +Ruling 3: if no exit-capture helper exists, T5 maps the 412 error to exit code 4 in one function and tests that mapping directly — avoids subprocess tests — cost if wrong: one untested os.Exit line. |
| +Ruling 4: implementers write draft strings; after T6 one Luna copy pass (per Paul's delegated-copy rule) over all new strings, Paul sees only flagged ones, one fix dispatch applies them — copy-review cannot block a running plan — cost if wrong: a string round-trip. |
| +Ruling 5: T6's implementer writes docs only; census card + Astra census verdict on #280 and the whole-branch review are controller steps — cost if wrong: none. |
| +Task 1: minor (deferred): observe.go:111 found layer without "vars" key returns nil Vars (absent case has empty map); trap for any writer into Layer.Manifest.Vars — carried to T2 dispatch |
| +Task 1: minor (deferred): TestDigestSecretUsesEnvelope plaintext comparison is weak |
| +Ruling: with HostClaim on, the console's hostops store wrappers (outside internal/release) don't forward AtomicConditionalPut, so if_version is refused 400 there — fails safe; claims are shelved and production runs the plain S3 store (proved by TestOpenStoreAtomicConditionalPut) — cost if wrong: if_version unavailable on a claims-on console until the wrappers forward it. |
| +Ruling: a name in both set and unset is refused with 400 only when if_version is present (Task 4) — keeps today's unconditional behaviour, gives receipts one meaning per name — cost if wrong: a script sending both with if_version gets a 400. |
| +Task 2: minor (deferred): release.AtomicConditionalStore exported; direct type assertion gives false for prefixStore over S3 — doc "use HasAtomicConditionalPut" or unexport |
| +Task 2: minor (deferred): hostops wrappers lose the capability when HostClaim is on (see Ruling above); note for claim re-enablement |
| +Ruling: a team credential on config/effective gets the same 403 role refusal as on every non-scoped door (config/sync), not the spec table's 404 — plan text chose "same as sync"; the 404 rule exists to hide other accounts/apps, which still 404; a team already knows its app — cost if wrong: one status code to change. |
| +Ruling: a route with no environment omits layers.environment and reports environment "" — honest, matches owned omitting default — cost if wrong: client shape tweak. |
| +Task 3: minor (deferred): effective answers 502 "try again" for a route bound to a never-created environment or a corrupt record; permanent conditions — candidate 409 with new copy, triage at final review |
| +Task 3: minor (deferred): no test with a real second account holding the same app/host; no overlay secret-kind test |
| +Task 3: minor (deferred): LoadHostLayers checks env name before reads, loadMergedETags after; comment overstates parity |
| +Ruling: a PUT that only sets exec_delivery carries no receipt — the receipt describes var changes (set/unset); exec_delivery is a separate field write with its own audit row — cost if wrong: a client wanting a version after exec_delivery re-reads with GET. |
| +Task 4: minor (deferred): combined set/unset + exec_delivery request: receipt version_after describes the first write only (CLI never sends both) |
| +Task 4: minor (deferred): If-Match "*", W/ weak tags and "" not refused (empty quoted tag treated as no precondition) — should 400 |
| +Task 4: minor (deferred): no test for team stale if_version on absent creatable env (no-mint path); 412 re-read 404 race untested |
| +Task 4: minor (deferred): defBefore read wasted for owned env writes |
| +Ruling: keep the implementer's extra guard — before an --if-version write the CLI reads the bundle and refuses if the console reports no version, because an older console silently ignores if_version and would write unconditionally — cost if wrong: one extra GET per conditional write. |
| +Task 5: minor (deferred): env effective 404 tells user to check membership; should mention --host and older console (precedent apimode.go:1271) |
| +Task 5: minor (deferred): env digest --kind secret unusable after `secrets set` (envelope/sealed_to never shown); better: secrets set compares receipt.Digests to its local envelopes |
| +Task 5: minor (deferred): secretsUsage new paragraph lacks blank lines (copy pass) |
| +Task 5: minor (deferred): env effective --json drops fields a newer console adds (typed re-encode) |
| +Task 5: minor (deferred): effective VALUE column blank for secret / overlay plain / empty value alike |
| +Task 5: minor (deferred): TestEnvDigestSecretMatchesStored nearly circular; no flag-to-wire test for secrets set/unset --if-version |
| +Task 5: minor (deferred): no-op set prints "set: X" then "nothing changed" (copy pass) |
| +Task 5: minor (deferred): secrets set --if-version makes two config GETs |
| +Ruling: round 2's one-sentence docs fix was re-checked by the controller against apiconfigeffective.go:95 instead of a fourth reviewer seat — the change is one sentence whose only claim is that line — cost if wrong: a docs sentence. |
| +Task 6: minor (deferred): docs say `--json prints the console's answer as it is` but the CLI re-encodes typed fields (ties to Task 5 minor); one over-long line at cli.md ~1049 |