carlos / platform Public

plans-6c: review brief for the live path, round 2 of 3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 9ddb760da00dfb1f7d54b49d596155ce9bc1c5f8 parent d18318b
1 file changed, +10 −7
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-plans-6c-live.md +10 −7

CI passed — run details

diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-plans-6c-live.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-plans-6c-live.md
index d48fa786f..42e47b982 100644
--- a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-plans-6c-live.md
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-plans-6c-live.md
@@ -1,4 +1,4 @@
-# Review brief: branch plans-6c-stripe-setup (live path), round 1 of 3
+# Review brief: branch plans-6c-stripe-setup (live path), round 2 of 3
Repo carlos/platform, branch `plans-6c-stripe-setup`, the commit that adds this brief (named in your prompt).
Under review: the diff `origin/main...HEAD`. It adds `scripts/stripe-setup.sh` (sandbox setup, now with a guarded `--live` mode), the approved price book `deploy/billing/pricebook-2026-11-01-v1.json` (the draft's amounts, approved by Paul), the runbook `docs/superpowers/plans/2026-10-27-plans-6c-stripe-setup.md`, and fake-CLI tests in `cmd/console/stripesetup_script_test.go`. This script will next run against Carloku's live Stripe account, creating the products, yearly prices, portal configuration, house coupon and webhook endpoint that the flagship console's billing reads.
@@ -7,14 +7,17 @@ Under review: the diff `origin/main...HEAD`. It adds `scripts/stripe-setup.sh` (
The script never writes to an account or mode other than the one named. In live mode it writes only live objects that exactly match the approved book and what the console's readiness check expects. A rerun is idempotent and never moves or changes an existing price.
+## Round 2
+
+Round 1 (`~/.cache/plans-6c-live/review-r1.md`) found 3 P1s and a P2: secret disclosure, cutoff coverage, replayed archived objects, and the rehearsal account. Here's how each was fixed. The secret goes only to a 0600 `--secret-out` file and is never printed. The runbook's switch-on now sets the cutoff to the next whole second, restarts, and sponsors accounts in [cutoff, start] by hand with `deploy/billing/sponsored-unlimited.json`, which a test ties to the console's own value. Every create is now read back by id, a replay of an archived object stops the run, and idempotency keys carry the book version. The rehearsal uses a fresh account marked house.
+
## What to check
-1. The live guards: `--live` plus `STRIPE_LIVE_ACCOUNT`, the account match, `/v1/balance` livemode, a livemode check on every object read and written, key-prefix rules, and approved-book-only. Can any path write in the wrong mode or account, or write with a draft book?
-2. What it creates matches what the console's billing readiness check and Checkout code expect: price lookup keys, tax_behavior exclusive, licensed yearly recurring, product tax code, portal configuration, coupon, webhook URL, events and API version 2025-02-24.acacia. Cross-check `internal/billingstripe` and the readiness check.
-3. Idempotency and partial failure: what a crash halfway through an apply leaves behind, and whether the next run finishes it without duplicates.
-4. Secrets: nothing secret is printed or written to disk. That includes the webhook signing secret: how it is surfaced, and whether that's safe.
-5. The runbook's live order is right and complete, and matches the code (sponsor_accounts_before, ops exemption, console v0.33.1+).
-6. The tests would catch a regression in the guards.
+1. Each round 1 finding is resolved, with no new instance of its fault family (secret handling, launch sponsorship coverage, replacement idempotency, rehearsal eligibility).
+2. The `--secret-out` handling: races, symlinks, an existing path, permissions, and whether any path still echoes the secret (error messages, `set -x`, a dry run, `--check`).
+3. The read-back checks on every object kind, and that a partial apply followed by a rerun still completes without duplicates.
+4. The runbook's switch-on sequence and its read-only console.db query are correct and safe on the flagship box.
+5. Anything round 1 didn't cover in the live guards.
## Severity