From 480ac4b9a97f840d7bc656a281a8529576080b13 Mon Sep 17 00:00:00 2001 From: Tudor Date: Mon, 5 Oct 2026 16:39:24 +0100 Subject: [PATCH] docs: plan names the session's trailer; spec reads the latest visit from dates 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 --- .../plans/2026-10-05-ofsted-current-status.md | 4 ++-- .../specs/2026-10-05-ofsted-current-status-design.md | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/superpowers/plans/2026-10-05-ofsted-current-status.md b/docs/superpowers/plans/2026-10-05-ofsted-current-status.md index d8944c8..8b68047 100644 --- a/docs/superpowers/plans/2026-10-05-ofsted-current-status.md +++ b/docs/superpowers/plans/2026-10-05-ofsted-current-status.md @@ -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 `; 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 " +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 "" ``` ### Task 3: `int_ofsted_latest` computes the current status diff --git a/docs/superpowers/specs/2026-10-05-ofsted-current-status-design.md b/docs/superpowers/specs/2026-10-05-ofsted-current-status-design.md index abee389..75dfb4f 100644 --- a/docs/superpowers/specs/2026-10-05-ofsted-current-status-design.md +++ b/docs/superpowers/specs/2026-10-05-ofsted-current-status-design.md @@ -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`