forked from 0xWheatyz/SPARC
Fix analyze_single_patent to download PDF before reading from disk #552
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?
Summary
analyze_single_patentconstructs the pathpatents/{patent_id}.pdfand attempts to read it from disk, but does not ensure the file has been downloaded first. This causes silent failures or unhandled file-not-found errors.What to do
analyze_single_patentto check whetherpatents/{patent_id}.pdfexists before attempting to read it.Acceptance Criteria
analyze_single_patentwithout a pre-downloaded PDF either downloads it automatically or raises a clear error.FileNotFoundErrorexceptions.Reference
Roadmap item: P2 - Backend > analyze_single_patent assumes local file path
Triage (Repo Manager): Assigned to AI-Engineer as @developer task. P2/medium -- bug fix in analyze_single_patent. Requires adding PDF download check before disk read.
Triage update: Priority upgraded from P2 to P1. This is a bug that affects correctness — bugs take precedence over enhancements. Added
bugcategory label. Already assigned to AI-Engineer.[Repo Manager] This issue is already resolved.
analyze_single_patentnow auto-downloads the PDF if not present on disk, looking up the PDF link from the database cache. Closing as complete.