plans 6b ledger: tasks 2 to 4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+6
−0
docs/superpowers/notes/plans-6b-ledger.md+6 −0
diff --git a/docs/superpowers/notes/plans-6b-ledger.md b/docs/superpowers/notes/plans-6b-ledger.md| index dc1d34aa9..ff9365cfe 100644 |
| --- a/docs/superpowers/notes/plans-6b-ledger.md |
| +++ b/docs/superpowers/notes/plans-6b-ledger.md |
| @@ -9,3 +9,9 @@ Task 0: complete (commits 45fe737d, dd365a07; review clean after fix round 1 of |
| Task 1: Ruling: Effective checks the member bound (0 to MaxTeamMembers) only on team plans; non-team plans ignore members entirely, even -1 — the brief says both "members outside 0 to MaxTeamMembers is ErrTeamMembers" and "on non-team plans, members is ignored"; ignoring is the narrower reading — cost if wrong: a one-line guard. |
| Task 1: example fixtures that used "business" as an unknown plan now use "gold"; the example book has 24 prices, so the billingstripe readiness budget is 1 + 24 + 8; the schema-2 golden was regenerated here and Task 2 regenerates it for schema 3. |
| Task 1: complete (commit 66f02ac1, review clean) |
| +Task 2: complete (commit d6cc8a17, review clean). FormatMinor of an unknown currency writes the upper-case code, a space and the amount ("CHF 15.50"). |
| +Task 3: naming: TestCLIMembershipTransition lives in cmd/console/member_test.go (it runs the built binary); exported Store.AddMemberWrite / RemoveMemberWrite wrap addMemberTx / removeMemberTx for cmd/console; planChange gains Seats here (billing passes 0 until Task 6); the lapse "paid and fell" rule is one helper, paidFall (planlapse.go), shared by lapseStarted and membershipFell; teamMembers skips the member count off team plans. |
| +Task 3: complete (commits 0d8b37fd, 11958b6c; review clean after fix round 1 of 5: duplicate lapse rule extracted, count skipped off team plans, door-level remove/revoke lock tests) |
| +Task 4: naming: billing.ErrNoProviderTime (exported; the plan's errNoProviderTime); CallsBy counts invoice pages as RenewalInvoice and line pages as RenewalInvoiceLines (an I(v,l) budget adds both); PayPending/ExpirePending are Fake methods; billingtest.ErrCrash is deliberately outside the outcome classes, so the console's send must stop and record nothing more on it. |
| +Task 5 pre-dispatch Ruling: Stripe's invoice list has no billing_reason filter, so RenewalInvoice pages the subscription's invoices and selects billing_reason=subscription_cycle with the given period start client-side; the budget's L(v) counts those pages — cost if wrong: none, the request count is the same or lower. |
| +Task 5 pre-dispatch Ruling: an idempotency parameter mismatch is a distinct exported error (logged, op left unresolved) rather than a panic inside library code; tests assert the error — the plan's "panic in tests" is met by tests failing on it — cost if wrong: a test helper. |