sponsor-existing-accounts: review brief, round 2 of 3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+13
−11
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-sponsor-existing-accounts.md+13 −11
CI failed — run details
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-sponsor-existing-accounts.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-sponsor-existing-accounts.md| index 0540dab5a..07fcbca64 100644 |
| --- a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-sponsor-existing-accounts.md |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-sponsor-existing-accounts.md |
| @@ -1,7 +1,7 @@ |
| -# Review brief: branch sponsor-existing-accounts, round 1 of 3 |
| +# Review brief: branch sponsor-existing-accounts, round 2 of 3 |
| Repo carlos/platform, branch `sponsor-existing-accounts`, the commit that adds this brief (named in your prompt). |
| -Under review: the diff `origin/main...HEAD`. Paul's ruling (2026-10-31): every account that exists when plan limits switch on is sponsored with no limits, so no existing user hits a cap or has to pay; new accounts get normal plans. A new optional catalog field `sponsor_accounts_before` (RFC 3339) names the cutoff. The console's limits pass first writes a sponsored row (default plan, source sponsored, effectively unlimited limits) for every live, non-ops account created before the cutoff that has no `account_plans` row. Until that row exists, `sponsorOwed` holds every limit off for the account. |
| +Under review: the diff `origin/main...HEAD`. Paul's ruling (2026-10-31): every account that exists when plan limits switch on is sponsored with no limits, so no existing user hits a cap or has to pay; new accounts get normal plans. A new optional catalog field `sponsor_accounts_before` (RFC 3339) names the cutoff. Round 1 (findings in `~/.cache/sponsor-existing-accounts/review-r1.md`, all four addressed) led to a redesign. Settlement is now synchronous at console startup (`sponsorAtStart` / `SettleLaunchSponsorship` / `Store.SponsorExistingAccounts`), before billing, NewServer, workers and the listener. It writes every sponsored row in one transaction. A future cutoff, an unreadable account manifest or a failed write makes that start run with plans and billing off. The derived `sponsorOwed` gate was removed. Paul's rulings, added in this round: sponsored rows are exempt from the plan 3b daemon and always-on refusals; the billing page shows "Unlimited" for sponsored values. |
| ## Invariant |
| @@ -9,15 +9,17 @@ No limit, cap, grace step, mail pause, throttle or limits record acts on an acco |
| ## What to check |
| -1. Every enforcement path that reads plan limits goes through the `sponsorOwed` gate or a sponsored row. Hunt for paths that bypass `EffectiveLimits` (box limits records, member cap, free-account rule, plan 3b refusals, rate-limit and keep doors, billing page and checkout). |
| -2. `EnsureDefaultPlans` excluding pre-cutoff accounts: no path can give an owed account a default row before its sponsored row. |
| -3. `applyAccountPlanUnassigned`: it writes only when no row exists, under the same lock and transition as `applyAccountPlan`. Check races with checkout, the operator door and account deletion. The census test that makes `applyAccountPlan` the only plan-change path still holds in spirit. |
| -4. The "unlimited" values (`sponsorUnlimited`) cannot overflow anywhere they are used, on the console or the box (grace multiples, mail pause, durations, rate limits, limits-record JSON). |
| -5. Settlement completion: errors propagate, there's a retry, and "done for this process" needs a success at least 10 minutes after the cutoff. Is that window right for a cutoff in the future? |
| -6. The catalog ID: an unset field leaves existing IDs unchanged. |
| -7. Census card and overlay in `docs/superpowers/notes/census-proposal-sponsor-existing-accounts.md`. You are the census reviewer: approve or reject it with reasons. |
| - |
| -Known and out of scope (decisions for Paul, don't report them): the plan 3b daemon and always-on refusals, the catalog's email ceiling on the mail pause, the free-account count, the billing page showing the raw large numbers. |
| +1. Round 1's four findings are resolved, with no new instance of the same fault families (consistent sponsorship state during enforcement, eligibility at the payment boundary, settlement completeness, cutoff precision). |
| +2. The startup ordering in `cmd/console` really precedes every reader of plan limits, and the source-reading test `TestServeSettlesTheSponsorshipBeforeItServes` would catch a regression. The serve lock gives one console per store. The builder left one gap open on purpose: `console member` takes no lock. Judge whether it matters. |
| +3. Plans-off on refusal: no path half-enables plans or billing. |
| +4. The daemon and always-on exemption covers sponsored rows only, and does not leak to other sources. |
| +5. Every enforcement path that reads plan limits sees a sponsored row for every eligible account. Hunt for paths that bypass `EffectiveLimits` (box limits records, member cap, free-account rule, plan 3b refusals, rate-limit and keep doors, billing page and checkout). |
| +6. The bulk insert writes only when no row exists. Check that it doesn't bypass anything `applyAccountPlan` does that a sponsored row needs (transition, limits record, revision). The census test that makes `applyAccountPlan` the only plan-change path still holds in spirit. |
| +7. The "unlimited" values (`sponsorUnlimited`) cannot overflow anywhere they are used, on the console or the box (grace multiples, mail pause, durations, rate limits, limits-record JSON). |
| +8. The catalog ID: an unset field leaves existing IDs unchanged, and fractional cutoffs are refused. |
| +9. Census card and overlay in `docs/superpowers/notes/census-proposal-sponsor-existing-accounts.md`. You are the census reviewer: approve or reject it with reasons. The envelope was re-pinned after round 1, so it needs approval at this commit. |
| + |
| +Out of scope (Paul's rulings, don't report them): the catalog's email ceiling still applies to the mail pause, and sponsored accounts count toward the free-account rule. Copy wording is under Paul's own review. |
| ## Severity |