Config: add strict type validation for pyfallow TOML values #37
Labels
No labels
area:ci
area:docs
area:engineering
area:framework-fp
area:test-coverage
dogfood:fn
dogfood:fp
dogfood:friction
dogfood:tp
phase:b
phase:c
severity:critical
severity:high
severity:low
severity:medium
source:deepseek-v4-pro
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pdurlej/fallow-py#37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source
Triaged from DeepSeek v4 Pro audit via #35.
Problem
The config loader validates some semantic constraints, but
_merge_dataclass()can assign TOML values with the wrong type directly into dataclass fields. That can let malformed configuration fail later in analysis with a less useful error, or quietly alter behavior.This is distinct from #8 / B5, which is about MCP Pydantic contract models and schema drift. This issue is about stdlib core config parsing in
src/pyfallow/config.py.Target behavior
Malformed
.pyfallow.toml,.fallow.toml, or[tool.pyfallow]values should fail early withConfigErrornaming the field and expected shape.Examples that should be rejected before analysis starts:
roots = "src"where a list is expectedentry = [123]where list[str] is expectedinclude_tests = "yes"where bool is expectedAcceptance criteria
ConfigErrorwith the offending field name._merge_dataclass().Out of scope
codex referenced this issue2026-05-12 08:37:36 +02:00