Files
desklock/gateway
jpmschweitzerandClaude 3f8e4cf593
Test, Build and Push / test-gateway (push) Successful in 11s
Test, Build and Push / release (push) Skipped
Test, Build and Push / build-gateway (push) Skipped
fix(gateway): tell mypy the speech extra may be absent
`make typecheck` failed on four missing stubs — piper, faster_whisper and numpy
twice — which made the pre-push gate red on a machine that had followed the
documented setup. `make setup` deliberately omits the speech extra; only
`make setup-speech` installs it, because faster-whisper and piper-tts pull
several GB of ML wheels for a backend the deployment does not use.
settings.tts_backend defaults to "speaches", a network call to the shared
service on 8601, and both imports are lazy inside the functions that need them.
So the absence is a runtime fact the code already handles, not a defect.

The gate was therefore failing for doing the right thing, which is how a gate
stops being read. The correct assertion is "these modules may be absent", not
"install several GB so the type checker is satisfied" — on a disk at 76%, for a
path this deployment does not take.

There was no [tool.mypy] section at all, so this adds one. numpy is listed for
the same reason as the other two: nothing depends on it directly, it arrives
with faster-whisper.

Note the packaging was already correct — speech is an optional extra and always
has been. I initially reported these as required dependencies that were missing
from the venv, having grepped for the package names and read the hits without
checking which table they sat under; `mypy>=1.11` was three lines below in the
same output, which should have said "these are extras". CLAUDE.md states it
outright. The fix is smaller than the one I first described because the repo
was already doing the right thing.

Gate now passes: secrets, ruff, mypy, 9 tests. Firmware and sim still report
undetermined, which is accurate — neither has a suite.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 14:30:56 +02:00
..