peptiderepo
|
a09bda0181
|
PR Vision v0.2.0: clear CI blockers (P1-A/B/C/D/E + P2 CONTEXT)
P1-A: Remove defined()/constant() declarations from tests/bootstrap.php
- Both shadow PHP built-ins → 'Cannot redeclare' fatal on PHP 8.x
- Killed PHP Lint (8.2) job and cancelled 8.1/8.3 jobs
- Full bootstrap audit: no other PHP built-in shadows remain
P1-B: Re-escape pre-escaped vars at echo site (class-prv-model-manager-table)
- $prov, $slug, $note: esc_html() at output (was only at assignment)
- $id: esc_attr() at every output site (3 places)
- $checked_attr/$toggle_attrs: phpcs:ignore -- hard-coded attribute strings
- render_health_badge(): phpcs:ignore -- returns pre-escaped HTML markup
P1-C: phpcs:disable/enable NonceVerification.Missing (class-prv-settings-page)
- Wraps all four handle_*() POST blocks
- Justification inline: nonce verified via require_admin_nonce() private helper
P1-D/E: Auto-fixable PHPCS violations (array formatting + style)
- class-prv-config.php: expand 12 inline associative peptide arrays to multi-line
- class-prv-probe-runner.php: expand inline {probed,errors} array; align param docs
- class-prv-model-test-ajax.php: multi-line wp_send_json_success/error calls
- class-prv-settings-renderer.php: extract cadence options array to variable
- class-prv-model-registry.php: capitalise docblock first word; align param spacing
P2: CONTEXT.md v0.2.0 -- add 7 new domain terms
- Config Version, Run Lock, Model Registry, Run Health, Projected Cost,
Config-version Stamp, Truncation State
Agent-Session: pr-vision admin v0.2.0 CI fix
|
2026-06-14 07:10:35 +00:00 |
|
peptiderepo
|
8274d54a5e
|
PR Vision v0.2.0: admin/settings interface + correctness fixes
Requirements 1-8 + all non-negotiables:
1. Model manager (CRUD): PRV_Model_Registry, prv_models v2 option, versioned
idempotent migration from v0.1.x flat-string format, Settings page CRUD.
2. Per-model run-health: PRV_Model_Registry::update_health() after each run;
health badges (Healthy/Retired?/Disabled/Unknown) in model table + dashboard.
3. Metric comparability: PRV_Config_Version stamps every run with config_version;
save-bar warning on scoring-relevant changes; orphaned rows excluded by version.
4. Projected cost at save: PRV_Config::get_projected_cost(); over-cap warning;
prv_last_run_truncated option + visible notice when cap hit mid-run.
5. Config surface: peptide set, intents, cadence (reschedules cron), budget cap;
all validated + sanitized; next-run timestamp shown.
6. API-key three-state: not-defined / defined-ok / defined-failed; derived from
ledger; never displays the key.
7. Run-lock: PRV_Run_Lock (transient); cron tick skips if locked; Run-now
refuses with clear message; lock released in finally block.
8. Design fixes: dark-ink focus ring on bright fills; disabled-row full AA
contrast (no opacity); toggle disabled on retired rows; save-bar-level
warning (role=alert); chip text #B4BDC7 6.83:1 AA; keyboard-sortable headers
(<button>+aria-sort); aria-live on Test chip; z-index:50 save-bar;
run-now double-fire guard; @media print light overrides.
New: PRV_Upgrader (runs migrations on plugins_loaded, not just activation),
PRV_Config_Version, PRV_Run_Lock, PRV_Settings_Page, PRV_Settings_Renderer,
PRV_Model_Manager_Table, PRV_Model_Test_Ajax.
Tests: test-model-registry, test-run-lock, test-config-version,
test-projected-cost, test-cron-reschedule (+ updated probe-runner,
uninstall, bootstrap).
Schema: config_version INT column added via dbDelta (idempotent).
Uninstall: purges all v0.2 prv_* options + transients.
|
2026-06-14 06:43:54 +00:00 |
|