Skip to content

fix(build-lectures,build-jupyter-cache): upload the hidden _build directories the failure artifacts promise (#243) - #251

Merged
mmcky merged 2 commits into
mainfrom
fix/243-hidden-artifacts
Nov 5, 2026
Merged

mmcky merged 2 commits into
mainfrom
fix/243-hidden-artifacts

Conversation

@mmcky

@mmcky mmcky commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Two failure artifacts left out the hidden directories they name or contain. Both uploads use actions/upload-artifact@v7 without include-hidden-files, and upload-artifact then 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. So build-lectures' upload-failure-reports artifact held the reports directories but not _build/.jupyter_cache, which its path list names. And build-jupyter-cache's build-cache-<run id> artifact, documented as "the whole _build directory", held _build without .jupyter_cache and .doctrees.

Include the directories, or correct the docs?

#243 left this open: set include-hidden-files: true where 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: the upload-failure-reports description 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: the upload-artifact description says "uploads the whole _build directory", 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 .doctrees is 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-cache artifact by .doctrees too. Both artifacts are uploaded only when a build fails, and build-lectures' is opt-in.

Changes

File Change
build-lectures/action.yml "Upload execution reports on failure" sets include-hidden-files: true.
build-jupyter-cache/action.yml "Upload build artifact (on failure, for debugging)" sets include-hidden-files: true.
.github/workflows/test-actions.yml build-fail-guard turns on upload-failure-reports, under its own failure-artifact-name (build-fail-guard-reports), because bjc-fail-guard uploads execution-reports-html in the same run. It then downloads the artifact and asserts that it holds html/reports/broken.err.log and .jupyter_cache/global.db. bjc-fail-guard turns on upload-artifact, with one day's retention, downloads build-cache-<run id> and asserts that it holds html/reports/broken.err.log, .jupyter_cache/global.db and .doctrees/environment.pickle.
CHANGELOG.md One entry under Unreleased, Fixed.

No input description changed, so the generated docs are unchanged (scripts/generate-docs.py --check passes).

Why build-fail-guard tests the build-lectures site

#243 proposed asserting both artifacts in bjc-fail-guard. But build-jupyter-cache calls build-lectures@v0, not ./build-lectures (CONTRIBUTING, Staged Releases, known limits). So the execution-reports-html artifact in that job comes from the released action, and an assertion on it would fail on this PR and on every PR until v0 moved. build-fail-guard calls ./build-lectures directly, so it tests this PR's upload. bjc-fail-guard tests the upload that build-jupyter-cache makes itself.

What I checked, and how

  • The new assertions fail without the fix. I pushed the harness change alone (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 logged include-hidden-files: false and there will be 1 file uploaded, and the downloaded artifact held only html/reports/broken.err.log.
    • bjc-fail-guard: the existing assertions passed. The _build upload logged include-hidden-files: false, and the downloaded artifact held html/ and jupyter_execute/ but no .jupyter_cache or .doctrees.
  • They pass with it. This PR's own harness run is that test.
  • scripts/generate-docs.py --check passes, and the three edited YAML files parse.
  • Not run: actionlint and shellcheck. Neither is installed here. pip could not verify TLS through my sandbox's proxy, and running the release binaries I downloaded was blocked, so neither tool has been run on these files.

What to watch

  • This PR's harness run: build-fail-guard and bjc-fail-guard should be green, each with a ✅ line for its artifact.
  • The staged release. The canary's normal path doesn't fail a build, so it never uploads these artifacts and needs nothing new. If a canary run does stage a failing build, check that its execution-reports-<builder> artifact holds .jupyter_cache/.
  • After v0 moves, build-jupyter-cache picks up build-lectures' half of the fix, through its @v0 call. Its failed runs then upload the execution cache twice or more: once in build-cache-<run id>, and once in each failing builder's execution-reports-<builder>, since upload-failure-reports defaults to 'true' there. That is a failure-path cost only. If it turns out too large for a big site, build-jupyter-cache could leave the cache out of the per-builder reports. That would need a new build-lectures input, so I've left it out of this fix.

Not in this PR

Closes #243

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMbtUbR5RRk4HEe1ACT

mmcky and others added 2 commits November 5, 2026 16:19
…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
Copilot AI balanced review requested due to automatic review settings November 5, 2026 05:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: true for failure artifact uploads in build-lectures and build-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

@mmcky
mmcky merged commit 2954dcb into main Nov 5, 2026
44 checks passed
@mmcky
mmcky deleted the fix/243-hidden-artifacts branch November 5, 2026 05:30
mmcky added a commit that referenced this pull request Nov 5, 2026
#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
mmcky added a commit that referenced this pull request Nov 5, 2026
…#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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build-lectures and build-jupyter-cache: failure artifacts silently leave out _build/.jupyter_cache (no include-hidden-files)

2 participants