Skip to content

Flip the business_cycle snapshots to repointed once lecture-wasm reads them (P4 block C) #146

Open

Description

@mmcky

Part of #118, the tracker for the wasm-dynamic-snapshots project. This is block C, this repo's half of lecture-wasm's adoption of the four business_cycle snapshots. When the lecture-wasm PR for QuantEcon/lecture-wasm#70 (block B) merges, that repo's lectures/business_cycle.md starts reading gdp_growth_annual.csv, unemployment_rate_annual.csv, private_credit_to_gdp.csv and us_business_cycle_monthly.csv, and the records here have to say so on the same day. The strict audit fails on a landed record that has a reader, and on a repointed record that has none, so there is no green state between B and C (AGENTS.md, "Repoint every consumer of a dataset together").

Gate: B merged. Land this the same day, and not across a Monday. Between the two merges, every push to main, the Monday 05:17 UTC audit run and any PR that touches a manifest go red, and the Pages deploy is skipped. The PR can be opened before B merges. Its audit-dashboard check scans lecture-wasm's main, so it stays red until B merges and then needs a re-run.

What the PR changes

  • The four manifests (lectures/<file>.yml): consumers becomes one entry, {repo: QuantEcon/lecture-wasm, file: lectures/business_cycle.md, on_refresh: <decided>}, replacing each "None yet" comment.
  • lectures/gdp_growth_annual.csv.yml: also rewrite the three comments that state facts a refresh has since changed, which AGENTS.md forbids: source.version, the comment above retrieved, and the comment above integrity.upstream.status.
  • migration.yml: the four records go from landed to repointed, each with repoints: [{repo: QuantEcon/lecture-wasm, pr: QuantEcon/lecture-wasm#<B>, date: <B's merge date>}]. Update the comment on the gdp_growth_annual.csv record too.
  • scripts/audit_annotations.yml: delete lecture-wasm:business_cycle:wbgapi and lecture-wasm:business_cycle:pandas_datareader, which do nothing once B turns the API-teaching cells into non-executing blocks. Also update the note on intro's pandas_datareader entry, which says the snapshot pipeline is unadopted.
  • CATALOG.md: regenerate it with python scripts/build_catalog.py, because the required consumed-files check fails on a stale catalog. The four files leave "awaiting repoint".
  • PLAN.md: record the flip on P4's line in Phase 8, and tick that line if the canary proof has closed. Record on the consumer fan-out line in Phase 5 that a consumer which executes at read time needs no dispatch, as lecture-wasm dynamic snapshots: business_cycle reads the four data-lectures snapshots (P4) #118 sets out under "Not in scope". docs: close-out tidy — status, convention pointers and stale facts after the migration #145 also edits PLAN.md, so rebase on whichever lands first.
  • If they are still there: delete the stale pending: P4 wave in migration.yml ("a maintained UNRATE twin"), which makes the migration page show "Wave P4" twice. Also rewrite the closing comment that says the final cutover is tracked at Phase 4 cutover: swap interim raw URLs → data.quantecon.org/lectures #15 and gated on DNS. D11 retired that cutover, and final now means qeld adoption.

Checks before merging

  • Dry-run the strict audit in both directions, which is the P3 wave's acceptance test recorded in migration.yml. Shallow-clone the eight lecture repos into repos/, with lecture-wasm at B's branch until B merges and at main afterwards. Then run python scripts/build_audit.py all --strict --repos-dir repos -o site. Expect exit 1 with the four records at landed and exit 0 with them at repointed.
  • In that run's site/, check three things: migration.html counts the four as migrated and shows one "Wave P4", and the migration legend on the overview page (index.html) has no negative count. The migration close-out corrects that legend while the four are still landed, so check that the correction holds after the flip.
  • validate-datasets is green. The shared validate() reads every manifest this PR edits.

The decision it records

on_refresh for lecture-wasm is rebuild when no prose in B's final text quotes a number a refresh can move, and review when some does (manifest-schema.yml). Proposed: rebuild. Consumer fan-out is out of scope, so the value sets nothing off: lecture-wasm executes in the reader's browser and reads raw/main at run time.

Done when the PR has merged and the next audit-dashboard run on main is green and deploys.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions