Skip to content

Add CI (build, test, clippy) and fix pre-existing clippy warnings - #2

Merged
vdmo merged 1 commit into
mainfrom
ci/rust-build-test
Sep 30, 2026
Merged

vdmo merged 1 commit into
mainfrom
ci/rust-build-test

Conversation

@vdmo

@vdmo vdmo commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Summary

This repo had no CI. The 25 tests merged in #1 (Only-Lang parser, signed governance chain, conductor UDP wiring) only ran when someone remembered to run them locally — a regression there would ship silently.

  • .github/workflows/rust.yml: cargo build/cargo test on push and PR to main; clippy -D warnings as a hard gate; cargo fmt --check as report-only (see below for why).
  • Fixed the 6 pre-existing clippy warnings so clippy could be a real gate immediately instead of starting pre-broken: two unused imports in pchi-schema/src/lib.rs, a manual range-contains in validation.rs, one half of a two-item use unused in each of transport.rs/web_server.rs, and a redundant use tracing_subscriber; in main.rs.

Why cargo fmt is report-only, not a gate

cargo fmt --all -- --check found 116 pre-existing diff hunks, all whitespace, across the whole codebase. Fixing that is a real, separate, dedicated change — reformatting the entire repo doesn't belong bundled into a CI-setup PR where it would swamp the actual diff. Happy to do that as its own PR if wanted.

Test plan

  • cargo build --workspace — clean
  • cargo clippy --workspace --all-targets -- -D warnings — clean (was 6 warnings before this PR)
  • cargo test --workspace — 25 passed, 0 failed
  • The workflow itself hasn't run on GitHub's runners yet — will confirm once this PR is open and Actions picks it up

🤖 Generated with Claude Code

… warnings

This repo had zero CI. The 25 tests covering the Only-Lang parser, the
signed governance chain, and the conductor's UDP-to-rule-engine wiring
(merged in #1) only ran when someone remembered to run them locally.

- .github/workflows/rust.yml: cargo build/test on push and PR to main,
  clippy as a hard gate (-D warnings), cargo fmt as report-only.
- Fixed the 6 pre-existing clippy warnings so clippy could actually be a
  hard gate from day one instead of starting pre-broken: two unused
  imports in pchi-schema/src/lib.rs (DateTime/Utc, thiserror::Error), a
  manual range-contains in validation.rs, SinkExt/StreamExt each imported
  but only one used in transport.rs/web_server.rs, and a redundant
  single-component `use tracing_subscriber;` in main.rs.
- cargo fmt --check found 116 pre-existing diff hunks (all whitespace) —
  a repo-wide reformat is a separate, dedicated change, not something to
  fold into a CI PR, so fmt stays report-only until that happens
  separately.

Verified locally: cargo build --workspace, cargo clippy --workspace
--all-targets -- -D warnings (clean), cargo test --workspace (25 passed).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@vdmo
vdmo merged commit 329a064 into main Sep 30, 2026
1 check passed
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