Skip to content

feat(test): add affected-crate fast Rust runner - #7061

Merged
proggeramlug merged 1 commit into
mainfrom
feat/affected-crate-fast-tests
Jul 30, 2026
Merged

feat(test): add affected-crate fast Rust runner#7061
proggeramlug merged 1 commit into
mainfrom
feat/affected-crate-fast-tests

Conversation

@TheHypnoo

@TheHypnoo TheHypnoo commented Jul 30, 2026

Copy link
Copy Markdown
Member

Closes #7053

Summary

  • add an opt-in local runner for Rust unit tests affected by tracked changes
  • reuse CI's existing crate selection and target-mode logic
  • preserve per-crate Cargo isolation and single-threaded runtime tests

Changes

File Change
scripts/test_affected_crates.sh Select affected crates from a base revision and run their fast unit-test targets
tests/test_affected_crates.sh Verify paths, target modes, ordering, environment constraints, dry-run behavior, and invalid bases with fake tools
CONTRIBUTING.md Document usage and replace the known-broken workspace test command

Test plan

  • bash -n scripts/test_affected_crates.sh tests/test_affected_crates.sh
  • shellcheck scripts/test_affected_crates.sh tests/test_affected_crates.sh
  • ./tests/test_affected_crates.sh
  • CARGO_BUILD_JOBS=1 cargo test --lib --bins -p perry-ui-testkit (5 passed)
  • representative real --dry-run against origin/main
  • git diff --check origin/main...HEAD

Limitations

  • runs unit-test targets only; integration suites remain covered by scoped/nightly CI
  • ignores untracked files until they are staged
  • requires the selected base revision to exist locally

Checklist

  • Linked approved issue
  • Scripts pass ShellCheck
  • Documentation updated
  • Conventional commit format
  • No attribution trailers
  • Workspace version, CLAUDE.md, and CHANGELOG.md are unchanged

Summary by CodeRabbit

  • New Features

    • Added a tool to run targeted Rust tests for crates affected by changes.
    • Added dry-run support to preview test commands before execution.
    • Added configurable base-revision support for determining affected files.
  • Documentation

    • Updated source-building guidance with targeted testing instructions and CI scope details.
  • Tests

    • Added coverage for affected-crate detection, command generation, dry runs, and invalid revisions.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 53978689-800d-4fa6-b389-e6d7fe29e403

📥 Commits

Reviewing files that changed from the base of the PR and between 788a757 and 5a643d3.

📒 Files selected for processing (3)
  • CONTRIBUTING.md
  • scripts/test_affected_crates.sh
  • tests/test_affected_crates.sh
 ____________________________________
< LLM (Looking for Leaks in Memory). >
 ------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/affected-crate-fast-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@proggeramlug
proggeramlug merged commit 4a8f3ba into main Jul 30, 2026
9 of 36 checks passed
@proggeramlug
proggeramlug deleted the feat/affected-crate-fast-tests branch July 30, 2026 15:02
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.

feat(test): add affected-crate fast Rust runner

2 participants