You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build-lectures: a raising cell passed -W --keep-going in a cache-mode jupyter build; only the error-output check caught it #300
A cell that raises didn't fail build-lectures' build under -W --keep-going. The release gate's staged-failure self-test showed it (QuantEcon/test-actions-lecture-intro run 42766210377, job "Build the cache", 2026-11-10 ~06:07 UTC):
build-jupyter-cache at v0.17.0 ran jb build gate/lectures --path-output . --builder=custom --custom-builder=jupyter -n -W --keep-going;
myst-nb logged gate/lectures/figures.md: WARNING: Executing notebook failed: CellExecutionError [mystnb.exec] for a cell that raises a RuntimeError;
jb build exited 0, and the build step's outcome was success. The pdflatex and html builds that followed also passed -W, with build succeeded.
The run went red only through #256's error-output check (check-error-outputs.py). Its message says "The kernel reported this cell as successful, so -W did not catch it", which is wrong for a cell that raised.
The setup matches the lecture sites: execute_notebooks: cache, the lean image (quantecon-build@sha256:d7676921…), and build-lectures' default extra-args: -W --keep-going.
Why it matters. A site on the default error-outputs: fail is protected by the error-output check. A site with error-outputs: warn or ignore would publish the traceback from a green build. docs/dev/TESTING.md and build-lectures' chapter may also claim -W catches a raising cell, and that needs checking.
To find out:
whether it reproduces with the html builder executing, as well as the custom jupyter builder;
whether it reproduces outside cache mode, with execute_notebooks: force;
what jupyter-book 1.0's --builder=custom does with -W and --keep-going, and whether myst-nb's execution warning is raised where Sphinx's warning-as-error handling sees it;
what the error-output check's message should say, depending on the answers.
The cheapest reproduction is a throwaway harness job with one raising cell, run under each builder and each execution mode.
Claude Code (on behalf of mmcky), organiser session; found by the mini:actions-gate session
Cause: confirmed. In a jupyter build, -W --keep-going fails on no warning at all, not only a raised cell. sphinx-tojupyter's JupyterBuilder.finish() ends with exit(self.execution_status_code): SystemExit(0), raised inside Sphinx's app.build(). That is before Sphinx turns --keep-going's counted warnings into exit status 1. SystemExit isn't an Exception, so neither Sphinx nor jupyter-book catches it, jb build exits 0, and the log has no build succeeded or build finished with problems line. With -W alone the build fails at the first warning, before finish(). Reproduced with the canary's versions, with a book that executes nothing: the jupyter build exits 0 with three warnings under -W --keep-going. With tojupyter's exit() taken out, the same build exits 1 with build finished with problems, 3 warnings. The execution mode doesn't matter.
The pdflatex and html builds passed because they read nothing. They shared the jupyter build's _build/.doctrees and logged 0 added, 0 changed, 0 removed, so figures.md never ran again. A cold html build fails correctly: build-fail-guard shows it on every harness run. Within one job, only the first build reads and executes the pages. In build-jupyter-cache, whenever jupyter is listed it is that first build, so it must fail on its own warnings.
build-lectures. For builder: jupyter, when jb build exits 0 under -W --keep-going and Sphinx logged warnings, the step fails and names them. build-jupyter-cache gets the same through build-lectures@v0.
The error-output check. It tells a cell that raised from one whose display raised, by whether the notebook ran on after it. "The kernel reported this cell as successful" stays only where that is true.
Docs. The chapter's claims about -W and the jupyter builder are corrected.
A harness job that fails on today's code.
Exposure.
No caller in the org sets error-outputs: warn or ignore, or extra-args.
The canary's, test-lecture-theme-sphinx's and lecture-dp's builds log no jupyter warning today.
In the lecture matrix, the jupyter builds of lecture-python.myst, lecture-python-programming and lecture-python-advanced.myst log tojupyter_static_path entry …/source/_static does not exist, a stale entry in their _config.yml. Those builds would go red once this lands, so the entry is best dropped first.
Upstream. The lecture repos' own pipelines run tojupyter with -n -W --keep-going as their gate (QuantEcon/meta#340). For the same reason, that gate passes every warning, which is what QuantEcon/lecture-python.zh-cn#271 saw in the field. Only a sphinx-tojupyter fix reaches them, and that will be proposed separately.
The maintainer's decisions, 2026-11-10: the build-lectures change is ⚠️BREAKING, with a migration line; one-line PRs drop the stale "source/_static" from tojupyter_static_file_path in lecture-python.myst, lecture-python-programming and lecture-python-advanced.myst, and merge before this fix; an issue in QuantEcon/sphinx-tojupyter follows those PRs; the new check covers the jupyter builder only.
The upstream cause is now QuantEcon/sphinx-tojupyter#69. #307 makes build-lectures catch the warnings; the lecture repos' own notebook gates keep passing them until that issue is resolved upstream.
Activity
mmcky commentedon Nov 10, 2026
Cause: confirmed. In a
jupyterbuild,-W --keep-goingfails on no warning at all, not only a raised cell. sphinx-tojupyter'sJupyterBuilder.finish()ends withexit(self.execution_status_code):SystemExit(0), raised inside Sphinx'sapp.build(). That is before Sphinx turns--keep-going's counted warnings into exit status 1.SystemExitisn't anException, so neither Sphinx nor jupyter-book catches it,jb buildexits 0, and the log has nobuild succeededorbuild finished with problemsline. With-Walone the build fails at the first warning, beforefinish(). Reproduced with the canary's versions, with a book that executes nothing: the jupyter build exits 0 with three warnings under-W --keep-going. With tojupyter'sexit()taken out, the same build exits 1 withbuild finished with problems, 3 warnings. The execution mode doesn't matter.The
pdflatexandhtmlbuilds passed because they read nothing. They shared the jupyter build's_build/.doctreesand logged0 added, 0 changed, 0 removed, so figures.md never ran again. A coldhtmlbuild fails correctly:build-fail-guardshows it on every harness run. Within one job, only the first build reads and executes the pages. Inbuild-jupyter-cache, wheneverjupyteris listed it is that first build, so it must fail on its own warnings.The plan (#305):
build-lectures. Forbuilder: jupyter, whenjb buildexits 0 under-W --keep-goingand Sphinx logged warnings, the step fails and names them.build-jupyter-cachegets the same throughbuild-lectures@v0.-Wand the jupyter builder are corrected.Exposure.
error-outputs: warnorignore, orextra-args.tojupyter_static_path entry …/source/_static does not exist, a stale entry in their_config.yml. Those builds would go red once this lands, so the entry is best dropped first.Upstream. The lecture repos' own pipelines run tojupyter with
-n -W --keep-goingas their gate (QuantEcon/meta#340). For the same reason, that gate passes every warning, which is what QuantEcon/lecture-python.zh-cn#271 saw in the field. Only a sphinx-tojupyter fix reaches them, and that will be proposed separately.The maintainer's decisions, 2026-11-10: the⚠️ BREAKING, with a migration line; one-line PRs drop the stale
build-lectureschange is"source/_static"fromtojupyter_static_file_pathin lecture-python.myst, lecture-python-programming and lecture-python-advanced.myst, and merge before this fix; an issue in QuantEcon/sphinx-tojupyter follows those PRs; the new check covers thejupyterbuilder only.Claude Code (on behalf of mmcky)
fix(build-lectures): an unknown cause covers cells followed only by s…
Drop the missing source/_static from tojupyter_static_file_path
Drop the missing source/_static from tojupyter_static_file_path
Drop the missing source/_static from tojupyter_static_file_path
docs(changelog): say plainly which callers' jupyter builds warn (#300)
Drop the missing source/_static from tojupyter_static_file_path (#1123)
Drop the missing source/_static from tojupyter_static_file_path (#659)
Drop the missing source/_static from tojupyter_static_file_path (#409)
fix(build-lectures): a jupyter build fails on its warnings under -W -…
mmcky commentedon Nov 11, 2026
The upstream cause is now QuantEcon/sphinx-tojupyter#69. #307 makes
build-lecturescatch the warnings; the lecture repos' own notebook gates keep passing them until that issue is resolved upstream.Claude Code (on behalf of mmcky)
feat(build-lectures): a nitpick input passes -n to every builder (#97) (
fix(build-lectures): check a page taken from the execution cache for …