diff --git a/scripts/audit_annotations.yml b/scripts/audit_annotations.yml index 19ada0c..2841d17 100644 --- a/scripts/audit_annotations.yml +++ b/scripts/audit_annotations.yml @@ -22,9 +22,6 @@ datasets: description: ACS occupation summary provenance: constructed-lost note: construction (ACS filters, grouping, sorting) described in lecture prose only - assignat.xlsx: - description: Assignat issuance / price data, French Revolution - provenance: author-assembled bbh_macro_quarterly.csv: description: Macro quarterly series (Bhandari et al.) provenance: constructed-lost @@ -33,24 +30,10 @@ datasets: description: Michigan survey monthly series (Bhandari et al.) provenance: constructed-lost note: same Zenodo replication package; extraction not scripted - caron.npy: - description: French Revolution money balances (Caron) - provenance: author-assembled - note: hand-prepared NumPy array, no construction record - chapter_3.xlsx: - description: Hyperinflation tables, Sargent "Ends of Four Big Inflations" - provenance: author-assembled - note: hand-transcribed by authors dataBHS.mat: description: US consumption/income series, MATLAB replication bundle provenance: verbatim flags: [lectures-root] - dette.xlsx: - description: French government debt series - provenance: author-assembled - fig_3.xlsx: - description: French Revolution fiscal data - provenance: author-assembled fred_data.csv: description: FRED snapshot — GS1, GS5, GS10, DFII5, DFII10, USREC provenance: constructed-lost @@ -71,17 +54,6 @@ datasets: description: Hansen–Jagannathan (1991) asset-returns bundle provenance: constructed-lost note: lecture documents 3 sources (FRED yields deflated by CPIAUCSL, …); no build script - longprices.xls: - description: Long-run price levels (Sargent–Velde) - provenance: author-assembled - note: hand-transcribed by authors - mpd2020.xlsx: - description: Maddison Project Database 2020 (GDP per capita, long run) - provenance: verbatim - nom_balances.npy: - description: Nominal balances, French Revolution - provenance: author-assembled - note: hand-prepared NumPy array, no construction record test_pwt.csv: description: Penn World Table 7.0 extract provenance: author-assembled diff --git a/scripts/build_audit.py b/scripts/build_audit.py index 673a700..26bca89 100644 --- a/scripts/build_audit.py +++ b/scripts/build_audit.py @@ -354,6 +354,15 @@ def scan(repos_dir: Path): manifests = load_manifests() migration = load_yaml(MIGRATION) + # A migrated dataset's manifest is its source of truth, so it must NOT also + # carry an `audit_annotations.yml` entry (that file's own header states the + # rule). Nothing enforced it before: annotations are consulted only as a + # fallback when a manifest is absent, so a stale entry is inert at runtime + # and a green audit said nothing about the invariant. Computed from the two + # static sources rather than from the scan, so it still fires for a dataset + # no lecture currently references. + dual_recorded = sorted(set(manifests) & set(datasets_ann)) + repos, all_refs, all_api, unscanned_nb = {}, [], [], [] for name in SCAN_REPOS: res = scan_repo(name, repos_dir) @@ -540,6 +549,12 @@ def scan(repos_dir: Path): "missing_api_annotations": sorted(api_missing), "migration_inconsistencies": mig_problems, "unscanned_notebooks": sorted(unscanned_nb), + "dual_recorded": [ + f"{f}: has a lectures/{f}.yml manifest AND an " + f"audit_annotations.yml datasets: entry — delete the annotation, " + f"the manifest is the source of truth" + for f in dual_recorded + ], }, "stats": { "static_files": len(datasets),