From 3aa8a6d07fb83256572716ce115c4a7eaa924b31 Mon Sep 17 00:00:00 2001 From: tignear Date: Sat, 17 Oct 2026 10:43:13 +0900 Subject: [PATCH 1/2] ci(lydite): skip version-only release PRs Release Please only bumps Cargo versions, which selected the core lane through the shared Cargo configuration rule. The daily run still covers the released tree. --- CONTRIBUTING.md | 1 + scripts/ci-changes.mjs | 9 +++++++++ scripts/ci-lydite-changes.mjs | 4 ++++ scripts/ci-lydite-changes.test.mjs | 23 +++++++++++++++++++++++ 4 files changed, 37 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1fed841ec2d..255ecb482d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -210,6 +210,7 @@ Lydite has its own test cadence (`scripts/ci-lydite-changes.mjs`): in the issue "Lydite validation is failing on ", closed by the next passing run. NAPI/JS changes, upstream private tests and Markdown do not reach Lydite. +- Version-only Release Please diffs, including their queue drafts, skip Lydite. - Shared dependency/toolchain configuration runs the core lane; an unreadable diff or dependency graph runs both lanes. The graph includes optional, build and dev edges. diff --git a/scripts/ci-changes.mjs b/scripts/ci-changes.mjs index 924e3bc5595..d4b8ff564df 100644 --- a/scripts/ci-changes.mjs +++ b/scripts/ci-changes.mjs @@ -102,6 +102,15 @@ export function cutsRelease(files) { ); } +// A Release Please diff that only bumps versions and changelogs. +export function isVersionOnlyRelease(files) { + const normalized = files.map((path) => path.replace(/^\.\//, "")); + return ( + cutsRelease(normalized) && + normalized.every((path) => RELEASE_PLEASE_FILES.has(path)) + ); +} + // On master, only the release pull request changes the release manifest, so a // PR or legacy merge group carrying it gets full validation before merging // instead of the change-based subset. Syncing master into develop carries the diff --git a/scripts/ci-lydite-changes.mjs b/scripts/ci-lydite-changes.mjs index 1449692eeae..819aab476e9 100644 --- a/scripts/ci-lydite-changes.mjs +++ b/scripts/ci-lydite-changes.mjs @@ -1,5 +1,6 @@ import { appendFileSync } from "node:fs"; import { fileURLToPath, pathToFileURL } from "node:url"; +import { isVersionOnlyRelease } from "./ci-changes.mjs"; import { changedFilesBetween, readWorkspace } from "./ci-rust-scope.mjs"; export const isLydite = (name) => @@ -93,6 +94,9 @@ const ownsBridge = (path) => ) || path.replace(/^\.\//, "") === ".github/workflows/lydite.yml"; export function pullRequestScope(files, packages) { + // Release PRs and their queue drafts only bump versions. + if (files !== null && isVersionOnlyRelease(files)) + return { core: false, bridge: false }; const scope = lyditeScope(files, packages); if (files === null) return scope; return { ...scope, bridge: scope.bridge && files.some(ownsBridge) }; diff --git a/scripts/ci-lydite-changes.test.mjs b/scripts/ci-lydite-changes.test.mjs index d2b59a3de8c..ce089d1ca99 100644 --- a/scripts/ci-lydite-changes.test.mjs +++ b/scripts/ci-lydite-changes.test.mjs @@ -84,6 +84,29 @@ test("PRs run the bridge only for Lydite-owned changes", () => { assert.deepEqual(pullRequestScope(null, packages), both); }); +test("version-only release PRs skip Lydite", () => { + const release = [ + ".release-please-manifest.json", + "CHANGELOG.md", + "Cargo.lock", + "Cargo.toml", + "VERSION", + "crates/celox-napi/package.json", + "packages/celox/package.json", + "packages/vite-plugin/package.json", + ]; + assert.deepEqual(pullRequestScope(release, packages), neither); + // Without the release manifest, Cargo changes are ordinary dependency edits. + assert.deepEqual(pullRequestScope(release.slice(1), packages), { + core: true, + bridge: false, + }); + assert.equal( + pullRequestScope([...release, "crates/lydite/src/main.rs"], packages).bridge, + true, + ); +}); + test("dependency selection follows new transitive edges automatically", () => { const graph = [ { name: "lydite", dir: "crates/lydite", dependencies: [] }, From c7018e37ec000a04f63a7aaee46fae29f5f03b64 Mon Sep 17 00:00:00 2001 From: tignear Date: Sat, 17 Oct 2026 10:51:25 +0900 Subject: [PATCH 2/2] ci(lydite): retire the old workflow path that stale branches still run PRs run the workflow from their merge ref, so stacked or old branches kept running the previous lydite.yml with every lane. Rename the workflow so the old path can stay disabled while the new one runs. Classifier and workflow edits now run only the core lane on PRs. --- .github/workflows/ci.yml | 2 +- .../workflows/{lydite.yml => lydite-checks.yml} | 2 +- .github/workflows/nightly.yml | 4 ++-- CLAUDE.md | 2 +- CONTRIBUTING.md | 6 +++++- lydite/README.md | 2 +- lydite/audit/README.md | 2 +- lydite/audit/automatic_proof/ci.py | 4 ++-- lydite/audit/veryl_scaling/rv32i_selected_ci.py | 2 +- lydite/conformance/veryl/README.md | 2 +- lydite/docs/usage.md | 2 +- scripts/ci-changes.mjs | 4 ++-- scripts/ci-lydite-changes.mjs | 8 ++++---- scripts/ci-lydite-changes.test.mjs | 14 +++++++++----- 14 files changed, 32 insertions(+), 24 deletions(-) rename .github/workflows/{lydite.yml => lydite-checks.yml} (99%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f266a99d85f..232a5024f1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -214,7 +214,7 @@ jobs: # runs the binaries one after another. # A pull request builds and runs only the tests its changes can affect # (scripts/ci-rust-scope.mjs); merge groups and the daily run keep the - # Celox workspace. lydite.yml owns Lydite tests at its own cadence. + # Celox workspace. lydite-checks.yml owns Lydite tests at its own cadence. - name: Run workspace tests with CI features if: needs.changes.outputs.rust_full != 'false' run: >- diff --git a/.github/workflows/lydite.yml b/.github/workflows/lydite-checks.yml similarity index 99% rename from .github/workflows/lydite.yml rename to .github/workflows/lydite-checks.yml index c76896075fc..92dff0e5283 100644 --- a/.github/workflows/lydite.yml +++ b/.github/workflows/lydite-checks.yml @@ -1,4 +1,4 @@ -name: lydite +name: Lydite # Proof, editor, and pinned-Celox conformance gates imported from # https://github.com/tignear/hwverify. The workspace crates are also built, diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7d904866769..bcc5e607f1e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -21,7 +21,7 @@ jobs: - name: Dispatch full CI on develop run: gh workflow run ci.yml --repo "$GITHUB_REPOSITORY" --ref develop - # lydite.yml schedules the default branch itself; its bridge lanes do not run + # lydite-checks.yml schedules the default branch itself; its bridge lanes do not run # for Celox PRs, so check develop's in-tree Celox daily as well. queue-lydite-develop: name: Queue develop Lydite validation @@ -30,7 +30,7 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - name: Dispatch every Lydite lane on develop - run: gh workflow run lydite.yml --repo "$GITHUB_REPOSITORY" --ref develop + run: gh workflow run lydite-checks.yml --repo "$GITHUB_REPOSITORY" --ref develop # heliodor-bench.yml schedules the stable master lane directly. Dispatch the # develop ref here for the small pinned/HEAD Linux boot compatibility gates. diff --git a/CLAUDE.md b/CLAUDE.md index f1ecd6bf882..65c5bff5124 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -34,7 +34,7 @@ cargo insta accept # Accept snapshot changes | `packages/celox` | TypeScript runtime package | | `packages/vite-plugin` | Vite plugin | | `crates/lydite-*` | lydite hardware refinement checker (unpublished; CLI is `lydite`) | -| `lydite/` | lydite docs, examples, editor client, and proof/conformance gates (`.github/workflows/lydite.yml`) | +| `lydite/` | lydite docs, examples, editor client, and proof/conformance gates (`.github/workflows/lydite-checks.yml`) | ### lydite diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 255ecb482d2..ae429db92c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -211,6 +211,10 @@ Lydite has its own test cadence (`scripts/ci-lydite-changes.mjs`): passing run. NAPI/JS changes, upstream private tests and Markdown do not reach Lydite. - Version-only Release Please diffs, including their queue drafts, skip Lydite. +- PR workflows come from the PR's merge ref, so branches based on an older base + still carry the earlier `lydite.yml`, which selected every lane. That + workflow file stays disabled in repository settings; `lydite-checks.yml` + replaces it. Re-enable nothing under the old path. - Shared dependency/toolchain configuration runs the core lane; an unreadable diff or dependency graph runs both lanes. The graph includes optional, build and dev edges. @@ -234,7 +238,7 @@ uses the finer behavior-based matrix above. | Daily at 02:17 UTC (11:17 JST) | `codspeed.yml` measures compile time on the default branch using CPU simulation. Execution failures and CodSpeed performance-check failures open or update a branch issue; the next healthy run closes it. Manual dispatch supports branch measurements. PRs, merge groups, and pushes do not run CodSpeed. | | Daily at 02:37 UTC (11:37 JST) | `heliodor-bench.yml` runs the complete master Linux suite on x86-64 and AArch64. Explicit manual selections retain focused suite runs and ARM64 profiling. PRs do not run this workflow; its tooling tests run in `Lint & Format` with the other script tests. | | Every full CI run | Run every shared Veryl and SystemVerilog case against both Verilator and Icarus, with locked Nix tools. Run the live adapter tests normally marked ignored because they need external tools. Preserve reports and per-case diagnostics as artifacts for 14 days, including on failure; matrix failures do not cancel the other comparisons. | -| Affected pull requests and merge groups; daily at 03:41 UTC (12:41 JST); on demand | `lydite.yml` owns Lydite Rust tests, proof, conformance, editor, and mutation gates. Unrelated changes skip these jobs, and Celox changes skip the bridge. Daily and manual runs enable all lanes and report failures in an issue. | +| Affected pull requests and merge groups; daily at 03:41 UTC (12:41 JST); on demand | `lydite-checks.yml` owns Lydite Rust tests, proof, conformance, editor, and mutation gates. Unrelated changes skip these jobs, and Celox changes skip the bridge. Daily and manual runs enable all lanes and report failures in an issue. | | On demand | Dispatch `ci.yml` on the desired branch to run full CI and external comparisons, regardless of its diff. | | Pull requests that cut a release | A `master` pull request or legacy merge group whose diff changes `.release-please-manifest.json` (only the release pull request does there; syncing it into `develop` is not a release) runs full CI and the external comparisons. `Rust Test & NAPI Build` then requires the comparisons to pass, so a release cannot merge after only change-based checks. Daily and manual full runs do not gate on the comparisons; their failures reach the full CI issue below. A `master` pull request or legacy merge group whose diff cannot be determined is treated the same way. | diff --git a/lydite/README.md b/lydite/README.md index 3e28356ad73..21b8fd45ac6 100644 --- a/lydite/README.md +++ b/lydite/README.md @@ -42,4 +42,4 @@ LYDITE_SOLVER=finite ../target/release/lydite audit/lemma_candidates/counter.lyd The Rust translation, obligation generation, kernel and selected solver are trusted; see the [trust boundary](docs/trust.md). Current results come from -[CI](../.github/workflows/lydite.yml), not archived reports. +[CI](../.github/workflows/lydite-checks.yml), not archived reports. diff --git a/lydite/audit/README.md b/lydite/audit/README.md index 9206bdc27b2..6336c910077 100644 --- a/lydite/audit/README.md +++ b/lydite/audit/README.md @@ -13,7 +13,7 @@ the commands below the "Sealed archives" heading must be run. ## Fresh required gates Run from `lydite/` with fresh output directories outside the checkout. -The [workflow](../../.github/workflows/lydite.yml) is the authoritative ordering. +The [workflow](../../.github/workflows/lydite-checks.yml) is the authoritative ordering. The original-corpus preparation builds the pinned frontend needed by the later symbolic/RV gates; a failed dependency fetch is a setup failure, never a pass. diff --git a/lydite/audit/automatic_proof/ci.py b/lydite/audit/automatic_proof/ci.py index 0ef7ecb7d01..f63ea4c5bfc 100644 --- a/lydite/audit/automatic_proof/ci.py +++ b/lydite/audit/automatic_proof/ci.py @@ -216,7 +216,7 @@ def validate_group(out, group, summary, checker_hash): def source_files(): repo = ROOT.parent paths = {repo / 'Cargo.toml', repo / 'Cargo.lock', Path(__file__).with_name('ci-matrix.json'), - repo / '.github/workflows/lydite.yml', + repo / '.github/workflows/lydite-checks.yml', ROOT / 'conformance/veryl-symbolic/run_automatic_ci.sh', ROOT / 'conformance/veryl-proof/tools/z3-tripwire.sh', Path(__file__).with_name('test_ci.py')} @@ -266,7 +266,7 @@ def gate(out, checker): 'python': sys.version, 'files': fingerprints, 'source_snapshots': 'source-snapshots'}, indent=2) + '\n') scope = ['../crates/lydite-ir', '../crates/lydite', '../crates/lydite-celox', '../crates/lydite-solver', '../crates/lydite-syntax', '../crates/lydite-verify', 'audit/automatic_proof', 'conformance/veryl-symbolic/run_automatic_ci.sh', - '../.github/workflows/lydite.yml', '../Cargo.toml', '../Cargo.lock'] + '../.github/workflows/lydite-checks.yml', '../Cargo.toml', '../Cargo.lock'] (out / 'dirty.patch').write_bytes(subprocess.check_output(['git', 'diff', '--binary', 'HEAD', '--', *scope], cwd=ROOT)) (out / 'untracked-source-paths.txt').write_bytes(subprocess.check_output(['git', 'ls-files', '--others', '--exclude-standard', '--', *scope], cwd=ROOT)) tripwire = out / 'tripwire-bin' diff --git a/lydite/audit/veryl_scaling/rv32i_selected_ci.py b/lydite/audit/veryl_scaling/rv32i_selected_ci.py index 184fe406180..34e6e8fae86 100644 --- a/lydite/audit/veryl_scaling/rv32i_selected_ci.py +++ b/lydite/audit/veryl_scaling/rv32i_selected_ci.py @@ -27,7 +27,7 @@ def capture_provenance(out, checker): root = selected.ROOT scope = ['../Cargo.toml', '../Cargo.lock', '../crates/lydite-ir', '../crates/lydite', '../crates/lydite-celox', '../crates/lydite-solver', '../crates/lydite-syntax', '../crates/lydite-verify', 'audit/veryl_scaling', 'audit/lemma_candidates', - 'conformance/veryl-symbolic', '../.github/workflows/lydite.yml', + 'conformance/veryl-symbolic', '../.github/workflows/lydite-checks.yml', 'examples/build_pipeline.py', 'examples/build_branch_pipeline.py', 'audit/interpreter.py'] files = set() diff --git a/lydite/conformance/veryl/README.md b/lydite/conformance/veryl/README.md index 469dc755623..385d0e4b93f 100644 --- a/lydite/conformance/veryl/README.md +++ b/lydite/conformance/veryl/README.md @@ -62,7 +62,7 @@ ignored; no prototype workspace paths are required. Use a new output directory for every run so stale reports cannot be mistaken for new results. Python optimization is rejected because source-mutation controls must execute. -The workflow is [.github/workflows/lydite.yml](../../../.github/workflows/lydite.yml): +The workflow is [.github/workflows/lydite-checks.yml](../../../.github/workflows/lydite-checks.yml): `push` and `pull_request`, pinned official checkout/upload actions, read-only contents permission, no persisted credentials, no repository secrets passed to checks, no cache, and a 30-minute job limit. Audit upload runs even when a check diff --git a/lydite/docs/usage.md b/lydite/docs/usage.md index c654114dd9e..d8e7512dfab 100644 --- a/lydite/docs/usage.md +++ b/lydite/docs/usage.md @@ -60,7 +60,7 @@ covers local links and fragments in all tracked Markdown, including the sealed historical records retained unchanged. The mandatory hosted gates are defined in -[the workflow](../../.github/workflows/lydite.yml). They include the original Veryl +[the workflow](../../.github/workflows/lydite-checks.yml). They include the original Veryl corpus, symbolic RTL refinement, native lemma diagnostics, selected RV32I, fixed automatic-proof controls and original-formula mutants. For their exact commands, dependency preparation and evidence locations, use the [audit index](../audit/README.md). diff --git a/scripts/ci-changes.mjs b/scripts/ci-changes.mjs index d4b8ff564df..072399c715c 100644 --- a/scripts/ci-changes.mjs +++ b/scripts/ci-changes.mjs @@ -304,7 +304,7 @@ if ( }); } -// Lydite tests are selected independently by lydite.yml, including its bridge. +// Lydite tests are selected independently by lydite-checks.yml, including its bridge. export function celoxRustTestScope(files, packages) { return rustTestScope( files.filter((path) => !/^(?:\.\/)?(?:lydite\/|crates\/lydite(?:-|\/))/.test(path)), @@ -313,7 +313,7 @@ export function celoxRustTestScope(files, packages) { } // Queue drafts, merge groups, releases and daily runs keep the Celox -// workspace. Lydite tests run independently in lydite.yml. +// workspace. Lydite tests run independently in lydite-checks.yml. function rustScopeOutputs(files) { let scope = { full: true }; if (files !== null) { diff --git a/scripts/ci-lydite-changes.mjs b/scripts/ci-lydite-changes.mjs index 819aab476e9..1893e907298 100644 --- a/scripts/ci-lydite-changes.mjs +++ b/scripts/ci-lydite-changes.mjs @@ -48,7 +48,7 @@ export function lyditeScope(files, packages) { "rust-toolchain.toml", "flake.nix", "flake.lock", - ".github/workflows/lydite.yml", + ".github/workflows/lydite-checks.yml", ".github/workflows/ci.yml", ".config/nextest.toml", ].includes(path) || @@ -87,11 +87,11 @@ export function lyditeScope(files, packages) { // Celox dependency changes reach the bridge, but its replay and proof corpus // are too heavy for every Celox PR. PRs run the bridge only for Lydite-owned -// changes; daily runs cover Celox changes and report failures in an issue. +// sources; daily runs cover Celox and CI changes and report failures. const ownsBridge = (path) => - ["lydite/", "crates/lydite", "scripts/ci-lydite-changes."].some((prefix) => + ["lydite/", "crates/lydite"].some((prefix) => path.replace(/^\.\//, "").startsWith(prefix), - ) || path.replace(/^\.\//, "") === ".github/workflows/lydite.yml"; + ); export function pullRequestScope(files, packages) { // Release PRs and their queue drafts only bump versions. diff --git a/scripts/ci-lydite-changes.test.mjs b/scripts/ci-lydite-changes.test.mjs index ce089d1ca99..e1d8fba88d5 100644 --- a/scripts/ci-lydite-changes.test.mjs +++ b/scripts/ci-lydite-changes.test.mjs @@ -21,7 +21,7 @@ test("Lydite core changes and shared configuration run both lanes", () => { "Cargo.toml", "rust-toolchain.toml", "flake.lock", - ".github/workflows/lydite.yml", + ".github/workflows/lydite-checks.yml", "scripts/ci-lydite-changes.mjs", "vendor/new/src/lib.rs", "crates/new/src/lib.rs", @@ -71,14 +71,18 @@ test("PRs run the bridge only for Lydite-owned changes", () => { "crates/celox-test-suite/src/veryl/cases/flip_flop.vtest", ]) assert.deepEqual(pr(path), neither, path); - for (const path of ["Cargo.lock", "rust-toolchain.toml", ".github/workflows/ci.yml"]) + for (const path of [ + "Cargo.lock", + "rust-toolchain.toml", + ".github/workflows/ci.yml", + ".github/workflows/lydite-checks.yml", + "scripts/ci-lydite-changes.mjs", + ]) assert.deepEqual(pr(path), { core: true, bridge: false }, path); for (const path of [ "crates/lydite-celox/src/lib.rs", "crates/lydite/src/main.rs", "lydite/conformance/veryl-proof/case-exceptions.json", - ".github/workflows/lydite.yml", - "scripts/ci-lydite-changes.mjs", ]) assert.equal(pr(path).bridge, true, path); assert.deepEqual(pullRequestScope(null, packages), both); @@ -164,7 +168,7 @@ test("workflows transfer Rust tests and gate each Lydite lane", () => { ci, /cargo test --locked --workspace --exclude 'lydite\*' --doc/, ); - const workflow = readFileSync(`${root}.github/workflows/lydite.yml`, "utf8"); + const workflow = readFileSync(`${root}.github/workflows/lydite-checks.yml`, "utf8"); assert.match( workflow, /pull_request:\n merge_group:\n schedule:\n - cron: "41 3 \* \* \*"/,