Skip to content

PR CI renders only the website profile, so LaTeX-only breakage lands on main before anything catches it #1160

Description

@d-morrison

Problem

PR CI renders only the website profile. .github/workflows/preview.yml's render job
calls Morrison-Lab/gha/.github/workflows/preview.yml@v2, which its own header comment
documents as fixing render-profile website. The PDF, docx, and revealjs renders happen
only in publish.yml, on main:

quarto render --to pdf
quarto render --to docx --no-clean
quarto render --to revealjs --no-clean

So a change that renders fine as HTML/MathJax but breaks LaTeX passes every PR check and
only turns red after it has merged, on the publish run — where it also blocks the site
deploy for everything else that has landed since.

Evidence

#1134 introduced \v0 in
chapters/parametric-survival-models.qmd. Every check on that PR was green. It merged, and
the next publish run died in LuaLaTeX:

Use of \v doesn't match its definition.
l.1610 ...tackrel{\text{def}}{=}{\lambda}(t \mid \v0

(run 34375808884,
tracked as #1155, worked around in
#1159, root cause upstream in
d-morrison/macros#86.)

MathJax and LaTeX disagree about macro semantics often enough for this to recur —
\providecommand is a MathJax no-op that macros-table.qmd already has to rewrite, and
delimited-parameter \defs of the kind that caused this failure are a LaTeX-only concept.
The HTML profile cannot see either class of defect.

Possible directions

Not obviously one right answer, so listing the trade-offs rather than prescribing:

  1. Render the changed chapters to PDF on PRs. Highest fidelity, and the narrowest form
    (only chapters whose files the PR touched) may be affordable. Costs a TeX install and
    LuaLaTeX time in the preview job.
  2. A LaTeX-only smoke check. Run quarto pandoc over latex-macros/macros.qmd plus the
    changed .qmd files with -t latex, then compile the emitted math with lualatex. Much
    cheaper than a full render, and it catches exactly this class (unexpanded or
    mis-expanding macros). Would not catch layout or float problems.
  3. A lint for known-broken macro spellings. Cheapest, and only ever catches defects
    somebody has already been bitten by.

Option 2 reproduced this specific failure locally in seconds, so it looks like the best
cost/coverage point, but option 1 is the only one that actually tests what publish.yml
runs.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions