Repository navigation
fix(capture): preserve linked PDFs as portable assets - #597
Merged
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.
Summary
Preserve linked PDFs as portable document assets and keep them out of the default adapter's HTML capture queue. Related to #421; extends the document download path introduced in #428.
.pdfandapplication/pdf.Reproduction and before/after evidence
Source: https://mdhruvil.com/
Published DLA 0.19.4 attempted to navigate
/resume.pdfas an HTML page. The endpoint returns HTTP 200 withapplication/pdf; Chromium'spage.goto()throwsDownload is startingbefore the non-HTML response check. Four retries for each viewport leave the capture incomplete and block Studio before WordPress materialization.The default adapter merged navigation/header URLs without using the asset filter already applied to other same-origin links. Separately, the portable document helper and dependency MIME intake supported Word documents but not PDFs.
Fresh candidate capture based on
13711036:diagnostics.jsonreportscomplete: true, with no capture failures, resource failures, unresolved dependencies, media or anchors.capture-receipt.jsonlists the résumé under assets aswebsite/resume.pdf, not under page routes. The shared header retains a working/resume.pdflink.f175f577d2b82e0c4cbcd9086c56f16b190eab0a8cc33181947902dc12bcdd05.Verification
Regression assertions failed before the fix: raw navigation included the PDF as a required page, and PDF DOM dependency capture fetched no portable bytes. All focused checks pass after the fix:
Generated
dist/output was restored after verification, as required by the repository's feature-PR policy.Execution provenance / AI assistance
OpenAI gpt-6.1-sol via OpenCode investigated the failure, implemented and self-reviewed the source/test changes, ran regression/build/package and real-source capture/comparison checks, and drafted this PR under human direction.
Finalization occurred outside Homeboy after explicit operator authorization. Homeboy's Lab refresh timed out and the documented local Cook route failed admission before coding (
mdhruvil-pdf-421-1557137277229211759). Direct work used an isolated Git worktree linked to #421. OpenCode session evidence:ses_eecf4e196ffeOW0yJqoWWWDlif; runtime commands and observed results are recorded above.