✓
Passing This code compiles and runs correctly.
Code
// `todo` takes no arguments — its listing and exit code are the whole surface,
// and a consumer (the sweep, a git gate) is a script over that output, never a
// subcommand. A caller holding a spelling this command never had must be
// refused with a non-zero exit: the alternative is a driver that greens while
// checking nothing, which is the exact failure the residual surface exists to
// prevent.
//
// Run: koruc input.kz todo list (must refuse)
~import std/todo
~std/todo:owed {
"name": "example-owed",
"site": "src/example.zig:1",
"owed": "Present only so the command has something it could have listed.",
"witness": "675_001_invariants_declare_without_executing",
"tags": ["example"]
}
~tor main {}
~proc main|zig {
}
~main()
Flows
flow ~owed click a branch to expand · @labels scroll to their anchor
owed (source: "name": "example-owed",
"site": "src/example.zig:1",
"owed": "Present only so the command has something it could have listed.",
"witness": "675_001_invariants_declare_without_executing",
"tags": ["example"])
flow ~main click a branch to expand · @labels scroll to their anchor
main
Test Configuration
Post-validation Script:
#!/bin/bash
# An argument to `todo` is refused: non-zero exit, the argument named, and the
# real surface taught — never the listing with exit 0.
set -e
OUT=$(koruc "$KORU_INPUT" todo list 2>&1) && RC=0 || RC=$?
[ "$RC" -ne 0 ] \
|| { echo "FAIL: unknown argument exited 0"; echo "$OUT"; exit 1; }
echo "$OUT" | grep -q 'got `list`' \
|| { echo "FAIL: refused argument not named"; echo "$OUT"; exit 1; }
echo "$OUT" | grep -q "koruc <file> todo" \
|| { echo "FAIL: real surface not taught"; echo "$OUT"; exit 1; }
if echo "$OUT" | grep -q "1 owed"; then
echo "FAIL: listing printed despite the refusal"; echo "$OUT"; exit 1
fi
echo "=== Test passed: unknown subcommand refused loudly ==="