-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add allow_inf_nan=False to all remaining ConfigDict declarations #913
Copy link
Copy link
Closed
Labels
prio:lowNice to have, can deferNice to have, can deferscope:medium1-3 days of work1-3 days of worktype:choreMaintenance, cleanup, dependency updatesMaintenance, cleanup, dependency updatesv0.5Minor version v0.5Minor version v0.5v0.5.3Patch release v0.5.3Patch release v0.5.3
Description
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).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:lowNice to have, can deferNice to have, can deferscope:medium1-3 days of work1-3 days of worktype:choreMaintenance, cleanup, dependency updatesMaintenance, cleanup, dependency updatesv0.5Minor version v0.5Minor version v0.5v0.5.3Patch release v0.5.3Patch release v0.5.3