KB-5197 rev 2

FIX7 authority/N-node TKT-v0.2-aligned review packet — commands.sh

3 min read Revision 2
tool-kiem-thufix7tkt-v02commands2026-06-11

#!/usr/bin/env bash

============================================================================

FIX7 AUTHORITY / N-NODE -- TKT v0.2-ALIGNED REVIEW PACKET command ledger.

Consumes the T2 v0.2 review-packet convention (gate ledger -> exit_codes.json,

OVERALL_RESULT). Offline, stdlib python3 + coreutils. NON_AUTHORITY.

Read-only against governed KB; creates NO seal. Reproduce with: bash commands.sh

============================================================================

set -uo pipefail cd "$(dirname "$0")" OUT="evidence"; mkdir -p "$OUT/logs" ENC="authority_seal_encoder.py" ENC_EXPECT="13344f92cafcaf0d07dcb21700bdb642f38b89351702e08080eacb0e957144b8" declare -a NAMES EXP ACT rec(){ NAMES+=("$1"); EXP+=("$2"); ACT+=("$3"); } run(){ local name="$1" exp="$2"; shift 2 "$@" > "$OUT/logs/$name.log" 2>&1; local rc=$? rec "$name" "$exp" "$rc" printf " [%s] %-24s expected=%s actual=%s\n"
"$([ "$rc" = "$exp" ] && echo OK || echo MISMATCH)" "$name" "$exp" "$rc"; }

echo "== FIX7 authority/N-node TKT-v0.2-aligned review packet -- command ledger =="

G0 encoder bytes frozen (byte-exact reconstruction pin)

got=$(shasum -a 256 "$ENC" | awk '{print $1}') [ "$got" = "$ENC_EXPECT" ] && g0=0 || g0=1 rec "G0_encoder_frozen" "0" "$g0" printf " [%s] %-24s expected=0 actual=%s (sha=%s)\n"
"$([ "$g0" = 0 ] && echo OK || echo MISMATCH)" "G0_encoder_frozen" "$g0" "${got:0:16}"

run "G1_encoder_selftest" 0 python3 authority_seal_encoder.py --selftest run "G2_codex_probes" 0 python3 codex_probes.py run "G3_n_node_checker" 0 python3 n_node_checker.py run "G4_supplemental" 0 python3 sp_align_probes.py

{ echo "{"; echo " "packet": "fix7-authority-n-node-tkt-v02-alignment-2026-06-11"," echo " "authority": "NON_AUTHORITY / NOT_PROMOTED / NO_SEAL","; echo " "gates": [" n=${#NAMES[@]} for i in $(seq 0 $((n-1))); do c=","; [ "$i" -eq $((n-1)) ] && c="" printf ' {"name": "%s", "expected": %s, "actual": %s, "ok": %s}%s\n'
"${NAMES[$i]}" "${EXP[$i]}" "${ACT[$i]}"
"$([ "${EXP[$i]}" = "${ACT[$i]}" ] && echo true || echo false)" "$c"; done echo " ]"; echo "}"; } > exit_codes.json

fail=0; for i in $(seq 0 $((${#NAMES[@]}-1))); do [ "${EXP[$i]}" = "${ACT[$i]}" ] || fail=1; done [ "$fail" = 0 ] && { echo "OVERALL_RESULT: PASS"; exit 0; } || { echo "OVERALL_RESULT: FAIL"; exit 1; }

Back to Knowledge Hub knowledge/dev/reports/architecture/fix7-authority-n-node-tkt-v02-alignment-2026-06-11/commands.sh