✓
Passing This code compiles and runs correctly.
Code
// Pins the claims registry's key-crash wall: two claims that land on ONE key
// are reported, and the export is refused.
//
// Both entries name the rule `no-alloc` about the same subject, with different
// stamps. That is a contradiction an author cannot resolve by reading — the
// declaration is either measured or aspirational about that rule, never both —
// and it is exactly what a registry sees that no single reader does.
[
- measured no-alloc
- aspirational no-alloc
Two stamps, one rule, one subject. Whichever is true, the other is a lie, and
an external judgment handed this export could not say which claim it judged.
]tor sort { items: []i32 } -> []i32
proc sort|zig {
return items;
}
Test Configuration
Post-validation Script:
#!/bin/bash
# Two claims on one key must be named loudly, and must fail the export.
set -e
OUT=$(koruc input.k claims 2>&1) || true
echo "$OUT"
echo "$OUT" | grep -q "duplicate claim key" || { echo "FAIL: collision not reported"; exit 1; }
echo "$OUT" | grep -q "no-alloc" || { echo "FAIL: colliding rule not named"; exit 1; }
echo "$OUT" | grep -q "measured" || { echo "FAIL: first stamp not shown"; exit 1; }
echo "$OUT" | grep -q "aspirational" || { echo "FAIL: second stamp not shown"; exit 1; }
# The JSON export refuses rather than emitting an untrustworthy keyset.
set +e
koruc input.k claims json > /dev/null 2>&1
JSON_STATUS=$?
set -e
[ "$JSON_STATUS" -ne 0 ] || { echo "FAIL: json export succeeded despite a key collision"; exit 1; }
echo "=== PASS: colliding claim keys are named and the export is refused ==="