Skip to content

Commit ae8224e

Browse files
committed
build,gate: fix stale getbuildinfo + ARM64 transcript truncation
Two latent build/gate-infra bugs surfaced during push 40 validation (both unblocked the BINARY_MATCH fix from ab80360 to actually work in practice): 1. scripts/build_phoenix.sh: rm -f Modules/getbuildinfo.o before each build. The .o embeds GITVERSION/GITTAG/GITBRANCH at compile time via -DGITTAG=`git describe --dirty`, computed AT FIRST BUILD. Incremental rebuilds skip recompiling that .o (the .c is unchanged), so once a binary is built dirty, every subsequent rebuild inherits the '-dirty' marker forever — and the new BINARY_DIRTY check then spuriously fails clean working trees. Forcing the .o to regenerate each build re-evaluates the git describe at every compile. 2. scripts/gate_phoenix.sh: prefix the local nbs-remote-run call with stdbuf -oL -eL. Two ARM64 truncation incidents during push 40 (01:11Z, 01:25Z) cut the gate transcript off mid-build, leaving verdict undeterminable and forcing manual SSH verification. The buffering happens on the LOCAL capture side ($(nbs-remote-run...)), not on the remote — so stdbuf is applied to the LOCAL process, not the remote heredoc. Per supervisor 2026-04-22 01:27:22Z (bundling both into one push 41 infra batch) + librarian 01:27:02Z (stdbuf recommendation).
1 parent ab80360 commit ae8224e

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

scripts/build_phoenix.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,14 @@ $AR_CMD rcs "$BUILD_DIR/_deps/asmjit-build/libasmjit.a"
176176
echo "--- Building CPython ---"
177177
cd "$CPYTHON_ROOT"
178178
rm -f python
179+
# Modules/getbuildinfo.o embeds GITVERSION/GITTAG/GITBRANCH at compile time,
180+
# baked from 'git describe --dirty' AT FIRST BUILD. Incremental rebuilds
181+
# don't re-run that compile because the .c source hasn't changed — so a
182+
# binary built once with a dirty working tree carries the '-dirty' marker
183+
# forever. Force re-evaluation every build by deleting the .o, so
184+
# Modules/getbuildinfo.o is the only object the BINARY_MATCH check
185+
# can rely on for accurate identity.
186+
rm -f Modules/getbuildinfo.o
179187
# ASAN builds: disable LeakSanitizer during make — CPython's freeze step runs
180188
# its own Python, and ASAN flags CPython's startup leaks as errors.
181189
MAKE_LOG=$(mktemp)

scripts/gate_phoenix.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,13 @@ if [ "$ARM64" -eq 1 ]; then
531531
# cannot pollute the build. Restore (pop) AFTER the gate completes — PASS or
532532
# FAIL — so the developer's in-flight work on devgpu004 is preserved.
533533
# 'git stash push -u' is a no-op when the working tree is clean.
534-
ARM64_OUTPUT=$(nbs-remote-run "$ARM64_HOST" "
534+
#
535+
# 'stdbuf -oL -eL' wraps the local nbs-remote-run process to force
536+
# line-buffering on its output. Two truncation incidents in the push 40
537+
# window (01:11Z, 01:25Z) had ARM64 transcript cut off mid-build, leaving
538+
# 'GATE PASS' verdicts undeterminable — addressed by line buffering on the
539+
# capture side so output flushes incrementally rather than in a final block.
540+
ARM64_OUTPUT=$(stdbuf -oL -eL nbs-remote-run "$ARM64_HOST" "
535541
cd $ARM64_DIR &&
536542
echo STASH_PUSH_BEGIN;
537543
ORIG_REF=\$(git symbolic-ref --short -q HEAD || git rev-parse HEAD);

0 commit comments

Comments
 (0)