You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CI/CD] Wire mypy into CI as a baseline-gated regression check #430
ci-cdContinuous integration, delivery, and automated runnerspythonPython-specific runtime or environment optimizationstestingUnit, integration, and E2E pipeline verification
Add mypy as a required CI check, gated against a committed baseline so it fails only on new type errors -- not the existing 235 (see #429 for the measured breakdown). Same pattern as `tests/dead_key_audit.py`.
🛠️ Implementation
`tests/mypy_audit.py`: runs `mypy gitgalaxy/ --ignore-missing-imports`, parses output into `{file}:{line}: {code}` keys, diffs against a committed `tests/mypy_audit_baseline.json`.
Baseline entries no longer reproduced should be reported as FYI (encourage shrinking the baseline in the same PR that fixes them), mirroring `dead_key_audit.py`'s `run_ci_check()`.
New workflow (or a job in an existing one) running `python tests/mypy_audit.py --ci`.
Baseline keys include line numbers, so unrelated edits elsewhere in a file can shift them and produce spurious "new" errors needing a baseline refresh, even when nothing type-relevant changed. This is a standard, accepted tradeoff for line-based mypy baselining (not a bug) -- document it in the script's docstring like dead_key_audit.py's own "SCOPE & LIMITATIONS" section.
Done and verified in production. `mypy-audit.yml` has been running as a required check on every PR since #434 merged, and has already correctly caught a real environment-dependent baseline mismatch once (#436) -- confirming the gate itself works as designed, not just that it exists.
ci-cdContinuous integration, delivery, and automated runnerspythonPython-specific runtime or environment optimizationstestingUnit, integration, and E2E pipeline verification
Activity
Wire mypy into CI as a baseline-gated regression check (#430) (#434)
Type RECORDING_SCHEMAS as a TypedDict, resolving 42 fan-out mypy erro…
squid-protocol commentedon Jul 25, 2026
Done and verified in production. `mypy-audit.yml` has been running as a required check on every PR since #434 merged, and has already correctly caught a real environment-dependent baseline mismatch once (#436) -- confirming the gate itself works as designed, not just that it exists.
Closing.
Clear all remaining 24 mypy errors -- baseline reaches 0 (#432 final …
Adopt ruff for linting and formatting, replacing flake8 (#469)
Adopt ruff for linting and formatting, replacing flake8 (#469) (#470)