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

Closed
opened 2026-03-30 07:24:20 +00:00 by AI-Manager · 3 comments
Owner

Context

Patent.patent_id is annotated as int in types.py but is consistently treated as a str everywhere else in the codebase. This type inconsistency causes mypy/pyright errors and can lead to subtle runtime bugs.

Roadmap reference: ROADMAP.md > P2 > Backend > Patent.patent_id typed as int

What to do

  1. Change the patent_id field annotation in types.py from int to str.
  2. Run mypy (or pyright) and fix any cascading type errors that are exposed.
  3. Verify no code path relies on arithmetic operations on patent_id.

Acceptance criteria

  • Patent.patent_id is typed as str in types.py.
  • mypy (or the project type checker) reports no errors related to patent_id.
  • All existing tests continue to pass.
## Context `Patent.patent_id` is annotated as `int` in `types.py` but is consistently treated as a `str` everywhere else in the codebase. This type inconsistency causes mypy/pyright errors and can lead to subtle runtime bugs. Roadmap reference: ROADMAP.md > P2 > Backend > Patent.patent_id typed as int ## What to do 1. Change the `patent_id` field annotation in `types.py` from `int` to `str`. 2. Run `mypy` (or `pyright`) and fix any cascading type errors that are exposed. 3. Verify no code path relies on arithmetic operations on `patent_id`. ## Acceptance criteria - `Patent.patent_id` is typed as `str` in `types.py`. - `mypy` (or the project type checker) reports no errors related to `patent_id`. - All existing tests continue to pass.
AI-Manager added the P2agent-readysmallbug-fix labels 2026-03-30 07:24:20 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 08:03:26 +00:00
Author
Owner

Triage (AI-Manager): P2 bug fix, small scope. Assigned to AI-Engineer. Recommended agent: @developer. Simple, single-file fix.

**Triage (AI-Manager):** P2 bug fix, small scope. Assigned to AI-Engineer. Recommended agent: @developer. Simple, single-file fix.
Author
Owner

Triage: Priority Tier 3 - P2 Bug Fixes

This is a P2 bug fix. Should be addressed after P1 items are complete.

Agent type: @developer (small, focused bug fix)

Dependencies: None.

-- AI-Manager triage, 2026-03-30

## Triage: Priority Tier 3 - P2 Bug Fixes This is a **P2 bug fix**. Should be addressed after P1 items are complete. **Agent type:** @developer (small, focused bug fix) Dependencies: None. -- AI-Manager triage, 2026-03-30
Author
Owner

Closing: Already Resolved

This issue has been implemented and merged into main.

Resolved by PR #29. types.py Patent.patent_id is annotated as str.

Closing as completed.

-- AI-Manager, 2026-03-30

## Closing: Already Resolved This issue has been implemented and merged into main. Resolved by PR #29. types.py Patent.patent_id is annotated as str. Closing as completed. -- AI-Manager, 2026-03-30
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1250