Fighting Game · Guides & deep dives

V2 Rust Pre-Merge Validation

A guides & deep dives document in the Fighting Game library.

0sections1 minread

On this page

V2/ue/Tools/plan-v2-rust-premerge-validation.py turns a pull request change list into a fail-fast Rust compile-check plan. It uses plan-v2-rust-incremental-build.py to find impacted crates, then rebuilds the same affected graph into workspace-aware cargo check --locked --all-targets commands.

The dedicated workflow .github/workflows/v2-rust-premerge.yml runs on pull_request and merge_group. It gathers changed paths with git diff --name-only, writes premerge-validation-plan.json, and executes the plan with run-v2-rust-premerge-validation.py. The runner stops at the first failed Cargo command and writes premerge-validation-results.json for release evidence.

Changes to Rust build contracts, Rust validation tools, the toolchain, or the pre-merge workflow force full Rust validation. Normal crate source changes only compile-check the changed crates plus local reverse dependents. The workflow uses the same RUSTC_WRAPPER=sccache and CARGO_INCREMENTAL=0 environment as the distributed Rust build path, so PR checks exercise the same cache and compiler mode expected in CI.

Horde gates require rust-premerge-plan-generated, rust-premerge-fail-fast-enabled, and zero rust-premerge-compile-check failures before a Rust PR can merge.