Skip to content

Commit 38fdc9b

Browse files
hyperpolymathclaude
andcommitted
fix(#99): wire the root Justfile to real cargo targets
Every build-ish recipe was a fake gate: build: @echo "Build not configured yet" `just build`, `test`, `fmt`, `lint` and `clean` all printed a string and exited 0, so any caller — human or CI — got a pass for doing nothing. Wired to the same commands the root rust-ci.yml gate runs, in the same order, so `just check` locally means what CI means: build -> cargo build --locked --all-targets, then --release test -> cargo test --locked --bins fmt -> cargo fmt --check (fmt-fix applies) lint -> cargo clippy --locked --all-targets deps-check -> the zero-dependency assertion, copied from rust-ci.yml check -> build test fmt deps-check self-verify -> run aletheia against this repository Two deliberate limits, documented in the recipes so nobody "fixes" them: - `test` is `--bins` only. The integration suite is a specification for a CLI that does not exist yet; 27 of 29 fail by design (#124). Adding `--tests` here would make the bar green by breaking it. - `lint` is not yet `-D warnings`; 23 findings remain (#125). When that closes, `-D warnings` must be added HERE AND to rust-ci.yml in the same change, so local and CI never disagree about what "lint passes" means. Verified by running them, not by reading them: just --list parses; just deps-check -> "OK: zero dependencies"; just test -> 29 passed; just check -> exit 0. And verified the gate can actually FAIL, which is the whole point: appending badly-formatted Rust makes `just fmt` exit 1 while `just build` still exits 0, and reverting restores exit 0. Closes #99. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 50ab7f4 commit 38fdc9b

1 file changed

Lines changed: 44 additions & 9 deletions

File tree

Justfile

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,60 @@ import? "contractile.just"
88
default:
99
@just --list
1010

11-
# Build the project
11+
# These recipes mirror the root `.github/workflows/rust-ci.yml` gate exactly, so
12+
# `just check` locally means the same thing as CI. They MUST fail loudly — a recipe
13+
# that echoes and exits 0 is a fake gate (issue #99 was exactly that).
14+
15+
# Build aletheia (debug + release, locked)
1216
build:
13-
@echo "Build not configured yet"
17+
cd aletheia && cargo build --locked --all-targets
18+
cd aletheia && cargo build --locked --release
1419

15-
# Run tests
20+
# Run aletheia's unit tests (--bins only; see #124 note in recipe)
1621
test:
17-
@echo "Tests not configured yet"
22+
# `--bins` is deliberate. The integration suite is a specification for a CLI
23+
# that has not been built yet — 27 of 29 fail by design (issue #124).
24+
# Do NOT add `--tests` here to make the bar look green.
25+
cd aletheia && cargo test --locked --bins
1826

19-
# Format code
27+
# Check formatting (does not modify files)
2028
fmt:
21-
@echo "Formatting not configured yet"
29+
cd aletheia && cargo fmt --check
30+
31+
# Apply formatting
32+
fmt-fix:
33+
cd aletheia && cargo fmt
2234

23-
# Lint code
35+
# Lint aletheia (not yet -D warnings — issue #125)
2436
lint:
25-
@echo "Linting not configured yet"
37+
# 23 findings remain, mostly dead code that exists because the CLI is
38+
# unwired (#124). When #125 closes, add `-- -D warnings` here AND to
39+
# rust-ci.yml in the same change, so local and CI never disagree about
40+
# what "lint passes" means.
41+
cd aletheia && cargo clippy --locked --all-targets
42+
43+
# Enforce the zero-dependency RSR Bronze constraint (mirrors rust-ci.yml)
44+
deps-check:
45+
#!/usr/bin/env bash
46+
set -euo pipefail
47+
cd aletheia
48+
if cargo tree --depth 1 | tail -n +2 | grep -q '[a-z]'; then
49+
echo "ERROR: Aletheia must have zero dependencies (see aletheia/CLAUDE.md)"
50+
cargo tree --depth 1
51+
exit 1
52+
fi
53+
echo "OK: zero dependencies"
54+
55+
# Everything the root CI gate runs, in the same order
56+
check: build test fmt deps-check
57+
58+
# Self-verify: run aletheia against this repository
59+
self-verify:
60+
cd aletheia && cargo run --locked --quiet -- ..
2661

2762
# Clean build artifacts
2863
clean:
29-
@echo "Clean not configured yet"
64+
cd aletheia && cargo clean
3065

3166
# Run panic-attacker pre-commit scan
3267
assail:

0 commit comments

Comments
 (0)