From cb679ab9d1c2aa7ca0b59421b18d9b295a2ef804 Mon Sep 17 00:00:00 2001 From: tignear Date: Mon, 19 Oct 2026 04:45:49 +0900 Subject: [PATCH] ci(lydite): skip unrelated sv-tests corpus changes Changes to Celox conformance/sv-tests were treated as unmapped sources and selected the Lydite core lanes, including editor and Veryl conformance jobs. Exclude this independent corpus while retaining checks for Lydite fixtures, mixed changes, and unknown conformance paths. Add a regression using the file list from PR #1509 and document the selection rule. Validation: all 53 tests in ci-changes.test.mjs, ci-rust-scope.test.mjs, and ci-lydite-changes.test.mjs passed; git diff --check passed. Change-Id: I10948e0190928598db1baa2979b94358f2f8fa95 --- CONTRIBUTING.md | 3 ++- scripts/ci-lydite-changes.mjs | 3 +++ scripts/ci-lydite-changes.test.mjs | 30 ++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8d0588f704a..8feff76b85a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -233,7 +233,8 @@ Lydite has its own test cadence (`scripts/ci-lydite-changes.mjs`): and dev edges. A `Cargo.lock` diff selects a lane only when a changed lock entry is in that lane's lockfile dependency closure, so adding a dependency to a Celox crate does not run Lydite. The Nix flake and `ci.yml` do not - select Lydite; its jobs use neither. + select Lydite; its jobs use neither. Celox's `conformance/sv-tests/` corpus + also skips Lydite; Lydite's fixtures live under `lydite/conformance/`. - Ordinary `ci.yml` tests exclude `lydite*`, including daily and release runs; formatting/lint/build checks remain there. The dedicated workflow tests the selected Lydite packages, including doctests, and installs its solver. diff --git a/scripts/ci-lydite-changes.mjs b/scripts/ci-lydite-changes.mjs index 21a0170f84c..8dec327c801 100644 --- a/scripts/ci-lydite-changes.mjs +++ b/scripts/ci-lydite-changes.mjs @@ -66,6 +66,9 @@ export function lyditeScope(files, packages, lock = null) { const owners = [...packages].sort((a, b) => b.dir.length - a.dir.length); for (const raw of files) { const path = raw.replace(/^\.\//, ""); + // Celox's SystemVerilog corpus is independent of Lydite's gates, whose + // fixtures live under lydite/conformance/. + if (path.startsWith("conformance/sv-tests/")) continue; if (path === "Cargo.lock" && lock !== null) { const reaches = (roots) => { const seen = closure(roots, (name) => lock.graph.get(name)); diff --git a/scripts/ci-lydite-changes.test.mjs b/scripts/ci-lydite-changes.test.mjs index 336a9f21005..b745af57b4a 100644 --- a/scripts/ci-lydite-changes.test.mjs +++ b/scripts/ci-lydite-changes.test.mjs @@ -29,6 +29,7 @@ test("Lydite core changes and shared configuration run both lanes", () => { "scripts/ci-lydite-changes.mjs", "vendor/new/src/lib.rs", "crates/new/src/lib.rs", + "conformance/new/case.sv", ]) assert.deepEqual(scope(path), both, path); assert.deepEqual(lyditeScope(null, packages), both); @@ -95,6 +96,35 @@ test("PRs run the bridge only for Lydite-owned changes", () => { assert.deepEqual(pullRequestScope(null, packages), both); }); +test("Celox sv-tests changes skip Lydite without masking other changes", () => { + const files = [ + ".github/workflows/ci.yml", + "conformance/sv-tests/README.md", + "conformance/sv-tests/expected.tsv", + "crates/celox/examples/sv_tests.rs", + ]; + for (const path of [ + ...files, + "conformance/sv-tests/revision", + "./conformance/sv-tests/expected.tsv", + ]) { + assert.deepEqual(scope(path), neither, path); + assert.deepEqual(pullRequestScope([path], packages), neither, path); + } + assert.deepEqual(pullRequestScope(files, packages), neither); + for (const path of [ + "crates/lydite/src/main.rs", + "lydite/conformance/veryl/run_ci.sh", + ]) { + assert.deepEqual(pullRequestScope([...files, path], packages), both, path); + assert.deepEqual(pullRequestScope([path, ...files], packages), both, path); + } + assert.deepEqual( + pullRequestScope([...files, "conformance/unknown/case.sv"], packages), + { core: true, bridge: false }, + ); +}); + test("Cargo.lock edits select only the lanes that reach the changed entries", () => { const lockfile = readFileSync(`${root}Cargo.lock`, "utf8"); const edit = (name, from, to) => {