Skip to content

fix(watch): add durable active watcher session#108

Open
JTInventory wants to merge 1 commit into
kunchenguid:mainfrom
JTInventory:fm/active-watcher-reliability-0627
Open

fix(watch): add durable active watcher session#108
JTInventory wants to merge 1 commit into
kunchenguid:mainfrom
JTInventory:fm/active-watcher-reliability-0627

Conversation

@JTInventory

Copy link
Copy Markdown

Summary

Active-mode supervision no longer treats a fresh watcher beacon as proof by itself. The guard now requires a live watcher lock for the same FM_HOME and watcher path, so a one-shot watcher that exited after writing a wake cannot leave firstmate falsely quiet.

This also adds a home-scoped durable watcher session runner for harnesses where foreground background calls are not reliable. The runner has --start, --status, --stop, --foreground, and --tmux modes, records only the current home in state/.watch-session.lock, and avoids broad process killing.

Validation

  • bash tests/fm-watcher-lock.test.sh
  • bash tests/fm-wake-queue.test.sh
  • bash tests/fm-wake-daemon-lifecycle-e2e.test.sh
  • bash tests/fm-watch-session.test.sh
  • bash -n bin/fm-guard.sh bin/fm-watch-session.sh tests/fm-wake-daemon-lifecycle-e2e.test.sh tests/fm-wake-queue.test.sh tests/fm-watcher-lock.test.sh tests/fm-watch-session.test.sh tests/wake-helpers.sh
  • for test_script in tests/*.test.sh; do echo "== $test_script"; bash "$test_script" || exit $?; done

Not run: shellcheck bin/*.sh tests/*.sh because shellcheck is not installed in this environment.


Compound Engineering
Codex

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