Skip to content

Store PDF alongside materialized datasheet outputs#572

Merged
akhilles merged 1 commit intomainfrom
resolve-datasheet-cleanup
Feb 24, 2026
Merged

Store PDF alongside materialized datasheet outputs#572
akhilles merged 1 commit intomainfrom
resolve-datasheet-cleanup

Conversation

@akhilles
Copy link
Contributor

@akhilles akhilles commented Feb 24, 2026

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_dir plus validators for markdown/PDF, and is_valid_cached_pdf was 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.


Open with Devin

@akhilles akhilles requested a review from LK February 24, 2026 03:01
devin-ai-integration[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

@akhilles akhilles force-pushed the resolve-datasheet-cleanup branch from e752001 to d13553f Compare February 24, 2026 03:05
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.
@akhilles akhilles force-pushed the resolve-datasheet-cleanup branch from d13553f to ed4ed82 Compare February 24, 2026 03:14
@akhilles akhilles merged commit 01694a4 into main Feb 24, 2026
12 checks passed
@akhilles akhilles deleted the resolve-datasheet-cleanup branch February 24, 2026 21:58
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