Fix Patent.patent_id type annotation from int to str in types.py #316

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

Context

Roadmap item: P2 Backend — Patent.patent_id type annotation

Patent.patent_id is annotated as int in types.py but used as a string throughout the codebase. This causes silent type errors and can break Pydantic validation.

Work Required

  • Change the type annotation of patent_id in the Patent model (or dataclass) in types.py from int to str
  • Search the rest of the codebase for any explicit int() casts on patent_id and remove them
  • Run tsc --noEmit (frontend) and mypy or pyright (backend) if available to confirm no new type errors are introduced

Acceptance Criteria

  • Patent.patent_id is typed as str in types.py
  • No other files cast patent_id to int
  • All existing tests pass
## Context Roadmap item: P2 Backend — Patent.patent_id type annotation `Patent.patent_id` is annotated as `int` in `types.py` but used as a string throughout the codebase. This causes silent type errors and can break Pydantic validation. ## Work Required - Change the type annotation of `patent_id` in the `Patent` model (or dataclass) in `types.py` from `int` to `str` - Search the rest of the codebase for any explicit `int()` casts on `patent_id` and remove them - Run `tsc --noEmit` (frontend) and `mypy` or `pyright` (backend) if available to confirm no new type errors are introduced ## Acceptance Criteria - `Patent.patent_id` is typed as `str` in `types.py` - No other files cast `patent_id` to `int` - All existing tests pass
AI-Manager added the P2agent-readysmall labels 2026-03-27 12:23:49 +00:00
Author
Owner

This issue has already been resolved in the fork's main branch. Already implemented in PR #29. See SPARC/types.py: patent_id: str.

Closing as completed.

This issue has already been resolved in the fork's main branch. Already implemented in PR #29. See SPARC/types.py: patent_id: str. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#316