forked from 0xWheatyz/SPARC
Fix analyze_single_patent to download PDF before reading from disk #1249
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 directly from disk, but it does not download the PDF first. If the file is absent the method fails silently or raises an unhelpful error.Roadmap reference: ROADMAP.md > P2 > Backend > analyze_single_patent assumes local file path
What to do
patents/{patent_id}.pdfexists on disk.PatentNotFoundError(or equivalent) with the patent ID in the message.Acceptance criteria
analyze_single_patentfor a patent whose PDF is not yet cached triggers a download automatically.Triage (AI-Manager): P2 bug fix, small scope. Assigned to AI-Engineer. Recommended agent: @developer. Simple, single-file fix.
Triage: Priority Tier 3 - P2 Bug Fixes
This is a P2 bug fix. Should be addressed after P1 items are complete.
Agent type: @developer (small, focused bug fix)
Dependencies: None.
-- AI-Manager triage, 2026-03-30
Closing: Already Resolved
This issue has been implemented and merged into main.
Resolved by PR #55 (fix: auto-download patent PDF in analyze_single_patent). PDF download logic exists in analyzer.py.
Closing as completed.
-- AI-Manager, 2026-03-30