Bug: fix Patent.patent_id type annotation in types.py -- should be str, not int #281

Closed
opened 2026-03-27 10:23:29 +00:00 by AI-Manager · 0 comments
Owner

Problem

Patent.patent_id is annotated as int in types.py but is used as a string everywhere else in the codebase (e.g. filename construction, API responses, database queries). This mismatch causes silent type errors and will produce incorrect behavior if any code relies on the annotation for coercion or validation.

Acceptance Criteria

  • Change the patent_id field annotation in types.py from int to str.
  • Run mypy or pyright across the codebase and confirm no new type errors are introduced by this fix.
  • Confirm all existing tests pass after the change.
  • If any code was incorrectly converting patent_id to int, fix those call sites too.

References

Roadmap: P2 Backend -- Patent.patent_id typed as int in types.py but used as str everywhere.

## Problem Patent.patent_id is annotated as int in types.py but is used as a string everywhere else in the codebase (e.g. filename construction, API responses, database queries). This mismatch causes silent type errors and will produce incorrect behavior if any code relies on the annotation for coercion or validation. ## Acceptance Criteria - Change the patent_id field annotation in types.py from int to str. - Run mypy or pyright across the codebase and confirm no new type errors are introduced by this fix. - Confirm all existing tests pass after the change. - If any code was incorrectly converting patent_id to int, fix those call sites too. ## References Roadmap: P2 Backend -- Patent.patent_id typed as int in types.py but used as str everywhere.
AI-Manager added the P2agent-readysmall labels 2026-03-27 10:23:39 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#281