From 1d822c86bf6871c48e7d10f000067d9f462e325e Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Mon, 27 Jul 2026 03:32:25 +0200 Subject: [PATCH 1/3] fix(soak): BSD-safe mktemp template for the per-leg log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BSD mktemp substitutes only TRAILING X's, so the template cbm-soak-leg-XXXXXX.log creates a near-literal file on macOS and the second leg of the same job collides with the first leg's leftover ('File exists'). First runs mask it — which is why the quick leg passed and query-leak failed locally, and why CI's macos soak jobs (BSD mktemp, two legs per job) would fail the same way. Drop the suffix; the path is only a log handle. Signed-off-by: Martin Vogel --- scripts/soak-legs.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/soak-legs.sh b/scripts/soak-legs.sh index 6f7944e7e..1177c5873 100755 --- a/scripts/soak-legs.sh +++ b/scripts/soak-legs.sh @@ -77,7 +77,10 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)" run_leg() { local leg="$1" local log - log="$(mktemp "${TMPDIR:-/tmp}/cbm-soak-leg-XXXXXX.log")" + # No suffix after the X run: BSD mktemp substitutes only TRAILING X's, so + # a template like ...XXXXXX.log creates a near-literal file on macOS and + # every second run collides with the first run's leftover ("File exists"). + log="$(mktemp "${TMPDIR:-/tmp}/cbm-soak-leg-XXXXXX")" echo "=== soak-legs: leg=${leg} binary=${BINARY} duration=${DURATION}m ===" local rc=0 case "$leg" in From 052a7a80ea1080159a64240eef70636bc65b6230 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Mon, 27 Jul 2026 03:32:25 +0200 Subject: [PATCH 2/3] fix(contract): tolerate transient port-file read denials in the 0h self-test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Windows the fixture server's atomic port publish (os.replace) — or a first-touch AV scan of the fresh file, with Defender ACTIVE on the VM — briefly denies the read: is_file() is true, read_text() raises PermissionError, and the poll loop crashed the whole contract with a bare traceback (observed on the VM once the 0e/0h needle fixes let the chain reach this self-test at all). Treat an unreadable-yet port file as not-ready and keep polling inside the existing deadline. Signed-off-by: Martin Vogel --- tests/test_smoke_fixture_contract.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/test_smoke_fixture_contract.sh b/tests/test_smoke_fixture_contract.sh index 55fd0a782..fdf707453 100755 --- a/tests/test_smoke_fixture_contract.sh +++ b/tests/test_smoke_fixture_contract.sh @@ -381,7 +381,13 @@ if helper.is_file(): deadline = time.monotonic() + 30 while time.monotonic() < deadline: if port_file.is_file(): - text = port_file.read_text(encoding="ascii").strip() + try: + text = port_file.read_text(encoding="ascii").strip() + except OSError: + # Windows: the atomic replace publishing the port + # (or a first-touch AV scan of the fresh file) + # briefly denies the read — not ready yet. + text = "" if text: port = int(text) break @@ -474,7 +480,12 @@ if helper.is_file(): dns_deadline = time.monotonic() + 20 while time.monotonic() < dns_deadline: if dns_port_file.is_file(): - dns_text = dns_port_file.read_text(encoding="ascii").strip() + try: + dns_text = dns_port_file.read_text(encoding="ascii").strip() + except OSError: + # Windows: replace-in-flight / first-touch AV scan — + # not ready yet (see the port poll above). + dns_text = "" if dns_text: dns_port = int(dns_text) break From 6655b858ea259a964f665a56baf5f78c704b58e5 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Mon, 27 Jul 2026 03:32:25 +0200 Subject: [PATCH 3/3] ci(local): curl in the Alpine smoke image The unified smoke-local.sh readiness-polls the fixture server with curl; the Alpine image never had it, so every poll iteration failed command-not-found and the portable smoke leg reported 'fixture server did not serve' with a perfectly healthy server. Local-only image (CI portable smokes run on ubuntu runners, curl preinstalled). Signed-off-by: Martin Vogel --- test-infrastructure/Dockerfile.alpine | 1 + 1 file changed, 1 insertion(+) diff --git a/test-infrastructure/Dockerfile.alpine b/test-infrastructure/Dockerfile.alpine index 00496238b..61776dd82 100644 --- a/test-infrastructure/Dockerfile.alpine +++ b/test-infrastructure/Dockerfile.alpine @@ -14,6 +14,7 @@ RUN apk add --no-cache \ zlib-dev \ zlib-static \ bash \ + curl \ git \ python3 \ nodejs \