ops-plan-exempt: review brief, round 2 of 3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+41
−0
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-ops-plan-exempt-R2.md+41 −0
CI passed — run details
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-ops-plan-exempt-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-ops-plan-exempt-R2.md| new file mode 100644 |
| index 000000000..715c18730 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-ops-plan-exempt-R2.md |
| @@ -0,0 +1,41 @@ |
| +# Review brief: branch ops-plan-exempt, round 2 of 3 |
| + |
| +Repo carlos/platform, branch `ops-plan-exempt`, the commit that adds this brief (named in your prompt). |
| +Under review: the diff `origin/main...HEAD`. |
| +Authorities: the plans spec `docs/superpowers/specs/2026-10-20-plans-caps-packs-design.md` and docs/site/plans.md (merged on main), plus Paul's requirement (2026-10-28): "The ops account needs to be exempt", and "because my paul@keymail.dev owns ops, it counts against my 1 free account". |
| + |
| +You are an independent reviewer. Read the diff and the code it touches, and check every claim against that code. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- The built-in ops account (account #1, internal/registry/registry.go:353, :895) is exempt from plans: no limits record, no caps, warnings, grace, after-grace, throttle or lapse, no billing, and it does not count toward free_accounts_per_person. The plan door refuses it. |
| +- One predicate, `(s *Store) planExempt`, enforced in one place, pinned by `TestPlanExemptConsulted`. |
| + |
| +## What to check |
| + |
| +1. Every path that applies a limit, cap, lifecycle stage, billing action or free-account count either consults `planExempt` (directly or through `EffectiveLimits`) or cannot reach ops. Look for paths the guard test's list misses: box-side limits, the storage deny, email and bandwidth stages, the lapse switch-off, member caps, the billing passes and doors, /upgrade. |
| +2. No other account is exempted by accident: the predicate is true for ops only in production (`planExemptID` is set to OpsAccountID), and test-only overrides cannot leak into production. |
| +3. `settlePlanExempt` deletes `accounts/<ops sqid>/limits.json` and any storage deny at console start: it can touch only ops's own objects, it is safe when the objects are missing, and it costs at most the stated requests per start (S3 requests cost money: no new per-box polling). |
| +4. The box side: a missing limits record really means "no limits" to plansPass and the activator (check the box code, not the comments). |
| +5. The plan door's 409 for ops (show and set), and that existing ops rows are never read for a decision. |
| +6. The census (you judge it; Paul does not rule on census classes, #280): the implementer reports the root-read and record-write censuses pass with no card. Confirm no root package changed, or say what did. |
| + |
| +## Round 2 |
| + |
| +Earlier round: `docs/superpowers/reviews/CODEX-FINDINGS-ops-plan-exempt-r1.md` (at e492e431: 2 P1, 1 P2). The fix is commit 4f11128a. Each invariant is now enforced at one shared point: `settlePlanExempt` (internal/console/planexempt.go) clears every plan-enforced state for ops (limits record, storage denies on live and trashed apps, PauseKindPlan mail pauses, cap rows, lapse items); `holdBilling(acct)` refuses ops (the only place a billing hold is made) and `billingOwner` is the entry for every /a/{sqid}/billing/ route, pinned by `TestBillingDoorsEnterThroughBillingOwner`. |
| + |
| +First give one line per round 1 finding: resolved, partly, or not. Carry forward anything unresolved, then add new findings, looking first at the fix (newly changed billing and production-storage behaviour). The verdict covers everything outstanding. |
| + |
| +## Severity |
| + |
| +- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks merge. |
| +- **P2**: wrong or missing. Fixed without reopening this review. |
| +- **P3**: clarity or polish. Goes on a follow-up list; never a reason for another round. |
| + |
| +A P1 states its failure scenario and the evidence (file:line). Do not raise a P2 to P1 to keep the review open. |
| + |
| +## Output |
| + |
| +Findings ranked P1, P2, P3. Each gives the problem, the evidence (file:line, verified), the failure scenario, a concrete fix and the invariant it breaks. End with exactly one verdict: **READY**, **READY AFTER FIXES**, or **NOT READY**. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites. |