KB-4C45
FIX7 authority/N-node TKT-v0.2 packet — RERUN.sh (fresh-reconstruction gate)
1 min read Revision 1
tool-kiem-thufix7tkt-v02rerun2026-06-11
#!/usr/bin/env bash
Fresh-reconstruction gate: verify byte-exactness THEN run the full ledger.
A reviewer runs: bash RERUN.sh (fails closed if any packet byte drifted)
Prereq: authority_seal_encoder.py + codex_probes.py present next to this file
(pinned BY REFERENCE to fix7-authority-closure-2026-06-10/, sha in HASH_MANIFEST).
set -uo pipefail cd "$(dirname "$0")" echo "== step1: HASH_MANIFEST byte verification ==" if ! shasum -a 256 -c HASH_MANIFEST.txt; then echo "RERUN_RESULT: FAIL (manifest drift)"; exit 1; fi echo "== step2: packet_tree fingerprint ==" TREE=$(shasum -a 256 HASH_MANIFEST.txt | awk '{print $1}') WANT=$(awk '{print $1}' packet_tree.sha256) [ "$TREE" = "$WANT" ] || { echo "RERUN_RESULT: FAIL (tree mismatch $TREE != $WANT)"; exit 1; } echo " tree OK $TREE" echo "== step3: command ledger ==" bash commands.sh; rc=$? [ "$rc" = 0 ] && echo "RERUN_RESULT: PASS" || echo "RERUN_RESULT: FAIL (ledger rc=$rc)" exit $rc