ci: run Python runtime tests in CI (#945) - #1018
Conversation
Add a dedicated uv-based python-runtime job to the CI workflow that runs the prime-agent-runtime test suite across supported Python versions (3.10-3.13) and wire it into the build-check-test aggregate gate so failures block merges and releases. Add a dev dependency group (httpx, mcp, pytest) and pytest config to prime-agent-runtime/pyproject.toml, and commit the generated uv.lock for deterministic installs. httpx mirrors the production kernel's default extra packages, which mcp_base.py imports for the http_client transport signature.
There was a problem hiding this comment.
Pull request overview
Adds Python runtime test coverage to the repo’s CI by introducing a dedicated uv/pytest job for prime-agent-runtime and wiring it into the aggregate CI gate so Python regressions block merges/releases.
Changes:
- Added a
python-runtimeGitHub Actions job that runs the runtime test suite on a Python 3.10–3.13 matrix usinguv. - Added a
devdependency group plus pytest discovery configuration toprime-agent-runtime/pyproject.toml. - Ignored local Python virtualenv and pytest cache directories in
.gitignore.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Adds a python-runtime matrix job and gates build-check-test on its result. |
prime-agent-runtime/pyproject.toml |
Adds dependency-groups.dev and configures pytest to look under test/. |
.gitignore |
Ignores .venv/ and .pytest_cache/ to reduce local noise. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thank you for the report and proposed work. This root cause is now covered by maintainer-owned stacked PR #1158, authored independently from We did not inspect or reuse this PR's diff, branch, commits, implementation code, or tests; its public description/comments were used only as a bug report. To keep one review surface, this PR is superseded by #1158 and is being closed. The complete review stack is #1158–#1165. It is being left unmerged for human review after CI and review-bot findings are cleared. |
Summary
Adds a dedicated uv-based Python CI job that runs the
prime-agent-runtimetest suite across all supported Python versions, and connects it to the aggregate CI success gate so Python harness/runtime failures block merges and releases.Fixes #945
Problem and impact
Python harness/runtime regressions can merge and ship without any direct Python test executing. The CI graph (
.github/workflows/ci.yml) contained only Node workspace/package lanes;prime-agent-runtime/test/test_*.pywas never invoked by any job. A failure confined to a Python test expectation would go completely unobserved.Changes
.github/workflows/ci.ymlpython-runtimejob:3.10,3.11,3.12,3.13(matchesrequires-python = ">=3.10"inpyproject.toml).astral-sh/setup-uv@v9.0.0withpython-versionandenable-cachefor fast, cached uv installs.uv sync --frozen(deterministic install from the committed lockfile) thenuv run pytest.test_agent_message_skill.py, which imports the shipped skill frompackages/coding-agent/skills/agent-message/) resolves correctly.python-runtimeinto thebuild-check-testaggregate gate: added it toneedsand to the result check (PYTHON_RUNTIME_RESULT). Failures now block aggregate CI and release, rather than being hidden in an unrelated kernel smoke test.prime-agent-runtime/pyproject.toml[dependency-groups]dev group:httpx,mcp>=1.0,pytest>=8.0.httpxis required becausesrc/rlm/mcp_base.pyimports it for thehttp_clienttransport signature (mcp 2.x style). Production always installshttpxas a default kernel extra package (DEFAULT_RLM_EXTRA_PACKAGESinpackages/coding-agent/src/core/kernel/bootstrap.ts), so the test environment now mirrors the production package set.mcpis required bytest_mcp_base.py(it patchesmcp.ClientSessionand the streamable-HTTP transport).[tool.pytest.ini_options]withtestpaths = ["test"].prime-agent-runtime/uv.lockuv sync --frozeninstalls dependencies deterministically in CI and locally. Dependabot already tracks/prime-agent-runtimefor theuvecosystem..gitignore.venv/and.pytest_cache/(created byuv sync/ pytest runs).Verification
uv sync --frozen && uv run pytest→ 64 passed on Python 3.11.uv lock --check→ lockfile in sync.npm run check→ passed.Acceptance criteria coverage
python-runtimeis a dependency of thebuild-check-testaggregate gate.uv.lock+uv sync --frozen.test_agent_message_skill.pyimports the shipped skill from the TypeScript package'sskills/directory.Notes
pkg:coding-agentlabel is not yet provisioned on the repo (per the issue audit metadata);bugandgithub_actionslabels should be applied by a maintainer.