plans 6b: round-6 findings and the round-7 brief
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+83
−0
docs/superpowers/specs/CODEX-FINDINGS-PLANS-6B-PLAN-R6.md+60 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-PLANS-6B-PLAN-R7.md+23 −0
CI cancelled — superseded by a newer push — run details
diff --git a/docs/superpowers/specs/CODEX-FINDINGS-PLANS-6B-PLAN-R6.md b/docs/superpowers/specs/CODEX-FINDINGS-PLANS-6B-PLAN-R6.md| new file mode 100644 |
| index 000000000..68527dc8a |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-FINDINGS-PLANS-6B-PLAN-R6.md |
| @@ -0,0 +1,60 @@ |
| +**Verdict: changes required** at `09060b4921f08adf82ebf7fab0de62a0b3b8d463`. |
| + |
| +Two new Important findings and one Minor finding. Calls 1–18 and the accepted residual risks remain settled. Wording was not reviewed. |
| + |
| +| Round-5 finding | Disposition | Evidence | |
| +|---|---|---| |
| +| 1. Detection stops after the first renewal observation | **Partly fixed** | Obligations are created transactionally with restores, checked on later observations and hourly, retain the renewal baseline, and escalate after seven days. Invoice failures and restart tests are explicit. The transition to `flagged` still has a durability gap below. [Obligation lifecycle](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:83), [Task 7](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:786). | |
| +| 2. Crashed `sending` operations cannot recover or escalate | **Fixed as reported** | Recovery adopts `sending` under the billing lock, permits bounded recovery, and escalates after the window. Tests cover crashes before and after transmission. [Recovery](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:777), [tests](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:834). | |
| +| 3. Retry budgets assume every prerequisite read costs one request | **Fixed** | Separate formulas cover customer, Checkout, subscription and expiry retries. Invoice and line pagination are counted separately, with pagination-faithful call assertions. [Budget](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:250). | |
| + |
| +Only new findings follow. |
| + |
| +1. **Important — flagging an obligation can permanently lose its operator problem.** |
| + |
| + Task 7 specifies setting the obligation to `flagged` and opening `restore_after_renewal`, but does not require those writes to commit together. Recovery selects only **open** obligations. The proposed `PutRestoreCheck` and existing `OpenBillingProblem` are separate store operations. [Store interfaces](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:760), [flagging and selection](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:790). |
| + |
| + A late restore is detected; saving `flagged` succeeds; creating the problem fails or the process crashes. After restart, the obligation is excluded from observation and seven-day escalation. The unpaid capacity remains without the promised operator alert. |
| + |
| + Require one transaction for flagging and problem creation, or keep the obligation retryable until the problem is durable. Add a failure/restart test between those writes. |
| + |
| +2. **Important — the shared recovery gate requires provider time that several branches cannot obtain.** |
| + |
| + `recoveryEligible` requires provider time for both the resend deadline and skew check. However, `CheckoutInfo` and `CustomerCheckouts` expose no provider timestamp. Customer creation has no prerequisite read, and a transport failure before response headers supplies no timestamp through `Result` either. [Gate](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:69), [provider interfaces](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:510), [customer recovery](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:981). |
| + |
| + On a first purchase, customer creation times out before headers arrive. The retry gate has no valid `providerNow`: refusing prevents the promised recovery; substituting console time defeats the skew check. Restarted Checkout creation and expiry have the same interface problem. |
| + |
| + Specify the time source for recovery without a customer ID, expose provider time on session/list reads—including empty lists—and include any additional request in the budget. Test recovery after a headerless timeout and restart with clock skew. |
| + |
| +3. **Minor — two assumed 6a names differ from merged main.** |
| + |
| + Against `7f79385e`: |
| + |
| + - The [names table](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:156) names `endMissingSubscription`; the actual helper is `endMissingSubscriptionLocked(ctx, acct, subscriptionID, now)`. Its caller already holds the billing lock. |
| + - [Task 5](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md:612) moves `HouseCoupon` from `ProviderConfig`, which has no such field. The existing field belongs to `CreateCheckoutParams`. |
| + |
| + Following those starting points literally produces nonexistent references or an incorrect lock refactor. Update them before implementation. The discovery migration and claim/census file references are consistent with merged main. |
| + |
| +The billing lock excludes competing console writers across subscription operations, customer creation, Checkout creation and expiry. It does **not** establish that Stripe stopped processing; treating delivery as unresolved preserves that distinction. A handler can also encounter its own `sending` row during a retry read, so “only a crash” is not literally universal, but the specified unresolved treatment remains safe. |
| + |
| +HEAD and the clean working tree are unchanged. No tests or repository writes were made. The initial coordination network attempt was blocked; the review used local material only. |
| + |
| +--- |
| + |
| +**FIRST PROMPT:** |
| +“Follow the brief docs/superpowers/specs/CODEX-REVIEW-BRIEF-PLANS-6B-PLAN-R6.md exactly, at the branch's current HEAD.” |
| + |
| +**WHAT:** |
| +Review revision 6 of the Plans 6b implementation plan. |
| + |
| +**STATUS:** |
| +Complete: changes required; two Important findings and one Minor finding. |
| + |
| +**NEEDED:** |
| +Nothing for this review. |
| + |
| +**RECOMMENDED:** |
| +Make alert creation durable, complete recovery’s provider-time contract, and correct the two 6a references. |
| + |
| +**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-R7.md b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-PLANS-6B-PLAN-R7.md| new file mode 100644 |
| index 000000000..282f8e34f |
| --- /dev/null |
| +++ b/docs/superpowers/specs/CODEX-REVIEW-BRIEF-PLANS-6B-PLAN-R7.md |
| @@ -0,0 +1,23 @@ |
| +# Plan review brief, round 7: Plans 6b |
| + |
| +Round 6 reviewed 09060b49; its findings are |
| +docs/superpowers/specs/CODEX-FINDINGS-PLANS-6B-PLAN-R6.md. Revision 7 is |
| +`git diff 09060b49..HEAD`. 6a is merged on main as 7f79385e; check names |
| +against origin/main. Rulings, context and read-only rules as in rounds |
| +1-6. |
| + |
| +Report: |
| +1. A disposition table for round 6's three findings. |
| +2. Only NEW findings, graded Critical / Important / Minor with a concrete |
| + failure scenario. Check: FlagRestoreCheck's single transaction and |
| + openBillingProblemTx; the time model (provider time only for |
| + restores; 22-hour console-time resend deadline with the 5-minute |
| + skew bound; skew recorded from every response's Date header, |
| + refusing when over 5 minutes or older than 10 minutes, and whether |
| + that staleness rule can wedge recovery on a quiet account); the |
| + closeBillingProblemLocked switch to holdBilling against the |
| + lock-usage test. |
| +3. A verdict: accept, accept with fixes, or changes required. Reserve |
| + "changes required" for Critical or Important findings. |
| + |
| +Do not review the wording. |