Engineering Enablement Python gate
All changed public callables under src/ require explicit parameter and return annotations because
the internal api-surface-diff release gate rejects newly inferred public types. Boundary models
must use the repository's Pydantic contract types; unvalidated dict[str, object] payloads are not
accepted across service or queue boundaries.
Tests should name observable company behavior, use the real contract model to build data, and fake
only a gateway owned by the repository. A mock assertion alone is not sufficient evidence for the
quality-evidence.json CI collector. New failure paths must assert the stable internal error code,
not the human-facing message.
Do not add broad Any, bare type ignores, or weaken basedpyright rules. A narrow
# pyright: ignore[rule] requires an adjacent invariant comment and a follow-up issue ID.
Before handoff run the repository's documented commands plus:
uv run ruff check .
uv run basedpyright
uv run pytest -m "not integration" --cov
Canonical references: ENG-PY-007 and ENG-TEST-011. Ask Engineering Enablement for review if a
third-party dependency has no usable types or a public contract must change incompatibly.