fix(wt-memory-gate-batch): pass --legacy-mode only when the deployed harness has it

b193 (U11b) retired the legacy plane and removed --legacy-mode from the
harness; passing it there fails the daily batch. The wrapper now greps
core/memory_acceptance at the deployed sha and omits the flag when it is
gone, so it is correct on both sides of the b192 -> b193 deploy (checked:
7a83f2f -> passes it, c2d87263 -> omits it).
This commit is contained in:
vh
2026-10-02 07:59:03 -07:00
parent 1cc8ad3292
commit cd30592e55
2 changed files with 11 additions and 4 deletions
+10 -3
View File
@@ -41,8 +41,11 @@
# WT_DEMO_API_CT default worldtree-worldtree-api-1
# WT_LEGACY_MODE default off (U11a ruling 2026-09-30: off, not read_only)
# WT_BATCH_LABEL default window-off
# Until the U11b retirement unit lands. After it, `off` is the only mode, the
# harness drops --legacy-mode, and this script needs that flag removed.
# WT_LEGACY_MODE is passed ONLY when the deployed sha's harness still has --legacy-mode.
# b193 (U11b, 2026-10-02) retired the legacy plane and removed the flag; passing it there
# fails the batch. The check greps core/memory_acceptance/ AT THE DEPLOYED SHA (the argparse
# lives in live_driver.py; live.py only imports it), so
# the wrapper is right on both sides of the b192 -> b193 deploy without a timed edit.
set -euo pipefail
WT_TREE="${WT_TREE:-$HOME/development/Worldtree}"
@@ -105,8 +108,12 @@ else
where="detached worktree $WT_GATE_TREE (tree HEAD ${head:0:12} != deployed)"
fi
legacy_args=()
if git -C "$WT_TREE" grep -q -e '"--legacy-mode"' "$deployed" -- core/memory_acceptance 2>/dev/null; then
legacy_args=(--legacy-mode "$WT_LEGACY_MODE")
fi
cmd=(python -m core.memory_acceptance.live --runs 3 --gate
--legacy-mode "$WT_LEGACY_MODE" --label "$WT_BATCH_LABEL" --out "$OUT_DIR")
"${legacy_args[@]}" --label "$WT_BATCH_LABEL" --out "$OUT_DIR")
echo "wt-memory-gate-batch $(now)"
echo " demo image $image"