Store PDF alongside materialized datasheet outputs#572
Merged
Conversation
e752001 to
d13553f
Compare
Copy or reuse the PDF inside the content-hash materialized directory so markdown, images, and PDF live together. Return pdf_path from the materialized directory and keep pretty filenames, while deduplicating cache lookup paths.
d13553f to
ed4ed82
Compare
LK
approved these changes
Feb 24, 2026
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.
Copy the PDF inside the content-hash materialized directory so markdown, images, and PDF live together.
Note
Low Risk
Localized caching changes around datasheet materialization; main risk is cache misses or extra disk usage due to copying PDFs.
Overview
Datasheet resolution now copies the source PDF into the content-hash materialized directory and returns that path, so the markdown, images, and PDF are co-located even when serving from cache.
Caching helpers were refactored into a generic
first_valid_file_in_dirplus validators for markdown/PDF, andis_valid_cached_pdfwas hardened to return false for directories; tests were updated/added to cover the new behavior.Written by Cursor Bugbot for commit ed4ed82. This will update automatically on new commits. Configure here.