From b9b7dfe44b42398e1ad92c7275664f4b8b340ba0 Mon Sep 17 00:00:00 2001 From: tignear Date: Tue, 27 Oct 2026 04:41:13 +0900 Subject: [PATCH] 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",