forked from 0xWheatyz/SPARC
Bug: analyze_single_patent does not download PDF before reading it from disk #527
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 prerequisite gap
analyze_single_patentconstructs a pathpatents/{patent_id}.pdfand reads from disk, but does not ensure the PDF has been downloaded first. This causes silent failures or crashes when the file is absent.Task
analyze_single_patentto determine the expected caller contractanalyze_single_patentbefore readingAcceptance Criteria
analyze_single_patenton a patent whose PDF is not yet downloaded either downloads it automatically or raises a descriptiveFileNotFoundErrorVerified complete:
analyze_single_patent()inanalyzer.pychecks if PDF exists on disk, and if not, looks up the cached PDF link from the database and downloads it automatically before proceeding with analysis. Closing as implemented.