Skip to content

ci: add fmt/clippy/test + cross-platform determinism gates#2

Merged
bartekus merged 1 commit into
mainfrom
feat/c0-ci
Jul 15, 2026
Merged

ci: add fmt/clippy/test + cross-platform determinism gates#2
bartekus merged 1 commit into
mainfrom
feat/c0-ci

Conversation

@bartekus

Copy link
Copy Markdown
Contributor

What

chancery had no CI. The merged kernel-addon (PR #1) and its two pinned golden hashes had zero automated protection. This adds the two workflows the four extracted primitives already ship, adapted for the napi addon crate, plus a toolchain pin.

Contents

  • .github/workflows/ci.ymlfmt + clippy (default and the opt-in --features napi surface) + build + test on kernel-addon. cargo test runs the full 22-test suite, including the golden determinism gate (composition::golden_hashes_are_stable). The test step uses default features only, because a napi crate cannot link a test executable (Node supplies the Node-API symbols at load time); the napi surface is covered by the separate clippy step instead.
  • .github/workflows/determinism.yml — runs the composition determinism proofs (the two pinned hashes) across ubuntu-latest / macos-latest / windows-latest, proving same inputs, same hash, everywhere. This is the cross-platform proof that the single-platform ci.yml test step does not give, and matches the intent documented in composition.rs.
  • kernel-addon/rust-toolchain.toml — pin 1.92.0 (rustfmt + clippy), matching the four primitives so local cargo fmt/clippy produce exactly what CI enforces.

Why two files

ci.yml is the fast single-platform gate (all four checks). determinism.yml is the focused, non-redundant cross-platform golden proof: the kernel's whole value is a verifiable core, and its hashes must be byte-identical on every OS.

Verification (local, under pinned 1.92.0)

  • cargo fmt --all --check — clean
  • cargo clippy --all-targets --locked -- -D warnings — clean
  • cargo clippy --all-targets --features napi --locked -- -D warnings — clean
  • cargo build --locked — ok
  • cargo test --locked22 passed, including golden_hashes_are_stable
  • cargo test --locked --test composition (the determinism gate command) — 11 passed

Both workflow files validated as well-formed YAML.

chancery had no CI, so the merged kernel-addon and its pinned golden
hashes had zero automated protection. Add the two workflows the four
extracted primitives already ship, adapted for the napi addon crate:

- ci.yml: fmt, clippy (default + the opt-in --features napi surface),
  build, and test on kernel-addon. `cargo test` runs the 22-test suite
  including the golden determinism gate. Test uses default features only
  because a napi crate cannot link a test executable (Node supplies the
  symbols at load time); the napi surface is clippy-checked instead.
- determinism.yml: runs the composition determinism proofs (the two
  pinned hashes) across ubuntu/macos/windows to prove same inputs, same
  hash, everywhere.
- kernel-addon/rust-toolchain.toml: pin 1.92.0 (rustfmt + clippy) to
  match the four primitives so local fmt/clippy match CI exactly.

Verified locally under 1.92.0: fmt clean, clippy clean (both feature
sets), 22 tests green including golden_hashes_are_stable.
@bartekus
bartekus merged commit 508cf7f into main Jul 15, 2026
4 checks passed
@bartekus
bartekus deleted the feat/c0-ci branch July 15, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant