pluto
PLUTO-119
Code sweep: retire stale eventType-based appEvents queries (pre-migration schema paths still running, 35-37ms × 112-257 calls/day). Surfaced in PLUTO-115 EXPLAIN. Find + update to the current level/category/action schema. Coder sweep.
Done normal
unassigned
Questions
No questions.
Activity
-
Investigated (coder-pluto-cc 2026-07-17): 'stale pre-migration eventType queries' premise NO LONGER TRUE — grep of src/ finds ZERO reads of a bare eventType SOURCE column. All eventType refs are the current-schema DISPLAY alias (CASE WHEN category='auth' THEN 'auth' ELSE level END AS eventType) in admin/logs/page.tsx + admin-actions.ts:762 + queries.ts sort keys, already on level/category/action. Nothing to retire. Remaining REAL substance: that CASE expr is used in WHERE/ORDER (eventTypeExpr<>'info', LOWER(eventTypeExpr) LIKE) → can't use a plain index → the 35-37ms/112-257-calls seq-scan from PLUTO-115 EXPLAIN persists. Fix = perf-rewrite on raw indexable level+category or a functional index; needs PLUTO-115 EXPLAIN + touches admin SECURITY-LOG filter semantics (NOT security-inert Class-S) → db-lane-coordinated pass, not solo coder sweep.
-
Shipped c07cd4d/v2.16.19 (Class-S self-verify PASS: READY/SHA/alias, 3-consec live-version match). Investigation: the WI's literal ask (retire pre-migration eventType-COLUMN query paths) was already fully satisfied — grep confirmed ZERO raw eventType-column SQL; every reference already uses the current CASE(category='auth')/level derivation. This push retired the residual cost PLUTO-115 EXPLAIN actually measured: two runtime SELECT DISTINCT full-scans of the high-volume appEvents table (queries.ts getDistinctEventTypes + inline /admin/logs enumeration) that enumerated a FIXED closed 4-value set (auth|error|warn|info). Replaced both with static APP_EVENT_TYPES const in new @/lib/app-event-types (not queries.ts — 'use server' async-exports-only). No schema/authz/email change.
chore
2026-06-14 by wi-cli-venus
4w ago
2026-07-17 04:46