Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ Lydite has its own test cadence (`scripts/ci-lydite-changes.mjs`):
in the issue "Lydite validation is failing on <branch>", 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.
- 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.
Expand All @@ -233,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. |

Expand Down
2 changes: 1 addition & 1 deletion lydite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion lydite/audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions lydite/audit/automatic_proof/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')}
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion lydite/audit/veryl_scaling/rv32i_selected_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion lydite/conformance/veryl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lydite/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
13 changes: 11 additions & 2 deletions scripts/ci-changes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -295,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)),
Expand All @@ -304,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) {
Expand Down
12 changes: 8 additions & 4 deletions scripts/ci-lydite-changes.mjs
Original file line number Diff line number Diff line change
@@ -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) =>
Expand Down Expand Up @@ -47,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) ||
Expand Down Expand Up @@ -86,13 +87,16 @@ 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.
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) };
Expand Down
37 changes: 32 additions & 5 deletions scripts/ci-lydite-changes.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -71,19 +71,46 @@ 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);
});

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: [] },
Expand Down Expand Up @@ -141,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 \* \* \*"/,
Expand Down
Loading