Skip to content

ci: run Python runtime tests in CI (#945) - #1018

Closed
himanshu231204 wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
himanshu231204:ci/run-python-runtime-tests
Closed

ci: run Python runtime tests in CI (#945)#1018
himanshu231204 wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
himanshu231204:ci/run-python-runtime-tests

Conversation

@himanshu231204

@himanshu231204 himanshu231204 commented Aug 8, 2026

Copy link
Copy Markdown

Summary

Adds a dedicated uv-based Python CI job that runs the prime-agent-runtime test 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_*.py was never invoked by any job. A failure confined to a Python test expectation would go completely unobserved.

Changes

.github/workflows/ci.yml

  • Added a new python-runtime job:
    • Matrix over supported Python versions 3.10, 3.11, 3.12, 3.13 (matches requires-python = ">=3.10" in pyproject.toml).
    • Uses astral-sh/setup-uv@v9.0.0 with python-version and enable-cache for fast, cached uv installs.
    • Runs uv sync --frozen (deterministic install from the committed lockfile) then uv run pytest.
    • Runs from the repo root checkout so the cross-language artifact contract test (test_agent_message_skill.py, which imports the shipped skill from packages/coding-agent/skills/agent-message/) resolves correctly.
  • Wired python-runtime into the build-check-test aggregate gate: added it to needs and 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

  • Added [dependency-groups] dev group: httpx, mcp>=1.0, pytest>=8.0.
    • httpx is required because src/rlm/mcp_base.py imports it for the http_client transport signature (mcp 2.x style). Production always installs httpx as a default kernel extra package (DEFAULT_RLM_EXTRA_PACKAGES in packages/coding-agent/src/core/kernel/bootstrap.ts), so the test environment now mirrors the production package set.
    • mcp is required by test_mcp_base.py (it patches mcp.ClientSession and the streamable-HTTP transport).
  • Added [tool.pytest.ini_options] with testpaths = ["test"].

prime-agent-runtime/uv.lock

  • Committed the generated lockfile so uv sync --frozen installs dependencies deterministically in CI and locally. Dependabot already tracks /prime-agent-runtime for the uv ecosystem.

.gitignore

  • Added .venv/ and .pytest_cache/ (created by uv sync / pytest runs).

Verification

  • uv sync --frozen && uv run pytest64 passed on Python 3.11.
  • Same suite → 64 passed on Python 3.13.
  • uv lock --check → lockfile in sync.
  • YAML lint → valid.
  • Pre-commit npm run check → passed.

Acceptance criteria coverage

  • Supported Python versions run the runtime suite in CI — matrix 3.10–3.13.
  • Failures block aggregate CI and releasepython-runtime is a dependency of the build-check-test aggregate gate.
  • Dependencies installed deterministically — committed uv.lock + uv sync --frozen.
  • Cross-language artifact contract coveredtest_agent_message_skill.py imports the shipped skill from the TypeScript package's skills/ directory.

Notes

  • The pkg:coding-agent label is not yet provisioned on the repo (per the issue audit metadata); bug and github_actions labels should be applied by a maintainer.

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.
Copilot AI lite review requested due to automatic review settings August 8, 2026 18:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-runtime GitHub Actions job that runs the runtime test suite on a Python 3.10–3.13 matrix using uv.
  • Added a dev dependency group plus pytest discovery configuration to prime-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.

@sethkarten

Copy link
Copy Markdown
Contributor

Thank you for the report and proposed work. This root cause is now covered by maintainer-owned stacked PR #1158, authored independently from upstream/main.

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.

@sethkarten sethkarten closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run Python runtime tests in CI

3 participants