e2e: default to the ranked upstream expert profile, record its sha256, refuse a different digest unless E2E_ALLOW_PROFILE_OVERRIDE=1

run-e2e.sh defaulted LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE to gpu-runs/baseline/profile.bin, a bring-up placeholder in expert-id order (47 % overlap with the
ranked upstream data/expert-profile.bin at 11,280 slots). Every harness run therefore started from an unranked VRAM set. The product deploy already pins the
upstream file (crates/deploy EXPERT_PROFILE_SHA256 8f59b4aa...). The harness now defaults to $A/data/expert-profile.bin, writes $OUT/expert-profile.sha256 and
refuses a profile whose digest differs from the pinned one unless E2E_ALLOW_PROFILE_OVERRIDE=1 (the record then says override).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Pavlo Ratushnyi
2026-10-29 01:38:01 +01:00
co-authored by Claude Sonnet 5.5
parent ea657e3eb5
commit 69db3ab268
+18 -1
View File
@@ -64,7 +64,24 @@ chmod 600 "$KEYFILE"
export LELEKA_ORIGINAL_SERVE_EXPERT_SLOTS=${LELEKA_ORIGINAL_SERVE_EXPERT_SLOTS:-2048}
export LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER=${LELEKA_ORIGINAL_SERVE_EXPERT_PER_LAYER:-yes}
export LELEKA_ORIGINAL_SERVE_PCIE_FRAC=${LELEKA_ORIGINAL_SERVE_PCIE_FRAC:-0.55}
export LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE=${LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE:-$G/baseline/profile.bin}
# The ranked upstream profile (data/expert-profile.bin, the file crates/deploy pins as EXPERT_PROFILE_SHA256 and vanilla Strata runs) is the default.
# The old default, $G/baseline/profile.bin, is a PLACEHOLDER in expert-id order (47 % overlap with the ranked set at 11,280 slots): every e2e run
# that used it started from an unranked VRAM set, which showed up as a burst of CPU/PCIe experts in the first 20 windows of each request and an
# 81 % instead of 97 % VRAM share (STRA-245 decode gap). The digest of the profile actually used is recorded in $OUT/expert-profile.sha256, and a digest
# other than the pinned one is refused unless E2E_ALLOW_PROFILE_OVERRIDE=1 (then the record says so, and a paired comparison must not mix digests).
PINNED_PROFILE_SHA256=8f59b4aa8873209dff11c11e37bcda9529a1335b724a1afeea37bf6388975baf
export LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE=${LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE:-$A/data/expert-profile.bin}
PROFILE_SHA256=$(sha256sum "$LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE" 2>/dev/null | cut -d' ' -f1)
if [ "$PROFILE_SHA256" = "$PINNED_PROFILE_SHA256" ]; then
PROFILE_NOTE=pinned
elif [ "${E2E_ALLOW_PROFILE_OVERRIDE:-}" = 1 ]; then
PROFILE_NOTE=override
log "WARNING: expert profile $LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE has digest ${PROFILE_SHA256:-unreadable}, not the pinned $PINNED_PROFILE_SHA256 (E2E_ALLOW_PROFILE_OVERRIDE=1)"
else
echo "refusing to start: expert profile $LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE has digest ${PROFILE_SHA256:-unreadable}, not the pinned $PINNED_PROFILE_SHA256; set E2E_ALLOW_PROFILE_OVERRIDE=1 to run on purpose (never in a paired comparison with the upstream profile)" >&2
exit 3
fi
echo "profile=$LELEKA_ORIGINAL_SERVE_EXPERT_PROFILE sha256=$PROFILE_SHA256 pinned=$PINNED_PROFILE_SHA256 state=$PROFILE_NOTE" >"$OUT/expert-profile.sha256"
export LELEKA_SERVE_PROFILE=1 LELEKA_GRAPH_EXEC_REUSE=off RUST_BACKTRACE=1
# synthetic prompts only: log the generated text when a streamed tool turn fails (operator debugging switch)
export STRATA_DEBUG_FAILED_OUTPUT=1