Skip to content

build: trim audited PDF.js server payload and measure #229 image - #235

Merged
lyyzka merged 5 commits into
mainfrom
codex/issue229-oci-measurement
Oct 20, 2026
Merged

lyyzka merged 5 commits into
mainfrom
codex/issue229-oci-measurement

Conversation

@lyyzka

@lyyzka lyyzka commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Related to #229. Independent draft from main c6c47bdd; no merge, production action or issue closure.

Published-image measurements

For baseline 535873b9 → deployed-source ac906946 (sha256:6ac0d343...) on linux/amd64, complete OCI gzip layers are 207,402,312 → 206,838,733 bytes (−0.272%) and digest-verified expanded tar layers are 625,566,208 → 623,327,232 bytes (−0.358%). Both published SPA dist layers have 1,134 identical files and identical per-file gzip/Brotli totals. Production dependency layers differ only in .package-lock.json and the removed lingxiloop self-link. Exact-image product source, licenses, entry paths and Visualize Python export were inspected. The image still carries third-party test/fixture and source-map candidates; these were not globally removed.

Bounded packaging change

The exact image's LingxiOS 3.5.6 imports only pdfjs-dist/legacy/build/pdf.mjs and resolves its CMaps, fonts and WASM. A scan of 17,834 packaged code/JSON files found no other PDF.js runtime consumer. The separate SPA build imports the generic PDF worker from its own complete dependency install. This PR trims only server-deps pdfjs-dist@6.3.289 viewer directories and three unused generic-build maps. It retains generic and legacy JS/worker, active legacy maps, types, dynamic resources, package metadata and all licenses. Exact version, consumer, path and import guards fail builds on drift.

Measured on a copy of the exact installed package: 554 → 379 files, 34,781,083 → 24,272,468 regular-content bytes (−10,508,615); deterministic package tar gzip 8,533,320 → 6,495,400 bytes (−2,037,920). These are package-copy measurements, not a built candidate OCI saving. The 379 retained files have identical hashes. The published image's Node 22 executed the trim successfully on a task-owned package copy.

No-network short checks against the exact published image with only the candidate PDF.js package mounted read-only: real LingxiOS PDF document-worker output is byte-identical before/after for the retained triangle PDF fixture (201 bytes, SHA-256 30ee46cd...); generic and legacy getDocument imports pass; packaged Web/Worker entries link to the missing-DATABASE_URL guard. The unpruned image fails the new packaging guard as intended; a wrong package version fails before deletion. Actual BuildKit scratch COPY confirms the prune script is present under production ignore rules. Existing production packaging/release-smoke contracts pass 24/24 with 0 skip.

Full report, failure model, inventories and reproduction.

Remaining: build and audit the actual candidate OCI on a suitable disk budget, controlled full-build time and peak disk, configured Web/Worker/DB and more PDF resource variants, combined runtime 3.5.8 compatibility and the sole integrator's final production acceptance. The default local Docker context fails the unchanged bubblewrap namespace preflight. The draft does not claim #229 completion.

@lyyzka lyyzka changed the title docs: measure #229 published OCI image and remaining gates build: trim audited PDF.js server payload and measure #229 image Oct 20, 2026
@lyyzka
lyyzka merged commit 19c35df into main Oct 20, 2026
16 checks passed
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.

2 participants