✓
Passing This code compiles and runs correctly.
Code
// Pins the three-state deps report: `check` answers presence, `ready`
// answers liveness. `present-ready` passes both; `present-down` passes check
// but its ready probe exits nonzero — deps must report it as
// "installed, not ready", never claim all-clear, and not route it to the
// install path (installing cannot fix a down daemon).
//
// Run: koruc input.kz deps → present-ready ✓, present-down ⚠ not ready,
// "Installed but not ready" section present,
// no "All system dependencies are installed!"
~import std/deps
~std/deps:requires.system {
"name": "present-ready",
"check": "echo 1.0.0",
"ready": "true",
"brew": "nothing"
}
~std/deps:requires.system {
"name": "present-down",
"check": "echo 1.0.0",
"ready": "false",
"brew": "nothing"
}
~tor main {}
~proc main|zig {
}
~main()
Flows
flow ~requires.system click a branch to expand · @labels scroll to their anchor
requires.system (source: "name": "present-ready",
"check": "echo 1.0.0",
"ready": "true",
"brew": "nothing")
flow ~requires.system click a branch to expand · @labels scroll to their anchor
requires.system (source: "name": "present-down",
"check": "echo 1.0.0",
"ready": "false",
"brew": "nothing")
flow ~main click a branch to expand · @labels scroll to their anchor
main
Test Configuration
Post-validation Script:
#!/bin/bash
# `ready` is a liveness probe distinct from `check`: exit nonzero means
# present-but-unusable. The report must name the third state and must NOT
# print the all-clear while any dep sits in it.
set -e
OUT=$(koruc "$KORU_INPUT" deps 2>&1)
echo "$OUT" | grep -q "present-ready" || { echo "FAIL: present-ready dep missing"; echo "$OUT"; exit 1; }
echo "$OUT" | grep -q "present-down.*installed, not ready" || { echo "FAIL: not-ready state unnamed"; echo "$OUT"; exit 1; }
echo "$OUT" | grep -q "Installed but not ready" || { echo "FAIL: no not-ready summary"; echo "$OUT"; exit 1; }
if echo "$OUT" | grep -q "All system dependencies are installed"; then
echo "FAIL: claimed all-clear with a not-ready dep"; echo "$OUT"; exit 1
fi
echo "PASS"