✓
Passing This code compiles and runs correctly.
Code
// An owed residual with no witness is REFUSED.
//
// This is the entire safety property of the surface. A residual that names no
// test cannot be driven by anything: it can only be re-read, which is what a
// bare `// TODO:` comment already offers and what this module exists to stop
// being the only option.
//
// The refusal was bought with a measured failure, not a preference. The first
// run of scripts/todo_sweep.sh found three parked tests passing and NONE of
// them promotable — two asserted only that the program exited zero, and both
// printed the exact error they were parked on. A driver pointed at residuals
// with no real assertion does not close them, it manufactures victories.
//
// Run: koruc input.kz todo (must refuse, and must name why)
~import std/todo
~std/todo:owed {
"name": "residual-with-no-witness",
"site": "src/example.zig:1",
"owed": "Deliberately names no test, so nothing can ever decide it.",
"tags": ["example"]
}
~tor main {}
~proc main|zig {
}
~main()
Flows
flow ~owed click a branch to expand · @labels scroll to their anchor
owed (source: "name": "residual-with-no-witness",
"site": "src/example.zig:1",
"owed": "Deliberately names no test, so nothing can ever decide it.",
"tags": ["example"])
flow ~main click a branch to expand · @labels scroll to their anchor
main
Test Configuration
Post-validation Script:
#!/bin/bash
# A residual naming no test is refused with a non-zero exit, is named as
# undrivable, and the refusal teaches what to do instead. A listing that
# reported it with exit 0 would be a gate that checks nothing.
set -e
OUT=$(koruc "$KORU_INPUT" todo 2>&1) && RC=0 || RC=$?
[ "$RC" -ne 0 ] \
|| { echo "FAIL: unwitnessed residual exited 0"; echo "$OUT"; exit 1; }
echo "$OUT" | grep -q "MISSING" \
|| { echo "FAIL: missing witness not named as missing"; echo "$OUT"; exit 1; }
echo "$OUT" | grep -q "cannot be driven" \
|| { echo "FAIL: refusal does not say the residual cannot be driven"; echo "$OUT"; exit 1; }
echo "$OUT" | grep -q "red today and green when it is" \
|| { echo "FAIL: refusal does not teach what a witness is"; echo "$OUT"; exit 1; }
echo "=== Test passed: a residual with no witness is refused ==="