[PR #2479] [MERGED] pr_ready: run CI's clippy, CI's test features, Python tests and launcher rule #4353

Closed
opened 2026-11-03 04:16:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2479
Author: @ludovic111
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: tools/pr-ready-like-ci


📝 Commits (1)

  • 37559da pr_ready: run CI's clippy, CI's test features, Python tests and launcher rule

📊 Changes

2 files changed (+66 additions, -36 deletions)

View changed files

📝 tests/test_pr_ready.py (+29 -12)
📝 tools/pr_ready.py (+37 -24)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

tools/pr_ready.py now checks what CI's verify and launcher jobs check:

Check Before Now
clippy -p <touched crates and their dependents>, with mods features only when horizon-mods was touched CI's two commands verbatim: --workspace --all-targets --features horizon-client/mods, plus -p horizon-client --no-default-features when horizon-client is affected (the server build)
tests touched crates, with code mods only when horizon-mods was touched still the touched crates, with the features CI's workspace run gives them: horizon-client/mods, and horizon-mods/{runtime,pack,index}
Python tests only when a Python file changed always, as in CI (some tests read the crates, the roadmap and the workflows)
launcher steps pr_ready's own path list tools/ci/rust_changes.py's needs_launcher, the rule CI's launcher job uses (it also covers the root manifests and the check itself)

Why

pr_ready --quick passed #1895, but CI's clippy failed on an unused import in crates/horizon-mods/tests/sandbox.rs (FEATURES 4zz57). The cause: clippy on a few packages gives them other features than CI's workspace-wide run, because Cargo unifies features over the packages it builds.

Cost

Measured on the Mac mini at load ~50, -j 4, on a worktree from new-worktree.

Warm, after a one-line change:

Change Before Now Server build pass
hud.rs 17 s 14-16 s +12-13 s
horizon-world/src/food.rs (dependents) 14 s 22-32 s +22-28 s

First run in a worktree: 176 s plus 43 s, once, against 46-63 s before.

On this branch, with a horizon-mods/tests/sandbox.rs change, pr_ready --quick ran clippy in 30 s.

Tested

  • python3 -m unittest tests.test_pr_ready: 19 OK. Tests were updated, and new ones cover the CI features, the Python tests always running and CI's launcher rule.
  • pr_ready --quick on this branch:
    • all green, with Python tests at 314 passed;
    • with a temporary change to crates/horizon-mods/tests/sandbox.rs: rustfmt ✅, clippy ✅ (30 s), tests: horizon-mods ✅ 64, launcher clippy ✅, launcher tests ✅ 137.

🤖 Generated with Claude Code


🔄 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/2479 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `tools/pr-ready-like-ci` --- ### 📝 Commits (1) - [`37559da`](https://github.com/horizon-rust/horizon/commit/37559dae820de4f3fee3c83dccb7dd0840640cdf) pr_ready: run CI's clippy, CI's test features, Python tests and launcher rule ### 📊 Changes **2 files changed** (+66 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_pr_ready.py` (+29 -12) 📝 `tools/pr_ready.py` (+37 -24) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What `tools/pr_ready.py` now checks what CI's verify and launcher jobs check: | Check | Before | Now | |---|---|---| | clippy | `-p <touched crates and their dependents>`, with mods features only when horizon-mods was touched | CI's two commands verbatim: `--workspace --all-targets --features horizon-client/mods`, plus `-p horizon-client --no-default-features` when horizon-client is affected (the server build) | | tests | touched crates, with code mods only when horizon-mods was touched | still the touched crates, with the features CI's workspace run gives them: `horizon-client/mods`, and `horizon-mods/{runtime,pack,index}` | | Python tests | only when a Python file changed | always, as in CI (some tests read the crates, the roadmap and the workflows) | | launcher steps | pr_ready's own path list | `tools/ci/rust_changes.py`'s `needs_launcher`, the rule CI's launcher job uses (it also covers the root manifests and the check itself) | ## Why `pr_ready --quick` passed #1895, but CI's clippy failed on an unused import in `crates/horizon-mods/tests/sandbox.rs` (FEATURES 4zz57). The cause: clippy on a few packages gives them other features than CI's workspace-wide run, because Cargo unifies features over the packages it builds. ## Cost Measured on the Mac mini at load ~50, `-j 4`, on a worktree from `new-worktree`. **Warm, after a one-line change:** | Change | Before | Now | Server build pass | |---|---|---|---| | `hud.rs` | 17 s | 14-16 s | +12-13 s | | `horizon-world/src/food.rs` (dependents) | 14 s | 22-32 s | +22-28 s | **First run in a worktree:** 176 s plus 43 s, once, against 46-63 s before. On this branch, with a `horizon-mods/tests/sandbox.rs` change, `pr_ready --quick` ran clippy in 30 s. ## Tested - `python3 -m unittest tests.test_pr_ready`: 19 OK. Tests were updated, and new ones cover the CI features, the Python tests always running and CI's launcher rule. - `pr_ready --quick` on this branch: - all green, with Python tests at 314 passed; - with a temporary change to `crates/horizon-mods/tests/sandbox.rs`: rustfmt ✅, clippy ✅ (30 s), tests: horizon-mods ✅ 64, launcher clippy ✅, launcher tests ✅ 137. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:33 +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#4353
No description provided.