From b9b7dfe44b42398e1ad92c7275664f4b8b340ba0 Mon Sep 17 00:00:00 2001 From: tignear Date: Tue, 27 Oct 2026 04:41:13 +0900 Subject: [PATCH 1/2] ci(aplite): avoid product builds for release metadata updates Aplite release PR #2180 changes only its release manifest and changelog, but the unknown manifest path selects every CI lane and the crate changelog selects Rust tests. Release Please updates consequently cancel and restart expensive product checks despite no executable changes. Classify exactly those two metadata paths as repository-script changes. Policy tests still run; source, Cargo.toml, Cargo.lock, mixed changes, and explicit full-validation runs keep their existing coverage. Validation: all 310 repository Node tests pass, including metadata-only and mixed source/manifest/lockfile regressions; git diff --check passes. Change-Id: I8a00accc0a59807c19d0edfdcc6c97ff118a3873 --- scripts/ci-changes.mjs | 8 ++++++++ scripts/ci-changes.test.mjs | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/scripts/ci-changes.mjs b/scripts/ci-changes.mjs index 3e343ee2a67..f94e7abbcb3 100644 --- a/scripts/ci-changes.mjs +++ b/scripts/ci-changes.mjs @@ -162,6 +162,14 @@ export function classifyFiles(files, { releasePlease = false } = {}) { continue; } + // Aplite has an independent release manifest. Its release notes and + // manifest need repository-policy checks, not a product rebuild. Keep + // source, Cargo.toml and Cargo.lock changes on their normal paths below. + if ([".release-please-aplite-manifest.json", "crates/aplite/CHANGELOG.md"].includes(path)) { + affected.scripts = true; + continue; + } + if (isRustOnlyPath(path)) { affected.rust = true; continue; diff --git a/scripts/ci-changes.test.mjs b/scripts/ci-changes.test.mjs index 42b42f7e884..8c75eaf8ab2 100644 --- a/scripts/ci-changes.test.mjs +++ b/scripts/ci-changes.test.mjs @@ -70,6 +70,22 @@ test("Rust test infrastructure skips bindings while retaining Rust checks", () = } }); +test("Aplite release metadata runs policy checks without rebuilding products", () => { + const metadata = [".release-please-aplite-manifest.json", "crates/aplite/CHANGELOG.md"]; + for (const files of [metadata, ...metadata.map(path => [path])]) { + for (const releasePlease of [false, true]) + assert.deepEqual(classifyFiles(files, { releasePlease }), { ...none, scripts: true }); + } + for (const path of ["crates/aplite/src/lib.rs", "crates/aplite/Cargo.toml", "Cargo.lock"]) { + assert.deepEqual( + classifyFiles([...metadata, path]), + { ...classifyFiles([path]), scripts: true }, + path, + ); + assert.equal(classifyFiles([...metadata, path]).rust, true, path); + } +}); + test("manifests and mixed runtime changes retain binding validation", () => { for (const path of [ "Cargo.toml", From 9d28028e17b7601ead077844796e115136978623 Mon Sep 17 00:00:00 2001 From: tignear Date: Tue, 27 Oct 2026 05:55:11 +0900 Subject: [PATCH 2/2] fix(test-suite): avoid rebuilding for absent Cargo configuration Do not register nonexistent optional Cargo configuration files as build script inputs. Cargo treats those paths as always dirty, rebuilding the suite and its consumers on successive invocations; one observed CI run spent 2m47s rebuilding before cocotb. Existing inputs remain registered and hashed by file(). Validated with repeated Cargo checks (the unchanged second invocation is fresh), both incremental CLI regression tests, crate clippy with verilator and icarus features, and formatting. Change-Id: I91831975d298ea8bbe3d4ee59768a08ca42196bc --- crates/celox-test-suite/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/celox-test-suite/build.rs b/crates/celox-test-suite/build.rs index 3d94cad2b64..978699e3e9b 100644 --- a/crates/celox-test-suite/build.rs +++ b/crates/celox-test-suite/build.rs @@ -165,7 +165,9 @@ mod fingerprint { ".cargo/config", ] { let path = workspace.join(name); - println!("cargo:rerun-if-changed={}", path.display()); + // file() registers existing inputs. Registering a missing optional + // Cargo config makes Cargo rerun this script on every invocation. + // Cargo itself tracks settings that affect compilation. if path.exists() { file(&mut hash, &path, name)?; }