fix(compare): census-sourced FSM/EAL benchmarks; never fall back across measure definitions

The FSM chip anchored against disadvantaged_pct (a different measure,
FSM6+CLA) whenever fsm_pct was null — which it always was, since the
performance df has no fsm_pct. New fact_census_benchmarks mart supplies
pupil-weighted FSM/EAL means per phase; the KS2-column medians that
produced a bogus 50% 'secondary disadvantaged' anchor are gone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
This commit is contained in:
Tudor
2026-07-16 19:05:15 +01:00
co-authored by Claude Fable 5
parent 9773483221
commit 1d855f3c17
7 changed files with 142 additions and 24 deletions
@@ -33,7 +33,10 @@ export function CompareCommunity({
const bench = isSecondary ? benchmarks?.secondary : benchmarks?.primary;
const fsmChip = (value: number | null) => {
const anchor = bench?.fsm_pct ?? bench?.disadvantaged_pct ?? null;
// FSM is anchored only against a real FSM benchmark (census-sourced,
// pupil-weighted). disadvantaged_pct is a different measure (FSM6+CLA)
// — never fall back across definitions; no anchor means no chip.
const anchor = bench?.fsm_pct ?? null;
if (value == null || anchor == null) return null;
const v = verdict(value, anchor, 3);
return (