carlos / platform Public

ops-plan-exempt: review brief, round 3 of 3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev c7d07387ad71d2e5d66ad0a772ee258a46730817 parent 0c99e5b
1 file changed, +41 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-ops-plan-exempt-R3.md +41 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-ops-plan-exempt-R3.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-ops-plan-exempt-R3.md
new file mode 100644
index 000000000..659051f75
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-ops-plan-exempt-R3.md
@@ -0,0 +1,41 @@
+# Review brief: branch ops-plan-exempt, round 3 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 3 (the last)
+
+Earlier rounds: `docs/superpowers/reviews/CODEX-FINDINGS-ops-plan-exempt-r1.md` (2 P1, 1 P2) and `CODEX-FINDINGS-ops-plan-exempt-r2.md` (1 P1 in the mail family, 2 P2). Stopping rule 2 triggered on the mail family and Paul chose the cut (discussion 455): `settlePlanExempt` no longer lifts plan mail pauses (none can exist on ops: flagship has no catalog, dev's ops was sponsored at once; the exemption stops new ones because enforceAccountMail reads EffectiveLimits, nil for ops). Do not re-raise the cut mail clean-up. Round 2's P2s are fixed in 2f31a678 (`openBillingProblemTx` opens nothing for ops; the house door refuses ops). Main was merged in afterwards (40 commits: the billing success screen, the usage view, the billing restyle); the one conflict, billingPageInput's fields, kept both sides.
+
+First give one line per round 1 and round 2 finding: resolved, partly, cut (mail), or not. Then new findings, looking first at the round 2 fixes and at how main's new billing code (success screen, usage view from plan_cap_state) treats ops. This is the last round: a P1 here means cutting scope and asking Paul, so state each P1's failure scenario precisely.
+
+## 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.