Engine gate: any igneum-pow*/src/ directory pairs (the fork pairs through a paths override that may name the tree igneum-pow-amend, the archive of c3d32437; the shipper, 7 Oct 2026), the matched name printed in the line; self-test with both names
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
01653c336d
commit
719d5fc133
1 changed files with 14 additions and 6 deletions
|
|
@ -4,7 +4,8 @@
|
|||
# were every one rejected (Reject(BlockInvalid)), the go stopped. The commit-string gate cannot see this: the string comes from the
|
||||
# fork's own git, the engine from the igneum-pow tree the build sat next to. So every igneumd and igneum-miner that
|
||||
# tools/build-remote.sh fetches must carry igneum-pow source paths in its strings (rustc embeds the panic locations of the engine
|
||||
# crate it compiled in: igneum-pow/src/...); none means the stub engine or a foreign igneum-pow, and the fetch refuses.
|
||||
# crate it compiled in: igneum-pow/src/..., or igneum-pow-amend/src/... when the fork pairs through its paths override); none means
|
||||
# the stub engine or no paired tree, and the fetch refuses; the matched directory name is printed so the pairing is visible.
|
||||
#
|
||||
# tools/ci/engine-check.sh <binary> # exit 0 with the count, exit 1 "no igneum-pow/src/ path in <binary>"
|
||||
# tools/ci/engine-check.sh --self-test # a fixture with the paths passes, one without fails
|
||||
|
|
@ -12,13 +13,20 @@ set -euo pipefail
|
|||
if [ "${1:-}" = --self-test ]; then
|
||||
t=$(mktemp -d); trap 'rm -rf "$t"' EXIT
|
||||
printf 'binary junk\0/srv/builds/x/igneum-pow/src/lib.rs\0more junk\0igneum-pow/src/lottery.rs\0' > "$t/good"
|
||||
printf 'binary junk\0/srv/builds/x/igneum-pow-amend/src/lib.rs\0igneum-pow-amend/src/lottery.rs\0' > "$t/amend"
|
||||
printf 'binary junk\0/srv/builds/x/consensus/pow/src/stub.rs\0commit 21d8f454\0' > "$t/bad"
|
||||
"$0" "$t/good" >/dev/null || { echo "engine-check self-test: a binary WITH igneum-pow paths was refused"; exit 1; }
|
||||
out=$("$0" "$t/good") || { echo "engine-check self-test: a binary WITH igneum-pow/src/ paths was refused"; exit 1; }
|
||||
case "$out" in *"igneum-pow/src/ 2 paths"*) ;; *) echo "engine-check self-test: the matched directory is not printed: $out"; exit 1 ;; esac
|
||||
out=$("$0" "$t/amend") || { echo "engine-check self-test: a binary paired through igneum-pow-amend/src/ was refused"; exit 1; }
|
||||
case "$out" in *"igneum-pow-amend/src/ 2 paths"*) ;; *) echo "engine-check self-test: the amend directory is not printed: $out"; exit 1 ;; esac
|
||||
if "$0" "$t/bad" >/dev/null 2>&1; then echo "engine-check self-test: a binary WITHOUT igneum-pow paths passed"; exit 1; fi
|
||||
echo "engine-check self-test: a binary with igneum-pow/src/ paths passes, one without is refused"; exit 0
|
||||
echo "engine-check self-test: igneum-pow/src/ and igneum-pow-amend/src/ pass with the directory named, a binary without is refused"; exit 0
|
||||
fi
|
||||
f="${1:-}"; [ -f "$f" ] || { echo "engine-check: no file '$f'" >&2; exit 2; }
|
||||
n=$(LC_ALL=C grep -a -c 'igneum-pow/src/' "$f" || true)
|
||||
if [ "${n:-0}" -gt 0 ]; then echo "engine-check: $(basename "$f") carries $n igneum-pow/src/ path line(s): the igneum-pow engine"; exit 0; fi
|
||||
echo "engine-check: no igneum-pow/src/ path in $(basename "$f"): the stub engine or a foreign igneum-pow tree (the commit string alone does not prove the engine; 7 Oct 2026 Devnet 3)" >&2
|
||||
# any directory name beginning igneum-pow and ending /src/ (the fork pairs its pow through a paths override that may name the tree
|
||||
# igneum-pow-amend, the archive of 017e7037; the shipper, 7 Oct 2026); the matched name is printed so the pairing is visible
|
||||
dirs=$(LC_ALL=C grep -a -oE 'igneum-pow[A-Za-z0-9._-]*/src/' "$f" | sort | uniq -c | awk '{printf "%s %s paths; ", $2, $1}')
|
||||
n=$(LC_ALL=C grep -a -c -E 'igneum-pow[A-Za-z0-9._-]*/src/' "$f" || true)
|
||||
if [ "${n:-0}" -gt 0 ]; then echo "engine-check: $(basename "$f") paired: ${dirs% }"; exit 0; fi
|
||||
echo "engine-check: no igneum-pow*/src/ path in $(basename "$f"): the stub engine or no paired igneum-pow tree (the commit string alone does not prove the engine; 7 Oct 2026 Devnet 3)" >&2
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue