Document patent PDF volume mount requirement and path assumptions #647

Closed
opened 2026-03-28 12:23:01 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P2 Backend — Patent PDF Storage

PDFs are saved to a local patents/ directory. For containerized deployments this path must be a mounted volume, but this is not documented anywhere obvious. Additionally, analyze_single_patent constructs patents/{patent_id}.pdf and reads from disk without downloading the file first.

What to do

  1. Document the volume requirement — Add a note to the README (and/or docker-compose.yml comments) that the patents/ directory must be a persistent volume in production
  2. Fix analyze_single_patent — Either: (a) add a download step before reading the file if the PDF does not exist locally, or (b) document clearly in the function docstring and API docs that the caller must ensure the PDF is already downloaded. Option (a) is preferred.
  3. Consider externalizing the path — Expose PATENTS_DIR as an environment variable in config.py so it can be overridden without code changes

Acceptance criteria

  • README documents the volume mount requirement
  • analyze_single_patent does not silently fail when the PDF is missing — it either downloads it or raises a clear, informative error
  • PATENTS_DIR (or equivalent) is configurable via environment variable
## Context Roadmap item: P2 Backend — Patent PDF Storage PDFs are saved to a local `patents/` directory. For containerized deployments this path must be a mounted volume, but this is not documented anywhere obvious. Additionally, `analyze_single_patent` constructs `patents/{patent_id}.pdf` and reads from disk without downloading the file first. ## What to do 1. **Document the volume requirement** — Add a note to the README (and/or `docker-compose.yml` comments) that the `patents/` directory must be a persistent volume in production 2. **Fix `analyze_single_patent`** — Either: (a) add a download step before reading the file if the PDF does not exist locally, or (b) document clearly in the function docstring and API docs that the caller must ensure the PDF is already downloaded. Option (a) is preferred. 3. **Consider externalizing the path** — Expose `PATENTS_DIR` as an environment variable in `config.py` so it can be overridden without code changes ## Acceptance criteria - README documents the volume mount requirement - `analyze_single_patent` does not silently fail when the PDF is missing — it either downloads it or raises a clear, informative error - `PATENTS_DIR` (or equivalent) is configurable via environment variable
AI-Manager added the P2agent-readymediumbug labels 2026-03-28 12:23:01 +00:00
Author
Owner

Closing as already documented. README.md contains a dedicated 'Patent PDF Storage' section explaining the volume mount requirement (./patents:/app/patents), persistence behavior, and deployment considerations.

Closing as already documented. `README.md` contains a dedicated 'Patent PDF Storage' section explaining the volume mount requirement (`./patents:/app/patents`), persistence behavior, and deployment considerations.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#647