Skip to content

feat: v0.1.0 — Bazel ruleset for ordeal certificate-checked SMT gates - #2

Merged
avrabe merged 1 commit into
mainfrom
feat/v0.1.0-ruleset
Jul 29, 2026
Merged

feat: v0.1.0 — Bazel ruleset for ordeal certificate-checked SMT gates#2
avrabe merged 1 commit into
mainfrom
feat/v0.1.0-ruleset

Conversation

@avrabe

@avrabe avrabe commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Builds the rules_ordeal Bazel ruleset, mirroring rules_verus's architecture (post-#21 fixed per-platform toolchain() hub shape).

What's in

  • Module extension (ordeal/extensions.bzl): _KNOWN_VERSIONS pins all four v0.16.1 sha256s from the release's SHA256SUMS.txt (re-verified locally against freshly downloaded assets); hub repo declares real per-platform toolchain() rules so register_toolchains("@ordeal_toolchains//:all") just works.
  • Repository rule (ordeal/private/repo.bzl): downloads ordeal-v{version}-{triple}.tar.gz, sha256-verifies, chmod +x, strips macOS quarantine.
  • Rules (ordeal/defs.bzl): ordeal_check gates on the verdict text unsat (verified: ordeal check exits 0 for cleanly decided sat too), surfacing the actual verdict/stdout/stderr on failure. ordeal_verus_check discharges Verus by (bit_vector) logs (exit code authoritative there; optional cert_out drops LRAT certs into test undeclared outputs). --cert-out verified to be verus-mode only, so ordeal_check has no such attribute.
  • examples/: consumer module via local_path_override — the CI oracle. //:smoke (unsat passes), //:sat_must_fail (proves a sat query FAILS the gate with the expected message), //:verus_obligations (real Verus log fixture from ordeal's test suite).
  • CI: bazel build //... + cd examples && bazel test //... on ubuntu + macos.
  • Minimal rivet setup (rivet validate: PASS) + generated AGENTS/CLAUDE.

Verified locally (aarch64-apple-darwin, real v0.16.1 binary)

//:sat_must_fail   PASSED
//:smoke           PASSED
//:verus_obligations PASSED
Executed 3 out of 3 tests: 3 tests pass.

Direct negative check: bazel test //:sat_gate fails with expected verdict 'unsat', got 'sat' (exit 0).

🤖 Generated with Claude Code

https://claude.ai/code/session_01EBJ6kdJ16E3hnsBbq9Lwf1

Mirrors rules_verus's architecture (post-PR #21 fixed shape):

- ordeal/extensions.bzl: bzlmod module extension; per-platform download
  repos + a hub repo declaring real per-platform toolchain() rules, so
  register_toolchains("@ordeal_toolchains//:all") registers all platforms
  and native resolution picks the host's.
- ordeal/private/repo.bzl: repository rule fetching
  ordeal-v{version}-{triple}.tar.gz from pulseengine/ordeal releases,
  sha256-verified against the release's SHA256SUMS.txt (all four v0.16.1
  hashes pinned and re-verified locally), macOS quarantine stripped.
- ordeal/toolchain.bzl: OrdealToolchainInfo provider + toolchain rule.
- ordeal/defs.bzl: ordeal_check (gates on the verdict TEXT `unsat`,
  because `ordeal check` exits 0 for cleanly decided `sat` too; failures
  surface the actual verdict/stdout/stderr) and ordeal_verus_check
  (discharges Verus `by (bit_vector)` logs; exit code authoritative;
  optional --cert-out into test undeclared outputs). `--cert-out` is
  verus-mode only — `ordeal check` takes no flags, so ordeal_check has
  no cert_out attribute.
- examples/: consumer module via local_path_override, the CI oracle:
  //:smoke (unsat gate passes), //:sat_must_fail (proves a sat query
  FAILS the gate with the expected message), //:verus_obligations
  (real Verus log fixture from ordeal's test suite, cert_out).
  Verified green with the real downloaded v0.16.1 binary on
  aarch64-apple-darwin.
- .github/workflows/ci.yml: bazel build //... + examples bazel test //...
  on ubuntu-latest and macos-latest.
- Minimal rivet setup (rivet validate: PASS) + generated AGENTS/CLAUDE.

Trace: skip

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EBJ6kdJ16E3hnsBbq9Lwf1
@avrabe
avrabe merged commit 6e0a5ab into main Jul 29, 2026
2 checks passed
@avrabe
avrabe deleted the feat/v0.1.0-ruleset branch July 29, 2026 10:32
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