Repository navigation
fix(build-lectures,build-jupyter-cache): upload the hidden _build directories the failure artifacts promise (#243) - #251
Conversation
…rectories (#243) build-fail-guard now uploads build-lectures' failure reports and checks that the artifact holds .jupyter_cache next to the err.log. bjc-fail-guard turns on build-jupyter-cache's build-cache upload and checks it for .jupyter_cache and .doctrees. Both fail until the uploads set include-hidden-files. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMbtUbR5RRk4HEe1ACT
…ectories the failure artifacts promise (#243) upload-artifact leaves out every path whose name starts with a dot unless include-hidden-files is set, even a path named in its list. So build-lectures' failure artifact held the reports without _build/.jupyter_cache, and build-jupyter-cache's build-cache artifact held _build without .jupyter_cache and .doctrees. Both uploads now set include-hidden-files: true, as the docs, the failure banner and the failure issue already describe. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMbtUbR5RRk4HEe1ACT
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟢 Approval recommended
The change directly addresses the missing hidden build-cache artifacts by enabling hidden-file uploads and adding workflow harness checks to assert those contents are present, with only a minor non-blocking diagnostic robustness nit noted.
No open issues 🎉
What changed in this PR
This pull request fixes failure/debug artifacts that were missing hidden _build subdirectories (notably .jupyter_cache and .doctrees) due to actions/upload-artifact@v7 default behavior, and adds CI harness assertions to prevent regressions.
Changes:
- Enable
include-hidden-files: truefor failure artifact uploads inbuild-lecturesandbuild-jupyter-cache. - Extend the test workflow harness to download failure artifacts and assert expected hidden cache/state files are present.
- Add a changelog entry documenting the fix.
Minor follow-up noted in the workflow diagnostics: in failure branches, make find ... | sort non-fatal under bash -e -o pipefail (e.g., append || true) so diagnostics reliably print before the explicit exit 1.
| File | Summary |
|---|---|
CHANGELOG.md |
Document the artifact behavior fix under Unreleased → Fixed. |
build-lectures/action.yml |
Ensure failure reports artifact includes hidden _build/.jupyter_cache via include-hidden-files: true. |
build-jupyter-cache/action.yml |
Ensure _build failure artifact includes hidden .jupyter_cache and .doctrees via include-hidden-files: true. |
.github/workflows/test-actions.yml |
Update harness jobs to enable uploads, download artifacts, and assert hidden cache/state contents are present (with minor diagnostic robustness nits noted). |
Review effort: Balanced
#251 merged while this was in review and closed #243. Item 15 moves the hidden-directory fix from Left to Done, and #243's row records the closure. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMXc6EroDo2qFL1pCjS
…#246) (#252) * docs(plan): catch up with wave 1 and the v0.13.0 and v0.14.0 releases (#246) PLAN said a dispatched run cannot exercise the preview deploy, and that 0c waits on #227. #240 made both untrue: with dispatch-alias, a scheduled or dispatched run deploys to a reserved alias, and the deployed output says whether it did. 0c now records the prerequisite as met and lists the canary's own changes that remain (#135, #136). The release state says v0.14.0 is tagged and staged, with v0 on v0.13.0 until the canary passes, and the eight exact pins are still on v0.12.0 (checked 2026-11-05). Backlog item 18 counts five actions with ${{ }} in run: scripts, since #240 moved the preview actions' last ones into env:. Item 15 lists #238 and #243. The disposition rows for #222, #227 and and #247 get rows. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMXc6EroDo2qFL1pCjS * docs(plan): v0 is on v0.14.0 v0 moved to v0.14.0 (c9f54de) at about 05:27 UTC on 2026-11-05, after the canary passed. The release line says so, and the "What does not stand" paragraph no longer says the canary's @v0 lacks dispatch-alias: it has the input, and its ci.yml does not pass it yet. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMXc6EroDo2qFL1pCjS * docs(changelog): write the exact pins as uses: references The entry said the pins are on `v0.12.0`, which reads as the tag. PLAN writes them as the workflow reference, `@v0.12.0`, so the entry does too. The paragraph is re-wrapped where the previous commit left a short line. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMXc6EroDo2qFL1pCjS * docs(plan): #243 is fixed by #251 #251 merged while this was in review and closed #243. Item 15 moves the hidden-directory fix from Left to Done, and #243's row records the closure. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMXc6EroDo2qFL1pCjS --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Two failure artifacts left out the hidden directories they name or contain. Both uploads use
actions/upload-artifact@v7withoutinclude-hidden-files, andupload-artifactthen skips every path whose name starts with a dot, even a path it is given by name. #243 has the source references and a harness run that shows it. Sobuild-lectures'upload-failure-reportsartifact held thereportsdirectories but not_build/.jupyter_cache, which its path list names. Andbuild-jupyter-cache'sbuild-cache-<run id>artifact, documented as "the whole_builddirectory", held_buildwithout.jupyter_cacheand.doctrees.Include the directories, or correct the docs?
#243 left this open: set
include-hidden-files: truewhere the docs say the cache is included, or correct the docs where it shouldn't be. I set the flag in both places and left the docs alone, because everything around these uploads already says the cache is in them:build-lectures: theupload-failure-reportsdescription names_build/.jupyter_cache, as does Behaviour item 4 in the manual ("it uploads the reports and the execution cache"). The failure banner tells the reader to "Check $OUTPUT_DIR/_build/.jupyter_cache/ for cached notebook states".build-jupyter-cache: theupload-artifactdescription says "uploads the whole_builddirectory", and the failure issue says the artifact "includes.jupyter_cache".The artifacts exist so that a person can reproduce a failed build. The execution cache spares them re-executing every notebook that passed, and
.doctreesis the Sphinx state an incremental rebuild reads. Correcting the docs would have meant removing the most useful part of each artifact to match a bug.The cost is size. Each artifact grows by the execution cache, and the
build-cacheartifact by.doctreestoo. Both artifacts are uploaded only when a build fails, andbuild-lectures' is opt-in.Changes
build-lectures/action.ymlinclude-hidden-files: true.build-jupyter-cache/action.ymlinclude-hidden-files: true..github/workflows/test-actions.ymlbuild-fail-guardturns onupload-failure-reports, under its ownfailure-artifact-name(build-fail-guard-reports), becausebjc-fail-guarduploadsexecution-reports-htmlin the same run. It then downloads the artifact and asserts that it holdshtml/reports/broken.err.logand.jupyter_cache/global.db.bjc-fail-guardturns onupload-artifact, with one day's retention, downloadsbuild-cache-<run id>and asserts that it holdshtml/reports/broken.err.log,.jupyter_cache/global.dband.doctrees/environment.pickle.CHANGELOG.mdNo input description changed, so the generated docs are unchanged (
scripts/generate-docs.py --checkpasses).Why
build-fail-guardtests thebuild-lecturessite#243 proposed asserting both artifacts in
bjc-fail-guard. Butbuild-jupyter-cachecallsbuild-lectures@v0, not./build-lectures(CONTRIBUTING, Staged Releases, known limits). So theexecution-reports-htmlartifact in that job comes from the released action, and an assertion on it would fail on this PR and on every PR untilv0moved.build-fail-guardcalls./build-lecturesdirectly, so it tests this PR's upload.bjc-fail-guardtests the upload thatbuild-jupyter-cachemakes itself.What I checked, and how
34752ec) and dispatched the harness on it: run 41973354911. Both jobs failed on their new assertion and on nothing else:build-fail-guard: the existing assertions passed. The upload loggedinclude-hidden-files: falseandthere will be 1 file uploaded, and the downloaded artifact held onlyhtml/reports/broken.err.log.bjc-fail-guard: the existing assertions passed. The_buildupload loggedinclude-hidden-files: false, and the downloaded artifact heldhtml/andjupyter_execute/but no.jupyter_cacheor.doctrees.scripts/generate-docs.py --checkpasses, and the three edited YAML files parse.What to watch
build-fail-guardandbjc-fail-guardshould be green, each with a✅line for its artifact.execution-reports-<builder>artifact holds.jupyter_cache/.v0moves,build-jupyter-cachepicks upbuild-lectures' half of the fix, through its@v0call. Its failed runs then upload the execution cache twice or more: once inbuild-cache-<run id>, and once in each failing builder'sexecution-reports-<builder>, sinceupload-failure-reportsdefaults to'true'there. That is a failure-path cost only. If it turns out too large for a big site,build-jupyter-cachecould leave the cache out of the per-builder reports. That would need a newbuild-lecturesinput, so I've left it out of this fix.Not in this PR
-Wand get published #247 (failing a build on error outputs) is my next PR in these two actions, from a fresh branch.--path-output#229/build-jupyter-cache: the failure alert can land on an open pull request instead of an issue #238, the later items in these two actions.Closes #243
🤖 Generated with Claude Code
https://claude.ai/code/session_01WT8bMbtUbR5RRk4HEe1ACT