Fix 1: Add io_captured TINYINT(1) NOT NULL DEFAULT 0 to prv_call_meta
CREATE (baked into initial schema — table is new in v0.3.0, no separate
migration needed). PRV_Capture_Writer::write_io() sets io_captured=1 via
set_io_captured() on success; error rows and legacy rows keep 0.
Drawer state now driven by io_captured instead of config_version heuristic:
0 → Legacy/not-captured
1 + io → Normal
1 + no io → Pruned
ARCHITECTURE.md schema section updated.
Fix 2: Soften reconciliation copy in PRV_Costs_Renderer (~line 75):
'matches the Dashboard MTD total' → 'approximately reconciles to the
Dashboard MTD total' — error calls write prv_call_meta (cost 0) but not
prv_ai_visibility, so exact equality is not guaranteed.
Fix 3: Harden security test (test-capture-writer Test 4): inject sentinel
sk-or-TEST-LEAK-CANARY as PRV_OPENROUTER_API_KEY constant; queue a mocked
401 wp_remote_post response; drive PRV_Probe_Runner → PRV_Probe_Run_Executor
→ probe_one() 401 error path end-to-end; assert the sentinel, Bearer, and
Authorization appear in NO stored row (prv_call_meta or prv_call_io).
Original direct-writer security test retained as Test 3.
PHP 8.1: Cannot use positional argument after argument unpacking —
class-prv-call-log-query.php line 77 (LIMIT/OFFSET args merged into
array before spread).
WPCS fixes across 8 files:
- class-prv-admin-page-css.php: short description capital letter
- class-prv-admin-page.php: docblock started on same line as closing brace
- class-prv-call-drawer-renderer.php: param spacing, empty elseif blocks,
extra indent on render_inline_script
- class-prv-call-log-query.php: InterpolatedNotPrepared (use
phpcs:disable/enable block for WHERE-clause interpolation)
- class-prv-cost-rollup-query.php: InterpolatedNotPrepared for GROUP BY
with dynamic column (phpcs:disable/enable block)
- class-prv-costs-renderer.php: AssociativeArrayFound on inline sub-arrays
- class-prv-probe-run-executor.php: docblock spacing, empty catch blocks,
inline array items, ArrayItemNoNewLine (phpcs:disable on write_meta calls)
- class-prv-probe-runner.php: extra space before ?? operator