diff --git a/validexor.sh b/validexor.sh index 0855f19..6b8f394 100755 --- a/validexor.sh +++ b/validexor.sh @@ -1,5 +1,5 @@ #!/bin/sh -# VALIDEXOR v0.0.0 +# VALIDEXOR v0.1.0 # Deterministic verification utility # Verifies claims against observable reality. No judgment. No execution. @@ -8,7 +8,7 @@ set -eu # --- Preconditions --------------------------------------------------------- git rev-parse --is-inside-work-tree >/dev/null 2>&1 || { - printf '%s\n' "VALIDEXOR: not a git repository" >&2 + printf '%s\n' "VALIDEXOR: NOT_A_GIT_REPOSITORY" >&2 exit 2 } @@ -17,7 +17,7 @@ git rev-parse --is-inside-work-tree >/dev/null 2>&1 || { INPUT="$(cat)" [ -z "$INPUT" ] && { - printf '%s\n' "INVALID" + printf '%s\n' "VALIDEXOR: EMPTY_INPUT" exit 1 } @@ -28,7 +28,7 @@ TEXT="$(printf '%s' "$INPUT")" # No speculation, hedging, or approximation printf '%s' "$TEXT" | grep -Eiq \ '(^|[^a-z])(maybe|might|could|should|approx|guess|probably|likely|unclear|unknown)([^a-z]|$)' && { - printf '%s\n' "INVALID" + printf '%s\n' "RULE: VERIFICATION.SPECULATION" exit 1 } @@ -37,7 +37,7 @@ printf '%s' "$TEXT" | grep -Eiq \ # Must contain at least one falsifiable anchor printf '%s' "$TEXT" | grep -Eq \ '([0-9]+|true|false|/[^[:space:]]+|[a-f0-9]{7,40}|==|!=|<=|>=|<|>)' || { - printf '%s\n' "UNVERIFIABLE" + printf '%s\n' "RULE: VERIFICATION.UNVERIFIABLE" exit 1 } @@ -47,7 +47,7 @@ printf '%s' "$TEXT" | grep -Eq \ for h in $(printf '%s' "$TEXT" | grep -Eo '[a-f0-9]{7,40}' | sort -u); do git cat-file -e "$h^{commit}" 2>/dev/null || git cat-file -e "$h^{tree}" 2>/dev/null || { - printf '%s\n' "INVALID" + printf '%s\n' "RULE: VERIFICATION.INVALID_REFERENCE" exit 1 } done