refactor(make-pdf): print through Aside first, the bundled browser otherwise

asideClient.ts replaces the direct $B client with one render() call per PDF (the exact option mapping the browse pdf command had: paper, margins, header/footer/page numbers, tagged, outline, printBackground, preferCSSPageSize, Paged.js wait); the diagram pre-pass, oversized-image downscale and DOCX rasters each run as one render script with per-fence try/catch; exit 4 now means no browser is available and names both remedies; $P setup reports which engine it found. The e2e gates run on whichever engine is present, so the Linux lane exercises the fallback.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Sina
2026-09-05 16:48:37 -04:00
co-authored by Claude Fable 5.1
parent c0ac82461e
commit f74d3a1a63
29 changed files with 976 additions and 1262 deletions
@@ -1,6 +1,6 @@
/**
* Offline-posture sanitizer tests — raw-HTML fetch vectors beyond <img src>
* (which the image inliner owns). No Playwright, no PDF generation.
* (which the image inliner owns). No browser, no PDF generation.
*
* Regression for: <style>@import, inline style="…url(https://…)…", and
* <img srcset> surviving sanitizeUntrustedHtml, letting Chromium fetch