Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071# wardend: the containerized build/test/verify gates.## Two tiers of tooling, matching the two kinds of proof:## make build - compile the whole workspace (the privileged no_std# core + the daemon skeletons + the host-test gate).# make test - run the keystone contract gate (src/test): the# concrete functional proofs (parse fail-closed,# grant-if-able, the capability-matrix gate, the RFC# 5424 round-trip, the bounded-sink FIFO).# make verify-kani - run the Kani model-check proofs (src/verify): the# symbolic integer invariants (PRI bounds, sink# bound + exact-loss accounting).# make verify-verus - (reserved) run the Verus proofs, once the Verus# harness is added; the style contract in the core# crates is already Verus-parseable.## `make ci` = build + test + verify-kani (the full green gate).## The gates run in a container (the demit/nit pattern): an in-tree# Containerfile that installs the Rust toolchain + Kani, so the build is# reproducible off the host toolchain. `make build-local`/`test-local`/# `verify-kani-local` run the same commands on the host toolchain for fast# iteration (the host already has cargo + Kani 0.68.0).
DOCKER ?= dockerIMAGE ?= wardend:buildIMAGE_KANI ?= wardend:kaniPLATFORM ?= linux/amd64
.PHONY: build test verify-kani verify-verus ci build-image build-image-kani.PHONY: build-local test-local verify-kani-local
# --- container tier ---------------------------------------------------------
# base: Rust stable only — the build/test gates do not need Kani (a Kani# install failure must not block them; see the two Containerfile targets).build-image: $(DOCKER) build --platform $(PLATFORM) --target base -t $(IMAGE) -f Containerfile .
# kani: base + the Kani proof layer — only verify-kani needs it.build-image-kani: $(DOCKER) build --platform $(PLATFORM) --target kani -t $(IMAGE_KANI) -f Containerfile .
build: build-image $(DOCKER) run --rm --platform $(PLATFORM) -v $(CURDIR):/src -w /src $(IMAGE) cargo build
test: build-image $(DOCKER) run --rm --platform $(PLATFORM) -v $(CURDIR):/src -w /src $(IMAGE) cargo run -q -p wardend-test
verify-kani: build-image-kani $(DOCKER) run --rm --platform $(PLATFORM) -v $(CURDIR):/src -w /src $(IMAGE_KANI) cargo kani --manifest-path src/verify/Cargo.toml
# Reserved: the Verus proofs (the style contract is already Verus-parseable;# the harness lands with the Verus toolchain). Fails loudly until then.verify-verus: @echo "wardend: verify-verus is reserved (Verus harness not yet added)" >&2; exit 1
ci: build test verify-kani
# --- host tier (fast iteration) --------------------------------------------
build-local: cargo build
test-local: cargo run -q -p wardend-test
verify-kani-local: cargo kani --manifest-path src/verify/Cargo.toml