Skip to content

fix: keep publish job alive when one post's LaTeX fails#28

Merged
Gavin-WangSC merged 1 commit intoComputerization:mainfrom
Gavin-WangSC:fix/resilient-publish-and-2026-02-13-math
Apr 29, 2026
Merged

fix: keep publish job alive when one post's LaTeX fails#28
Gavin-WangSC merged 1 commit intoComputerization:mainfrom
Gavin-WangSC:fix/resilient-publish-and-2026-02-13-math

Conversation

@Gavin-WangSC
Copy link
Copy Markdown
Contributor

Summary

  • The scheduled `Generate New Article` workflow has been failing every day for 10+ consecutive runs (back to 2026-04-19). All failures occur in `compile / publish_article` → Publish Individual Post.
  • Root cause: post `2026-02-13` produces a LaTeX compile error (`Missing $ inserted` near `h^*(n)`), and `pdfgenr` then unconditionally copies a non-existent `index.pdf`, raising `FileNotFoundError` and exiting the job. Every subsequent post (including each new daily article) gets blocked behind this single bad article.
  • This PR makes `pdfgenr` resilient: if no PDF is produced, it logs a warning, cleans up `.tmp/`, and returns `False`. The caller then skips writing the sha256 stamp so the post will be retried on the next run.
  • Also braces the bare `` superscript in `2026-02-13/index.md` (`h^(n)` → `h^{*}(n)`) to address the specific lualatex error.

Test plan

  • Re-run the `Generate New Article` workflow (or wait for the next scheduled run).
  • Confirm `compile / publish_article` reaches Commit and Push Changes without exit-code-1.
  • Confirm `public/blog/2026-02-13/index.pdf` is committed (or, if the math fix wasn't enough, that the post is logged as skipped and posts after it still publish).
  • Spot-check that 2026-02-14 onwards begin compiling — they have been queued but unreached for ~75 days.

🤖 Generated with Claude Code

… job

The daily publish workflow has been failing for 10+ runs because pdfgenr
unconditionally copies index.pdf even when lualatex produced no output,
turning one bad article (2026-02-13) into a hard block on every
subsequent post.

- pdfgenr now checks for the PDF after texcomp, logs and returns False
  when missing, and only writes the sha256 hash on success so failed
  posts are retried on the next run.
- Brace the bare star superscript in 2026-02-13 (h^* -> h^{*}) which
  the lualatex log flagged as "Missing $ inserted".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 29, 2026

Deploy Preview for c13n-newsletter ready!

Name Link
🔨 Latest commit 5b4dcce
🔍 Latest deploy log https://app.netlify.com/projects/c13n-newsletter/deploys/69f194c91e5ce100089ddbda
😎 Deploy Preview https://deploy-preview-28--c13n-newsletter.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Gavin-WangSC Gavin-WangSC merged commit 8cce3c1 into Computerization:main Apr 29, 2026
4 checks passed
@Gavin-WangSC
Copy link
Copy Markdown
Contributor Author

demo use of AI for 2026 WFLA club mini forum

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.

1 participant