ops-plan-exempt: round 2 findings (NOT READY: 1 P1 in the mail family, rule 2 triggered; 2 P2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+27
−0
docs/superpowers/reviews/CODEX-FINDINGS-ops-plan-exempt-r2.md+27 −0
CI passed — run details
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-ops-plan-exempt-r2.md b/docs/superpowers/reviews/CODEX-FINDINGS-ops-plan-exempt-r2.md| new file mode 100644 |
| index 000000000..aba1b2328 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-ops-plan-exempt-r2.md |
| @@ -0,0 +1,27 @@ |
| +# Astra findings: ops-plan-exempt, round 2 of 3 |
| + |
| +gpt-6-astra via codex, high, brief CODEX-REVIEW-BRIEF-ops-plan-exempt-R2.md at 4b28c0b3. Unedited. |
| + |
| +Round-one finding 1 — **Partly resolved:** normal mail cleanup works, but a failed sender read can leave a plan pause permanently skipped. |
| +Round-one finding 2 — **Resolved:** checkout recovery, Continue and the return endpoint now refuse ops. |
| +Round-one finding 3 — **Resolved:** storage cleanup includes trashed apps. |
| + |
| +Reviewed `4b28c0b3182885742c93c21d7bafacb50eb8b7c6`, round 2. |
| + |
| +1. **P1 — Mail cleanup can falsely declare settlement complete.** |
| + [planexempt.go:152](/home/paulca/.cache/tmp/claude-1001/ops-plan-exempt/internal/console/planexempt.go:152) uses `mail.ListSenders`, which silently skips failed reads of non-app senders ([mail.go:312](/home/paulca/.cache/tmp/claude-1001/ops-plan-exempt/internal/mail/mail.go:312)). If a plan-paused instance sender’s GET fails during startup, cleanup returns success and sets `planExemptSettled` ([planexempt.go:86](/home/paulca/.cache/tmp/claude-1001/ops-plan-exempt/internal/console/planexempt.go:86)). Later limits passes skip cleanup, while the grace pass exits for ops before resuming mail. The sender remains paused until another restart or manual intervention. |
| + **Fix:** require complete sender enumeration before marking settlement complete; propagate individual read/decode failures. Add a regression that fails one instance-sender read, then verifies the next pass resumes it. **Invariant:** ops retains no plan-enforced email pause. |
| + |
| +2. **P2 — Webhook error paths bypass the billing exemption.** |
| + When a subscription lookup returns not-found, [billingsync.go:179](/home/paulca/.cache/tmp/claude-1001/ops-plan-exempt/internal/console/billingsync.go:179) calls `subscriptionMissing` outside the billing hold. That function reads an existing ops billing row and opens `subscription_missing` without checking exemption ([billingsync.go:389](/home/paulca/.cache/tmp/claude-1001/ops-plan-exempt/internal/console/billingsync.go:389)). A webhook concerning an old ops subscription can therefore create a problem that operators cannot close: the close path now refuses ops ([apibilling.go:174](/home/paulca/.cache/tmp/claude-1001/ops-plan-exempt/internal/console/apibilling.go:174)). The unknown-customer branch likewise opens problems before acquiring a hold. |
| + **Fix:** apply `planExempt` at the shared problem-opening boundary and test these webhook paths. **Invariant:** billing does not act on ops’s state. |
| + |
| +3. **P2 — The house-flag API still accepts ops.** |
| + [apibillinghouse.go:48](/home/paulca/.cache/tmp/claude-1001/ops-plan-exempt/internal/console/apibillinghouse.go:48) calls `SetBillingHouse` without either exemption guard. An operator can submit ops to `/api/cli/billing/house`, receive success and create or delete its billing-house row. The new route guard covers only `/a/{sqid}/billing/` endpoints. |
| + **Fix:** refuse exempt accounts before this mutation and cover the operator endpoint in the exemption tests. **Invariant:** every billing action excludes ops. |
| + |
| +No P3 findings. No root-binary package changed, confirmed through dependency listings for Linux amd64 and arm64; no root-read census card is required. Missing limits records clear cached limits, throttle and disabled hosts. Changed Go files are formatted. Targeted tests could not start because the sandbox denied Go’s work-directory creation; census passes were not independently reproduced. `git diff --check` reports only Markdown trailing spaces in the archived round-one findings. No files were edited. |
| + |
| +The mail invariant has findings in rounds 1 and 2, triggering stopping rule 2 before another fix. Of its prescribed choices, I recommend enforcing settlement completeness in one place with a fault-injection guard test. |
| + |
| +**NOT READY** |
| \ No newline at end of file |