- scoring.py: shared real compression-score formula (mirrors the exact
validator formula, same one used in real_validator_score_test.py) so
every part of the CMS scores consistently instead of each view
reimplementing it.
- db.py: added score column (+ migration for the pre-existing DB), an
alerts table, a calibration_runs table, sortable/filterable item
queries, score-trend and rate-distortion query helpers.
- cq_health.py: parses the live CQ tables directly from app.py's source
and cross-references them against real calibration evidence, flagging
which tiers are backed by data vs. still guesses. Caught and fixed a
real bug while building this: calibration evidence wasn't filtered by
encoder_mode, so NVENC AV1 data was silently getting attributed to the
SVT-AV1 table (different CQ/CRF curve entirely) and vice versa. Also
normalized all scores to the real vmaf_threshold rather than trusting
stored score_est, which for search-log rows is computed against an
inf…
Add CMS foundation: persistent outcome logging, video sample capture, DB + browsing UI
silvanus930
b5c3309
- Compression service now writes a structured outcome record (codec, cq,
vmaf, ratio, timing, searched-vs-fallback) per completed item to
compression_outcomes.jsonl, following the same pattern as the existing
cq_search_log.jsonl. This doesn't touch the CompressResponse contract
with neurons/miner.py -- the CMS reads this log directly instead.
- _search_cq_for_max_score now returns (cq, vmaf) instead of just cq, so
the real measured VMAF for the chosen value can be logged instead of
re-measuring or guessing.
- neurons/miner.py captures a compressed-output sample alongside the
existing reference-clip capture, using the same category-aware
eviction policy (reserve=3 per codec/threshold, cap=80) -- generalized
the reference-library eviction helpers to serve both libraries, since
compressed outputs are normally deleted within seconds of upload and
would otherwise never be available to preview.
- New cms/ subsystem: SQLite-backed ingest of the outcome log, a FastAPI
s…