forked from 0xWheatyz/SPARC
Fix analyze_single_patent to download PDF before reading from disk #1361
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
Roadmap item: P2 Backend - analyze_single_patent assumes local file path
analyze_single_patentinanalyzer.pyconstructspatents/{patent_id}.pdfand reads directly from disk, but does not ensure the file exists first. Callers must download the PDF separately, which is undocumented and error-prone.What to do
analyze_single_patent: ifpatents/{patent_id}.pdfdoes not exist, download it before attempting to parse it.Acceptance criteria
analyze_single_patentfor a patent whose PDF has not been downloaded either fetches the PDF automatically or raises a clear, actionable error.[Repo Manager] This issue has already been resolved on the main branch. Verified by code inspection during triage. Closing.