Skip to content

Add CI workflow, README, and align CLAUDE.md with Kani-BMC reality#6

Merged
avrabe merged 4 commits into
mainfrom
phase1/foundation-ci-readme-claudemd
May 19, 2026
Merged

Add CI workflow, README, and align CLAUDE.md with Kani-BMC reality#6
avrabe merged 4 commits into
mainfrom
phase1/foundation-ci-readme-claudemd

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 19, 2026

Summary

Foundation PR 1b of the Phase 1 effort. Partial completion of #1 — nightly long-fuzz + fuzz coverage for the other 4 components are tracked in #8 (per architect-reviewer recommendation).

Lands four things that turn the cleaned-up baseline (#2) into a real ASPICE-grade merge gate:

  1. .github/workflows/ci.yml — actual CI on every PR and main push
  2. Root README.md — public-facing project description with CI badge
  3. CLAUDE.md drift fix — replaces stale Verus claims with current Kani-BMC reality
  4. Root LICENSE (Apache-2.0) — matches sibling repo (relay) pattern

CI workflow

Job Runs
lint per-crate cargo fmt -p $c --check for each workspace member + cargo clippy --workspace --all-targets -- -D warnings
test cargo test --workspace --all-features (covers proptest)
kani cargo kani -p $crate for all monitors (serial loop; matrix split tracked in #8)
fuzz-smoke cargo fuzz run with -max_total_time=60 on nightly toolchain
rivet-validate rivet validate against artifacts/*

Why per-crate fmt: cargo fmt --all reaches into local path-dependencies and would inherit drift in relay//rivet/ siblings. The per-package loop scopes the gate to this workspace's 8 members.

Cross-repo checkout: relay and rivet are checked out as siblings (matching the local path = "../relay/..." layout). Currently pins to their main branches — pinning to SHAs is tracked in #8.

Caching: Swatinem/rust-cache@v2 per-job, plus a dedicated actions/cache@v4 for the Kani install.

Reviewer feedback addressed (round 1 → 2 → 3)

Round Reviewer Finding Resolution
1 Tester Rivet warning count drift in README Switched to status-words; stakeholder later asked all numbers removed
1 Architect "Verus planned (separate tracking issue)" referenced no issue Filed #7
1 Architect Closes #1 would auto-close while nightly-long-fuzz unmet Reframed as "Partial completion"; #8 captures remaining work
1 Architect CI improvements (matrix, pinning, cargo-deny, bazel) Filed #8 as omnibus
1 Architect LICENSE pending Added, matches relay
2 Stakeholder Don't put specific numbers in README — they drift Stripped harness/warning counts; verification table now uses status words
2 Architect cargo fmt --all reaches into ../relay/ and would fail CI Replaced with per-crate loop (commit c8e9f67); locally exit 0 across all 8 members

CLAUDE.md drift fix

Replaces stale paths and Verus claims with current Kani-BMC reality. Links to issue #7 for the planned Verus work on wohl-alert.

Local verification

Check Result
Per-crate cargo fmt -p $c --check × 8 clean
cargo clippy --workspace --all-targets -- -D warnings clean
cargo test --workspace --all-features pass
YAML parse OK
rivet validate PASS

CI runs the full matrix end-to-end on this PR.

After this PR merges

  • Enable GitHub branch protection rule on main: require CI green (PR-only is already on)
  • Decide required vs advisory jobs (architect-recommended: lint, test, kani, rivet-validate required; fuzz-smoke advisory — tracked in CI follow-ups: matrix split, pinned siblings, cargo-deny, bazel build, nightly long-fuzz #8)
  • Phase 2 tracks open in parallel:
    • Track B — STM32G0 + door contact firmware
    • Track Ccrates/wohl-ota/ no_std core with Kani harnesses
    • Track D — Verus on wohl-alert (#7) + CI hygiene (#8)

🤖 Generated with Claude Code

Foundation PR 1b of the Phase 1 effort. Closes #1.

CI workflow (.github/workflows/ci.yml)
  - jobs: lint (fmt + clippy -D warnings), test (workspace), kani (all 6
    components), fuzz-smoke (60s per target on nightly), rivet-validate
  - cross-repo checkout for relay + rivet siblings (path = "../relay/..."
    and path = "../rivet/...")
  - Rust 1.85.0 stable, edition 2024; rust-cache + dedicated Kani cache
  - Concurrency group cancels in-progress runs on same ref

Root README.md
  - tagline, components table, architecture summary, build instructions,
    verification status table, CI badge, links to PulseEngine/Relay/Rivet
  - License section notes Apache-2.0 SPDX in Cargo.toml; root LICENSE file
    pending separately

CLAUDE.md drift fix
  - Was: "Verified core logic in src/core.rs (Verus-annotated)" — wrong
    path AND wrong verification tool
  - Now: "crates/wohl-*/plain/src/lib.rs (Kani BMC harnesses on engine.rs)"
  - Removed bazel test //:verus (not active), replaced with the cargo kani
    / cargo test / cargo fuzz / rivet validate commands that actually work
  - Verus mentioned as planned for wohl-alert dispatcher dedup invariant

After this PR merges:
  - main branch protection can require CI green (currently only PR-required)
  - Phase 2 tracks (B: STM32G0 + door firmware, C: OTA core, D: Verus +
    fuzz deepening) start in parallel

Verification (local, macOS-aarch64)
  - cargo fmt --all --check: clean
  - cargo clippy --workspace --all-targets -- -D warnings: clean
  - cargo test --workspace: 92/92 pass
  - YAML parse: OK

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe and others added 3 commits May 19, 2026 15:08
Round 2 of reviewer feedback on PR #6.

Architect-flagged blockers
  - README.md Rivet validation status: was "0 errors / 20 warnings" — the 20
    was lifecycle-gap count, actual warning count is 5. Fixed to
    "PASS, 5 warnings". (rivet validate confirms.)
  - CLAUDE.md / README.md said "Verus planned (separate tracking issue)" but
    no such issue existed. Filed issue #7 (Track D Verus on wohl-alert) and
    linked both files to it.
  - README "Build" section removed the `bazel build //...` line since CI
    does not exercise it; the bazel path is tracked for follow-up in #8.

Bonus: root LICENSE file
  - Apache-2.0, matches sibling repo (relay) verbatim, including
    "Copyright 2026 pulseengine contributors" attribution.
  - README License section updated to reference LICENSE file.

CI follow-ups (architect non-blocking, deferred)
  - Filed issue #8 for: Kani matrix split, pinned relay/rivet refs,
    cargo-deny job, bazel build job, nightly long-fuzz, fuzz coverage for
    the other 4 components, Kani cache key tightening, declaring required
    vs advisory jobs.

No behavior change. cargo fmt + clippy + test still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
User feedback: "dont add any numbers in the readme, they will be in the
next round again false." The previous revision had "PASS (20 harnesses)"
and "PASS, 5 warnings" — both will drift the moment a harness is added
or rivet validate is re-run.

Changes:
  - Verification table: replace specific counts with "gated by CI" /
    "active in spar/" / "planned" — status words that don't drift.
  - Toolchain section: link to Cargo.toml's rust-version rather than
    restating "1.85.0" (which would drift when Cargo.toml bumps).
  - Links section: remove "this PR closes" qualifier on #1 since the PR
    now refs rather than closes it (nightly long-fuzz remaining).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Architect re-reviewer caught this: `cargo fmt --all --check` reaches into
local path-dependencies (relay/, rivet/ siblings) and inherits their fmt
drift. The lint job would have gone red on first push even though every
wohl crate is formatted correctly.

Switch to a per-package loop over the 8 workspace members. Locally:
  before: cargo fmt --all --check     → exit 1 (relay diff)
  after:  cargo fmt -p <each> --check → exit 0 for all 8

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit 6041199 into main May 19, 2026
1 of 5 checks passed
@avrabe avrabe deleted the phase1/foundation-ci-readme-claudemd branch May 19, 2026 15:28
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