✓
Passing This code compiles and runs correctly.
Code
// The positive twin of 676_003, and it pins two things at once.
//
// FIRST: a gate that refuses everything is as useless as one that refuses
// nothing. Its sibling proves the refusal fires; this proves it does not fire
// on a residual that IS drivable. Without both, a gate stuck in one position
// looks exactly like a gate that works.
//
// SECOND, and the reason this test lives six directories deep: the reader finds
// the test corpus by CLIMBING from wherever it was invoked, never by a path
// relative to where the manifest happens to sit. A hardcoded relative path
// would resolve from the manifest's directory and nowhere else, so every
// witness checked from inside a test — that is, from here — would report NOT
// FOUND, and the gate would be uniformly red for a reason that has nothing to
// do with any residual.
//
// Run: koruc input.kz todo (must accept, and must resolve the witness)
~import std/todo
~std/todo:owed {
"name": "residual-with-a-real-witness",
"site": "src/example.zig:1",
"owed": "Names a test that exists and asserts something, so it can be decided.",
"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": "residual-with-a-real-witness",
"site": "src/example.zig:1",
"owed": "Names a test that exists and asserts something, so it can be decided.",
"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
# A residual naming a real, asserting test is ACCEPTED: exit 0, the witness
# echoed plainly, and none of the three refusal words anywhere in the output.
#
# The witness is resolved by climbing from this directory — six levels below the
# repo root — so a pass here is also proof the corpus lookup is not relative to
# the manifest's location.
set -e
OUT=$(koruc "$KORU_INPUT" todo 2>&1) && RC=0 || RC=$?
[ "$RC" -eq 0 ] \
|| { echo "FAIL: a witnessed residual was refused (exit $RC)"; echo "$OUT"; exit 1; }
echo "$OUT" | grep -q "witness 675_001_invariants_declare_without_executing" \
|| { echo "FAIL: witness not resolved from a nested directory"; echo "$OUT"; exit 1; }
echo "$OUT" | grep -q "1 owed" \
|| { echo "FAIL: the residual was not counted"; echo "$OUT"; exit 1; }
for bad in MISSING "NOT FOUND" VACUOUS; do
if echo "$OUT" | grep -q "$bad"; then
echo "FAIL: refusal '$bad' fired on a drivable residual"; echo "$OUT"; exit 1
fi
done
echo "=== Test passed: a witnessed residual is accepted, witness resolved by climbing ==="