Repair Worker resume imports and dependency security gates - #69
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resume file import failed on Workers because its module loader used string code generation and its PDF parser required browser-only APIs. PDF extraction now runs on the device with the existing parser and a bundled, same-origin worker; the existing server action structures and saves the extracted text. Expected parsing, AI and save failures return readable, retryable UI results. Legacy .doc uploads receive conversion guidance; supported extensions work when browsers omit MIME types.
The repair also updates vulnerable existing dependencies: Next.js 16.3.4, Mammoth 1.12.2, Astro 7.2.8, aligned Wrangler 4.114.0, and targeted transitive overrides. The security gate reports zero critical and zero unexpected findings; seven previously accepted high advisory IDs remain across eight paths. No acceptance exceptions were added. Astro's four static pages remain pixel-identical at 390px and 1440px after restoring two inline spaces.
Validation: full quality passes (483 tests) and the complete Cloudflare build passes. Real synthetic PDF/DOCX fixtures exercise the parsers. In Chromium at 390px against the built local Worker, PDF import preserved source facts in the AI request, opened the editor and persisted after reload using a local AI stub. A deliberately unavailable provider produced a readable message and enabled retry; the PDF worker asset returned HTTP 200. Local servers, browsers and temporary files were cleaned up. Evidence is under docs/operations/evidence/.
Hosted AI import and signed-in persistence are not yet qualified. This is not production release evidence. Refs #68; keep that acceptance issue open.