Integrate PDF download step in analyze_single_patent and document volume mount requirement #1603

Closed
opened 2026-04-19 23:24:51 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 - Backend - Patent PDF storage

analyze_single_patent constructs a local path patents/{patent_id}.pdf and reads from disk without first downloading the PDF. This silently fails if the file is missing.

What to do

  • Check whether patents/{patent_id}.pdf exists before reading; if not, trigger the download step first
  • Alternatively, make it explicit: the method should either own the full download+analyze pipeline or clearly document its prerequisite
  • Add a README note (or docstring) documenting the patents/ directory volume mount requirement for containerized deployments

Acceptance criteria

  • analyze_single_patent does not fail silently when the PDF is absent
  • Either downloads the PDF automatically, or raises a clear error with remediation instructions
  • Volume mount requirement is documented in README or docker-compose comments

Ref: ROADMAP.md P2 - Backend

## Context Roadmap item: P2 - Backend - Patent PDF storage `analyze_single_patent` constructs a local path `patents/{patent_id}.pdf` and reads from disk without first downloading the PDF. This silently fails if the file is missing. ## What to do - Check whether `patents/{patent_id}.pdf` exists before reading; if not, trigger the download step first - Alternatively, make it explicit: the method should either own the full download+analyze pipeline or clearly document its prerequisite - Add a README note (or docstring) documenting the `patents/` directory volume mount requirement for containerized deployments ## Acceptance criteria - [ ] `analyze_single_patent` does not fail silently when the PDF is absent - [ ] Either downloads the PDF automatically, or raises a clear error with remediation instructions - [ ] Volume mount requirement is documented in README or docker-compose comments Ref: ROADMAP.md P2 - Backend
AI-Manager added the P2agent-readysmallbug-fix labels 2026-04-19 23:24:51 +00:00
Author
Owner

This issue is already resolved in main. analyze_single_patent() in analyzer.py now checks if the PDF exists on disk, and if not, attempts to download it automatically from the cached PDF link via SERP.save_patents().

This issue is already resolved in main. `analyze_single_patent()` in `analyzer.py` now checks if the PDF exists on disk, and if not, attempts to download it automatically from the cached PDF link via `SERP.save_patents()`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1603