The "make indexer importable without env" refactor (e32806a, merged via PR
#52 on 2026-10-09) removed EMBEDDING_MODEL_NAME, BATCH_SIZE and
EMBEDDING_BATCH_SIZE from the module scope while main() kept referencing
them, so every indexer run died before reaching Qdrant:
File "/app/src/indexer.py", line 264, in main
print(f"Loading embedding model: {EMBEDDING_MODEL_NAME}...")
NameError: name 'EMBEDDING_MODEL_NAME' is not defined
CI never caught it because no test executes main(). Both *-indexer cronjobs
have been failing (BackoffLimitExceeded) since 2026-10-16, i.e. the first
run after the image pin moved to v0.0.22-latest.
- restore the three constants with their pre-refactor defaults
- cover them in tests/test_indexer.py and cross-check that the indexer
embeds with the same model as server.py (vectors must stay comparable)
- add a ruff F821 gate to the unit job so undefined names fail CI
Fixes mcp-maildir-cabilloteu-indexer and mcp-maildir-gmail-indexer.
Two concurrent jobs (docker-build + PR Checks on the same push) both
used container name 'qdrant'; the second job's 'docker rm -f qdrant'
destroyed the first job's Qdrant mid-run, so the test collection 404'd.
Name is now qdrant-${{ github.run_id }} everywhere (cleanup included).
- pr.yaml: new pytest job (unit tests only, integration deselected by marker)
- main.yaml / cron.yaml / tag.yaml: replace the build-only 'test' job with a
real pytest unit job + an integration-test job that starts a Qdrant
container sharing the job container's network namespace
(--network container:$(hostname) — bypasses the Gitea runner bug with
service containers), waits for /healthz, runs 'pytest -m integration',
then tears down.
- build/build-push jobs now require [test, integration-test]; previously
'test' was only a docker build and pytest never ran in CI.
- integration-test first cleans up any stale qdrant container (rerun-safe).
- setup-python SHA aligned with docker-build.yaml (v7, python 3.13/3.14).