operator-pages: branch review round 1 findings and round 2 brief
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+64
−0
docs/superpowers/reviews/CODEX-FINDINGS-operator-pages-r1.md+43 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-operator-pages-R2.md+21 −0
CI failed — run details
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-operator-pages-r1.md b/docs/superpowers/reviews/CODEX-FINDINGS-operator-pages-r1.md| new file mode 100644 |
| index 000000000..4673340f0 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-FINDINGS-operator-pages-r1.md |
| @@ -0,0 +1,43 @@ |
| +Reviewed `092a9b5e571988c4e2acba4170f414817af3d46d` against `origin/main` at `0a32ce38b45106ff1b690b8d6359d1c444688d45`, following round 1’s brief. Found one P1 and three P2s. |
| + |
| +1. **P1 — Job panic recovery does not cover mail delivery goroutines.** |
| + |
| + The new wrapper calls `runRecovered` around the pass, but its recovery only covers that goroutine ([jobs.go:128](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/operator-pages/internal/console/jobs.go:128)). `mailPushPass` launches delivery goroutines whose only deferred operation releases the semaphore and wait group; they have no recovery ([mailpush.go:750](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/operator-pages/internal/console/mailpush.go:750)). |
| + |
| + **Failure scenario:** a panic during `deliverAppMailEvents` escapes the job wrapper and terminates the console process. The job cannot finish as Failed or run again. This breaks the required invariant that a panicking background pass cannot take down the console. |
| + |
| + **Fix:** recover inside each delivery goroutine and report the recovered error through the parent run’s `jobFailed` context, preserving semaphore cleanup and delivery retries. Add a regression that injects a panic inside a delivery child and verifies that the console survives, the job records Failed, and another pass runs. |
| + |
| +2. **P2 — Failed retirement recovery can be reported as OK.** |
| + |
| + `retirementStepsLocked` logs classification and tombstone-write failures and returns `errLifetimePending`, without calling `jobFailed` ([lifetimes_retire.go:241](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/operator-pages/internal/console/lifetimes_retire.go:241), [lifetimes_retire.go:315](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/operator-pages/internal/console/lifetimes_retire.go:315)). `recoverRetirementLocked` consumes that result and only logs again ([lifetimes_retire.go:362](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/operator-pages/internal/console/lifetimes_retire.go:362)). The enclosing `recoverLifetimes` pass can then return nil. |
| + |
| + **Failure scenario:** a pending normal or cleanup retirement encounters an S3 read or write failure, while the other work succeeds. The retirement remains pending, but Lifetime recovery appears as OK and contributes no dashboard warning. This breaks the invariant that a swallowed operational failure marks its run Failed. |
| + |
| + **Fix:** record the underlying errors at the retirement dispatcher’s failure sites, retaining existing return values and retry behavior. Cover this path with a failed-read or failed-write regression through `jobs.Run`. This finding concerns missing runtime reporting, not the previously recorded P3 limitations of the log census. |
| + |
| +3. **P2 — Individual box-report failures can still produce an all-clear dashboard.** |
| + |
| + The new operator reader delegates to `HostRows` ([opboxes.go:35](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/operator-pages/internal/console/opboxes.go:35)), which calls `status.LoadBoxes`. That loader discards its completeness result; individual GET failures, corrupt reports and oversized reports are skipped with a nil error ([fleet.go:221](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/operator-pages/internal/status/fleet.go:221), [fleet.go:291](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/operator-pages/internal/status/fleet.go:291)). Consequently, the dashboard’s `hostsErr` warning is not activated ([opdashboard.go:376](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/operator-pages/internal/console/opdashboard.go:376)). |
| + |
| + **Failure scenario:** a listed report cannot be read or parsed, and that box is also absent from the latest fleet summary—for example, a newly reporting box. With the remaining boxes healthy and no other attention items, the dashboard says “Everything is running.” The failed report has disappeared from both the table and the callout. |
| + |
| + **Fix:** propagate completeness from the existing `status.LoadBoxesComplete` through an operator-specific reader and show the unread-reports warning for incomplete results. This needs no additional S3 requests. Test a failed individual GET and corrupt JSON, including a box absent from the summary. |
| + |
| + **Invariant:** unavailable box evidence must not become an all-clear result. |
| + |
| +4. **P2 — Summary-only boxes ignore the agreed status rule.** |
| + |
| + Every box present in `fleet.json` but absent from `HostRows` is assigned Silent unconditionally ([opdashboard.go:269](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/operator-pages/internal/console/opdashboard.go:269)). The plan explicitly requires using `FleetBox.Stale` for those rows, then applying the load-word rule. |
| + |
| + **Failure scenario:** the report listing succeeds without that box, while a fresh summary carries `Stale: false` and `Load: "busy"`. The dashboard displays Silent and adds “has stopped reporting,” instead of displaying Busy. |
| + |
| + **Fix:** use `FleetBox.Stale` and `FleetBox.Load` for summary-only rows, retaining unknown load-meter and last-report values. Preserve the separate incomplete-read warning described above. Update the existing status test, which currently expects Silent for every summary-only box. |
| + |
| + **Invariant:** box status must follow the documented Stale → Silent → Busy → Healthy precedence using the specified evidence. |
| + |
| +The remaining source checks found no additional issues: stale asset hashes receive current bytes with `no-cache`; search values are escaped and parameterized; paging inputs are bounded; missing/deleted-account joins preserve rows; job notes are capped and template-escaped; operator gates precede page-data reads. The alert projection adds no S3 reads, and the declared dashboard/Boxes read sets match their handlers. Shell structure matches the mockup’s organization, with one heading per page, rail selection, local assets and no inline stylesheet markup. |
| + |
| +All seven vendored asset hashes match `VERSION`. Changed Go files pass formatting checks, and `git diff --check` passes. **Runtime validation remains unperformed:** the targeted tests and `make census-card` both stopped before execution because the read-only sandbox blocked temporary-file creation. Static diff inspection found no changed root-binary production files, but this does not substitute for a successful census run. No files were edited, no subagents were spawned, and no full suites were run. |
| + |
| +**NOT READY** |
| \ No newline at end of file |
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-operator-pages-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-operator-pages-R2.md| new file mode 100644 |
| index 000000000..294872e5a |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-operator-pages-R2.md |
| @@ -0,0 +1,21 @@ |
| +# Review brief: branch operator-pages, round 2 of 3 |
| + |
| +Repo carlos/platform, branch `operator-pages`, code at 357d78effaa499f98dbb9213cf7e9b486f723844. |
| +Under review: the fix diff `435d6e44..357d78effaa499f98dbb9213cf7e9b486f723844` (one commit answering round 1), in the context of the whole branch against origin/main. |
| +Authorities: as round 1, `docs/superpowers/reviews/CODEX-REVIEW-BRIEF-operator-pages.md` (its "Fixed: do not re-argue", Severity and Output sections apply unchanged). |
| + |
| +You are an independent reviewer. Read the round 1 brief, then the findings, then the fix diff, and check every claim against the code. |
| + |
| +## Round 2 |
| + |
| +Earlier rounds: round 1, `docs/superpowers/reviews/CODEX-FINDINGS-operator-pages-r1.md` (NOT READY: one P1, three P2s). |
| + |
| +First give one line per P1 and P2 from round 1: resolved, partly, or not. Carry every unresolved or partly resolved finding forward at its current severity, then add new findings, limited to what the fix diff changed or broke. The verdict covers everything outstanding, earlier rounds included. |
| + |
| +## What to check |
| + |
| +1. P1: a panic in a mail delivery goroutine is recovered, marks the run Failed, keeps the semaphore and wait group balanced, and leaves the row due; no other goroutine started inside a tracked pass is left unrecovered. |
| +2. P2s: retirement failures mark the recovery run Failed with returns and retries unchanged; an incomplete box-report load (failed GET, corrupt or oversized report) is never all-clear and makes no extra S3 request; `HostRows` behaves as before for its other callers; summary-only boxes follow Stale, then Silent, then Busy, then Healthy. |
| +3. The new tests go through production wiring (newPerfFixture, recordS3, jobs.Run) and would fail without the fix. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites. End with exactly one verdict: READY, READY AFTER FIXES, or NOT READY. |