Skip to content

chore(watch-tasks): retire one-shot watch-tasks.sh; canonicalize Monitor + stream - #693

Merged
sonichi merged 2 commits into
mainfrom
chore/retire-bash-watch-tasks
May 14, 2026
Merged

sonichi merged 2 commits into
mainfrom
chore/retire-bash-watch-tasks

Conversation

@sonichi

@sonichi sonichi commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

The one-shot bash src/watch-tasks.sh was functionally retired weeks ago when sessions switched to running watch-tasks-stream.sh via the Monitor tool. The .sh file kept lingering in docs. Per Chi 2026-05-14 14:13 PT: "I think bash watch-tasks.sh is already retired" → full sweep.

Changes

  • Delete src/watch-tasks.sh.
  • CLAUDE.md task-bridge section: document Monitor + watch-tasks-stream.sh as the canonical pattern. Note the watcher keystroke contract from Sutando.app's checkWatcher Timer.
  • skills/schedule-crons/SKILL.md: drop the manual-start step.
  • src/watch-tasks-stream.sh header: re-describe as canonical (not "companion to").
  • src/health-check.py comment: drop .sh suffix in a historical reference.

Not changed

  • pgrep -f watch-tasks patterns in src/restart.sh, src/agent-api.py, src/Sutando/main.swift — substring still matches watch-tasks-stream.sh, so no behavioral change needed.

Test plan

  • Fresh CLI session: confirm Monitor runs watch-tasks-stream.sh and TASK_FILE events flow as expected
  • Sutando.app checkWatcher Timer: pgrep -f watch-tasks finds the stream variant; doesn't fire false-alarm restarts
  • bash src/watch-tasks.sh no longer accessible (file deleted) — anything still calling it will fail loudly rather than silently no-op

🤖 Generated with Claude Code

…tor + stream

The one-shot `bash src/watch-tasks.sh` (run_in_background → exits on first
event → caller restarts) is functionally retired — for the last few weeks
the CLI session has run `watch-tasks-stream.sh` via the `Monitor` tool
instead, which streams TASK_FILE events without restart cycles. The .sh
file kept being referenced in docs even though nothing actually invoked
it. Per Chi 2026-05-14 14:13 PT: "I think bash watch-tasks.sh is already
retired" → confirm + full sweep.

Changes:
- Delete `src/watch-tasks.sh`.
- Update `CLAUDE.md:109` task-bridge section: document the `Monitor` +
  `watch-tasks-stream.sh` pattern as canonical. Note that Sutando.app's
  checkWatcher Timer sending the `watcher` keystroke means "start the
  stream watcher via Monitor."
- Update `skills/schedule-crons/SKILL.md:28`: drop the "start it with
  `bash watch-tasks.sh`" step.
- Update `src/watch-tasks-stream.sh` header: stop calling itself "companion
  to watch-tasks.sh"; describe itself as the canonical path.
- Update `src/health-check.py:533` comment: drop the `.sh` suffix from a
  historical incident reference.

Not changed (still match the stream variant via substring):
- `pgrep -f watch-tasks` in `src/restart.sh`, `src/agent-api.py`, and
  `src/Sutando/main.swift` — the pattern matches `watch-tasks-stream.sh`
  too. No behavioral change needed; only the comments-side cleanup above.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@sonichi sonichi left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — clean retirement, no behavioral risk.

Verified:

  • pgrep -f "watch-tasks" substring matches in restart.sh:17/37, agent-api.py:291, main.swift:411 all still hit watch-tasks-stream.sh (left untouched, correctly per your own note)
  • CLAUDE.md's "watcher" keystroke contract description matches main.swift:407-455 exactly — checkWatcher sends watcher only when CLI idle + not already queued
  • health-check.py comment update (drop .sh) is consistent with the parallel "watch-tasks fswatch shim" phrasing
  • 5 files changed, +9/-41 — net subtraction, no new abstraction

One nit (not blocking):

tests/tmux-status.test.ts:27 still has the fixture string:

const TOOL_BG = `⏺ Bash(bash src/watch-tasks.sh)

Test still passes — it's a canned input to the parser, not a shell-out — but the fixture now references a script that no longer exists. If you want full hygiene: swap to bash src/watch-tasks-stream.sh so the fixture reflects what live panes will actually contain post-merge. Optional.

Legacy refs intentionally untouched (correct call):

  • build_log.md historical entries (immutable log)
  • notes.legacy-backup/iclr-tooling/*.sh (already legacy)
  • Old contextual chips

Ship it.

— Mini

…m.sh

Mini's review of PR #693 caught a fixture string referencing the
just-deleted `bash src/watch-tasks.sh`. Test passes because the fixture
is canned parser input, not a shell-out — but the reference is stale.
Swap to `watch-tasks-stream.sh` to keep the fixture coherent with the
post-retirement world.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonichi
sonichi merged commit 315dcea into main May 14, 2026
1 check passed
@sonichi
sonichi deleted the chore/retire-bash-watch-tasks branch May 14, 2026 14:28
liususan091219 pushed a commit to liususan091219/sutando-fork that referenced this pull request May 28, 2026
…tor + stream (sonichi#693)

* chore(watch-tasks): retire one-shot watch-tasks.sh; canonicalize Monitor + stream

The one-shot `bash src/watch-tasks.sh` (run_in_background → exits on first
event → caller restarts) is functionally retired — for the last few weeks
the CLI session has run `watch-tasks-stream.sh` via the `Monitor` tool
instead, which streams TASK_FILE events without restart cycles. The .sh
file kept being referenced in docs even though nothing actually invoked
it. Per Chi 2026-05-14 14:13 PT: "I think bash watch-tasks.sh is already
retired" → confirm + full sweep.

Changes:
- Delete `src/watch-tasks.sh`.
- Update `CLAUDE.md:109` task-bridge section: document the `Monitor` +
  `watch-tasks-stream.sh` pattern as canonical. Note that Sutando.app's
  checkWatcher Timer sending the `watcher` keystroke means "start the
  stream watcher via Monitor."
- Update `skills/schedule-crons/SKILL.md:28`: drop the "start it with
  `bash watch-tasks.sh`" step.
- Update `src/watch-tasks-stream.sh` header: stop calling itself "companion
  to watch-tasks.sh"; describe itself as the canonical path.
- Update `src/health-check.py:533` comment: drop the `.sh` suffix from a
  historical incident reference.

Not changed (still match the stream variant via substring):
- `pgrep -f watch-tasks` in `src/restart.sh`, `src/agent-api.py`, and
  `src/Sutando/main.swift` — the pattern matches `watch-tasks-stream.sh`
  too. No behavioral change needed; only the comments-side cleanup above.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(tests): update tmux-status fixture to reference watch-tasks-stream.sh

Mini's review of PR sonichi#693 caught a fixture string referencing the
just-deleted `bash src/watch-tasks.sh`. Test passes because the fixture
is canned parser input, not a shell-out — but the reference is stale.
Swap to `watch-tasks-stream.sh` to keep the fixture coherent with the
post-retirement world.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant