ci: select only affected jobs by Cargo scope - #329
Conversation
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (20)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| working-directory: rust_hft | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82c7f8e343
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| done | ||
|
|
||
| if [[ $needs_metadata == false ]]; then | ||
| [[ $toolchain == true ]] && select_job ci/rust |
There was a problem hiding this comment.
Preserve the repository-wide safety scan
For changes that do not set toolchain—for example .github/workflows/docker-publish.yml, or the explicitly handled .github/workflows/acr-publish.yml—this emits no ci/rust job. The repository-wide Enforce Rust-only research and runtime source check in ci.yml is inside that job and previously ran on every Monorepo CI event, so such a PR can now add a prohibited Python runtime or workflow command while the selector and scope jobs pass. Keep ci/rust selected for these paths, or move the policy scan into an unconditional job.
AGENTS.md reference: AGENTS.md:L50-L54
Useful? React with 👍 / 👎.
| rust_hft/prediction-markets/*.md) | ||
| continue |
There was a problem hiding this comment.
Run policy tests for guarded Markdown changes
Because a Bash case pattern's * also spans /, this branch ignores every Markdown file anywhere under rust_hft/prediction-markets. However, tests/workspace_runtime_retirement.rs:1410-1427 explicitly rejects retired write commands in existing OpenClaw Markdown, and that test runs in ploy/integration-regressions; editing examples/openclaw/README.md to advertise one of those commands now produces jobs=,, and bypasses the counterexample. Do not blanket-ignore .md; select the integration policy test for guarded operational documents.
AGENTS.md reference: AGENTS.md:L50-L54
Useful? React with 👍 / 👎.
| deployment/aliyun/*) | ||
| control=true | ||
| toolchain=true | ||
| [[ $path == deployment/aliyun/research/* ]] && research_image_relevant=true | ||
| ;; |
There was a problem hiding this comment.
Keep commit hygiene active for deployment PRs
For a pull request changing a non-Kubernetes path under deployment/aliyun/research/**, the Ploy workflow's path filter starts the workflow, but this case only sets legacy flags and never selects ploy/commit-hygiene; consequently all Ploy validation can skip that check. Before this commit, commit-hygiene was conditioned only on github.event_name == 'pull_request', so every such deployment PR rejected WIP, fixup, and squash commit subjects. Select commit hygiene for these admitted PR paths or leave that job unconditional.
Useful? React with 👍 / 👎.
| # Manual runs retain the complete build/package contract. | ||
| if [[ $event == workflow_dispatch ]]; then |
There was a problem hiding this comment.
Propagate push changed-file discovery failures
By limiting the unconditional full run to workflow_dispatch, branch pushes now enter the git diff process-substitution path. When github.event.before is unavailable locally—for example, it is all zeros on the first push creating develop, or an old pre-force-push commit was not fetched—git diff prints a fatal error, but the process substitution's status does not fail the outer shell; the selector exits 0 with jobs=,,. The scope job therefore treats selection as successful instead of applying its all-jobs fallback, leaving that main/develop push unvalidated. Capture and check the diff command's status before continuing, and handle an all-zero base explicitly.
AGENTS.md reference: AGENTS.md:L50-L54
Useful? React with 👍 / 👎.
| rust_hft/prediction-markets/ploy-frontend/*) | ||
| [[ $event == pull_request ]] && select_job ploy/commit-hygiene | ||
| select_job ploy/safety-scans | ||
| select_job ploy/frontend | ||
| continue |
There was a problem hiding this comment.
Run the execution-surface guard for frontend changes
For a frontend-only PR this branch selects the route scan and frontend build but not ploy/integration-regressions. That omitted job runs active_compatibility_source_has_no_authenticated_venue_execution_surface in tests/workspace_runtime_retirement.rs:1601-1645, which recursively scans active TypeScript, JavaScript, and Rust files for authenticated venue/order surfaces that the route scan does not cover. A direct authenticated order client added under ploy-frontend can therefore lint and build while the test designed to reject this authority bypass is skipped; select that guard for every active frontend execution-surface change or move it into the unconditional safety job.
AGENTS.md reference: AGENTS.md:L50-L54
Useful? React with 👍 / 👎.
82c7f8e to
7333ee8
Compare
Change contract
Select Monorepo and Prediction Markets CI jobs from changed paths plus Cargo dependency identity while preserving fail-closed required checks and complete Research image validation for relevant main pushes.
Out of scope
Compiler caches, Docker image contents, ACR publication behavior, Rust/research/collector behavior, and branch-protection policy.
Dependencies and merge order
None.
Focused validation
.github/scripts/test-select-rust-ci-scope.shbash -n .github/scripts/select-rust-ci-scope.sh .github/scripts/test-select-rust-ci-scope.shshellcheck .github/scripts/select-rust-ci-scope.sh .github/scripts/test-select-rust-ci-scope.shgo run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 .github/workflows/ci.yml .github/workflows/ploy-ci.ymlorigin/mainwas unchanged.Rollout and rollback
Rollout changes CI scheduling only; no runtime or publication behavior changes. Revert this PR to restore the prior workflow-wide scheduling and image-only selector.
Scope exception
None. The change is 20 files / 664 changed lines, below the repository split threshold.
Closes #316