Repository navigation
Description
Refs #5569
Problem
Item 15 of #5569 (batch A comment) has the acceptance criterion: "After round.sh stop, no watch.sh for that data dir is still running within 10 s (Windows Git Bash included)." The original report was a watch.sh and its curl long-poll left running after round.sh stop on Windows Git Bash, killed by PID.
PR #5722 ends the watcher on POSIX only. end_watcher in plugins/planning/surface/round.py returns early when os.name != "posix", because the pid a Git Bash watch.sh records ($$) is not a native Windows PID and could name any process. On Windows the watcher is meant to end through its refused-poll path: round.sh stop removes the env file, the next poll is refused, and watch.sh exits 3 with "the interview server was stopped (round.sh stop): not re-arming". plugins/planning/surface/README.md says that path has not been exercised on Windows Git Bash.
This needs a Windows host with Git for Windows and an operator run. A Linux or WSL session cannot produce the evidence.
Acceptance criteria
- On Windows Git Bash, after
round.sh stop, nowatch.shfor that data dir and no curl long-poll it started is still running within 10 s, and thewatch.shprocess exited 3 with the "the interview server was stopped" message (the refused-poll path). -
bash plugins/planning/surface/watch.test.shrun on that host passes, including "round.sh stop ended the data dir's watch.sh" and "watch.sh exits 3 at once on a refused poll after a clean stop". - The result (host, Git for Windows version, commands, output) is posted on this issue. If it passes, a PR that closes this issue replaces the README sentence "That path has not been exercised on Windows Git Bash." with the verified behavior. If it fails, the failing output is the repro for a fix: a stop the lease can trust on Windows, or a
watch.shthat ends sooner, with the POSIX cases inwatch.test.shstill green.
Operator steps
In Git Bash, from plugins/planning/surface, with d set to a scratch data dir:
bash round.sh --dir "$d" ensure-running --port 0
bash watch.sh "$d" >watch.out 2>watch.err &
wpid=$!
ps -ef | grep -E 'watch\.sh|curl'
bash round.sh --dir "$d" stop
sleep 10
ps -ef | grep -E 'watch\.sh|curl'
wait "$wpid"; echo "exit $?"; cat watch.errRelated
Parent: #5569 (item 15, third acceptance criterion). POSIX path: PR #5722.
Activity
feat(planning): interview watcher stop, restatement diff and page pol…
kyle-sexton commentedon Oct 1, 2026
Windows Git Bash run, 2026-10-01. The first criterion holds. The second does not: one of the two
watch.test.shcases it names fails on Windows, and the cause is the test, notwatch.sh. This issue stays open.Where and what
MINGW64_NT-10.0-26200, bash 5.3.15, curl 8.21.0), Python 3.14.7.038c2ae22(includes feat(planning): interview watcher stop, restatement diff and page polish #5722). I copiedplugins/planningout of git into a scratch folder, so the host's own checkout, which is behind main, was not touched.bash.exefrom Git for Windows, started from the WSL lane through interop. It is not a Claude Code Bash tool session. The processes are the same Windows ones.C:/Users/KyleSexton/claude-lane-sandbox/drain-20261001/5723-data.1. Operator steps: pass
I ran the issue's steps as written (
ensure-running --port 0,watch.shin the background,ps -ef | grep -E 'watch\.sh|curl',round.sh stop,sleep 10, the sameps,wait). I also listed the Windows processes by command line, because Git Bash'spsshows only part of them.Before
round.sh stop(watcher armed, long-poll open). The token is redacted:Then
bash round.sh --dir "$d" stopprintedstopped 59212and took 2 seconds. The watcher was already gone 0.1 seconds afterstopreturned. Ten seconds afterstopreturned:The
watch.shprocess exited 3, andwatch.errheldthe interview server was stopped (round.sh stop): not re-arming. So afterround.sh stopon Windows, nowatch.shand no curl long-poll was left, and the refused-poll path worked as designed.2.
bash watch.test.sh: 26 pass, 1 fail"round.sh stop ended the data dir's watch.sh" passes. "watch.sh exits 3 at once on a refused poll after a clean stop" does not: its case (o) fails with the message above.
Cause: the test, not
watch.sh. Case (o) removes the env file, then stops the server withkill "$spid", where$spidis the pid the server wrote to.interview-session.json. On Windows that is a native Windows pid, and Git Bash'skillonly knows its own process numbers. I reproduced the case by hand:kill 42680(the server's native pid) printedkill: (42680) - No such process. The server kept running and answered HTTP 200, so the watcher's poll kept succeeding andwatch.shnever took its refused-poll branch.killrejects-f, and/usr/bin/kill -f <native pid>also printed "No such process".taskkill //F //PID 10708(the server's native pid) with the env file removed, same as the test:watch.shexited 3 withthe interview server was stopped (round.sh stop): not re-arming, inside the 10 second window.So the refused-poll behavior holds on Windows Git Bash. The test fails because it cannot kill the server there.
What this leaves
watch.shor curl left within 10 s, exit 3 with the stop message): met.watch.test.shpasses on that host): not met, for the test defect above.Next step is a code change, not another host run: make case (o) in
plugins/planning/surface/watch.test.shkill the server by native pid on Windows (for exampletaskkill //F //PID "$spid"whenuname -sisMINGW*orMSYS*,killelsewhere), keeping the POSIX path as is. Then re-runbash watch.test.shon a Windows host. If it is 27 of 27, a PR can replace the README sentence "That path has not been exercised on Windows Git Bash." with the behavior verified above.