Blast radius: exclude projection<=0 grades from the public model record
The degraded grades (projection=0 → model_value=0) are already settled in the
append-only ledger and must NOT be deleted (Data Semantics law). But their
hit/miss is noise, not model skill — they never had a real projection. So
getModelAggregate now filters `.gt('model_value', 0)` on both the settled and
pending queries: the rows stay in ledger_entries, but leave the public hit_pct /
CLV / per-tier record. `.gt` also drops NULL model_value. Post-fix no such row
can be written (projection<=0 refuses), so this only sheds the historical set.
This is the functional form of the "marking" the work order asked for — the
degraded locks are effectively marked as non-counting without mutating history.
Test builder mocks gained `.gt`; a lock asserts the filter is applied to both
queries. Suite 269/3253 green, web build exit 0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -154,7 +154,7 @@ describe('ledgerService.settleLedger — WNBA settles vs the ESPN game log', ()
|
||||
upsert() { return Promise.resolve({ error: null }); },
|
||||
update(v) { b._update = v; return b; },
|
||||
select() { return b; }, eq() { return b; }, is() { return b; },
|
||||
not() { return b; }, lt() { return b; }, gte() { return b; }, order() { return b; },
|
||||
not() { return b; }, lt() { return b; }, gte() { return b; }, gt() { return b; }, order() { return b; },
|
||||
in(col, ids) {
|
||||
if (b._update) { calls.updates.push({ values: b._update, ids }); return Promise.resolve({ error: null }); }
|
||||
return terminal();
|
||||
|
||||
Reference in New Issue
Block a user