# Converge Core - Development Commands
# Run `just --list` to see all available commands
# Default recipe: run all checks
default: check
# Run all checks (format, lint, test)
check: fmt-check clippy test
# Format code
fmt:
cargo fmt --all
# Check formatting without modifying
fmt-check:
cargo fmt --all -- --check
# Run clippy lints
clippy:
cargo clippy --all-targets -- -D warnings
# Run all tests
test:
cargo test --all-targets
# Run tests with output
test-verbose:
cargo test --all-targets -- --nocapture
# Run only unit tests (fast)
test-unit:
cargo test --lib
# Run convergence axiom tests
test-axioms:
cargo test --test engine_convergence_axioms -- --nocapture
# Run property-based tests
test-property:
cargo test --test property_tests
# Run determinism tests
test-determinism:
cargo test --test transparent_determinism
# Run human-in-the-loop tests
test-hitl:
cargo test --test hitl_pause_resume_axioms
# Run parallel execution tests
test-parallel:
cargo test --test parallel_execution
# Build documentation
doc:
cargo doc --no-deps
# Open documentation in browser
doc-open:
cargo doc --no-deps --open
# Build release
build:
cargo build --release
# Clean build artifacts
clean:
cargo clean
# Verify no converge-provider/domain dependency (boundary check)
verify-boundary:
@echo "Checking for converge-provider imports..."
@if grep -r "converge_provider\|converge-provider" src/; then \
echo "ERROR: Found converge-provider dependency in src/"; \
exit 1; \
else \
echo "OK: No converge-provider dependencies found"; \
fi
@echo "Checking for converge-domain imports..."
@if grep -r "converge_domain\|converge-domain" src/; then \
echo "ERROR: Found converge-domain dependency in src/"; \
exit 1; \
else \
echo "OK: No converge-domain dependencies found"; \
fi
# Show dependency tree
deps:
cargo tree
# Update dependencies
update:
cargo update
# Audit dependencies for security issues (requires cargo-audit)
audit:
cargo audit
# Check for outdated dependencies (requires cargo-outdated)
outdated:
cargo outdated
# Run all CI checks
ci: fmt-check clippy test verify-boundary doc
# Show test coverage (requires cargo-tarpaulin)
coverage:
cargo tarpaulin --out Html --output-dir target/coverage
# Watch for changes and run tests
watch:
cargo watch -x "test --lib"
# Benchmark (if benchmarks exist)
bench:
cargo bench
# Show lines of code
loc:
@echo "Lines of code in src/:"
@find src -name "*.rs" | xargs wc -l | tail -1
@echo ""
@echo "Lines of code in tests/:"
@find tests -name "*.rs" | xargs wc -l | tail -1
# List all test files
list-tests:
@echo "Test files:"
@ls tests/*.rs 2>/dev/null || echo "No test files found"
# Run a specific test file
test-file file:
cargo test --test {{file}} -- --nocapture
# Quick sanity check
sanity: fmt-check clippy test-unit
@echo "Sanity check passed!"
# Count tests by category (hard numbers, not estimates)
test-count:
@echo "═══════════════════════════════════════════════════════════"
@echo " CONVERGE-CORE TEST COUNTS"
@echo "═══════════════════════════════════════════════════════════"
@echo ""
@printf "Unit tests (src/*.rs): "
@cargo test --lib -- --list 2>/dev/null | grep -c "test$" || echo "0"
@printf "Integration tests (tests/): "
@cargo test --tests -- --list 2>/dev/null | grep -c "test$" || echo "0"
@printf "Property tests: "
@cargo test --test property_tests -- --list 2>/dev/null | grep -c "test$" || echo "0"
@echo "───────────────────────────────────────────────────────────"
@printf "TOTAL: "
@cargo test --all-targets -- --list 2>/dev/null | grep -c "test$" || echo "0"
@echo ""
# Run golden trace test (canonical demo + regression anchor)
test-golden:
@echo "═══════════════════════════════════════════════════════════"
@echo " GOLDEN TRACE: Engine Axioms"
@echo "═══════════════════════════════════════════════════════════"
cargo test --test engine_convergence_axioms -- --nocapture
# Verify Cargo.toml has no forbidden dependencies
verify-deps:
@echo "Checking Cargo.toml for forbidden dependencies..."
@if grep -E "converge-provider|converge-domain" Cargo.toml; then \
echo "ERROR: Found forbidden dependency in Cargo.toml"; \
exit 1; \
else \
echo "OK: No forbidden dependencies in Cargo.toml"; \
fi
@echo "Checking cargo tree for forbidden transitive dependencies..."
@if cargo tree 2>/dev/null | grep -E "converge-provider|converge-domain"; then \
echo "ERROR: Found forbidden transitive dependency"; \
exit 1; \
else \
echo "OK: No forbidden transitive dependencies"; \
fi