plans 6b: round-7 findings and the round-8 brief
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+73
−0
docs/superpowers/specs/CODEX-FINDINGS-PLANS-6B-PLAN-R7.md+51 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-PLANS-6B-PLAN-R8.md+22 −0
CI passed — run details
diff --git a/docs/superpowers/specs/CODEX-FINDINGS-PLANS-6B-PLAN-R7.md b/docs/superpowers/specs/CODEX-FINDINGS-PLANS-6B-PLAN-R7.md| new file mode 100644 |
| index 000000000..b69b24467 |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-FINDINGS-PLANS-6B-PLAN-R7.md |
| @@ -0,0 +1,51 @@ |
| +**Verdict: changes required** at `a0654af67afbab161550aaedc9348838179b2a0e`. |
| + |
| +One new Important finding and one new Minor finding. Round 6’s recovery-time finding remains partly fixed. Wording and settled rulings were not reviewed. |
| + |
| +| Round-6 finding | Disposition | Evidence | |
| +|---|---|---| |
| +| 1. Flagging can lose its operator problem | **Fixed** | `FlagRestoreCheck` commits both writes through `openBillingProblemTx`; failures leave the obligation open. The failure/restart test covers the original gap. [Transaction contract](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:788), [test](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:876). | |
| +| 2. Recovery requires unavailable provider time | **Partly fixed — Important remains** | The response hook supplies observations for subscription, session and list reads. Customer recovery still assumes a `LiveSubscriptions` read without a bound customer ID; see below. [Hook](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:632), [customer recovery](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:1020). | |
| +| 3. Incorrect 6a names | **Fixed** | Checked against local `origin/main`, `7f79385e`: `endMissingSubscriptionLocked` and the coupon’s existing home are corrected. The newly specified lock-test contract has a separate inconsistency below. [Names](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:163), [coupon](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:627). | |
| + |
| +For inherited finding 2, consider a customer creation that times out before headers, leaving no bound customer ID. Eleven minutes later, on an otherwise quiet console, its clock observation is stale. `LiveSubscriptions(ctx, customer)` cannot supply the promised refresh: the existing client rejects an empty customer ID **before HTTP**. Skipping that read also supplies no observation. Recovery therefore remains refused despite a healthy provider and correct clock. [Provider interface](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:556), [client validation](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/billingstripe/client.go:823). |
| + |
| +Specify a refresh that works without a customer ID, count its request, and test recovery after more than ten quiet minutes without restarting the console. The other recovery paths read before checking eligibility, so quietness alone does not wedge them. |
| + |
| +Only new findings follow. |
| + |
| +1. **Important — the deadline trusts the clock at retry time without establishing trust at the first send.** |
| + |
| + Invariant 8 derives safety from `FirstSent + 22h`, but clock checks govern **resends and restores**. Ordinary first sends can record `FirstSentAt` while the console clock is arbitrarily wrong. A later good observation overwrites the skew and permits recovery. [Time model](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:69), [first-send sequence](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:798). |
| + |
| + Concrete scenario: an unresolved renewal change was first sent with the console **three hours ahead**. After correcting the clock, recovery runs **24½ real hours later**. The stored elapsed time is only **21½ hours**, and the fresh skew observation is good. Recovery permits a resend although Stripe may have pruned the key. If the original target is no longer visible—for example, an operator reversed it before an observation settled the operation—the resend executes another mutation instead of returning the original result. |
| + |
| + Require a trustworthy time basis when recording every first-send timestamp, or persist a conservative provider-relative deadline. Add a test covering initial skew, clock correction, restart and key pruning. Bounding both endpoint skews to five minutes still leaves ample room within the 22-hour window. |
| + |
| +2. **Minor — the proposed wrapper contradicts the enforced lock contract.** |
| + |
| + The names table explicitly keeps `closeBillingProblemLocked` as a lock-taking wrapper and says the lint selects functions by a `billingHold` parameter. Global Constraints instead require **every `*Locked` function** to take that parameter and never acquire a lock. [Wrapper decision](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:167), [AST-test contract](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:244). |
| + |
| + Implementing the prescribed wrapper makes a test following the global contract fail. Rename the locking wrapper, or explicitly reconcile the test’s selection rule. The proposed `holdBilling` substitution itself preserves the existing critical section. |
| + |
| +Static review only; no tests or repository writes. HEAD and the clean working tree are unchanged. The initial coordination network attempt was blocked; subsequent review used local material only. |
| + |
| +--- |
| + |
| +**FIRST PROMPT:** |
| +“Follow the brief docs/superpowers/specs/CODEX-REVIEW-BRIEF-PLANS-6B-PLAN-R7.md exactly, at the branch's current HEAD.” |
| + |
| +**WHAT:** |
| +Review revision 7 of the Plans 6b implementation plan. |
| + |
| +**STATUS:** |
| +Complete: changes required. |
| + |
| +**NEEDED:** |
| +Nothing for this review. |
| + |
| +**RECOMMENDED:** |
| +Fix customer clock refresh, establish first-send clock trust, and reconcile the lock-test contract. |
| + |
| +**SESSION:** |
| +Safe to close. Repository unchanged; nothing left running. |
| \ No newline at end of file |
diff --git a/docs/superpowers/specs/CODEX-REVIEW-BRIEF-PLANS-6B-PLAN-R8.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-PLANS-6B-PLAN-R8.md| new file mode 100644 |
| index 000000000..84d3cf28c |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-PLANS-6B-PLAN-R8.md |
| @@ -0,0 +1,22 @@ |
| +# Plan review brief, round 8: Plans 6b |
| + |
| +Round 7 reviewed a0654af6; its findings are |
| +docs/superpowers/specs/CODEX-FINDINGS-PLANS-6B-PLAN-R7.md. Revision 8 is |
| +`git diff a0654af6..HEAD`: the console wall clock is removed from every |
| +billing safety decision (Invariant 9: provider time from response Date |
| +headers plus monotonic elapsed, at most 60 s old; a clock probe, GET of |
| +one configured price, where no recent response exists). Rulings, |
| +context and read-only rules as in rounds 1-7. |
| + |
| +Report: |
| +1. A disposition table for round 7's findings, including the inherited |
| + recovery-time item. |
| +2. Only NEW findings, graded Critical / Important / Minor with a concrete |
| + failure scenario. Check: every safety decision now uses provider |
| + time; Date header resolution (one second) and the direction of every |
| + error; the probe's failure handling and budget; the timers left on |
| + the console clock are truly never compared with provider time. |
| +3. A verdict: accept, accept with fixes, or changes required. Reserve |
| + "changes required" for Critical or Important findings. |
| + |
| +Do not review the wording. |