Repository navigation
Description
Surfaced by the v0.8.0 validation study.
Problem
Containers are covered end-to-end (build-containers.yml → test-container.yml / test-containers-lectures.yml), and since v0.10.0 so are the cache and environment actions, on the PR's own code. Untested: the publish and preview layer, plus the @v0 sibling-pin chain only a released ref can reach.
Coverage — harness (.github/workflows/test-actions.yml, via uses: ./; bare :N are its lines) / canary (QuantEcon/test-actions-lecture-intro, pinned @v0):
restore-jupyter-cache✅ both cache types × both modes,fail-on-missfiring and staying quiet (:195,:234,:268,:301,:332,:362,:394) / ✅ci.yml:23setup-environment✅ standard-mode conda cache, two-run miss→hit chain (:431,:461) / ✅ viabuild-jupyter-cachebuild-lectures✅ real executed HTML build, both directions (:461,:508) / ✅ six call sites inci.yml,publish.ymlbuild-jupyter-cache⚠️ runs (:591,:638,:698,:784,:818) but its internal calls execute@v0, not the PR / ✅cache.yml:27preview-netlify❌ needs a real deploy target /⚠️ ci.yml:54, fires only on a PR opened there — no successful deploy between 2026-02-10 and 2026-08-05preview-cloudflare❌ / ❌ called nowhere — no harness job, no canary call sitepublish-gh-pages❌ would publish this repo's own Pages /⚠️ publish.yml:56, fires only on apublish*tag pushed there — last run 2026-02-10, so v0.7.0–v0.11.1 never went through it
Behind the ❌s: uses: takes no expressions and build-jupyter-cache pins siblings hardcoded (setup-environment@v0 at build-jupyter-cache/action.yml:149; build-lectures@v0 at :164, :174, :184), so that chain is untestable pre-release; the previews and publish-gh-pages need real deploy targets end to end, hence TESTING.md:37 assigns them to the canary — but see stage 1.5 below, which that framing has been writing off. The relevance gate is blind too — the IGNORED list at test-actions.yml:112 misses preview-*/action.yml, so a preview-only PR runs all 15 substantive jobs and reports the required check Action harness: all checks green without running a line of preview code. Publish/preview confidence rests on code review plus production publishes in the lecture repos, which is where this issue started.
Why it matters
A publish or cache regression surfaces only when a real build fails — the layer whose gaps hid #28 (see #83). preview-cloudflare, uncovered everywhere, shipped PR comments linking the per-deployment hash rather than the stable pr-N alias, and a deploy-url returning the alias on one wrangler release and the hash on another; both caught by reading, fixed in v0.11.1 (#131). #105 (preview deploy errors swallowed) is the same shape, still open. Canaries also decay untended: the weekly cache.yml build ran every Sunday to 2026-04-12, missed 16 consecutive Sundays, resumed 2026-08-09 — the first Sunday after activity returned 2026-08-05, the signature of GitHub disabling a schedule after 60 days of repository inactivity. v0.7.0, v0.8.0 and v0.9.0 all shipped in that window, unnoticed.
Stage 1 — shipped
-
A PR-time harness in this repo using— done in v0.10.0 (ci: add action-level PR harness for cache and environment actions #114, Harness follow-ups from #116: attribute the negative build test, document the -W dependence #118), extended in v0.11.0 (Retire the ~/.bash_logout workaround now v0 carries the build-lectures fix #120, fix(build-jupyter-cache): make container-mode failure alerting actually work (#83) #122, ci(harness): decide relevance in a gate job, not with paths: filters (#116 item 5) #124, fix(build-jupyter-cache): alert when the run aborts before the builds (#123) #127)../local paths, so it exercises the code on the PR rather than a released ref
17 jobs: a relevance gate (:75), 15 substantive jobs, and harness-summary (:854), whose job name Action harness: all checks is the required check on main. Fixtures are salted per run, jobs assert on outputs and filesystem, and negative jobs unit-build-miss-guard (:301), build-fail-guard (:508), bjc-fail-guard (:638), bjc-abort-guard (:698) stop a swallowed failure passing green. TESTING.md:25 documents it as stage 1. #29's env-test half landed with it — env-seed (:431), env-hit-build (:461), the two-run standard-mode conda miss→hit chain, done under PLAN.md backlog item 9; #29's docs half remains.
- Make the harness's green honest about what it did not run — naming the un-exercised actions in
harness-summary's output is enough.
Stage 2 — make the canary consume the shipped templates
The canary — named in PLAN.md's "Consumers in production" table and TESTING.md:47, superseding QuantEcon/test-lectures from the design proposal comment below — is live, pinned @v0 and runs the full chain, but does not consume templates/ verbatim, so what we ship consumers is validated nowhere.
- Re-sync the canary's
cache.yml,ci.ymlandpublish.ymlfromtemplates/, and keep them synced. Drift:templates/publish.ymltriggers on push tomainplusworkflow_dispatchwhere the canary's uses apublish*tag, so the trigger we hand consumers is never exercised;templates/cache.ymlcrons0 0 * * 0against the canary's0 3 * * 0. Also keeps docs: reconcile action READMEs and templates with the shipped code #109's template fixes from re-drifting. Coordinate with Release gating: a gate.yml in the canary tests the candidate before v0 moves #135, which changes the canary's publish trigger too. - Detect a silent canary, not only a red one — the 16 missed Sundays produced no signal because absence is indistinguishable from success. (Release gating: a gate.yml in the canary tests the candidate before v0 moves #135 covers a red canary reaching a human, and scheduling; neither addresses liveness.)
Stage 3 — coverage needing a real deploy target
-
— the canary deploys real Netlify previews atpreview-netlify— a call site on a real deploy targetci.yml:54, with the tokens it needs. -
— the canary publishes atpublish-gh-pages— a call site on a real Pages targetpublish.yml:56; that it has not run since 2026-02-10 is a trigger problem, and belongs to Release gating: a gate.yml in the canary tests the candidate before v0 moves #135. -
preview-cloudflare— the only action with zero coverage in either harness. Needs a Cloudflare Pages project and an API token on the canary, plus a call site: a second preview job in itsci.yml, or a dedicated workflow. Also the action most recently found broken by reading, which argues for doing it first.
Scope boundary
- Stage 4 — canary on release, green before
v0moves — is now Release gating: a gate.yml in the canary tests the candidate before v0 moves #135: all ten of the canary's action references are@v0, the tag a release moves, so it always exercises the previous release, which no trigger change fixes; Release gating: a gate.yml in the canary tests the candidate before v0 moves #135 proposes av0-nextstaging tag. - Release gate fixture: content and hygiene for the canary's gate.yml #136 goes further — a floating
:latestcontainer, build-time network reads and live Dependabot each make a red there ambiguous — and proposes a frozen fixture repo for the gate role, keeping the canary as the sandbox. Stages 2–3 stay here either way; if Release gate fixture: content and hygiene for the canary's gate.yml #136 lands, the gate fixture is its work. - Container fixture gaps (
containers/quantecon/tests/minimal-jupyter-book/) stay with test: unify container smoke tests and make the fixture exercise the Dockerfiles #108: those exercise the image, these the action logic. - Uncovered even then: the pre-release
build-jupyter-cachesibling chain, structurally — Release gating: a gate.yml in the canary tests the candidate before v0 moves #135 narrows the ungated surface rather than closing it; real-scale performance and content diversity, sotest-containers-lectures.ymlagainst the three real lecture repos stays as-is; thelecture-jaxGPU path, while Add JAX installation commands to lectures lecture-jax#284 is open. - QuantEcon/workspace-lectures#31 sequences the lecture family's move to floating
@v0behind this gap; QuantEcon/workspace-lectures#33 is the consumer view of the gating decision.
Stage 1.5 — the deploy-action logic that needs no deploy target
"Needs real deploy targets and secrets" is true of the deploy itself and false of most of what these three actions actually do. The following are pure functions of their inputs, testable in this harness today with no Cloudflare project, no Netlify account, no canary and no #136 fixture repo — and they are the parts that have silently shipped wrong before:
- Extract the duplicated ~87-line PR-comment renderer from
preview-netlifyandpreview-cloudflareinto a shared script (PLAN item 6) and assert the rendered URL paths, including thestrip-lectures-dirvariants - Extract
publish-gh-pages' release-asset packaging and assert the tarball, its SHA256 checksum, and the JSON manifest fields against a fixture directory - Assert CNAME injection and build-directory validation against a fixture
- Correct the "needs real deploy targets and secrets" line here and at
TESTING.md:37, which currently writes off work that needs neither
This matters more now than when this issue was filed: #135/#136 have moved the real-deploy route behind a new fixture repo that does not exist yet, so the pure-logic half is the only preview/publish coverage reachable in the near term. It also removes the duplication PLAN item 6 tracks, so the extraction pays for itself twice.
Activity
mmcky commentedon Jul 23, 2026
Design proposal: a two-part harness, not one
This issue's suggested fix is "a minimal fixture repo/workflow". This is a concrete proposal for its shape, prompted by the v0.9.0 release — where the only consumer-facing change (#104) had to be verified with a throwaway harness on a branch, because nothing in CI exercises the cache actions at all.
The short version: one harness can't do this job, because of a structural constraint in how our own actions call each other. Two cheap harnesses can, and they catch different things.
The constraint that shapes everything
GitHub does not allow expressions in
uses:. A ref cannot be parameterised, ever.That matters because
build-jupyter-cachecalls its siblings at a pinned ref —setup-environment@v0at action.yml:132, andbuild-lectures@v0at :147, :156 and :165. That pinning is correct and deliberate — it's the H8 fix from v0.8.0, and it exists because relative./paths in a composite action resolve against the consumer's workspace, not this repo.The consequence: a test repo pinned at
@mainstill executes@v0for everythingbuild-jupyter-cachecalls internally. That chain cannot be tested before release, by construction. No harness design gets around it, so the design should stop trying and split the work instead.The proposal
A. A PR-time harness, in this repo, using
./local paths. Fast, synthetic, runs on every PR that touches an action. This is a generalisation of the throwaway harness used to verify #104: seed a fixture, invoke the action, assert on its outputs and on the filesystem, fail the job on any mismatch. It caught the #104 defect and a control run against the pre-fix code proved it detects it rather than merely passing.B. A post-release canary, in a separate
QuantEcon/test-lecturesrepo pinned at@v0. Runs on a schedule and immediately after each tag move. This is the only thing that exercises the real consumer path, including the sibling-pinned chain that A structurally cannot reach.setup-environmentbuild-lecturesrestore-jupyter-cachebuild-jupyter-cache@v0, not the PRpreview-netlify,preview-cloudflarepublish-gh-pagesWhy B has to be a separate repo
The decisive reason is the one above: in this repo the workspace is the actions repo, so the exact condition that breaks for consumers is the condition that works in an in-repo test. The bug class is invisible here.
Two practical reasons follow.
publish-gh-pagesneeds a realgh-pagesbranch and the preview actions need real deploy targets — neither of which should point at the actions repo. And the cache actions' semantics that matter most (branch-scoped caches, main→PR inheritance) only exist where there is a real main branch and real PRs.The fixture is where the current gap is worst
The existing minimal fixture at
containers/quantecon/tests/minimal-jupyter-book/_config.ymlcannot fail in the ways that matter — already noted in #108:execute_notebooks: "off"kaleido<1.0pinhtml_theme: sphinx_book_themequantecon-book-themeis never importedfontpkg: "".otf-symlink workaround in the Dockerfile exists forA fixture worth having deliberately exercises the three things that have actually broken in production: a plotly cell that forces static-image export, a matplotlib cell, and the real
quantecon_book_themeunder xelatex. Keep it to roughly five lectures so a build is 2–3 minutes rather than the 107 minutes the real-repo matrix takes.If the canary consumes
templates/cache.yml,templates/ci.ymlandtemplates/publish.ymlverbatim, it also validates the shipped templates — which #109 flags as having drifted from the shipped code. Two birds.Suggested staging
Each stage is independently useful, so this doesn't have to land as one lift.
test-lectureswith the fixture and the templates verbatim, wiringcache.ymlon main andci.ymlon PR. Covers thebuild-jupyter-cachechain and real cache scoping.gh-pagesbranch).What this still won't cover
Worth stating plainly so the harness isn't over-trusted. It won't cover pre-release testing of the
build-jupyter-cachesibling chain — that's the structural constraint, and stage 4 mitigates it by shortening the window rather than closing it. It won't cover real-scale performance or content diversity, sotest-containers-lectures.ymlagainst the three real lecture repos stays as-is. And thelecture-jaxGPU path remains out of scope while QuantEcon/lecture-jax#284 is open.Why this is worth the maintenance
The evidence is specific rather than general.
restore-jupyter-cache'ssave-cache: truemode shipped dead on arrival in v0.8.0 — every output empty,fail-on-missfailing unconditionally — and survived until a maintenance audit found it eight months later (#104). A canary running the save-cache path would have caught it the same day. #105 (preview deploy errors swallowed) and #34/H4 are the same shape: bugs in the layer with no tests, found by reading rather than by failing.A secondary benefit worth noting: a canary makes the "repin consumers" step safe. Repin the canary first, watch one real build, then repin the lecture repos — instead of
lecture-dpbeing the thing that discovers a regression.ci: add action-level PR harness for cache and environment actions (#114)
chore(harness): retire the ~/.bash_logout workaround now v0 has the f…
Rehabilitate as the actions canary: repin @v0, trim to a stable lectu…
docs: give test infrastructure a home under tests/, with tests/local/…
docs: point at the renamed canary repo, disambiguate the local clone (#…
mmcky commentedon Aug 11, 2026
Assessed this from the consumer side while auditing
quantecon/actionsadoption across the Python lecture family (QuantEcon/workspace-lectures#31), where it decides whether the lecture repos float on@v0or carry exact pins. Two things worth feeding back.This issue's body now understates the coverage
The body predates the harness that answers most of it, and it is the first thing a reader finds when asking "is the action logic tested?" — so it currently reads as a much larger gap than exists. What has actually shipped:
test-actions.yml(stage 1)restore-jupyter-cache(7),build-jupyter-cache(4),setup-environment(3),build-lectures(3) throughuses: ./, asserting on outputs and filesystem, with deliberate fail-guard and abort-guard jobs. Enforced as the required checkAction harness: all checksonmain, so it is a gate rather than a signaltest-actions-lecture-intro(stage 2/3)@v0, running the real chain includingpublish-gh-pagesandpreview-netlify— the two this repo structurally cannot testA note in the body pointing at the shipped state would stop the next reader drawing the conclusion I nearly did.
The remaining gap is lead time, not coverage
The premise of a canary is that it meets a bad release before production does. Checking the triggers, it does that on one of the three consumer paths:
schedule, Sunday 03:00 UTClecture-dp), 03:00 UTC (other six)pull_requestin the canaryThe cache ordering is real and looks deliberate — Sunday ahead of Monday is not an accident, and that is the path where the two-month silent-alerting failure happened.
The other two have no lead at all. The canary's
ci.ymlfires only when a human opens a PR there, which is sporadic in practice (2026-08-05, and before that 2026-07-15), and itspublish.ymlfires on a tag push in the canary rather than on a release here. Nothing dispatches the canary whenv0moves, and there is no release automation in this repo — the tag is moved by hand.So on the highest-consequence path, the first real consumer of every release is a published lecture site.
Why that makes stage 4 the priority
Stage 4 is listed last in the staging plan, but it is what converts the canary from a detector into a gate, and it is the smallest of the four. Coverage work — more assertions, more fixtures — does not change the ordering; only triggers do.
Concretely, two small changes would close it:
ci.ymlandpublish.ymlon a schedule ahead of the Monday cache builds, so both paths are exercised on the same weekly cadence the cache path already enjoys;repository_dispatchthe canary whenv0moves, so a release is smoke-tested against a real consumer before any lecture repo picks it up.The second also makes the repin step safe in the way the closing argument of the design comment above anticipated: repin the canary, watch one real build, then repin consumers — rather than
lecture-dpdiscovering a regression.Consumer-side stake
Worth stating plainly since it is not visible from inside this repo. The lecture family is currently split three ways —
@v0(2 repos),v0.8.0(3),v0.9.0(2) — and QuantEcon/workspace-lectures#31 settles that on floating@v0, on the strength of the harness and canary above. It sequences the sweep behind this gap, because all six exactly-pinned call sites are onpublish-gh-pages, which is precisely the least-gated action today.Separately,
PLAN.md's "Consumers in production" table lists onlylecture-dp,lecture-python.mystand the canary, and states "no exact pins left". The audit found six exactly-pinned call sites across five lecture repos it does not list (lecture-jax×2,lecture-python-intro,lecture-python-advanced.myst,lecture-python-programming,continuous_time_mcs). Flagging it here rather than opening a second issue, since the versioning argument in that section was reasoned partly from that table.mmcky commentedon Aug 11, 2026
Followed up on the lead-time finding above with a concrete gating proposal: #135.
The short version of what turned up while designing it — the canary cannot gate a release as built, for a reason that is structural rather than a scheduling oversight. All ten of its action references are
@v0, which is the tag a release moves, so it always exercises the previous release. It is a post-release regression detector; no change to its triggers makes it a gate.#135 proposes a
v0-nextstaging tag as the fix, since it sidesteps the "no expressions inuses:" constraint without needing parameterised refs. It also records what that still would not cover: abuild-jupyter-cache@v0-nextrun executessetup-environment@v0andbuild-lectures@v0, so the candidate's cache action is tested against the previous release's siblings — the structural limit this issue already names, narrowed to one action's internal chain rather than removed.mmcky commentedon Aug 11, 2026
Stage 4 now has a tracking issue of its own: #138, with the design split across #135 (the
v0-nextgate mechanism) and #136 (the fixture the gate needs).Worth recording here, since this issue is where people look first for the state of testing: stages 1–3 have landed and this issue's body understates them.
test-actions.ymlis 15 jobs acrossrestore-jupyter-cache,build-jupyter-cache,setup-environmentandbuild-lectures, enforced as the required checkAction harness: all checks;test-actions-lecture-introruns the real chain includingpublish-gh-pagesandpreview-netlify. A reader arriving cold currently concludes there is no action-level testing at all.What is left is not coverage — it is that the canary pins
@v0, so it can only ever exercise a published release, never a candidate. That is what #138 sets out to close.mmcky commentedon Nov 4, 2026
From the 2026-10-06 codebase review (finding M5; record:
.qe/dev/log/2026-10-06-codebase-review.md, #220).Two static checks for this coverage issue that nothing tracks yet:
scripts/generate-docs.py --check-examplesgives it onlytemplates/and the manual's examples. So.github/workflows/*.ymlis never linted: about 2,400 lines, including the relevance gate whose self-test the required check depends on. Expect the first run to need a few fixes or documented-ignoreflags.run:blocks. actionlint does not readaction.yml, so nothing checks the 50run:blocks in the eight actions. Extract them with PyYAML, replacing each${{ … }}with a placeholder word, then run shellcheck. A trial on4550f69atshellcheck -S warningfound only constant-comparison hits (SC2050/SC2157), all at expression sites thatdocs/dev/PLAN.mdbacklog item 18 covers. At that severity the check should go green once those sites are handled. Default severity also reports info-level SC2086 hits, mostly unquoted$GITHUB_OUTPUT.The rest of the finding is already filed:
detect-changed-lectures.shunit job, in preview-netlify, preview-cloudflare: change detection lists lectures the pull request did not change #215;publish-gh-pagesin the canary, in Release gating: a gate.yml in the canary tests the candidate before v0 moves #135.docs(dev): ARCHITECTURE and TESTING as the current design, PLAN trimm…
ci(harness): lint .github/workflows/ with actionlint in the gate (#264)
ci(harness): shellcheck the actions' run: scripts and scripts/*.sh in…
ci(harness): shellcheck the actions' run: scripts and scripts/*.sh in…
ci(harness): shellcheck the actions' run: scripts and scripts/*.sh in…
ci(harness): shellcheck the actions' run: scripts and scripts/*.sh in…
ci(harness): hold the workflows' run: scripts to the ${{ }} rule too
ci(harness): lint-shell reads a block's indent from the block itself
ci(harness): shellcheck the actions' run: scripts and scripts/*.sh in…
ci(harness): hold the workflows' run: scripts to the ${{ }} rule too
ci(harness): lint-shell reads a block's indent from the block itself
ci(harness): shellcheck the actions' run: scripts and scripts/*.sh in…
release: v0.16.0 (#278)
mmcky commentedon Nov 10, 2026
Closing. What this issue asked for is covered, apart from two items carried elsewhere.
publish-gh-pages' release-asset packaging is a script the harness checks (feat(publish-gh-pages): a mode input, so Pages is deployed from a job that runs no notebook code (#233) #257);docs/dev/TESTING.mdno longer says this logic needs real deploys.preview-cloudflareruns in the canary'sci.ymlagainst a real Pages project, and the harness checks how it builds its URL.v0moves.Carried forward: detecting a canary that silently stops running is now on #302, and bringing the canary's workflows back in line with
templates/is #310.Claude Code (on behalf of mmcky)
docs: point versioning.md at the release gate; PLAN's issue rows (#310)
ci(canary-watch): check the canary for drift from templates/ at v0 (#310