ci: fix docs build OOM and move back to the official docgen-action #519
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 434 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.363
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #519"
general
weight: 0.35
seewoo5
What's broken
The
Compile blueprint and documentationstep has failed on every push to main since #506 (14 Nov). Last green run on main was #508 on 11 Nov. Three consecutive failures: 14 Nov, 21 Nov, 23 Nov.The failure is always the same:
PRs never caught this because
Build project API documentationis gated ongithub.event_name == 'push'— API docs are only built on pushes to main.Why it happens
doc-gen4 leaves a very large heap resident after building
coreDocs. When Lake then forksgitfor thesrcUri.githubtargets, the kernel's default overcommit heuristic refuses the fork.This is the overcommit heuristic, not genuine exhaustion:
srcUri.githubfor each dependency;Fix 1: give the docs build headroom to fork
vm.overcommit_memory=1makes the kernel allow the fork. The swapfile is belt-and-braces for real pressure, and lives on/mnt(the ~70 GB temp disk) so it doesn't compete with the docs build for space on/. The existingfree-disk-spacestep already hasswap-storage: false, so it isn't fighting this.There is no cleaner "use fewer jobs" knob: Lake 5.0 (Lean 4.36) has no
-jflag and noLAKE_JOBS-style env var, and the action gives no way to passlean -j/-Minto doc-gen4's build.Fix 2: back to the official docgen-action
Both fixes we needed from
dwrensha/docgen-actionare now upstream:| fork workaround | upstreamed as |
|---|---|
| user project after doc-gen4 in
docbuild/lakefile.toml(theplausibleversion skew that forced full mathlib rebuilds) | docgen-action#32 || force doc-gen4's HTML pass to re-run after a cache hit (the project-page 404s) | docgen-action#38 |
scripts/build_docs.shis otherwise identical between the two (comments plus a better-guardedsudo chownupstream), anddist/index.jsis byte-identical, so the cached paths don't change and there's no forced cache-version miss.ruby-version: "3.1"preserves what the fork hardcoded —home_page/Gemfileuses thegithub-pagesgem, which does not build on the official action's3.4default. Upstream also ungated the Jekyll steps frompush, so the homepage build now runs on PRs too.Reviewer note: this PR's CI cannot prove the fix
Build project API documentationis push-gated, so this PR will go green whether or not the OOM is fixed. Only the merge to main exercises it.What the PR run does confirm: the new step runs and
free -hshows the 16 GB swapfile, and the Jekyll build now runs on PRs, confirming the Ruby 3.1 pin.Also note the docs cache is currently dead and cannot self-heal: the key is
Docs-${{ hashFiles('lake-manifest.json', 'references.bib') }}, #510 moved it to470e9af…, the only cache present isDocs-dd2ccf…from 5 Nov, andactions/cacheispost-if: success()so a failing job never writes one. The first green run on main repopulates it and later runs drop from ~11.3k targets back to the cheap path.If it still OOMs after merge, the next lever is a one-off
continue-on-error: trueon the docgen step to force a partial cache save, then revert it.🤖 Generated with Claude Code