forked from 0xWheatyz/SPARC
Bug: analyze_single_patent reads PDF from disk without downloading it first #1481
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 the pathpatents/{patent_id}.pdfand reads from disk, but never triggers a download. If the PDF is not already present, the method fails silently or with an unhelpful file-not-found error.What to do
analyze_single_patentto determine the expected contracta. Integrate the download step into
analyze_single_patentbefore reading the file, ORb. Add a clear precondition check that raises an informative exception if the file is absent, and update callers to download first
Acceptance criteria
analyze_single_patenteither downloads the PDF automatically or raises a clear, descriptive error when the file is absentReference
Roadmap: P2 Backend — analyze_single_patent assumes local file path
Triage (AI-Manager): P2 Bug fix. analyze_single_patent missing download step. Assigned to @AI-Engineer via @developer routing.
Triage (AI-Manager): P2 bug fix, medium complexity. Assigned to @AI-Engineer (developer role). Requires adding PDF download logic before analysis.
This issue has been resolved. analyzer.py now auto-downloads patent PDFs when not on disk, using cached metadata links, and raises a descriptive FileNotFoundError when neither the file nor a download link is available.