From bce08505d279561628abaa75191768d2d872eb1e Mon Sep 17 00:00:00 2001 From: xstudio agent Date: Mon, 28 Sep 2026 21:51:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(dispatch-preflight):=20prep-sandbox-space.s?= =?UTF-8?q?h=20=E4=BC=A0=20"true"=20=E8=80=8C=E9=9D=9E=20"--force"?= =?UTF-8?q?=EF=BC=88=C2=A72.5=201=20=E8=A1=8C=E4=BF=AE=E5=A4=8D=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 影响:dispatch-preflight.sh --force 实际未触发 prep-sandbox-space.sh 重播种, 旧空间残留导致后续派单基于陈旧 main 改动:脚本 line 77 $FORCE 改为 FORCE_FLAG="--force"(仅在 true 时赋值) 参考:dispatch-session-v2 §2.5 + dispatch-preflight.sh 自检流程 Co-Authored-By: Claude Code --- scripts/dispatch-preflight.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/dispatch-preflight.sh b/scripts/dispatch-preflight.sh index 02b86b3..fe08bd8 100755 --- a/scripts/dispatch-preflight.sh +++ b/scripts/dispatch-preflight.sh @@ -74,7 +74,10 @@ echo "[3/4] sandbox space 存在 + 可写" SPACE_DIR="/tmp/xstudio-sandbox/$WS_HASH/space" if [ ! -d "$SPACE_DIR" ] || [ "$FORCE" = "true" ]; then echo " ⚠️ space 不存在(或 --force),调 prep-sandbox-space.sh" - if ! bash "$SELF_DIR/prep-sandbox-space.sh" "$WS_HASH" $FORCE; then + # prep-sandbox-space.sh expects literal "--force" arg, not "true"(dispatch-session-v2 §2.5 bug) + FORCE_FLAG="" + [ "$FORCE" = "true" ] && FORCE_FLAG="--force" + if ! bash "$SELF_DIR/prep-sandbox-space.sh" "$WS_HASH" $FORCE_FLAG; then exit 4 fi fi