docs: plan names the session's trailer; spec reads the latest visit from dates
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m14s
PR Checks / Backend Smoke (pull_request) Successful in 12s
PR Checks / Build Backend (no push) (pull_request) Successful in 18s
PR Checks / Build Frontend (no push) (pull_request) Successful in 1m27s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 53s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 27s

The plan hard-coded one model's Co-Authored-By trailer; an executor should use the one its own session specifies. The spec's report-card rule now matches int_ofsted_latest. Review on #183.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TudorandClaude Opus 5.5 committed 2026-10-05 16:39:24 +01:00
1 parent 93f17211b1
commit 480ac4b9a9
2 files changed
+8 -6

No files matched your search

@@ -17,7 +17,7 @@
- PR 2 must not be merged before `school_data_monthly_ofsted` has run on staging with PR 1, nor promoted before it has run on production.
- No compatibility code in the backend for marts built before PR 1 (agreed in brainstorming).
- Copy follows the site's factual rule: print what Ofsted published; no derived summaries. Dates in prose use long months ("14 March 2023").
- Commits end with `Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>`; PR bodies end with the Claude Code line. Never push to `main`.
- Commits end with the Co-Authored-By trailer the executing session's harness specifies (not a fixed model name); PR bodies end with the Claude Code line. Never push to `main`.
## Review Focus
@@ -289,7 +289,7 @@ Expected: unit tests PASS; `fact_ofsted_inspection`'s `not_null` on `inspection_
```bash
git add pipeline/transform/models/staging/stg_ofsted_inspections.sql pipeline/transform/models/staging/stg_ofsted_inspections.yml
git commit -m "feat(pipeline): keep Ofsted's graded, ungraded and report-card dates apart" -m "int_ofsted_latest needs to know which inspection came last. Report-card-only schools are no longer dropped; inspection_date stays for current readers and now falls back to the report-card date." -m "Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>"
git commit -m "feat(pipeline): keep Ofsted's graded, ungraded and report-card dates apart" -m "int_ofsted_latest needs to know which inspection came last. Report-card-only schools are no longer dropped; inspection_date stays for current readers and now falls back to the report-card date." -m "<the session's Co-Authored-By trailer>"
```
### Task 3: `int_ofsted_latest` computes the current status
@@ -81,10 +81,12 @@ Computed once per URN in `int_ofsted_latest`.
| Latest is ungraded, any other outcome ("Standards maintained", "Improved significantly", "Some aspects not as strong") | the graded inspection's overall grade if it is 1–4, else null | G when a grade is kept | `graded` when a grade is kept |
| No inspection | null | null | null |
Report cards began in November 2025, after the last legacy graded and ungraded
inspections, so when a school has a report card it is always the latest visit,
and no legacy grade stays in force beside it. Ties between G, U and RC on the
same date resolve in the order report card, graded, ungraded.
A report card replaced overall grades, so no legacy grade stays in force beside
one. The latest visit is read from the dates, not assumed: report cards began in
November 2025, after the last legacy graded and ungraded inspections, and in
Ofsted's 31 Aug 2026 data no school has a legacy visit newer than its report
card, but the rule does not depend on that. Ties between G, U and RC on the same
date resolve in the order report card, graded, ungraded.
Invariants: `current_grade` is null or 1–4; `current_grade_date <=
latest_visit_date`; `current_grade_basis` is null exactly when `current_grade`