fix(fleet): watch viewer-session leak + workdir test settle-race #601

Merged
jason.woltje merged 1 commits from feat/f3-watch-workdir into main 2026-06-22 01:43:22 +00:00
Owner

Closes #600 · refs #588. The 2 deferred items from #595/#599:

  • agent watch leak: try/finally around the interactive attach; kill the grouped viewer in finally so a thrown/interrupted attach never leaves a stray <agent>-watch-<pid> session (the one you found live).
  • workdir test race: Test 1 read pane_current_path before the pane settled into its -c start dir (cwd-dependent false fail that aborted the suite before HB tests 6/7) — poll until settled. HB tests 6/7 now run.

Verified: full shell suite green from /tmp (was red); prettier clean.

Closes #600 · refs #588. The 2 deferred items from #595/#599: - **agent watch leak:** try/finally around the interactive attach; kill the grouped viewer in finally so a thrown/interrupted attach never leaves a stray `<agent>-watch-<pid>` session (the one you found live). - **workdir test race:** Test 1 read `pane_current_path` before the pane settled into its `-c` start dir (cwd-dependent false fail that aborted the suite before HB tests 6/7) — poll until settled. **HB tests 6/7 now run.** Verified: full shell suite green from /tmp (was red); prettier clean.
jason.woltje added 1 commit 2026-06-21 23:38:10 +00:00
fix(fleet): watch viewer-session leak + workdir test settle-race
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed
234dc56c5f
The 2 deferred F3 items from the #595/#599 reviews:
- agent watch: wrap the interactive attach in try/finally and kill the grouped
  viewer session in finally — so an attach that throws or an interrupted process
  never leaves a stray <agent>-watch-<pid> session behind (the leak you found).
- test-start-agent-session.sh Test 1: pane_current_path briefly reflects the tmux
  server's cwd until the pane process establishes its -c start dir; poll until it
  settles. Fixes the cwd-dependent false failure that aborted the suite before the
  heartbeat tests (6/7) — those now run.

Verified: full shell suite green from /tmp (was failing); prettier clean.

Refs #588 #542

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jason.woltje merged commit 6dbe452a9f into main 2026-06-22 01:43:22 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#601