default:
    @just --list

check:
    cargo check --workspace --all-targets --all-features

build:
    cargo build --workspace

build-release:
    cargo build --workspace --release

run:
    cargo run -p bone-app

test:
    cargo test --workspace --all-features

clippy:
    cargo clippy --workspace --all-targets --all-features -- -D warnings

snap:
    cargo insta test --workspace --all-features

snap-review:
    cargo insta review

snap-accept:
    cargo insta accept

fmt:
    cargo fmt --all

fmt-check:
    cargo fmt --all -- --check

lint: fmt-check clippy

prove-determinism:
    @find crates -name '*.snap.new' -delete
    @echo "run 1 / 2 (debug)"
    CARGO_INCREMENTAL=0 INSTA_UPDATE=no cargo test --workspace --all-features --locked --quiet
    @if find crates -name '*.snap.new' -print -quit | grep -q .; then echo "snapshot drift in run 1" >&2; exit 1; fi
    @echo "run 2 / 2 (debug)"
    CARGO_INCREMENTAL=0 INSTA_UPDATE=no cargo test --workspace --all-features --locked --quiet
    @if find crates -name '*.snap.new' -print -quit | grep -q .; then echo "snapshot drift in run 2" >&2; exit 1; fi
    @echo "run 1 / 2 (release)"
    CARGO_INCREMENTAL=0 INSTA_UPDATE=no cargo test --workspace --all-features --locked --release --quiet
    @if find crates -name '*.snap.new' -print -quit | grep -q .; then echo "snapshot drift in release run 1" >&2; exit 1; fi
    @echo "run 2 / 2 (release)"
    CARGO_INCREMENTAL=0 INSTA_UPDATE=no cargo test --workspace --all-features --locked --release --quiet
    @if find crates -name '*.snap.new' -print -quit | grep -q .; then echo "snapshot drift in release run 2" >&2; exit 1; fi
    @echo "determinism: clean across two debug + two release runs"
