Skip to content

Add Verus CI job (closes #7)#19

Merged
avrabe merged 2 commits into
mainfrom
add/verus-ci-job
May 24, 2026
Merged

Add Verus CI job (closes #7)#19
avrabe merged 2 commits into
mainfrom
add/verus-ci-job

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 23, 2026

Summary

Wires the Verus deductive-proof gate into CI. The Bazel target //proofs/verus:alert_dedup_verify was landed in Phase 2 Track D (#12); this PR adds the corresponding workflow job, completing the Verus CI loop.

Closes #7.

What the job does

  • Checks out wohl (path: wohl).
  • Checks out pulseengine/rules_wasm_component at a pinned SHA (new RULES_WASM_COMPONENT_REF env var, fbe2057). wohl/MODULE.bazel uses local_path_override for rules_wasm_component so local dev iterates against a sibling checkout; CI provides the same sibling layout from a pinned commit so module resolution succeeds without breaking the local-dev pattern.
  • Sets up Bazelisk via bazel-contrib/setup-bazel@0.15.0 with bazelisk-cache, disk-cache, and repository-cache enabled — keeps the Verus toolchain (~26 MB) and Bazel state cached across runs.
  • Runs bazel test //proofs/verus:alert_dedup_verify --test_output=summary. rules_verus's hermetic toolchain handles the Verus binary download via the pinned 0.2026.02.15 toolchain in MODULE.bazel — no manual install on the runner.

Why bazel-contrib/setup-bazel

It's the maintained successor to bazelbuild/setup-bazelisk, supports cache configuration directly, and is widely used in the Bazel community.

Pairs with

🤖 Generated with Claude Code

avrabe added a commit that referenced this pull request May 23, 2026
PR #19's first CI run failed because rules_rocq_rust (added in #17)
unconditionally creates a nixpkgs-backed `rocq_toolchains` repo at
Bazel module-resolution time — that needs `nix-build` on PATH, even
though no rocq rule is actually loaded by //proofs/verus.

Per the architect's direction ("install Nix in CI, but pin"):

- MODULE.bazel: add rules_nixpkgs_core (0.13.0) + nix_repo.github
  pinned to NixOS/nixpkgs commit aca4d95 (matches rivet's pin
  exactly — keep wohl and rivet in lock-step on the nixpkgs ref
  until there is a reason to diverge). Without nix_repo, rules_
  rocq_rust falls back to behavior that varies by tool version.
- ci.yml (verus job): add cachix/install-nix-action pinned to SHA
  8aa03977 (v31.10.6) BEFORE the setup-bazel step. Pinning by SHA,
  not tag — tags can move; SHAs cannot.

Local devs need nix installed for `bazel test //proofs/verus:...`
too (a side-effect of #17's rules_rocq_rust addition). Mac:
`brew install nix`; Linux: official installer or distro package.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe added a commit that referenced this pull request May 23, 2026
rules_rocq_rust (added in #17) calls rust_toolchain with `channel`,
`iso_date`, and `version` attributes — newer-rules_rust APIs that
wohl's pinned rules_rust commit (6281d27 via git_override) does not
have. This blocks PR #19's Verus CI job at toolchain resolution.

Match relay's pin:
  - bazel_dep rules_rust 0.61.0 -> 0.70.0 (from BCR)
  - drop the git_override to 6281d27 — that commit is now an ancestor
    of 0.70.0; the override was the old workaround for a Bazel API
    break that 0.61.0 had inherited (relay's MODULE.bazel comment
    documents this).
  - bazel_dep rules_wasm_component 0.1.0 -> 1.0.0 — rules_wasm_
    component 1.0.0 also targets rules_rust 0.70.0; keep the local_
    path_override so active rules_wasm_component dev still works.

Validation
  - `bazel mod show_repo @rules_rust` resolves 0.70.0 from BCR cleanly.
  - `bazel mod show_repo @rules_wasm_component` resolves via the local
    override.
  - Existing CI (lint/test/kani/fuzz/rivet-validate) is cargo-based
    and does not exercise the bazel rules — so this PR's CI passes
    "trivially". The real bazel-side validation comes via PR #19's
    Verus job once rebased onto this. A future bazel build //:all
    CI job (tracked in #14 / #8) will be the standing gate for any
    rules_wasm_component API ripple through wohl's WASM components.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe added a commit that referenced this pull request May 24, 2026
Matches relay's pin. Drops the rules_rust git_override (commit 6281d27 is now an ancestor of 0.70.0). Unblocks rules_rocq_rust + the Verus CI job in #19, which calls rust_toolchain with channel/iso_date/version attrs that the old pin lacked.
avrabe and others added 2 commits May 24, 2026 21:08
Wires the Verus deductive-proof gate into CI. The bazel target was
landed in Phase 2 Track D (#12 / SWARCH-WOHL-006's verification chain);
this PR adds the corresponding workflow job, completing the Verus CI
loop and closing issue #7.

What the job does
  - Checks out wohl (path: wohl).
  - Checks out pulseengine/rules_wasm_component at a pinned SHA
    (new env var RULES_WASM_COMPONENT_REF). wohl's MODULE.bazel uses
    local_path_override for rules_wasm_component so local dev iterates
    against a sibling checkout; CI provides the same sibling layout
    from a pinned commit so module resolution succeeds without
    breaking the local-dev pattern.
  - Sets up Bazelisk via bazel-contrib/setup-bazel@0.15.0 with
    bazelisk-cache, disk-cache, and repository-cache enabled — keeps
    the Verus toolchain (~26 MB) and Bazel state cached across runs.
  - Runs `bazel test //proofs/verus:alert_dedup_verify`. rules_verus's
    hermetic toolchain handles the Verus binary download via the
    pinned 0.2026.02.15 toolchain in MODULE.bazel — no manual install.

Closes #7.

Pairs with #17 (sibling pinning) — this is the first CI job that
actually runs Bazel; the pinning makes its behavior deterministic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR #19's first CI run failed because rules_rocq_rust (added in #17)
unconditionally creates a nixpkgs-backed `rocq_toolchains` repo at
Bazel module-resolution time — that needs `nix-build` on PATH, even
though no rocq rule is actually loaded by //proofs/verus.

Per the architect's direction ("install Nix in CI, but pin"):

- MODULE.bazel: add rules_nixpkgs_core (0.13.0) + nix_repo.github
  pinned to NixOS/nixpkgs commit aca4d95 (matches rivet's pin
  exactly — keep wohl and rivet in lock-step on the nixpkgs ref
  until there is a reason to diverge). Without nix_repo, rules_
  rocq_rust falls back to behavior that varies by tool version.
- ci.yml (verus job): add cachix/install-nix-action pinned to SHA
  8aa03977 (v31.10.6) BEFORE the setup-bazel step. Pinning by SHA,
  not tag — tags can move; SHAs cannot.

Local devs need nix installed for `bazel test //proofs/verus:...`
too (a side-effect of #17's rules_rocq_rust addition). Mac:
`brew install nix`; Linux: official installer or distro package.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avrabe avrabe force-pushed the add/verus-ci-job branch from c75d7c3 to 18f5059 Compare May 24, 2026 19:08
@avrabe avrabe merged commit 47098cd into main May 24, 2026
6 checks passed
@avrabe avrabe deleted the add/verus-ci-job branch May 24, 2026 19:29
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.

Track D: Add Verus proofs to wohl-alert dispatcher dedup invariant

1 participant