Skip to content

chore: add allow_inf_nan=False to all remaining ConfigDict declarations #913

@Aureliolo

Description

@Aureliolo

Context

PR #911 documented the allow_inf_nan=False convention in CLAUDE.md and applied it to Task and AcceptanceCriterion. However, many ConfigDict declarations across the codebase still lack this setting.

Problem

~150+ ConfigDict(frozen=True) declarations do not include allow_inf_nan=False. Models with numeric float fields (costs, rates, percentages, timestamps) could accept inf/NaN values that break downstream arithmetic.

Proposed Solution

Add allow_inf_nan=False to every ConfigDict declaration in src/synthorg/. Priority modules (have float fields):

  • providers/models.py (8 declarations)
  • settings/models.py (3 declarations)
  • templates/schema.py (5 declarations)
  • tools/base.py (1 declaration)
  • budget/spending_summary.py (2 declarations)
  • budget/config.py (2 declarations)
  • budget/coordination_metrics.py (6 declarations)
  • api/dto.py (30+ declarations)
  • engine/ models (many declarations)
  • security/ models (many declarations)
  • communication/ models (many declarations)
  • core/ models (many declarations)

Models without numeric fields get it defensively (guards against future float additions).

Source

Found during PR #911 review (CodeRabbit inline comment on CLAUDE.md).

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:lowNice to have, can deferscope:medium1-3 days of worktype:choreMaintenance, cleanup, dependency updatesv0.5Minor version v0.5v0.5.3Patch release v0.5.3

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions