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.
class-prv-cost-rollup-query.php:
- get_mtd_summary + get_model_breakdown: phpcs:disable/enable block for
InterpolatedNotPrepared (single-line ignore doesn't cover multi-line
string spans)
class-prv-probe-run-executor.php:
- Reduced to 290 lines (well under 300)
- write_meta array calls: phpcs:disable ArrayItemNoNewLine for compact
2-per-line format; write_io try/catch explicit comment on empty catch
- persist_result: expanded insert array to one item per line
- Class docblock consolidated; property @var docblocks to one-line format
- Closing class brace: removed extra blank line (PSR2 CloseBraceAfterBody)
tests/bootstrap.php + test-cost-audit.php:
- Added get_row() stub to stdClass_wpdb (PRV_Cost_Rollup_Query uses
get_row for get_mtd_summary, not get_var)
- Added wpdb_row key to initial state + prv_test_reset()
- Test 1: seed wpdb_row with expected row data instead of wpdb_var
Squash-merge PR #6: PR Vision v0.2.3 — UI-editable encrypted provider API key
QA APPROVED: 2026-06-14-85956da7c86bed2c9e2cf60625fda0cf2e9518bb.md
All 5 CI checks green on head SHA 85956da7c8
Rename to PR Vision (PRV_/pr-vision); fix www-strip char-mask in competitor display (str_starts_with); make PHPCS a CI gate; remove dead in-run cache.
QA: APPROVE — qa-reviews/pr-vision/2026-06-13-c633fdb9e1541386a713a6de12d2ee2ae4239640.md
Agent-Session: pr-vision rename v0.1.1 merge