Three tsc projects held the frontend and NOTHING held the backend: ~36k lines of `app/`, annotated in 113 of 128 files, that no lane had ever read. Asymmetric by accident, not by decision. basedpyright, in basic mode. Measured against mypy on this tree with the dependencies actually installed — without them basedpyright errors on every import and mypy's --ignore-missing-imports quietly turns them into Any and UNDER-reports. Both land ~190-200 errors with the same distribution, so the choice fell to what differs: basedpyright is ~2x faster (4.4s vs 7.4s, and this runs on every `siftlode lint`), resolves our `app.*` imports from its own config with no MYPYPATH, and has a first-class `--writebaseline`. That last one is the ratchet itself; mypy would have needed a third-party tool for it. 198 pre-existing errors are baselined, so the lane fails on NEW errors only and the list burns down epic by epic. A green lane means no new damage, not a clean codebase. It runs in the pytest test image rather than on the host, and that is forced rather than chosen: `requirements.lock` cannot be installed on Windows at all — uvloop refuses to build there — so a host venv could only ever be the lock minus a package, and a type checker without the real third-party packages reports nonsense rather than nothing. The image installs the pin from requirements-dev.txt, so the lane's version IS the pin and there is no host copy to drift. The cost is that `siftlode lint` now needs Docker, which it did not before.
14 lines
867 B
Plaintext
14 lines
867 B
Plaintext
# Test + lint tooling — NEVER in the prod image. Installed only by backend/Dockerfile.test (the
|
|
# throwaway test image), which the prod build (root Dockerfile) never references. Pinned so the
|
|
# suite is reproducible: pytest for the pure-logic tests, and ruff at the SAME version the gate's
|
|
# backend lint lane runs on the host (the gate fails when the host's ruff is not this one). httpx2:
|
|
# Starlette 1.x's TestClient is built on it (`import httpx2 as httpx`) and only falls back to the
|
|
# app's own httpx with a deprecation warning on every run.
|
|
# basedpyright: the backend type-check lane (E27 S3). Pinned like everything else here — a type
|
|
# checker whose version floats silently changes what "clean" means, and the ratchet baseline it
|
|
# writes is keyed to the diagnostics THIS version produces.
|
|
basedpyright==1.40.1
|
|
pytest==8.4.2
|
|
ruff==0.15.21
|
|
httpx2==2.13.0
|