Context
The lint CI job previously ran make typecheck (pyright) against the committed generated code in generated/. This broke when examples referenced types from new upstream API operations (e.g. ResourceSearchQuery from searchResources) that hadn't been regenerated into the committed code yet.
What was done (PR #122)
Moved make typecheck from the lint job into the test job, gated to python-version == '3.12'. The test job runs make itest, which depends on make generate, so pyright now checks freshly generated code.
The lint job retains:
make lint (ruff)
make sync-readme-check
make config-reference-check
make docs-link-check
Tradeoffs of current approach
- Slower feedback — type errors now wait for the full test pipeline (Docker, Node.js, spec fetch, generation, integration tests) instead of the fast
lint job.
- Fragile dependency chain — if Docker, spec fetch, or tests fail, pyright never runs.
- Redundant pyright runs —
make generate already runs uv run pyright and uv run pyright examples/ internally, then the explicit make typecheck step runs uv run pyright again.
- Docker required for type checking — purely static analysis is now gated behind Docker Compose.
Future improvement: separate generation job
Long-term, consider splitting CI into three jobs:
lint (fast, no generation) → ruff, readme checks, config checks, docs links
gen (medium, no Docker) → bundle-spec + generate + pyright + pyright examples/ + acceptance tests
test (slow, Docker) → integration tests + coverage checks
The gen job would:
- Set up Node.js + Python
- Run
make bundle-spec (fetch upstream spec)
- Run generation + formatting + linting of generated code
- Run
make typecheck (pyright on generated code + examples)
- Run acceptance tests
This gives fast type-checking feedback (~2-3 min) without needing Docker, while keeping the heavy integration tests separate.
Context
The
lintCI job previously ranmake typecheck(pyright) against the committed generated code ingenerated/. This broke when examples referenced types from new upstream API operations (e.g.ResourceSearchQueryfromsearchResources) that hadn't been regenerated into the committed code yet.What was done (PR #122)
Moved
make typecheckfrom thelintjob into thetestjob, gated topython-version == '3.12'. Thetestjob runsmake itest, which depends onmake generate, so pyright now checks freshly generated code.The
lintjob retains:make lint(ruff)make sync-readme-checkmake config-reference-checkmake docs-link-checkTradeoffs of current approach
lintjob.make generatealready runsuv run pyrightanduv run pyright examples/internally, then the explicitmake typecheckstep runsuv run pyrightagain.Future improvement: separate generation job
Long-term, consider splitting CI into three jobs:
The
genjob would:make bundle-spec(fetch upstream spec)make typecheck(pyright on generated code + examples)This gives fast type-checking feedback (~2-3 min) without needing Docker, while keeping the heavy integration tests separate.