[PR #1065] [MERGED] Reduce PR validation builds while checking downstream crates #3017

Closed
opened 2026-11-02 16:00:51 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1065
Author: @rdbtCVS
Created: 10/20/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @ludovic111

Base: main ← Head: fix/pr-ready-validation-scope


📝 Commits (1)

  • a7941a8 Scope PR validation to affected crates and avoid unrelated example builds

📊 Changes

3 files changed (+154 additions, -11 deletions)

View changed files

📝 CONTRIBUTING.md (+5 -0)
📝 tests/test_pr_ready.py (+99 -2)
📝 tools/pr_ready.py (+50 -9)

📄 Description

What and why

PR validation currently runs workspace-wide Clippy for every Rust edit and uses unrestricted package tests, which also build and link unrelated example executables. Small client changes can consequently spend minutes compiling validation targets.

Scope Clippy to touched crates plus their transitive workspace dependents, using Cargo metadata to include renamed, optional, platform, build and dev path dependencies. Shared Cargo/toolchain changes and unrecognised Rust paths retain workspace-wide checks. Run test-enabled targets with --tests and run doc tests separately for library packages, avoiding unrelated example executables while preserving example checking through Clippy.

This changes only tools/pr_ready.py, its regression tests, and contributor documentation. Test execution remains scoped to touched crates; workspace-wide CI remains the broader backstop. Unrelated example executables are no longer linked locally, so example linker failures can surface later in CI or parity harness builds. No end-to-end build speedup is claimed yet.

Vanilla reference

None: development tooling only.

Self-check

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at defaa7cd2, 19 s)

Check Result
Scope ✅ 3 files, +154 −11
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 259 passed (19 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label skip-release

Additional validation:

  • All 259 Python tests passed, including scope, transitive dependency, cycle, renamed/optional/platform/build/dev dependency, and binary-only crate regression cases.
  • A temporary Cargo workspace verified that the generated Clippy command detects a downstream API break and excludes an unrelated crate.
  • A temporary Cargo workspace verified unit, binary, integration and doc tests run without building an unrelated example; Clippy still detects an error in that example.
  • git diff --check passed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1065 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/20/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/pr-ready-validation-scope` --- ### 📝 Commits (1) - [`a7941a8`](https://github.com/horizon-rust/horizon/commit/a7941a8eca6e75eaf702bfb248ffb7b082ec32ef) Scope PR validation to affected crates and avoid unrelated example builds ### 📊 Changes **3 files changed** (+154 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `CONTRIBUTING.md` (+5 -0) 📝 `tests/test_pr_ready.py` (+99 -2) 📝 `tools/pr_ready.py` (+50 -9) </details> ### 📄 Description ## What and why PR validation currently runs workspace-wide Clippy for every Rust edit and uses unrestricted package tests, which also build and link unrelated example executables. Small client changes can consequently spend minutes compiling validation targets. Scope Clippy to touched crates plus their transitive workspace dependents, using Cargo metadata to include renamed, optional, platform, build and dev path dependencies. Shared Cargo/toolchain changes and unrecognised Rust paths retain workspace-wide checks. Run test-enabled targets with `--tests` and run doc tests separately for library packages, avoiding unrelated example executables while preserving example checking through Clippy. This changes only `tools/pr_ready.py`, its regression tests, and contributor documentation. Test execution remains scoped to touched crates; workspace-wide CI remains the broader backstop. Unrelated example executables are no longer linked locally, so example linker failures can surface later in CI or parity harness builds. No end-to-end build speedup is claimed yet. ## Vanilla reference None: development tooling only. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at defaa7cd2, 19 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +154 −11 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 259 passed (19 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | `skip-release` | Additional validation: - All 259 Python tests passed, including scope, transitive dependency, cycle, renamed/optional/platform/build/dev dependency, and binary-only crate regression cases. - A temporary Cargo workspace verified that the generated Clippy command detects a downstream API break and excludes an unrelated crate. - A temporary Cargo workspace verified unit, binary, integration and doc tests run without building an unrelated example; Clippy still detects an error in that example. - `git diff --check` passed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 16:00:51 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3017
No description provided.