plans 6b: whole-branch review round 1 findings (Astra, NOT READY: 2 P1, 2 P2; census approved)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+57
−0
docs/superpowers/reviews/CODEX-FINDINGS-plans-6b-branch.md+57 −0
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-plans-6b-branch.md b/docs/superpowers/reviews/CODEX-FINDINGS-plans-6b-branch.md| new file mode 100644 |
| index 000000000..999f8eb30 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-plans-6b-branch.md |
| @@ -0,0 +1,57 @@ |
| +# Astra findings: branch plans-6b-checkout-flow, whole-branch round 1 of 3 |
| + |
| +Model gpt-6-astra via codex, reasoning high, brief CODEX-REVIEW-BRIEF-plans-6b-branch.md at 5af3d04e. Unedited. |
| + |
| +Reviewed `5af3d04e15e7b268f21e28ef9bbdd6c8716022b4`, whole-branch round 1. |
| + |
| +1. **P1 — Task 11: one seat authorisation can pay for multiple seats.** |
| + |
| + Admission computes `need = Billed(members+1)` and charges up to that quantity after checking one invite’s authorisation. It does not first detect existing unpaid members. See [billingseats.go:292](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/console/billingseats.go:292) and the charge at line 341. The invitation quote covers one seat at [billingseats.go:616](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/console/billingseats.go:616). |
| + |
| + **Failure scenario:** ten members and ten paid seats; an owner authorises one invitation; an operator adds another member before acceptance. Before the hourly pass opens `seats_unpaid`, acceptance charges for the increase from ten to twelve. The single authorisation pays for both people. The subsequent observation sees twelve paid seats and misses the original deficit. |
| + |
| + **Fix:** detect existing unpaid membership under the admission locks before preparing a charge, open `seats_unpaid`, and refuse the charge. Enforce that one authorisation cannot purchase more than one additional seat. Test acceptance before any background pass. |
| + |
| + **Fault family:** charge quantity exceeds consent; Invariant 2 and Call 11’s prohibition on charging operator-added members. |
| + |
| +2. **P1 — Tasks 5 and 11: team membership paths bypass billing readiness.** |
| + |
| + `admitMember` reaches `admitSeatLocked`, recovery and new charges without checking `s.billing.ready`: [billingseats.go:242](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/console/billingseats.go:242). Invitation creation similarly reaches the billing quote and authorisation path without that check: [server.go:3029](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/console/server.go:3029). |
| + |
| + **Failure scenario:** after restart, readiness rejects a configured book whose amount differs from the actual subscription price. The price mismatch is explicitly checked at [adapter.go:402](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/billingstripe/adapter.go:402). Nevertheless, an owner can authorise an invitation using the configured amount, and acceptance charges the actual provider price. `seatCovered` compares local book amounts, so it does not repair the bypass. |
| + |
| + **Fix:** require readiness before billing work in invitation, admission and removal paths, including recovery of outstanding operations. Add a shared write guard covering retirement-triggered writes too. Test failed readiness with readable subscriptions and otherwise successful sends. |
| + |
| + **Fault family:** provider-validation gate bypass; inherited 6a readiness requirements and verifiable seat-price consent. |
| + |
| +3. **P2 — Task 5: a truncated HTTP 500 becomes retryable.** |
| + |
| + When response-body reading fails, `exchange` returns `CodeNetwork` even after receiving status 500: [client.go:279](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/billingstripe/client.go:279). `classify` maps that code unconditionally to `ErrNoResponse`: [prepared.go:253](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/billingstripe/prepared.go:253). |
| + |
| + **Failure scenario:** the provider returns 500 headers and then closes the connection mid-body. The console retries the prepared request and can persist it as unresolved without the indeterminate flag. This also delays the required operator escalation. |
| + |
| + **Fix:** preserve a known 5xx classification regardless of body-read failure. Add a test returning 500 headers with a truncated body. |
| + |
| + **Fault family:** loss of indeterminate outcome classification; Invariant 8. |
| + |
| +4. **P2 — Task 9: expiry recovery exceeds its request budget.** |
| + |
| + `expireIntentLocked` recognises an existing prepared expiry but still permits all three in-handler retries: [billingcheckout.go:874](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/console/billingcheckout.go:874), with the unchanged retry limit at line 914. |
| + |
| + **Failure scenario:** recovery of a stored expiry receives repeated retryable failures while session reads remain open. It performs four reads and four sends, rather than the recovery budget’s one read plus at most one resend, excluding probes. |
| + |
| + **Fix:** set the retry allowance to zero when recovering, as `sendCreateLocked` does. Add a call-count assertion for recovery of an existing expiry. |
| + |
| + **Fault family:** bounded recovery requests; Global Constraints’ `F` budget. |
| + |
| +**Census verdicts** |
| + |
| +- **`.` envelope — APPROVE.** The house command uses the existing session resolution and JSON transport with a fixed API path: [billing_cli.go:131](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/billing_cli.go:131). The remaining production changes are help text. No new tenant-controlled root filesystem input or weakened root check. |
| +- **`internal/plans` envelope — APPROVE.** Reviewed catalog validation, team scaling, formatting and export changes. Member bounds and overflow refusals remain explicit: [catalog.go:239](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/plans/catalog.go:239), [team.go:67](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/plans/team.go:67). These changes add no filesystem, execution or query path. |
| +- **Record-write layer — APPROVE both replacements.** `Server.registerCLIRoutes` and `NewServer` add route registrations, not record writes. Their existing `key-site` classifications remain appropriate: [plans6b_census_test.go:17](/home/paulca/.cache/tmp/claude-1001/plans-6b-checkout-flow/internal/provision/plans6b_census_test.go:17). |
| + |
| +No loss of main’s fields or closed-door entries was found in the two merge-conflict files. The count increases from 67 to 68 for the house endpoint. |
| + |
| +Validation was by source inspection. Targeted tests could not start because Go could not create its work directory in the read-only sandbox. No files were changed. |
| + |
| +**NOT READY** |
| \ No newline at end of file |