Skip to content

Commit af3ffbd

Browse files
authored
Merge pull request DeusData#1289 from DeusData/feat/local-remote-parity
Cycle-5: soak .exe resolution (root cause of both Windows runner soak reds) + preflight cleanup race
2 parents 3428b12 + c3b3569 commit af3ffbd

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎.github/workflows/_smoke.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ jobs:
201201
# runner workspace is deliberately not a valid launcher bundle root.
202202
PROFILE_ROOT="$(cygpath -u "$USERPROFILE")"
203203
LAUNCH_DIR="$(mktemp -d "$PROFILE_ROOT/cbm-release-version.XXXXXX")"
204-
trap 'rm -rf "$LAUNCH_DIR"' EXIT
204+
# Best-effort cleanup with one retry: Windows holds the just-exited
205+
# image's file busy for ~100ms (section teardown / first-touch AV),
206+
# and a temp dir on an ephemeral runner must never fail the job.
207+
trap 'rm -rf "$LAUNCH_DIR" 2>/dev/null || { sleep 2; rm -rf "$LAUNCH_DIR" 2>/dev/null || true; }' EXIT
205208
cp "$ARTIFACT_DIR/codebase-memory-mcp.exe" \
206209
"$ARTIFACT_DIR/codebase-memory-mcp.payload.exe" "$LAUNCH_DIR/"
207210
"$LAUNCH_DIR/codebase-memory-mcp.payload.exe" --version
@@ -231,7 +234,8 @@ jobs:
231234
scripts/security-strings.sh "$ARTIFACT_DIR/codebase-memory-mcp.payload.exe"
232235
PROFILE_ROOT="$(cygpath -u "$USERPROFILE")"
233236
SECURITY_DIR="$(mktemp -d "$PROFILE_ROOT/cbm-release-security.XXXXXX")"
234-
trap 'rm -rf "$SECURITY_DIR"' EXIT
237+
# Best-effort cleanup with one retry (see the version preflight).
238+
trap 'rm -rf "$SECURITY_DIR" 2>/dev/null || { sleep 2; rm -rf "$SECURITY_DIR" 2>/dev/null || true; }' EXIT
235239
cp "$ARTIFACT_DIR/codebase-memory-mcp.exe" \
236240
"$ARTIFACT_DIR/codebase-memory-mcp.payload.exe" "$SECURITY_DIR/"
237241
TMPDIR="$SECURITY_DIR" \

‎scripts/soak-legs.sh‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,14 @@ esac
6767
[ "$DURATION" -gt 0 ] || { echo "soak-legs: duration must be positive" >&2; exit 2; }
6868
# Windows builds produce <name>.exe; resolve it here so every venue passes the
6969
# same plain path and carries no per-platform binary-name logic of its own.
70-
if [ ! -x "$BINARY" ] && [ -x "${BINARY}.exe" ]; then
70+
# Resolve whenever the .exe EXISTS, not only when the plain name fails -x:
71+
# msys resolves the suffix-less name transparently (it IS -x), but soak-test
72+
# keys its native-Windows handling — cygpath'd CBM_CACHE_DIR, coproc stdio —
73+
# off the literal .exe suffix. A suffix-less native binary therefore received
74+
# a POSIX-form cache path, mis-rooting the daemon logs and silently disabling
75+
# diagnostics (both hosted-runner Windows soak legs; reproduced on the VM's
76+
# CLANG64 environment with a suffix-less invocation).
77+
if [[ "$BINARY" != *.exe ]] && [ -x "${BINARY}.exe" ]; then
7178
BINARY="${BINARY}.exe"
7279
fi
7380
[ -x "$BINARY" ] || { echo "soak-legs: binary '$BINARY' missing or not executable — build first" >&2; exit 2; }

0 commit comments

Comments
 (0)