graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
zig build unit: run only the unit tests
justrach479514e45442
diff --git a/AGENTS.md b/AGENTS.mdindex 08951f4b..ea9e87bb 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -102,6 +102,11 @@ graff over ACP. A new-chat folder rule, a worktree handoff, or a session cwdthat exists only in a client is not done — wire the same behavior through the ACP session in the samechange. The workspace the agent runs in is not chrome.+## Running tests++- While you work, run only what you touched: `zig build unit -Dtest-filter="<part of a test name>"` builds and runs just the unit tests (repeat the flag for several names).+- `zig build test` also runs the subprocess integration scripts and takes several minutes. Run it once before you push; the pre-push hook does.+## Tests must be reachable- `zig build test` only runs the tests in files the test root pulls in. A new module's `test {}` blocks compile to nothing until something references it, and the suite still reports green.diff --git a/build.zig b/build.zigindex 12fa968b..8a1b8e65 100644--- a/build.zig+++ b/build.zig@@ -141,6 +141,10 @@ pub fn build(b: *std.Build) void {// pre-push spend its 600s budget before the tests check started.const test_bin = b.step("test-bin", "Compile unit tests without running them");test_bin.dependOn(&unit_tests.step);+ // The working loop: the unit binary alone, without the integration+ // scripts `test` adds below. `-Dtest-filter` narrows it to named tests.+ const unit_step = b.step("unit", "Run only the unit tests (-Dtest-filter narrows them)");+ unit_step.dependOn(&run_tests.step);const acp_preauth_test = b.addSystemCommand(&.{ "python3", "scripts/test-acp-preauth.py" });acp_preauth_test.addArtifactArg(exe);test_step.dependOn(&acp_preauth_test.step);diff --git a/scripts/eval-tier1.sh b/scripts/eval-tier1.shindex 01d629db..ceeaf1d2 100755--- a/scripts/eval-tier1.sh+++ b/scripts/eval-tier1.sh@@ -237,7 +237,7 @@ if wanted tests; thenfiif ((status != 0)); thenprintf ' fix: the failing test names are above; rerun one with\n'- printf ' zig build test -Dtest-filter="<part of the name>"\n'+ printf ' zig build unit -Dtest-filter="<part of the name>"\n'record_fail testselsecount=$(suite_count "$out")