Skip to content

PLAN: pilot migration — one dataset per hosting pattern to validate the datasets design #338

Open

Description

@mmcky

Part of #336. Before graduating the datasets convention to a QEP, this issue proposes a pilot: migrate one dataset per hosting pattern, chosen as the hardest representative of each class, so the design decisions get validated empirically and the edge cases surface before we write them into a standard.

Where the plan comes from

A full audit of the 7 Python lecture repos (2026-07-15) produced a complete registry of dataset usage. Headline numbers:

Metric Count
Distinct static data files referenced by lectures 34
Data files committed across the repos 50 (20 unreferenced)
GitHub raw-URL spellings in production 6
References into the dormant pre-MyST lecture-python repo 8
Lectures fetching live API data (wbgapi, FRED ×3 access methods, yfinance) 11
Lectures referencing QuantEcon/data (which already holds 10 intro files) 0

Provenance split of the 34 files: 7 constructed with a committed builder script, 5 constructed but the pipeline was never committed, 7 verbatim third-party files, 14 author-assembled with no pipeline, 1 toy.

Working assumptions under test

The pilot adopts the current #336 direction as a strawman and tests it: canonical repo per the rename/repurpose decision, served at stable URLs (the data.quantecon.org/lectures proposal), flat layout, main pinning with corrections-in-place / new-vintages-as-new-files. If any assumption fails in practice, that is a pilot finding, not a pilot failure.

The four pilots

P1 — local-path static (simplest, first): lingcod_msy_recovery.csv, read by msy_fishery in lecture-python-intro via a relative path today.
Must answer: does the migrated lecture build green in a single PR (motivation 1 in #336)? Does the downloaded notebook run in Colab unchanged (motivation 8)? What catalog metadata does an author-assembled file need?

P2 — cross-series shared static: the pandas_panel trio (realwage.csv, countries.csv, employ.csv), used by the same lecture in lecture-python-programming and lecture-python.myst, currently fetched mostly from the dormant legacy repo.
Must answer: does the flat namespace work when two series consume one file? Does one data-repo PR cleanly update two lecture repos? This pilot also retires 5 of the 8 legacy-repo references as a side effect.

P3 — external-repo static with LFS: the heavy_tails set (forbes-global2000.csv, forbes-billionaires.csv, cities_us.csv, cities_brazil.csv) plus the SCF pair from high_dim_data.
Must answer: does the serve-it-ourselves URL make the raw-vs-media LFS trap fully invisible (open question 4 in #336)? Does the Pages deploy handle LFS objects correctly (lfs: true checkout)? Do constructed files' builders (webscrape_forbes.ipynb, generating_mini.md) migrate alongside the data?

P4 — dynamic snapshot twin (most new machinery, last): UNRATE, consumed today by 4 lectures across 3 repos via 2 different access methods.
Must answer: the full dynamic-data template — a per-dataset manifest (source, series ID, license, cadence, schema, consumers), a build script with fetch → pre-process → validate → write stages, a scheduled GitHub Action that lands refreshes as reviewable PRs, and a "sources alive" canary that detects upstream breakage in the data repo instead of in lecture CI. Also: what is the documented mechanism for a lecture to switch between the live call (where the API is the pedagogy) and the snapshot twin?

Success criteria

  • Each migrated lecture builds green under -nW in a single PR, with no two-step merge
  • Downloaded notebooks run in Colab without edits
  • A pyodide/JupyterLite fetch of each migrated URL succeeds (CORS — relates to the WASM work in [Plan/Idea] Supporting WASM based introductory series #143)
  • P4's refresh workflow produces a reviewable PR with a meaningful diff summary, and its canary catches an induced failure
  • Every decision exercised gets written into the draft styleguide/datasets.md as it is validated

Out of scope

  • Bulk sweep of the remaining ~25 files (mechanical once the convention is proven)
  • The %%file-embedded toy datasets (5 files — proposal: these stay embedded in lecture source by design)
  • Recovering pipelines for the 5 constructed-but-unscripted files and licensing review for rehosting third-party files — both need their own passes and should be recorded as QEP follow-ups

Sequence and exit

P1 → P2 → P3 → P4, each a small PR set (data repo + consuming lecture repos). Exit: findings folded into the draft manual page, then the QEP gets written recording a convention that has already worked, with the remaining sweep as its rollout checklist.

Activity

  1. mmcky commented on Jul 16, 2026

    @mmcky
    ContributorAuthor

    P1 built and in review — 2026-07-16

    P1 (local-path static, lingcod / msy_fishery): QuantEcon/data-lectures#12 (data + first manifest) → QuantEcon/lecture-python-intro#792 (lecture repoint). #792 is a draft until #12 lands, stacked behind the flat-tree restructure in QuantEcon/data-lectures#10.

    Exit tests

    • Downloaded notebook runs unchanged — and P1 fixed this rather than preserving it. The read was a relative path (pd.read_csv('datasets/lingcod_msy_recovery.csv')), which only resolves inside a repo checkout, so the cell raised FileNotFoundError in Colab. Reading over https is what makes the notebook self-contained. Verified by running the lecture's own cell against the data over https: 82 rows, figure renders, terminal-year null handled.
    • Output unchanged — the migrated file is byte-identical to the copy removed from intro (sha256 fc2f873f…), checked before the repoint.
    • Single-PR green build under -nW — blocked on merge order, which is the pilot's main finding (below).
    • pyodide/JupyterLite CORS check — not done.

    What P1 actually validated

    Filed in full on QuantEcon/QuantEcon.manual#108. In short, the first real file broke the schema sketch in three places and exposed one process gap:

    The merge order is load-bearing. The data repo's README promises "the lecture PR builds green immediately, no two-step merge" — true, but only once the data is on the data repo's default branch. Probed live: the main URL 404s, the branch URL returns 200. The branch shortcut is right there and would turn #792 green instantly — and it is precisely the bug #337 risk 1 was: a lecture pinned to a non-default branch since 2023, which turned out to live in four repos and 404'd all four the moment the branch was auto-deleted on merge. So: data PR first, lecture PR second, never a non-default ref even temporarily.

    Integrity is two questions. Lingcod is a byte-perfect copy of what the lecture consumes and its upstream provenance cannot be re-derived at all — no stock id, no database version, no builder. Both true at once, so integrity split into migration and upstream, with unverifiable plus a reason as a legitimate value.

    A constructed dataset with no builder needs somewhere to say so. Lingcod is one — the exact bug AGENTS.md names. The tempting fix is relabelling it verbatim, which makes the manifest lie. builder_status: unrecovered keeps it visible in the catalog and makes the Phase 9 backlog machine-countable.

    Licences: check the DOI record, not the homepage. RAM Legacy is CC BY 4.0 and the extract is redistributable — but ramlegacy.org states no licence at all; the authority is the Zenodo record behind its DOI.

    P2 is better positioned than it was

    P2's scope was understated in one direction and overstated in another. The trio is referenced by more repos than the two listed here — but the extra ones are translations, and they self-heal: QuantEcon/action-translation syncs them from the English sources as PRs, verified today when merging QuantEcon/lecture-python-programming#576 opened sync PRs in .fa, .fr and .zh-cn within seconds. So P2 remains a two-repo job, as planned.

    What did change: the trio no longer reads from the dormant QuantEcon/lecture-python repo. QuantEcon/lecture-python.myst#968 and QuantEcon/lecture-python-programming#576 repointed all five references to own-repo copies (byte-compared, published), which was #337 risk 2. P2 therefore starts from a clean base and is a straight migration rather than a migration tangled with a legacy-repo retirement.

  2. mmcky commented on Jul 16, 2026

    @mmcky
    ContributorAuthor

    P1 status: data half merged — provisional decisions as they now stand

    The data-repo half of P1 has landed (QuantEcon/data-lectures#12, on top of the Phase 2 flatten in QuantEcon/data-lectures#10). The paired lecture repoint QuantEcon/lecture-python-intro#792 is still open — the "builds green in a single PR" and Colab criteria ride with it. The schema evolved during review, so this comment records the P1 decision set as merged, superseding the intermediate states described in earlier commit messages. All of it is provisional until folded into QuantEcon/QuantEcon.manual#108.

    What P1 answered: "what catalog metadata does an author-assembled file need?"

    More than the sketch had, and less prose than the first draft used. The pilot file was a productively hard case: a byte-perfect copy of what the lecture consumes, whose upstream provenance cannot be re-derived (no stock id, no database version, no transformation recorded, no builder committed).

    Decision Substance
    Sidecar manifests, full-filename keyed lectures/<filename>.yml next to the data, so a file cannot move without its metadata and CI can assert the pairing with a glob. Full filename (fig_3.xlsx.yml, not fig_3.yml) because stems collide across formats
    Licence: dated, against a named authority ramlegacy.org states no licence at all; the authority is the Zenodo record behind its DOI (cc-by-4.0, open). So license.verified records when and against what a licence was established — an undated claim is not evidence. Established once per source, not per file
    Cache-not-host framing The repo is a stability cache for lecture builds, with attribution carried in every manifest's source block — not a content-distribution host. Redistribution is a cheap binary gate (permitted | restricted): a fast yes for public data sources, blocking only genuinely restricted ones (e.g. FRED third-party series)
    Integrity: one manifest axis P1 proved migration safety ("byte-identical to what the lecture consumed?") and upstream authenticity ("is this what the source says?") are independent questions with different answers. Final resolution: the manifest carries integrity.upstream only (status / date / against / optional one-line note) plus sha256; the migration check is a one-time gate recorded in the repoint PR, reproducible later from the hash. The free-text method field is retired — the generic how-to-verify recipe lives once in AGENTS.md
    Honest unknowns are known statuses status: unverifiable with a one-line note ("cannot be re-derived — trust rests on author provenance") is what the catalog should show; silence is not
    Inherited-file states retrieved: null for inherited-undated bytes (never reconstructed from git history — that dates acquisition, not retrieval), paired with the upstream note. builder_status: unrecovered keeps class: constructed honest instead of misclassifying to verbatim — the P1 file is one of the 5 constructed-but-unscripted files this issue already tracks
    known_nulls F/Fmsy is legitimately null in the terminal assessment year; declaring expected nulls lets validation enforce "no unexpected nulls" without a blanket rule rejecting correct files
    Effort scales with messiness Capture rich provenance whenever the source provides it; a missing field is recorded as a reasoned gap, never a bar to landing a useful dataset. A clean verbatim file now carries a three-line integrity block with zero prose

    Parked for Phase 5, with research attached

    Builder architecture is documented in QuantEcon/data-lectures#14: the four-stage template (traceback-clean failures, atomic writes, manifest-driven validation), the notebook policy (jupytext .py twin as the committed builder; papermill only as fallback), and the schema decisions the invariant tests will force (column patterns for wide files, known_nulls exact-vs-ceiling, canonical dtype vocabulary). P2 is the natural place to test those three against a second real file.

    Next

    P1 closes when QuantEcon/lecture-python-intro#792 merges and the lecture builds green. Then P2 (the pandas_panel trio), which additionally tests the flat namespace under two consuming series and the cross-repo update flow.

  3. mmcky commented on Jul 17, 2026

    @mmcky
    ContributorAuthor

    P1 complete — the repo is live

    Both halves merged: data QuantEcon/data-lectures#12, repoint QuantEcon/lecture-python-intro#792 (2026-07-17). msy_fishery now reads lectures/lingcod_msy_recovery.csv from raw/main at build time — the first production consumer, so published filenames in data-lectures are an API from this point.

    Success criteria

    Criterion Result
    Migrated lecture builds green in a single PR ✅ test passed (8m49s) on the repoint PR itself — no two-step merge
    Downloaded notebook runs in Colab unchanged ✅ by construction — the public URL replaces the relative path that was precisely what broke downloaded notebooks; the served URL is verified byte-identical to the manifest sha256
    pyodide/JupyterLite fetch (CORS) ⬜ open — tracked as its own Phase 8 bullet, relates to meta#143
    Catalog metadata for an author-assembled file ✅ answered — see the decision-set comment above

    Machinery P1 added that the pilot plan didn't originally list

    Going live surfaced an operational gap: the plan gated the first repoint on data integrity (byte-compare) but on no operational guardrail. Closed before #792 merged:

    • Branch protection (protect-main ruleset): PRs only, zero approvals (solo-maintainer friendly), force-push and deletion blocked — raw/main is production now, so a force-push is a lecture outage.
    • Consumed-file check (Add the consumed-file check — the go-live CI guardrail data-lectures#16, first CI in the repo): every manifest with a non-empty consumers list must have its data file present and byte-matching its recorded sha256; made a required status check, so a PR that breaks a consumed file cannot merge. The narrowest guardrail — the full Phase 5 validation suite subsumes it later.
    • PLAN's ordering note now names the go-live guardrails as a Phase 8 prerequisite, so P2–P4 inherit the gate for free.

    Next

    P2 — the pandas_panel trio (realwage.csv, countries.csv, employ.csv), consumed by the same lecture in lecture-python-programming and lecture-python.myst. New questions it tests beyond P1: the flat namespace with two consuming series, one data PR updating two lecture repos, and (per the schema-implications list in QuantEcon/data-lectures#14) column patterns, known_nulls semantics and dtype vocabulary against a second real file. It also retires 5 of the 8 legacy-repo references as a side effect.

  4. mmcky commented on Aug 6, 2026

    @mmcky
    ContributorAuthor

    Pilot status — 2026-08-07

    P1 and P2 are complete. P3's central question has been dissolved by a storage decision rather than answered by a pilot. P4 is still not started and is now explicitly blocked on two decisions tracked elsewhere. Along the way the pilots disproved three things this plan asserted, and those are the more useful half of this report.

    Where each pilot stands

    Pilot Meant to validate Status Landed as
    P1 — local-path static (lingcod_msy_recovery.csv) single-PR green build under -nW; downloaded notebook runs in Colab unchanged; what catalog metadata an author-assembled file needs complete 2026-07-17 data QuantEcon/data-lectures#12 → repoint QuantEcon/lecture-python-intro#792
    P2 — cross-series shared static (realwage.csv, countries.csv, employ.csv) does a flat namespace work with two consuming series; does one data PR cleanly update two lecture repos complete 2026-07-17 data QuantEcon/data-lectures#17 → repoints QuantEcon/lecture-python-programming#578 + QuantEcon/lecture-python.myst#973
    P3 — external-repo static with LFS (Forbes ×2, cities ×2, SCF ×2) does serving it ourselves make the raw-vs-media LFS trap invisible; does Pages handle LFS; do the builders migrate alongside not started — and both premises inverted, see below —
    P4 — dynamic snapshot twin (UNRATE) the full dynamic template: manifest, four-stage builder, refresh-as-PR, canary, and the documented live-call ↔ snapshot switch not started, blocked on QuantEcon/data-lectures#14 and QuantEcon/data-lectures#26 —

    P2's completion was never reported here; it landed the same day as P1, ninety minutes after it (repoint QuantEcon/lecture-python-intro#792 merged 2026-07-17T00:31Z, the P2 repoints 2026-07-17T02:02Z). The convention has since carried well past the pilots: 18 sidecar manifests in the published tree, 13 datasets repointed and 5 landed in migration.yml, and a separate "P5" cohort of six genuinely-new datasets (ames_house_prices.csv, japan_deaths_by_age.csv, us_adult_heights.csv, epl_match_goals.csv, japan_earthquakes.csv, japan_population_by_age.csv) that this plan does not define — they arrived through QuantEcon/data-lectures#27, #31 and #33 and repointed via QuantEcon/lecture-python-intro#811, #814 and #821.

    What P1 and P2 actually validated

    Merge order is load-bearing, and it is the single most transferable finding. The data PR must land on the default branch before the lecture PR references it: a P1 probe of …/data-lectures/raw/main/lectures/lingcod_msy_recovery.csv 404s while the data still sits on a branch. That is the mechanism behind the "single-PR green build" criterion, not a happy accident of it.

    Integrity is two questions with different answers. P1 produced a byte-perfect copy of what the lecture consumed while its upstream provenance stayed unrecoverable. That is why the manifest carries integrity.upstream only; the migration-safety check is a one-time gate recorded in the repoint PR, reproducible afterwards from integrity.sha256. An earlier proposal to split the manifest into integrity.migration + integrity.upstream was retracted the next day and should not be revived.

    builder_status: unrecovered beats mislabelling. A constructed file whose builder is lost stays constructed with an honest status; reclassifying it verbatim to dodge the rule is misclassification. Seven of the 18 manifests sit at unrecovered today, and us_adult_heights.csv is the counter-case — its builder was recovered, reproduces the sha256 exactly, and landed as committed.

    Licence authority is the DOI or Zenodo record, not the project homepage, recorded with a date (license.verified).

    Translations self-heal, so a repoint stays a same-family job. action-translation opened sync PRs in the .fa/.fr/.zh-cn editions within seconds of QuantEcon/lecture-python-programming#576 merging.

    The storage decision that dissolves most of P3

    P3 asked two LFS questions. Both are now moot, and one is inverted.

    The published tree stays 100% plain git. The two files that drove the LFS requirement do not need it: SCF_plus_mini.csv is 31.3 MiB and SCF_plus_mini_no_weights.csv is 72.4 MiB — both comfortably under GitHub's 100 MiB blob limit. LFS is scoped by path to a sources/ tree that holds exactly one file, SCF_plus.dta (99.1 MiB), which is a builder input, not a dataset: no lecture reads it, it is never served, it gets no sidecar manifest, and its provenance lives in sources/README.md instead. So P3's first question — "does the serve-it-ourselves URL make the raw-vs-media trap invisible?" — is answered by removing the trap rather than hiding it. Its second — "does the Pages deploy handle LFS correctly with lfs: true?" — reverses: the plan now sets the Pages checkout to lfs: false once sources/ exists, so a 99 MiB .dta is not pulled on every dashboard build (push-to-main plus weekly).

    A blanket LFS rule is specifically the thing to avoid. high_dim_data's .gitattributes tracks *.csv and *.dta, so every CSV in it — including a 130-byte teaching extract — is an LFS pointer served only from media.githubusercontent.com. That is why enabling LFS on an existing path is a consumer-visible break: raw.githubusercontent.com then returns pointer text, and the consumer fails with a confusing parse error rather than a 404. Per-path LFS on a tree nobody reads has no such blast radius.

    But the fold inverts the trap rather than ending it, and this is the operational finding for whoever runs P3. Measured 2026-08-07: media.githubusercontent.com serves only LFS objects and 404s on plain-git files — raw.githubusercontent.com/QuantEcon/data-lectures/main/lectures/mpd2020.xlsx returns 200 while the same path on the media host returns 404. Both hosts send access-control-allow-origin: *, so this is host routing, not CORS. Because the six high_dim_data datasets are LFS-tracked today, every consuming read currently uses the media host — and after the fold the media host will 404 for them. Every read must change host as well as org and repo. A mechanical org/repo swap that preserves the host produces a 404 on all of them. There are 14 such reads across lecture-python-intro and lecture-wasm (heavy_tails.md ×4 in each, mle.md, inequality.md, and _static/lecture_specific/inequality/data.ipynb in each) — 12 on the media host, 2 on the github.com/*/raw/ redirect form.

    high_dim_data also cannot be archived on the current shape: its SCF builder generating_mini.md reads its own input over the network from the repo being retired (pd.read_stata('https://github.com/QuantEcon/high_dim_data/blob/main/SCF_plus/SCF_plus.dta?raw=true')). Repointing that at sources/ is a precondition, not a tidy-up — otherwise archiving re-introduces exactly the legacy-repo dependency #337 drove to zero. For the record, the branch-pin risk in #337 is closed: high_dim_data now has main as its only branch.

    The fetch layer for P4, now tracked separately

    pandas_datareader is maintained again — 0.11.0 (2026-06-23) and 0.11.1 (2026-06-24), including a new pandas_datareader.macro API. The question of whether that becomes the standard builder entry point is now QuantEcon/data-lectures#26, and its recommendation is no, and probably not for UNRATE: the four-stage builder contract is already the right level of abstraction (a fetch stage is typically five lines), two releases in one week after five years dormant is not a track record, and for UNRATE a plain HTTP GET on fredgraph.csv needs no dependency at all — writing P4 against read_macro would be adding a dependency to replace a URL. That thread independently confirms this plan's own "prefer a direct CSV endpoint over a wrapper library" line, and it obsoletes #160's premise that the package is unmaintained.

    P4 is additionally blocked on three schema decisions in QuantEcon/data-lectures#14 — column patterns for wide year-keyed tables, exact-vs-ceiling known_nulls, and a canonical dtype spelling — because the builder's validate() reads the sidecar manifest as its specification, so an imprecise sidecar is an unwritable builder.

    What the pilots disproved or revised

    1. "The bulk sweep of the remaining files is mechanical once the convention is proven" — false. The sweep produced five repoint rules, three of them learned the hard way twice, and one reader-facing breakage. Nothing about it was mechanical.

    2. "The lecture PR builds green immediately, no two-step merge" — false as written. A repoint is three or four PRs, not one: data PR → sibling repoint → primary repoint → a separate deletion PR. lecture-python-intro publishes on a publish* tag, not on push to main, so merging a repoint does not refresh the live site. On 2026-08-06 the notebook served at intro.quantecon.org still fetched …/lecture-python-intro/raw/main/lectures/datasets/mpd2020.xlsx after QuantEcon/lecture-python-intro#823 merged and the file was gone. Rendered HTML is fine (figures bake at build time); the breakage is confined to the downloadable notebook, the Colab link and {download} targets. The rule is now repoint, publish, then delete — visible in that session's ordering: #823 merged 05:48Z, the publish released 06:44Z, #824 merged 07:26Z, its publish released 07:53Z, and the deletion QuantEcon/lecture-python-intro#825 landed 08:06Z. Seven of the eight lecture repos are tag-triggered; only lecture-wasm publishes on push to main and needs no split.

    3. "Pick one URL form" — picked, adopted everywhere, then found wrong for one runtime. lecture-wasm executes code cells in the reader's browser (JupyterLite/Pyodide), so every pd.read_*(url) is a CORS-checked cross-origin fetch on every redirect hop. github.com/<org>/<repo>/raw/… is a 302 whose response carries an empty access-control-allow-origin, so the browser rejects it before following. The correct rule is two forms keyed by consumer runtime: CPython consumers may use any resolving form; browser consumers must use raw.githubusercontent.com (or media.githubusercontent.com/media/… for LFS). This was not theoretical — the Track A repoints normalised wasm onto intro's github.com/…/raw/ form and broke long_run_growth and inflation_history on the wasm site. Found by an independent validation pass, tracked as QuantEcon/data-lectures#46, with the repair landing in QuantEcon/lecture-wasm#54 (merged 2026-08-06). Nothing in CI could catch it: the break exists only inside a browser, and the static pages still return 200 because the wasm build bakes no outputs. A post-merge net now exists (QuantEcon/data-lectures#48) but it is a net, not a gate — it scans each repo's main.

    4. Three provenance classes were not enough vocabulary. mpd2020.xlsx forced a fourth upstream status, diverged, plus delta_kind/delta/delta_evidence/register: three header labels on the Regional data sheet are locally edited, and because long_run_growth reads that sheet with header=(0,1,2) the edits are load-bearing — swapping in a pristine upstream copy would silently change the plot with no error. The general rule this produced: a migration moves bytes; it does not update them. Deltas are recorded in the manifest and in the register QuantEcon/data-lectures#39, and reviewed after the migration completes.

    5. Licensing does not gate migration for inherited data. This plan's checklist step 1 ("confirm the licence permits redistribution" before adding) is superseded for anything the lecture repos already serve publicly: migrate with the licence recorded as found, including redistribution: restricted and name: null. The gate moved to promoting data.quantecon.org as a public open-data host. Live instance: countries.csv (Proprietary — © WorldData.info, all rights reserved), migrated with a license.note and logged at QuantEcon/workspace-lectures#20. Genuinely new datasets still establish their licence first — that is what the P5 cohort did.

    6. The metadata question P1 was posed grew well past the seven fields drafted here — identity fields, a class field, the whole integrity block, builder/builder_status, license.redistribution/verified, schema.known_nulls/row_count_floor/date_range, and a sidecar placement rule keyed on the full filename (fig_3.xlsx.yml, not fig_3.yml, because fig_3.xlsx and fig_3.ods collide). Real manifests are ahead of the schema file by a further set of fields (license.note, source.doi, source.version, consumers.repo/consumers.file, the whole schema.sheets block, schema.read_as, schema.shape), most consequentially schema.positional_reads — three workbooks are read by cell position, so padding rows and columns outside the read block are part of the published contract.

    Open against this issue

    The pyodide/JupyterLite success criterion is met on the host (quantecon.github.io/data-lectures/… returns access-control-allow-origin: *, verified 2026-08-06) and simultaneously proven insufficient — the constraint is the URL form, not the host. The remaining boxes are P3, P4, and the one this plan named that has not happened at all: every validated decision was to be written into the draft styleguide/datasets.md as it was validated, and that file does not exist on the manual's main at all — it lives only in the single commit of 2026-07-15 on QuantEcon/QuantEcon.manual#108, still an open draft PR with no commits added since; everything above lives only in issue comments and in PLAN.md.

  5. mmcky commented on Aug 10, 2026

    @mmcky
    ContributorAuthor

    P3 reframed — two of its questions are no longer runnable, and one is inverted

    Recording this because #338 is still open and is the pilot's canonical scope, so anyone taking scope from it would now run a test that contradicts the shipped configuration.

    P3 asks two questions about the LFS case: "does the serve-it-ourselves URL make the raw-vs-media LFS trap fully invisible?" and "does the Pages deploy handle LFS objects correctly (lfs: true checkout)?"

    The first is unrunnable by construction. The storage decision (2026-08-06) keeps the published tree 100% plain git, so the trap is removed rather than hidden — and for the repoint it inverts: consumers already on the media host must be moved off it, because that host 404s plain-git files. That is 17 live reads, not a hypothetical.

    The second is inverted. Both workflow checkouts are now lfs: false by design (QuantEcon/data-lectures#57). That is the assertion, not a saving: if a lectures/ file is ever LFS-tracked by mistake, the checker hashes the pointer and goes red, and Pages deploys the same pointer bytes a reader would get from raw.githubusercontent.com. With lfs: true it would fetch the real bytes, pass green, and publish a file that resolves correctly only from Pages — one path, two hosts, disagreeing.

    What P3 actually tests now: host migration across three consuming repos, one of which no audit can see; per-path LFS confined to sources/, which nothing serves; and whether notebook-form builders can migrate alongside their data — which is unsettled, at QuantEcon/data-lectures#14, and is currently the only thing gating the fold.

    Full storage reasoning, limits and the ladder above 100 MiB: QuantEcon/data-lectures#58.

  6. mmcky commented on Aug 10, 2026

    @mmcky
    ContributorAuthor

    P3's data half is complete — and it has already disproved three things that were not on its test list

    The high_dim_data fold landed 2026-08-10 in QuantEcon/data-lectures#62 (six datasets, manifests, migration records, both builders) and QuantEcon/data-lectures#63 (sources/SCF_plus.dta, its audit trail, and a CI gate over it). The consuming repoints are still open, so P3 is not finished — but the data-repo side is done and the pilot has produced findings worth folding into manual#108 now rather than at the end.

    What P3 was reframed to test, and how each came out

    Test Result
    Host migration off media.githubusercontent.com (repoint rule 6) Confirmed in production. The media host now returns 404 for these paths under data-lectures while raw serves them, and high_dim_data still returns 200 for the originals
    Per-path LFS confined to sources/ Holds. sources/ returns 404 on Pages; lectures/ is 100% plain git and every published file serves real bytes, not pointer text
    Builders migrating alongside their data Holds, and turned out to be mandatory rather than tidy — see below

    Three findings that were not on the list

    1. A constructed dataset's builder must land in the same PR as its data. The plan split them across B1 (data) and B2 (builders). That is not possible: check_consumed_files.py asserts that a committed* builder_status names a builder and that the path resolves inside the repo, so a data-only PR either fails the required check or has to misrecord four manifests as unrecovered — which would be false, since the builders exist and are recoverable. This is a convention finding, not a local accident, and belongs in the standard: the builder is part of the dataset's landing, not a follow-up.

    2. builder_status: committed-frozen earned its place immediately. Both migrated builders are frozen — an undocumented scraper and a notebook whose writes are commented out upstream — and neither committed nor unrecovered was true of either. More usefully, freezing them forced a discipline that paid off: Copilot flagged three genuine defects in webscrape_forbes.ipynb (a dead ./sources mkdir, a plain-http:// endpoint, a to_csv missing index=None), and the right answer was to record all three in the manifests rather than fix them in the artifact. Fixing them would have made it a better program and a worse record. That distinction is worth stating explicitly in the standard.

    3. Verifying an LFS-tracked upstream costs nothing. A pointer's oid is the object's sha256. So byte-comparing seven files totalling ~215 MB against high_dim_data required no second download, and the sources/ CI gate verifies a 99 MiB object under a lfs: false checkout at zero LFS bandwidth. Any convention that says "verify against upstream" should say this, because the naive reading is expensive enough that people skip it.

    One provenance finding with teeth

    forbes-billionaires.csv is not the 2020 snapshot that both its upstream README and the consuming lecture describe. Its timestamp column holds 282 distinct values spanning 2020-04-07 to 2023-04-15, and the committed builder's only active request asks for a single year — so the notebook as committed did not produce that file.

    The reason this matters for the standard: integrity.upstream.status: unverifiable was already the honest value, but it was reached by reasoning ("frozen builder, undocumented API, nothing to re-fetch"). The timestamp spread makes it evidenced. A vocabulary that distinguishes those two would be more useful than one that does not — an unverifiable backed by a measurement is a different claim from one backed by an argument.

    Separately, SCF_plus_mini_no_weights.csv truncates the top of the wealth distribution — rounding a survey weight to zero drops the household, so maximum net wealth falls from 2,928,346,000 to 48,765,100 against its weighted twin. A derived extract can differ from its parent in ways no schema field captures, which argues for a free-text shape note as a first-class part of the manifest rather than a comment.

    Status

    P1 ✅, P2 ✅, P3 data half ✅ / repoints open, P4 not started. The repoints are sequenced on QuantEcon/workspace-lectures#23 and currently gated on a translation-repo PR audit.

  7. mmcky commented on Sep 30, 2026

    @mmcky
    ContributorAuthor

    P4, 2026-09-30: the canary catches an induced failure. On a throwaway branch of data-lectures, a validation failure (exit 2) was induced by narrowing UNRATE's band in builders/business_cycle_fred.py to (0, 1), and the refresh workflow was dispatched against it twice. Run 36654189187 failed the canary with exit 2 and opened an upstream-break issue that classifies the failure as validation (QuantEcon/data-lectures#150). Run 36654357802 ran with force: true, so the file counted as due. It failed the same way, commented on that issue instead of opening another, and skipped the refresh job. So a failing canary keeps a refresh from running even when one is due. The fetch class (exit 1) had already been caught for real on 2026-09-01, in a FRED timeout (QuantEcon/data-lectures#115).

    That meets the canary half of P4's success criterion. The other half, a reviewable refresh PR with a meaningful diff summary, rests on QuantEcon/data-lectures#112, merged 2026-09-01 for the World Bank GDP-growth file. The FRED file's first scheduled refresh PR should open on Monday 2026-10-05. The evidence is on QuantEcon/data-lectures#147. The rest of P4, lecture-wasm's adoption of the four business_cycle snapshots, is tracked in QuantEcon/data-lectures#118.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions