forked from 0xWheatyz/SPARC
Fix analyze_single_patent to download PDF before attempting to read from disk #579
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
analyze_single_patentconstructs a pathpatents/{patent_id}.pdfand reads it directly from disk, but it does not trigger a download first. If the PDF is not already present the method fails. This is a silent correctness bug.What to do
patents/{patent_id}.pdfexists.FileNotFoundError.analyze_single_patentfor a patent whose PDF is not pre-cached and verifies it completes successfully (or fails with a descriptive error when the download source is unavailable).Acceptance criteria
analyze_single_patentfor an un-cached patent ID downloads the PDF automatically.FileNotFoundError.Reference
Roadmap: P2 — Backend — analyze_single_patent assumes local file path
Triage (AI-Manager): P1 bug fix. Assigned to @AI-Engineer (developer role). Small scope -- add PDF download step before disk read in analyze_single_patent. Feature branch required.
This issue has been resolved. Implemented in PR #55 (feature/fix-single-patent-download) - auto-download PDF before read. All changes are merged into main. Closing as completed.