forked from 0xWheatyz/SPARC
Fix: integrate PDF download step into analyze_single_patent or document the prerequisite #885
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 a local pathpatents/{patent_id}.pdfand reads from disk, but does not download the PDF first. This causes silent failures when the file is absent.Roadmap reference: P2 Backend - analyze_single_patent PDF prerequisite
What to do
Choose one of:
analyze_single_patentso that if the file does not exist, it is downloaded before analysis proceeds.FileNotFoundErrorwith a helpful message) if the PDF is not present, and update the API layer to return a 422 with instructions.Whichever option is chosen:
Acceptance criteria
analyze_single_patentwith a non-existent PDF does not silently fail.This issue has been resolved. The changes are already merged into main.
PDF auto-download integrated into analyze_single_patent. Missing PDF case handled with proper error.
Closing as completed.