carlos / platform Public

plans 6b: revision 10, accepted by Astra (rounds 1 to 9). The pass's per-account probe ceiling is removed: P? per decision, a fresh observation shared while it lasts, another probe after it expires; merge origin/main, never rebase

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 4594caffeab909a02b51244d4b0b6c557f955a3e parent d0c138d
1 file changed, +15 −5
  • docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md +15 −5
diff --git a/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md b/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md
index cd8fbb026..26234ead3 100644
--- a/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md
+++ b/docs/superpowers/plans/2026-10-25-plans-6b-checkout-flow.md
@@ -2,6 +2,8 @@
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
+> **Status: ACCEPTED** by Astra after review rounds 1 to 9 (round 9 at `d0c138dc`: accept with fixes; its one Minor finding is fixed in revision 10). Paul ruled Calls 1 to 18. Ready to build.
+
**Goal:** On a console with billing configured, an account owner can:
- buy Personal, Community or Business (with packs) through Stripe Checkout;
- add and reduce packs;
@@ -164,7 +166,7 @@ Also binding:
## Base branch, order and 6a's names
-- Cut from `plans-6-checkout` (6a) at `f4ce6bda`. **6a is merged on main as `7f79385e`.** Rebase this branch onto `origin/main` before Task 1. Only this plan file and its review notes differ from 6a's branch, so the rebase is mechanical.
+- Cut from `plans-6-checkout` (6a) at `f4ce6bda`. **6a is merged on main as `7f79385e`.** Merge `origin/main` into this branch before Task 1, and again before the final review. Merge, never rebase, so every push stays a fast-forward with no force-push. Only this plan file and its review notes differ from 6a's branch, so the first merge is mechanical.
- **6a's merged names, which this plan uses:**
| Name | Notes |
@@ -325,7 +327,7 @@ Also binding:
| Match seats | drift | `S` + `P?` + (1 + 2N) + `S` |
| Deletion gate, per run | `u` outstanding ops, `j` non-terminal intents, `k` live of `n` examined | `u` × `F` + per intent (1 session read + `P?` + expiry 1 + 2N, or the create's `F`) + `L(n)` + `k` × `S` |
| Restore check | per open obligation, per observation | `S` (shared with the observation) + `I(v, l)` until the baseline is stored, then 0; + `P?` for the stall deadline |
- | Hourly pass, per account | any | 6a's sync; discovery `L(n)` per recently bound customer; 1 session read per open intent (creating past `ExpiresAt`: `L(c)`); 1 read per outstanding op; per open obligation as above; + `P?` per escalation or stall decision (at most 1 per account per round, since one fresh observation serves the rest of that account's decisions for 60 s); **0 writes** |
+ | Hourly pass, per account | any | 6a's sync; discovery `L(n)` per recently bound customer; 1 session read per open intent (creating past `ExpiresAt`: `L(c)`); 1 read per outstanding op; per open obligation as above; + `P?` per escalation or stall decision: a fresh observation (at most 60 s old) is shared by every decision while it lasts, and a decision reached after it expires (for example after slow headerless pagination) probes again. There is no per-account ceiling; **0 writes** |
- **Time costs a request only through `P` and `P?`.** Everywhere else, provider time rides on responses already counted.
- S3: nothing polled. A limits publication is a GET plus a conditional PUT, with conflict retries. `transitionAccountPlan` adds 4d's inventory reads and convergence writes per change that moves limits.
@@ -912,7 +914,9 @@ Also binding:
func TestHeaderlessReadCostsOneProbe(t *testing.T) // op recovery: the subscription read has no Date; providerNow probes; resend: CallsBy == {Subscription: 1, ClockProbe: 1, Send: 1}
func TestStaleObservationCostsOneProbe(t *testing.T) // in-handler retry after AdvanceMonotonic(61s): each retry's read then probe; counts per the budget's probed retry form
func TestFailedProbeSendsNothing(t *testing.T) // the read is headerless and the probe fails: CallsBy == {Subscription: 1, ClockProbe: 1}, no Send; op stays unresolved
- func TestPassProbesAtMostOncePerAccount(t *testing.T) // a pass round with headerless reads and three decisions on one account: CallsBy[ClockProbe] == 1
+ func TestPassSharesAFreshObservation(t *testing.T) // headerless reads; three decisions on one account within 60 s of one probe: CallsBy[ClockProbe] == 1
+ func TestPassProbesAgainAfterExpiry(t *testing.T) // two restore obligations; the second's invoice pages are headerless and AdvanceMonotonic(10s) each for 7 pages:
+ // its stall decision finds the observation 70 s old and probes again: CallsBy[ClockProbe] == 2
func TestFlagAndProblemCommitTogether(t *testing.T) // a SQLite trigger fails the problem insert: obligation still open, no problem; restart; next observation:
// flagged and restore_after_renewal together
func TestFirstSendUnderSkewThenLateRecoveryRefused(t *testing.T) // console wall clock 3 h ahead; renewal op first sent (FirstSentAt from the provider Date, correct);
@@ -930,7 +934,7 @@ Also binding:
func TestPassesNeverWrite(t *testing.T)
func TestReadinessBackoff(t *testing.T)
```
-- [ ] **Step 2: Run** `go test ./internal/console/ -run 'BillingLockedHelpers|ConsoleBillingHasNo|OpOutstanding|RecoveryEligible|FlagAndProblem|RestoreStallUses|HeaderlessReadCosts|StaleObservationCosts|FailedProbe|PassProbes|FirstSendUnderSkew|QuietCustomerRecovery|HeaderlessTimeoutRecovered|ObservationOlder|RestoreNeedsProviderTime|ExpiresAtAndProration|NoProviderTime|Crash(Before|After)Send|OrphanedSending|RestoreCheck|SyncSubscriptionLocked|Refresh|Allowance|QuantityPlan|PreparedPersisted|HandlerRetry|TimeoutStillProcessing|InFlight|RateLimit|Cached500|WindowCloses|NoResend|Pending(Never|Expiry)|OperatorClose|OneOutstanding|ReorderedWebhooks|LateRestore|PassesNeverWrite|ReadinessBackoff'`. Expected: FAIL.
+- [ ] **Step 2: Run** `go test ./internal/console/ -run 'BillingLockedHelpers|ConsoleBillingHasNo|OpOutstanding|RecoveryEligible|FlagAndProblem|RestoreStallUses|HeaderlessReadCosts|StaleObservationCosts|FailedProbe|PassSharesAFresh|PassProbesAgain|FirstSendUnderSkew|QuietCustomerRecovery|HeaderlessTimeoutRecovered|ObservationOlder|RestoreNeedsProviderTime|ExpiresAtAndProration|NoProviderTime|Crash(Before|After)Send|OrphanedSending|RestoreCheck|SyncSubscriptionLocked|Refresh|Allowance|QuantityPlan|PreparedPersisted|HandlerRetry|TimeoutStillProcessing|InFlight|RateLimit|Cached500|WindowCloses|NoResend|Pending(Never|Expiry)|OperatorClose|OneOutstanding|ReorderedWebhooks|LateRestore|PassesNeverWrite|ReadinessBackoff'`. Expected: FAIL.
- [ ] **Step 3: Implement.**
- [ ] **Step 4: Run** again, plus the sync, webhook, pass, missing and claim suites. Expected: PASS.
- [ ] **Step 5: Commit** `console: operations as prepared requests resolved by Stripe's idempotent result or a positive read; one outstanding predicate and one recovery gate; orphaned sends recovered; durable late-restore obligations; passes only read (plans 6b)`.
@@ -1470,7 +1474,13 @@ CLI: `carlos billing house -account <sqid> -on|-off -note "..."`, console mode o
| --- | --- |
| 1. the 7-day stall crosses clock domains | The deadline is `obligation.PeriodEnd + 7 d` against `providerNow` (the recorder or one probe), and is removed from Invariant 9's console-time exceptions. The remaining console timers are measured from console-recorded starts (`TestRestoreStallUsesProviderTime`: 14 days behind, 14 days ahead, correction and restart). |
| 2. the lock test catches unrelated helpers | Scoped to billing files' `*Locked` functions plus any function taking `billingHold`. Both migrated 6a helpers are named. A billing-file `*Locked` without `billingHold` fails; `ensureLocked` and the lifetimes helpers are out of scope. |
-| 3. fallback probes missing from budgets | `P?` (0 or 1 at each provider-time decision) in every affected row: first-send stamps, resends, the restore margin, `expires_at`, continue, pass escalations and the stall deadline, with probed retry forms. The pass probes at most once per account per round. Tests for a headerless read, a stale observation, a failed probe and the pass's single probe. |
+| 3. fallback probes missing from budgets | `P?` (0 or 1 at each provider-time decision) in every affected row: first-send stamps, resends, the restore margin, `expires_at`, continue, pass escalations and the stall deadline, with probed retry forms. Tests for a headerless read, a stale observation and a failed probe. |
+
+**Round 9** (`d0c138dc`, accept with fixes):
+
+| Finding | Revision 10 |
+| --- | --- |
+| Minor: one probe per account per pass is not a bound | The per-account ceiling is removed. `P?` stays per decision: a fresh observation is shared while it is at most 60 s old, and a later decision probes again (`TestPassSharesAFreshObservation`, `TestPassProbesAgainAfterExpiry`). |
---