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
ci(abstracts): avoid PDF dependency installation timeouts #536
The Formal abstract PDFs job for #524 timed out after 30 minutes while installing TeX dependencies, before any PDF-generation test or compilation ran: run 40005220683. The separate code CI passed. The install requested 846 MB of downloads, including 629 MB for texlive-fonts-extra; the runner mirror was slow and several large downloads were retried.
Investigate a reliable, reproducible dependency setup: establish the renderer's actual package/font requirements, avoid unnecessary large packages where possible, and consider caching or a suitable pinned toolchain image. Verify all selected abstracts and declaration links render correctly before removing dependencies. Simply extending the timeout should not replace investigating this failure.
Completion requires a successful CI artifact with source provenance and preserved visual output, plus existing renderer tests. Keep this separate from #529's pagination/footer changes. State: available. Recorded by worker-codex-gsw-shallow-decryption-20261023 during the FHE recovery; AI-assisted triage.
active: claimed by worker worker-claude-536-c4b0c164 (Claude Code, Opus 5.5), delegated by coordinator-claude-c4b0c164-20261023. Scope: reduce the abstracts workflow's apt install to the TeX packages and fonts the renderer actually uses (possibly with a pinned cache action), then verify the PR artifact page by page against the published formal-abstracts PDFs and check declaration links. No renderer design changes (#529/#541). Branch: ci/abstracts-deps-536.
blocked (worker-claude-536-c4b0c164): the change is committed locally (0e840a89 on ci/abstracts-deps-536), but I can't push it. GitHub rejects workflow-file updates from the available OAuth token because it lacks the workflow scope. Next step: push once a credential with that scope is available (for example, after the maintainer runs gh auth refresh -h github.com -s workflow). Then I'll open the PR and compare its CI artifact with the formal-abstracts release.
Findings:
What the renderer reads. I mapped the recorded pdflatex inputs (.fls) of the full build and of the renderer test to packages with dpkg -S. They come only from texlive-fonts-extra, texlive-latex-extra, texlive-plain-generic (binhex.tex), lmodern (the renderer test only) and their dependencies. From texlive-fonts-extra it reads 82 files (about 3 MB): Libertine, newtxmath, Inconsolata/zi4 and mweights. The noble Contents index lists no other package that ships libertine.sty, newtxmath.sty, zi4.sty or mweights.sty, so the 629 MB package stays. fonts-linuxlibertine and fonts-inconsolata contain only OpenType, which would require a different engine.
Packages dropped. Nothing uses texlive-science. Dropping it also removes texlive-lang-greek, texlive-fonts-recommended and the GFS fonts, which brings the runner download from 846 MB to about 758 MB. That alone can't avoid the timeouts: the slow runs fetched at 30–50 kB/s.
How often the install is slow. In the last day, 5 of 54 build attempts used the full 30 minutes in the install step, and 4 more spent over 1000 s there before they were cancelled. The median install takes 111 s.
Fix. Install the reduced set and cache the downloaded .deb archives with actions/cache/restore and actions/cache/save, pinned to v6.1.0's commit SHA. The cache key is a digest of the exact archive list from apt-get --print-uris, and an older cache is restored as a fallback. Only main (and manual dispatches) save; PRs read main's cache. apt still verifies every archive, and cache maintenance can't fail the build. The cost is about 760 MB in an Actions cache that the 2.5 GB Lean caches already keep above 10 GB.
Verification so far. In a clean ubuntu:24.04 container I ran the workflow's own step scripts as a sudo user, then the build. All 40 renderer tests passed with none skipped. Compared with the release built from fe7bc578 at 150 dpi, all 69 pages are identical except for the 12-character source-SHA text on the 24 pages that show it. Extracted text, embedded fonts and all 232 link targets and rectangles also match once the SHA is normalised. The cache-restored install showed "Need to get 0 B/779 MB". It isn't faster than a fast mirror (about 90 s either way); what it removes is the dependence on the mirror's speed.
Patch (workflow and README)
diff --git a/.github/workflows/abstracts.yml b/.github/workflows/abstracts.yml
index 1da65b62..3db11744 100644
--- a/.github/workflows/abstracts.yml+++ b/.github/workflows/abstracts.yml@@ -29,18 +29,65 @@ jobs:
timeout-minutes: 30
outputs:
artifact-id: ${{ steps.artifact.outputs.artifact-id }}
+ env:+ # What pdflatex reads: Libertine, newtxmath, Inconsolata (zi4) and mweights from+ # texlive-fonts-extra; tcolorbox, enumitem, xurl and titlesec from texlive-latex-extra;+ # binhex.tex from texlive-plain-generic; and Latin Modern for the renderer test. Poppler's+ # pdftotext checks margins.+ TEX_PACKAGES: >-+ latexmk lmodern texlive-latex-extra texlive-fonts-extra texlive-plain-generic poppler-utils+ # The downloaded archives (about 760 MB) are cached so that runs do not depend on the speed+ # of the Ubuntu mirror; apt still resolves them from its index and verifies their digests.+ TEX_DEBS: /var/cache/tex-debs
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Validate the curated selection
run: python3 -B scripts/build_abstracts.py --check
- - name: Install PDF tooling and fonts+ - name: Resolve PDF tooling packages+ id: tex-debs
run: |
sudo apt-get update
+ sudo install -d -o "$USER" "$TEX_DEBS"+ # The cache key names the exact archives (file, size, digest) that apt would download.+ apt-get install --no-install-recommends -y -qq --print-uris \+ -o Dir::Cache::Archives="$TEX_DEBS" $TEX_PACKAGES \+ | awk '{print $2, $3, $4}' | sort > "$RUNNER_TEMP/tex-debs.txt"+ test -s "$RUNNER_TEMP/tex-debs.txt"+ echo "prefix=tex-debs-$ImageOS-" >> "$GITHUB_OUTPUT"+ echo "key=tex-debs-$ImageOS-$(sha256sum < "$RUNNER_TEMP/tex-debs.txt" | cut -c1-16)" >> "$GITHUB_OUTPUT"+ - name: Restore cached TeX packages+ id: tex-debs-cache+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0+ with:+ path: /var/cache/tex-debs+ key: ${{ steps.tex-debs.outputs.key }}+ restore-keys: ${{ steps.tex-debs.outputs.prefix }}+ - name: Install PDF tooling and fonts+ run: |
sudo apt-get install --no-install-recommends -y \
- latexmk lmodern texlive-latex-extra texlive-fonts-extra texlive-science \- texlive-plain-generic poppler-utils+ -o Dir::Cache::Archives="$TEX_DEBS" $TEX_PACKAGES+ # Pull requests read the cache saved by main; they do not write their own copies. Cache+ # maintenance never blocks the PDF build or its publication.+ - name: Prune the TeX package cache+ id: tex-debs-prune+ if: steps.tex-debs-cache.outputs.cache-hit != 'true' && github.event_name != 'pull_request'+ continue-on-error: true+ run: |+ sudo find "$TEX_DEBS" -mindepth 1 -maxdepth 1 ! -name '*.deb' -exec rm -rf {} ++ cut -d' ' -f1 "$RUNNER_TEMP/tex-debs.txt" > "$RUNNER_TEMP/tex-debs.keep"+ find "$TEX_DEBS" -maxdepth 1 -name '*.deb' -printf '%f\n' \+ | { grep -vxFf "$RUNNER_TEMP/tex-debs.keep" || true; } \+ | sed "s|^|$TEX_DEBS/|" | xargs -r sudo rm -f --+ diff <(ls "$TEX_DEBS" | sort) <(sort "$RUNNER_TEMP/tex-debs.keep")+ - name: Save the TeX package cache+ if: steps.tex-debs-prune.outcome == 'success'+ continue-on-error: true+ uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0+ with:+ path: /var/cache/tex-debs+ key: ${{ steps.tex-debs.outputs.key }}
- name: Test abstract generation
run: python3 -B -m unittest discover -s scripts -p 'test_*abstract*.py'
- name: Build individual PDFs, catalogue and provenance
diff --git a/abstracts/README.md b/abstracts/README.md
index ad2b9231..897de34f 100644
--- a/abstracts/README.md+++ b/abstracts/README.md@@ -44,7 +44,8 @@ python3 -B scripts/build_abstracts.py
On Debian/Ubuntu, the workflow installs latexmk, lmodern, poppler-utils, texlive-latex-extra,
-texlive-fonts-extra, texlive-science and texlive-plain-generic. Outputs go to abstracts/build/:
+texlive-fonts-extra and texlive-plain-generic without recommended packages, and caches the
+downloaded archives. Outputs go to abstracts/build/:
individual PDFs, catalogue.pdf, generated TeX, and provenance.json. They are untracked. Use --require-clean
for publication builds; a local build with edits records dirty-source digests and labels links as
pointing to the base revision.
active (worker-claude-536-c4b0c164): the token now has the workflow scope. Next I'll rebase ci/abstracts-deps-536 onto current main, push it, open the PR, and compare its CI artifact with the release.
awaiting review: #561 (a9cfea19). Its own PDF run built every abstract, and rendering is unchanged from the current release; the PR records the comparison. worker-claude-536-c4b0c164 was stopped mid-task, so coordinator-claude-c4b0c164-20261023 finished the record. The PR needs a non-authoring review.
Activity
SamuelSchlesinger commentedon Oct 23, 2026
active: claimed by worker
worker-claude-536-c4b0c164(Claude Code, Opus 5.5), delegated bycoordinator-claude-c4b0c164-20261023. Scope: reduce the abstracts workflow's apt install to the TeX packages and fonts the renderer actually uses (possibly with a pinned cache action), then verify the PR artifact page by page against the publishedformal-abstractsPDFs and check declaration links. No renderer design changes (#529/#541). Branch:ci/abstracts-deps-536.SamuelSchlesinger commentedon Oct 23, 2026
blocked (
worker-claude-536-c4b0c164): the change is committed locally (0e840a89onci/abstracts-deps-536), but I can't push it. GitHub rejects workflow-file updates from the available OAuth token because it lacks theworkflowscope. Next step: push once a credential with that scope is available (for example, after the maintainer runsgh auth refresh -h github.com -s workflow). Then I'll open the PR and compare its CI artifact with theformal-abstractsrelease.Findings:
pdflatexinputs (.fls) of the full build and of the renderer test to packages withdpkg -S. They come only fromtexlive-fonts-extra,texlive-latex-extra,texlive-plain-generic(binhex.tex),lmodern(the renderer test only) and their dependencies. Fromtexlive-fonts-extrait reads 82 files (about 3 MB): Libertine, newtxmath, Inconsolata/zi4 and mweights. The noble Contents index lists no other package that shipslibertine.sty,newtxmath.sty,zi4.styormweights.sty, so the 629 MB package stays.fonts-linuxlibertineandfonts-inconsolatacontain only OpenType, which would require a different engine.texlive-science. Dropping it also removestexlive-lang-greek,texlive-fonts-recommendedand the GFS fonts, which brings the runner download from 846 MB to about 758 MB. That alone can't avoid the timeouts: the slow runs fetched at 30–50 kB/s..debarchives withactions/cache/restoreandactions/cache/save, pinned to v6.1.0's commit SHA. The cache key is a digest of the exact archive list fromapt-get --print-uris, and an older cache is restored as a fallback. Only main (and manual dispatches) save; PRs read main's cache. apt still verifies every archive, and cache maintenance can't fail the build. The cost is about 760 MB in an Actions cache that the 2.5 GB Lean caches already keep above 10 GB.ubuntu:24.04container I ran the workflow's own step scripts as a sudo user, then the build. All 40 renderer tests passed with none skipped. Compared with the release built fromfe7bc578at 150 dpi, all 69 pages are identical except for the 12-character source-SHA text on the 24 pages that show it. Extracted text, embedded fonts and all 232 link targets and rectangles also match once the SHA is normalised. The cache-restored install showed "Need to get 0 B/779 MB". It isn't faster than a fast mirror (about 90 s either way); what it removes is the dependence on the mirror's speed.Patch (workflow and README)
On Debian/Ubuntu, the workflow installs
latexmk,lmodern,poppler-utils,texlive-latex-extra,-
texlive-fonts-extra,texlive-scienceandtexlive-plain-generic. Outputs go toabstracts/build/:+
texlive-fonts-extraandtexlive-plain-genericwithout recommended packages, and caches the+downloaded archives. Outputs go to
abstracts/build/:individual PDFs,
catalogue.pdf, generated TeX, andprovenance.json. They are untracked. Use--require-cleanfor publication builds; a local build with edits records dirty-source digests and labels links as
pointing to the base revision.
SamuelSchlesinger commentedon Oct 23, 2026
active (
worker-claude-536-c4b0c164): the token now has theworkflowscope. Next I'll rebaseci/abstracts-deps-536onto current main, push it, open the PR, and compare its CI artifact with the release.SamuelSchlesinger commentedon Oct 23, 2026
awaiting review: #561 (
a9cfea19). Its own PDF run built every abstract, and rendering is unchanged from the current release; the PR records the comparison.worker-claude-536-c4b0c164was stopped mid-task, socoordinator-claude-c4b0c164-20261023finished the record. The PR needs a non-authoring review.