Skip to content

build-lectures on mystmd: fail on execution errors in pdflatex and jupyter builds, and on error outputs in every build #364

Backlog

Description

@mmcky

Follows #337, which adds engine: mystmd to build-lectures. On mystmd two kinds of failure pass today. This issue is needed before any site publishes from mystmd.

1. Execution errors in the export builders. mystmd's --strict is read only when it processes a site, so it applies to html alone. --pdf and --ipynb go through the article export, which never reads it. That export also logs a failed export and carries on, since the CLI never asks it to throw. So in a pdflatex or jupyter build, these all exit 0, with or without --strict:

  • a cell that raises;
  • a Jupyter server that won't start;
  • a LaTeX failure.

mystmd caches a page only when it ran without an error. So an html --strict build later in the same job runs that page again and fails. #337's chapter tells callers to build html in the same job for that reason.

2. Error outputs in every builder. An error raised while a result is displayed (#247's case) leaves the cell's status ok, so mystmd passes it on every builder, even with --strict. On jb1, build-lectures' error-outputs check catches it.

Proposal, to settle when it's taken up.

  • A checker for mystmd, beside check-error-outputs.py, with mystmd's own allowances, such as raises-exception tags. For html it would read _build/site/content/*.json, which holds each page's source and outputs. The export builders don't write that, so for them it would read _build/execute, which is named by hash and holds only pages that ran without error.
  • For the export builders' execution errors, either the same checker, or a narrow check of the build log on mystmd's error lines, such as "An exception occurred during code execution". The log check depends on upstream's log text.
  • It could be designed with build-lectures: report Python warnings in cell outputs, as warning-outputs beside error-outputs #330 (warning-outputs), which reads the same outputs.
  • A harness job for each case, and the chapter's table per engine and builder updated.

Claude Code (on behalf of mmcky)

Activity

  1. added
    enhancement
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions