Skip to content

Commit c7898c3

Browse files
committed
Fix CI smoke watcher startup race
1 parent 3af0fe8 commit c7898c3

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to `devloop` will be recorded in this file.
44

55
## [Unreleased]
66

7+
### Fixed
8+
- Made the CI smoke test wait for file watching to start before editing
9+
the watched fixture file, avoiding a startup race that could time out
10+
on macOS runners.
11+
712
## [0.6.1] - 2026-03-26
813

914
### Changed

scripts/ci-smoke.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ while time.time() < deadline:
4444
raise SystemExit("timed out waiting for startup state")
4545
PY
4646

47+
python3 - "$log_path" <<'PY'
48+
import pathlib
49+
import sys
50+
import time
51+
52+
log_path = pathlib.Path(sys.argv[1])
53+
deadline = time.time() + 15
54+
while time.time() < deadline:
55+
if log_path.exists() and "watching " in log_path.read_text():
56+
sys.exit(0)
57+
time.sleep(0.1)
58+
raise SystemExit("timed out waiting for watcher startup")
59+
PY
60+
4761
printf 'updated\n' > "${tmp_dir}/watched.txt"
4862

4963
python3 - "$state_path" "$log_path" <<'PY'
@@ -65,6 +79,7 @@ while time.time() < deadline:
6579
if "changed value: updated" in log_path.read_text():
6680
sys.exit(0)
6781
time.sleep(0.1)
82+
print(log_path.read_text(), file=sys.stderr)
6883
raise SystemExit("timed out waiting for changed state")
6984
PY
7085

0 commit comments

Comments
 (0)