Skip to content

Add CI: Rust and Python test workflows - #8

Merged
AjayThorve merged 3 commits into
NVIDIA:mainfrom
AjayThorve:ajay/ci-tests
Jun 23, 2026
Merged

Add CI: Rust and Python test workflows#8
AjayThorve merged 3 commits into
NVIDIA:mainfrom
AjayThorve:ajay/ci-tests

Conversation

@AjayThorve

@AjayThorve AjayThorve commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Adds two GitHub Actions workflows so the existing test suite runs on PRs:

  • ci_rust.ymlcargo fmt --check, cargo check -p fabric-python, and cargo test --workspace (which includes the schema-snapshot checks that guard the public contract).
  • ci_python.yml — builds the native extension, then runs the dependency-free smokes (smoke_cli, smoke_sdk, smoke_native_sdk, smoke_hermes_cli, smoke_hermes_config_mapping, smoke_swebench_style, smoke_local_env_e2e, smoke_environment_handle).

Why

The repo had a test suite but nothing ran it on PRs, so contract/schema drift could merge unnoticed. Both workflows are single-platform (ubuntu-latest), need no secrets, and mirror nemo-relay's Rust/Python split and pinned action SHAs.

Triggers

pull_request + push to main. No secrets are required, so the checks report directly on the PR (unlike the docs workflow, which uses copy-pr-bot mirror branches for FERN_TOKEN).

Excluded

  • Gated integration smokes (smoke_hermes_sdk, smoke_relay_integration, smoke_harbor_*) — they need NVIDIA_API_KEY / a running Hermes / a sibling harbor checkout.
  • smoke_sdk_concurrency — currently flaky (two concurrent runs can collide on runtime_id); excluded until that is fixed.

Verified locally

All included checks pass (cargo fmt/check/test --workspace green; all 8 smokes pass).

Resolves FABRIC-32

Summary by CodeRabbit

  • Chores
    • Updated continuous integration workflows to enforce automated code quality checks and comprehensive testing across Python and Rust components.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 47001ba7-dbc8-46ff-a1d8-355c18b0b95c

📥 Commits

Reviewing files that changed from the base of the PR and between dfb73c3 and ea07130.

📒 Files selected for processing (2)
  • .github/workflows/ci_python.yml
  • .github/workflows/ci_rust.yml
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/ci_python.yml
  • .github/workflows/ci_rust.yml

📝 Walkthrough

Walkthrough

Two GitHub Actions workflows are added: ci_rust.yml runs cargo fmt, cargo check, and cargo test on the Rust workspace; ci_python.yml builds the native extension via uv and executes a fixed list of Python smoke scripts. Both use per-ref concurrency with cancellation and read-only permissions.

Changes

CI Workflows

Layer / File(s) Summary
Rust CI workflow
.github/workflows/ci_rust.yml
Defines PR/push triggers, concurrency cancellation, stable Rust with rustfmt, shared Cargo cache (fabric-rust key), then runs format check, locked fabric-python build check, and locked workspace tests in a 30-minute ubuntu-latest job.
Python CI workflow
.github/workflows/ci_python.yml
Defines same trigger/concurrency/permission pattern, installs Rust stable + uv, creates a Python 3.12 venv, installs the project in editable mode (building the native extension), installs pyyaml, and runs ordered smoke scripts with set -euo pipefail and ::group:: log markers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add CI: Rust and Python test workflows' directly and concisely summarizes the main change: adding two CI workflows for Rust and Python testing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@linear

linear Bot commented Jun 23, 2026

Copy link
Copy Markdown

@AjayThorve
AjayThorve requested a review from dagardner-nv June 23, 2026 06:14

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci_rust.yml:
- Line 32: The pinned SHAs for the GitHub workflow actions do not match their
stated version tags. For the actions/checkout action, update the pinned SHA from
the current value to df4cb1c069e1874edd31b4311f1884172cec0e10 which corresponds
to the v6 tag. For the Swatinem/rust-cache action, update the pinned SHA to
23869a5bd66c73db3c0ac40331f3206eb23791dc which corresponds to the v2.9.1 tag.
Alternatively, if these older commits are intentionally being used as
pre-release versions, remove the version comments to avoid confusion between the
pinned SHA and the claimed version.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c90af9a9-dee3-4750-aa23-520d74795997

📥 Commits

Reviewing files that changed from the base of the PR and between 7c9b0c1 and 842cf46.

📒 Files selected for processing (2)
  • .github/workflows/ci_python.yml
  • .github/workflows/ci_rust.yml

Comment thread .github/workflows/ci_rust.yml
The repo had a test suite but nothing ran it on PRs. Add two minimal,
single-platform workflows (mirroring nemo-relay's Rust/Python split and
pinned action SHAs):

- ci_rust.yml: cargo fmt --check, cargo check -p fabric-python, and
  cargo test --workspace (which includes the schema-snapshot contract checks).
- ci_python.yml: build the native extension, then run the dependency-free
  smokes.

Both trigger on pull_request and push to main and need no secrets. Gated
integration smokes and the flaky smoke_sdk_concurrency are excluded.

Signed-off-by: Ajay Thorve <athorve@nvidia.com>
smoke_hermes_config_mapping imports yaml, which is not a project dependency,
so the clean CI venv lacked it. Install pyyaml alongside the editable build.

Signed-off-by: Ajay Thorve <athorve@nvidia.com>
The runtime_id collision that made this smoke flaky is fixed (process id is
now part of every generated id), so it runs reliably. Add it back to the CI
smoke set.

Signed-off-by: Ajay Thorve <athorve@nvidia.com>
@AjayThorve
AjayThorve merged commit 77d0a4b into NVIDIA:main Jun 23, 2026
4 checks passed
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.

2 participants