Session F (night2): Phase 5 — records + dossier
5.1 Archetype defined on-page: one line from the archetype library under
ARCHETYPE DNA (BOMBER — elite raw power…); expander keeps the long form.
5.2 VYNDR-on-team live: getModelAggregate team scope (migration-020 column)
+ /api/ledger/model?team= + ModelRecord mounted on the Team Hub header.
5.3 WNBA/NBA profile parity: minutes-based usage (+MIN season cell) when
the feed carries minutes — absent beats invented.
5.4 Settings read meter: real rolling-24h usage from the SAME store the
limiter enforces (GET /api/user/scan-meter + proxy). Metered tiers see
'X of N reads today' + bar; unlimited tiers see nothing. Corrects the
stale '5 scans / month' copy.
5.5 Per-tier calibration on the MODEL tab: A+/A/B/C chips with hit% at
n>=20 PER TIER, 'building (n/20)' below — the separation between tiers
is the proof the grades mean something.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -233,3 +233,22 @@ describe('getModelAggregate — never a % under min sample', () => {
|
||||
expect(agg.beat_close_pct).toBe(65); // 13 beat / 20 with clv
|
||||
});
|
||||
});
|
||||
|
||||
// Session 60 (night2/F, 5.5) — calibration by grade tier.
|
||||
describe('getModelAggregate — per-tier calibration (n≥20 per tier)', () => {
|
||||
test('a tier at 20+ settles gets a pct; a small tier stays building (null)', async () => {
|
||||
const sb = fakeSb();
|
||||
const rows = [
|
||||
...Array.from({ length: 14 }, () => ({ outcome: 'hit', clv_result: null, grade: 'A' })),
|
||||
...Array.from({ length: 6 }, () => ({ outcome: 'miss', clv_result: null, grade: 'A-' })),
|
||||
...Array.from({ length: 3 }, () => ({ outcome: 'hit', clv_result: null, grade: 'B' })),
|
||||
];
|
||||
sb._state.selectResults = [rows];
|
||||
sb._state.countResult = 0;
|
||||
const agg = await ledger.getModelAggregate({ sb });
|
||||
expect(agg.by_tier.A.settled).toBe(20); // A + A- bucket together
|
||||
expect(agg.by_tier.A.hit_pct).toBe(70); // 14/(14+6)
|
||||
expect(agg.by_tier.B.settled).toBe(3);
|
||||
expect(agg.by_tier.B.hit_pct).toBeNull(); // under 20 → building
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user