From 4a65c8daae416f5f2d1bdfe3c3647dc2e90cd92e Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 17 Jul 2026 14:01:26 +1000 Subject: [PATCH 1/2] Freshness badge: say "audit ran", document the floored-day thresholds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every build re-runs the full scan, so the badge date IS the last audit run — the wording now says so ("audit ran / audit up to date — last ran …"), answering the natural reader question of whether the audit itself is automated (it is: weekly cron + on push + on dispatch). Also documents why the age thresholds floor to full calendar days rather than comparing raw milliseconds (Copilot's suggestion on #24): the run stamp is date-only at midnight UTC and the cron fires Mondays 05:17 UTC, so raw-ms "> 7 days" would flip the badge orange every Monday between 00:00 and the cron completing — a weekly false alarm. Floored days means orange = a full scheduled run has been missed. Follow-up to #24. Co-Authored-By: Claude Fable 5 --- scripts/render_audit.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/render_audit.py b/scripts/render_audit.py index 052f72f..41201a4 100644 --- a/scripts/render_audit.py +++ b/scripts/render_audit.py @@ -468,23 +468,26 @@ def render_index(audit: dict) -> str: Companion to the migration of lecture data into QuantEcon/data-lectures.

-● generated {esc(audit["generated"])} +title="Every build re-runs the full audit scan across the 8 lecture repos — this date IS the last audit run. It runs on every change to data-lectures, weekly on schedule, and on demand; a badge older than a week means the scheduled run has stopped succeeding."> +● audit ran {esc(audit["generated"])} From 090ee2add7961a4259ec4edd18d1859a297a2f51 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 17 Jul 2026 14:11:46 +1000 Subject: [PATCH 2/2] Derive the repo count in page copy from the audit payload The freshness tooltip and both page ledes hard-coded "8" repos; the count now comes from audit["repos"], so a manifest change to the scanned set cannot silently falsify the copy. Co-Authored-By: Claude Fable 5 --- scripts/render_audit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/render_audit.py b/scripts/render_audit.py index 41201a4..119f5b0 100644 --- a/scripts/render_audit.py +++ b/scripts/render_audit.py @@ -462,13 +462,13 @@ def render_index(audit: dict) -> str:

QuantEcon · generated data audit · Python lecture family

Lecture data — audit & migration dashboard

-

Every dataset referenced by lecture source across the 8 synced Python-family repos, +

Every dataset referenced by lecture source across the {len(audit["repos"])} synced Python-family repos, regenerated from each repo's main by a script — not maintained by hand. Companion to the migration of lecture data into QuantEcon/data-lectures.

+title="Every build re-runs the full audit scan across the {len(audit["repos"])} lecture repos — this date IS the last audit run. It runs on every change to data-lectures, weekly on schedule, and on demand; a badge older than a week means the scheduled run has stopped succeeding."> ● audit ran {esc(audit["generated"])}