interplane.Get Omega
Read in your language

aien-protocols-mv

Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem

Brought by drakestapleton

GitHub aien-dev/aien-protocols-mv#11 (code only)

closed derived 53f90696142adf69 #11

Imported from GitHub aien-dev/aien-protocols-mv#11 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base fdd288ab27f34e2f410fab5e35fba726ff7ec5e3 · Head 19153c781c23a2d6b66e1b104a34c746b7d9b5fb

Apply it

git checkout -b patch-53f90696142adf69 fdd288ab27f34e2f410fab5e35fba726ff7ec5e3
curl -fsSL https://interplane.io/drakestapleton/aien-protocols-mv/patches/53f90696142adf69.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aien-protocols-mv
11
19153c781c23a2d6b66e1b104a34c746b7d9b5fb
{"kind":"github-import","owner":"aien-dev","repo":"aien-protocols-mv","number":11,"url":"https://github.com/aien-dev/aien-protocols-mv/pull/11","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:39:42Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/specs/execution-transcript/tools/check-corpus.sh b/specs/execution-transcript/tools/check-corpus.sh
index 0997e39..fd8491d 100755
--- a/specs/execution-transcript/tools/check-corpus.sh
+++ b/specs/execution-transcript/tools/check-corpus.sh
@@ -43,9 +43,12 @@ for cx in flip drop attr; do
     fi
 done
 echo "TRN1_CORPUS_SELFTEST counterexamples=3 detected=3"
-if ! diff -r "$vec" "$tmp/regen" >/dev/null; then
+# Only the crumb tool's two exact file names are ignored (RFC-0001 drops
+# .crumb / .crumb.local into directories); any other stray file still differs.
+ignore="-x .crumb -x .crumb.local"
+if ! diff -r $ignore "$vec" "$tmp/regen" >/dev/null; then
     echo "TRN1_CORPUS_STALE: vectors/ differs from make-corpus.sh output" >&2
-    diff -rq "$vec" "$tmp/regen" >&2 || true
+    diff -rq $ignore "$vec" "$tmp/regen" >&2 || true
     exit 1
 fi
 echo "TRN1_CORPUS_REGEN identical"
diff --git a/specs/execution-transcript/tools/test-check-corpus.sh b/specs/execution-transcript/tools/test-check-corpus.sh
new file mode 100755
index 0000000..bb62245
--- /dev/null
+++ b/specs/execution-transcript/tools/test-check-corpus.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+# test-check-corpus.sh: prove check-corpus.sh ignores the crumb tool's files
+# (.crumb, .crumb.local, exact names) and nothing else.
+# Usage: test-check-corpus.sh [CC]   Copies specs/execution-transcript to a temp dir.
+set -eu
+here=$(cd "$(dirname "$0")" && pwd)
+CC=${1:-cc}
+tmp=$(mktemp -d)
+trap 'rm -rf "$tmp"' EXIT
+fails=0
+
+fresh() { rm -rf "$tmp/et"; cp -R "$here/.." "$tmp/et"; rm -f "$tmp/et/vectors/.crumb" "$tmp/et/vectors/.crumb.local"; }
+runcheck() { sh -c 'bash "$1/tools/check-corpus.sh" "$2"' x "$tmp/et" "$CC" >"$tmp/out" 2>&1; }
+expect() { # name, want (0|nz), then runcheck result
+    if runcheck; then got=0; else got=nz; fi
+    if [ "$got" = "$2" ]; then echo "ok   $1"; else echo "FAIL $1 (exit $got, wanted $2)"; tail -n 5 "$tmp/out"; fails=$((fails+1)); fi
+}
+
+fresh
+expect baseline 0
+
+# (a) kills: removing the -x .crumb exclusion (check would exit 1 as STALE).
+fresh; printf 'crumb\n' >"$tmp/et/vectors/.crumb"
+expect crumb-ignored 0
+# (a2) kills: dropping only the .crumb.local exclusion.
+fresh; printf 'local\n' >"$tmp/et/vectors/.crumb.local"
+expect crumb-local-ignored 0
+
+# (b) kills: widening the exclusion to a glob such as -x '.crumb*' or '*'.
+fresh; printf 'x\n' >"$tmp/et/vectors/.crumbx"
+expect near-name-still-fails nz
+fresh; printf 'x\n' >"$tmp/et/vectors/stray.txt"
+expect unknown-file-still-fails nz
+
+# (c) kills: neutering the vector comparison (e.g. ignoring everything).
+fresh
+f="$tmp/et/vectors/f001.trn"
+b=$(od -An -N1 -tu1 "$f" | tr -d ' ')
+printf "\\$(printf '%03o' $((b ^ 1)))" | dd of="$f" bs=1 seek=0 count=1 conv=notrunc 2>/dev/null
+expect mutated-golden-still-fails nz
+
+[ "$fails" -eq 0 ] && echo "TEST_CHECK_CORPUS pass" || { echo "TEST_CHECK_CORPUS fail=$fails"; exit 1; }