feat(pipeline): carry the report-card inspection's own date; pick newest MI file in discovery

The MI file's report-card grade columns belong to the latest FULL
inspection (col 'Inspection start date'), but inspection_date maps to the
legacy OEIF graded/ungraded dates — so report cards were being dated with
pre-Nov-2025 inspections. Also discover_csv_url() returned matches[0],
the oldest (2017) link on the GOV.UK page.

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 14:44:51 +01:00
co-authored by Claude Fable 5
parent 026a7ab6aa
commit e00a1b38a8
4 changed files with 59 additions and 6 deletions
@@ -34,6 +34,7 @@ select
rc_leadership_governance,
rc_early_years,
rc_sixth_form,
rc_inspection_date,
report_url
from ranked
where rn = 1