forked from 0xWheatyz/SPARC
Fix analyze_single_patent to download PDF before reading from disk #1556
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 it directly, but does not download the PDF first. If the file is absent the method fails silently or raises an unhandled exception.Roadmap reference: ROADMAP.md > P2 > Backend > analyze_single_patent assumes local file path
What to do
serp_api.py).analyze_single_patentif the local file does not already exist.Patentobject and save to the expected path.Acceptance criteria
analyze_single_patentfor a patent whose PDF is not already cached triggers a download.This issue has been resolved. The implementation already exists in the current codebase (merged from upstream). Verified by repo manager during triage on 2026-04-19.