Problem
list[Model], dict[str, Model], tuples and sets don't map to the right spec array/object schemas.
Acceptance criteria
Guardrails (must hold — the AI reviewer enforces these)
- Python 3.11+,
from __future__ import annotations in every module, strict mypy, ruff clean (line length 100)
- Parser stays AST-only — never import or exec the analyzed project
- No new runtime dependency without strong justification in the PR (CI dep-count matters)
.docguard.yaml config stays backwards-compatible
- No LLM in the
check/report path; output stays deterministic (sorted, no clocks/network)
- Internal data = stdlib
@dataclass with to_dict(); exit codes 0/1/2
- Add pytest coverage including a false-positive / missed-endpoint case where relevant
Likely files
src/docguard/parsers/fastapi_parser.py
src/docguard/core/comparator.py
tests/test_type_fidelity.py
Out of scope
Numpy/pandas container types.
Part of epic: Epic: Deep type fidelity — eliminate the last false positives. Picked up autonomously by the DocGuard pipeline when moved to Ready.
Problem
list[Model],dict[str, Model], tuples and sets don't map to the right spec array/object schemas.Acceptance criteria
list[Model]/set[Model]→ spec array with item schema;dict[str, Model]→ object/additionalPropertiesGuardrails (must hold — the AI reviewer enforces these)
from __future__ import annotationsin every module, strict mypy, ruff clean (line length 100).docguard.yamlconfig stays backwards-compatiblecheck/reportpath; output stays deterministic (sorted, no clocks/network)@dataclasswithto_dict(); exit codes 0/1/2Likely files
src/docguard/parsers/fastapi_parser.pysrc/docguard/core/comparator.pytests/test_type_fidelity.pyOut of scope
Numpy/pandas container types.
Part of epic: Epic: Deep type fidelity — eliminate the last false positives. Picked up autonomously by the DocGuard pipeline when moved to Ready.