Fixes the three must-fix findings from the Ofsted expert's sign-off review of the compare screen (primary + secondary + all-through pass).
M1 — All-through school's Year 7 round shown on the Primary tab
New admissionsForPhase helper selects the admissions round matching the active phase tab; a round tagged with the other phase is never substituted (untagged legacy rows are used only when no row carries a phase). Hessle's 433-forms-for-173-places Year 7 round no longer reads as Penshurst Primary's Reception odds. Honest fallbacks name the round: per-cell "We don't hold Reception/Year 7 admissions data for this school" and a phase-labelled section empty state. Applied to both the "Getting a place" section and the at-a-glance chip.
M2 — Ofsted sentinel code "9" rendered as a judgement; sixth-form judgement dropped
Legacy judgement lists now render only real grades (1–4), so "not applicable" sentinels (9 etc.) never appear as chips — and the sixth-form judgement, previously missing from the list entirely, renders for schools that have one (Bishop Stopford's real "Good" sixth form now shows; its "Early years provision — 9" is gone).
M3 — Primaries' distance template on secondary/selective schools
"What this means" is now phase- and type-aware, driven by admissions_policy (newly exposed in compare school_info) and religious_denomination:
Selective: "Entry is by entrance test — the school is selective; distance and preference rank don't decide places."
Secondary faith: "…check the school's admission criteria (faith-based criteria may apply)."
Secondary non-faith: "…(catchment or distance often decides, but criteria vary)."
Primary copy unchanged (reviewed mockup wording).
Tests: 12 new frontend tests (phase selection, sentinel filtering, per-type copy); e2e secondary journey now asserts the distance template never appears on a secondary comparison. 97 frontend + 52 backend green.
Remaining from the review: should-fixes S1–S7 (not in scope here) and the pending school_data_annual_ees DAG run for official KS4 national averages, with the expert's post-DAG verification list (Hessle's A8 chip must flip to "Below England average").
Fixes the three must-fix findings from the Ofsted expert's sign-off review of the compare screen (primary + secondary + all-through pass).
## M1 — All-through school's Year 7 round shown on the Primary tab
New `admissionsForPhase` helper selects the admissions round matching the active phase tab; a round tagged with the other phase is never substituted (untagged legacy rows are used only when no row carries a phase). Hessle's 433-forms-for-173-places Year 7 round no longer reads as Penshurst Primary's Reception odds. Honest fallbacks name the round: per-cell "We don't hold Reception/Year 7 admissions data for this school" and a phase-labelled section empty state. Applied to both the "Getting a place" section and the at-a-glance chip.
## M2 — Ofsted sentinel code "9" rendered as a judgement; sixth-form judgement dropped
Legacy judgement lists now render only real grades (1–4), so "not applicable" sentinels (9 etc.) never appear as chips — and the sixth-form judgement, previously missing from the list entirely, renders for schools that have one (Bishop Stopford's real "Good" sixth form now shows; its "Early years provision — 9" is gone).
## M3 — Primaries' distance template on secondary/selective schools
"What this means" is now phase- and type-aware, driven by `admissions_policy` (newly exposed in compare `school_info`) and `religious_denomination`:
- Selective: "Entry is by entrance test — the school is selective; distance and preference rank don't decide places."
- Secondary faith: "…check the school's admission criteria (faith-based criteria may apply)."
- Secondary non-faith: "…(catchment or distance often decides, but criteria vary)."
- Primary copy unchanged (reviewed mockup wording).
Tests: 12 new frontend tests (phase selection, sentinel filtering, per-type copy); e2e secondary journey now asserts the distance template never appears on a secondary comparison. 97 frontend + 52 backend green.
Remaining from the review: should-fixes S1–S7 (not in scope here) and the pending `school_data_annual_ees` DAG run for official KS4 national averages, with the expert's post-DAG verification list (Hessle's A8 chip must flip to "Below England average").
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
M1: admissions rounds are now selected by the active phase tab
(admissionsForPhase) — an all-through school's Year 7 round no longer
masquerades as Reception odds beside pure primaries; honest per-cell and
section fallbacks name the round (Reception / Year 7).
M2: Ofsted sentinel codes (9 = not applicable) never render as judgement
chips, and the sixth-form judgement — previously dropped — now renders
for schools that have one.
M3: 'What this means' is phase- and type-aware: selective schools get
entrance-test framing, secondary faith schools a faith-criteria note, and
the primaries' distance template never appears on the secondary tab
(admissions_policy now exposed in compare school_info).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
This PR makes the 'Getting a place' admissions section and Ofsted judgement detail phase- and school-type-aware: admissions rounds are now matched to the active phase tab (so an all-through school's Year 7 round never masquerades as Reception odds), selective/faith schools get tailored copy instead of the generic distance template, and Ofsted sentinel codes (9/0/8, meaning 'not applicable') are excluded from judgement chips while a previously-dropped sixth-form judgement is now shown. Backend, types, and components are consistently wired (admissions_policy and religious_denomination are real School fields verified against GIAS code dictionaries; sixth_form_provision was already loaded by the pipeline), and the change is backed by solid unit/component/e2e tests. No correctness, security, or deploy issues found.
✅ No issues found.
## 🤖 AI Code Review (Claude Code)
This PR makes the 'Getting a place' admissions section and Ofsted judgement detail phase- and school-type-aware: admissions rounds are now matched to the active phase tab (so an all-through school's Year 7 round never masquerades as Reception odds), selective/faith schools get tailored copy instead of the generic distance template, and Ofsted sentinel codes (9/0/8, meaning 'not applicable') are excluded from judgement chips while a previously-dropped sixth-form judgement is now shown. Backend, types, and components are consistently wired (admissions_policy and religious_denomination are real School fields verified against GIAS code dictionaries; sixth_form_provision was already loaded by the pipeline), and the change is backed by solid unit/component/e2e tests. No correctness, security, or deploy issues found.
✅ No issues found.
tudor
merged commit 64b63b96c8 into main2026-07-17 12:02:56 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes the three must-fix findings from the Ofsted expert's sign-off review of the compare screen (primary + secondary + all-through pass).
M1 — All-through school's Year 7 round shown on the Primary tab
New
admissionsForPhasehelper selects the admissions round matching the active phase tab; a round tagged with the other phase is never substituted (untagged legacy rows are used only when no row carries a phase). Hessle's 433-forms-for-173-places Year 7 round no longer reads as Penshurst Primary's Reception odds. Honest fallbacks name the round: per-cell "We don't hold Reception/Year 7 admissions data for this school" and a phase-labelled section empty state. Applied to both the "Getting a place" section and the at-a-glance chip.M2 — Ofsted sentinel code "9" rendered as a judgement; sixth-form judgement dropped
Legacy judgement lists now render only real grades (1–4), so "not applicable" sentinels (9 etc.) never appear as chips — and the sixth-form judgement, previously missing from the list entirely, renders for schools that have one (Bishop Stopford's real "Good" sixth form now shows; its "Early years provision — 9" is gone).
M3 — Primaries' distance template on secondary/selective schools
"What this means" is now phase- and type-aware, driven by
admissions_policy(newly exposed in compareschool_info) andreligious_denomination:Tests: 12 new frontend tests (phase selection, sentinel filtering, per-type copy); e2e secondary journey now asserts the distance template never appears on a secondary comparison. 97 frontend + 52 backend green.
Remaining from the review: should-fixes S1–S7 (not in scope here) and the pending
school_data_annual_eesDAG run for official KS4 national averages, with the expert's post-DAG verification list (Hessle's A8 chip must flip to "Below England average").🤖 Generated with Claude Code
https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB
🤖 AI Code Review (Claude Code)
This PR makes the 'Getting a place' admissions section and Ofsted judgement detail phase- and school-type-aware: admissions rounds are now matched to the active phase tab (so an all-through school's Year 7 round never masquerades as Reception odds), selective/faith schools get tailored copy instead of the generic distance template, and Ofsted sentinel codes (9/0/8, meaning 'not applicable') are excluded from judgement chips while a previously-dropped sixth-form judgement is now shown. Backend, types, and components are consistently wired (admissions_policy and religious_denomination are real School fields verified against GIAS code dictionaries; sixth_form_provision was already loaded by the pipeline), and the change is backed by solid unit/component/e2e tests. No correctness, security, or deploy issues found.
✅ No issues found.