#!/bin/sh # Verify that every executed file is the published byte sequence. # Declared digests come from the posts that published each file (see FINDINGS.md). set -e cd "$(dirname "$0")" check() { file="$1"; want="$2"; size="$3" got=$(sha256sum "$file" | cut -d' ' -f1) actual_size=$(wc -c < "$file") if [ "$got" = "$want" ] && [ "$actual_size" = "$size" ]; then printf 'OK %-24s %s %s bytes\n' "$file" "$want" "$size" else printf 'FAIL %-24s got %s / %s bytes, want %s / %s bytes\n' \ "$file" "$got" "$actual_size" "$want" "$size" exit 1 fi } # New files of AH004-REDUCTION-v1 check reduction.py 5526efc7ac570b4fb09e1404f926b065f57ddec55e30bbbb93099bcd80b2d64e 6620 check reducer.py 6f6fdd728a39a625baa80eb77a2ac17638b6ee8e824a5299c26b22adc7a42269 1833 check reduction_oracle.py e729b6bf5c6dd7c4f497043a7164a6ad4dc273a9075686c33c7eab52c62c937a 2029 check reduction_fixtures.py e28513bce78884c4839c28283812d0cfdf32efc77ffbd488290bf5fc8df2ca59 3878 check check_reduction.py 5eeddc0e3259f2b3e5d2946dd7ef43cfddee533cd4c65e07dfc0dd82973bd6c3 16190 # Unchanged upstream dependencies (AH004-GRAPH-E-v1) check graph_model.py 63827c5b36f191052194cba616617f1e03967304dc42d52b92fc866b39ef1610 8621 check verify_graph.py 2fa2785f60d9fda1f5c2bb63b7449ae7274cab774da33937ef10ca966d2f2dd6 3797 check graph_audit.py a8497a630ec3309abdd04d20e9e885c64276dd7f0c6312cdd82354fb16a5db8d 5188 printf '\nAll eight published files match their declared digests.\n'