Skip to content

Commit 0a5f096

Browse files
committed
gate: assert ARM64 gate binary identity (mirror x86_64 BINARY_MATCH)
Symmetric defense to e808676 — guards against any future ARM64 build-pipeline refactor (e.g., switching to cp-and-cache for build speed) silently regressing the binary-identity property. Today the ARM64 chain (cmake clean → fetch → checkout → build → test in same repo) inherently couples binary identity to checked-out commit, so the check is belt-and-suspenders. Per theologian 2026-04-22 00:47:10Z: the defense-in-depth value is in preventing future regression of the safety property, not in catching today's bugs. After build_phoenix.sh + chmod +x python: - capture sys.version of the freshly-built binary - grep for $ARM64_COMMIT (the just-checked-out short hash) - exit 99 if absent, with explicit ARM64_BINARY_MISMATCH message Existing 'ARM64_REMOTE_FAIL' cascade catches the non-zero exit and fails the gate. Transcript carries verbatim ARM64_BINARY_MATCH or ARM64_BINARY_MISMATCH for gatekeeper item python#11 verification.
1 parent e808676 commit 0a5f096

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

scripts/gate_phoenix.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,15 @@ if [ "$ARM64" -eq 1 ]; then
534534
scripts/build_phoenix.sh 2>&1 | tail -5;
535535
echo BUILD_ARM64=\$?;
536536
chmod +x python;
537+
ARM64_BINARY_LONG_VERSION=\$(./python -c 'import sys; print(sys.version)' 2>&1);
538+
echo ARM64_BINARY_LONG_VERSION=\$ARM64_BINARY_LONG_VERSION;
539+
if echo \"\$ARM64_BINARY_LONG_VERSION\" | grep -q \"\$ARM64_COMMIT\"; then
540+
echo \"ARM64_BINARY_MATCH: ./python reports \$ARM64_COMMIT ✓\";
541+
else
542+
echo \"ARM64_BINARY_MISMATCH: ./python does not contain \$ARM64_COMMIT\";
543+
echo \"GATE FAIL — ARM64 gate binary identity does not match HEAD\";
544+
exit 99;
545+
fi;
537546
JIT_ENABLE=1 ./python -m test test_phoenix_jit_arithmetic test_phoenix_jit_autocompile test_phoenix_jit_comparisons test_phoenix_jit_containers test_phoenix_jit_controlflow test_phoenix_jit_coverage test_phoenix_jit_functions test_phoenix_jit_generators test_phoenix_jit_loadattr_golden test_phoenix_float test_phoenix_hir_type test_phoenix_benchmark_correctness test_phoenix_deferred_compile test_phoenix_profiling_hooks test_phoenix_usetype_float 2>&1 | tail -10;
538547
echo ARM64_EXIT=\$?;
539548
echo STASH_POP_BEGIN;

0 commit comments

Comments
 (0)