Skip to content

fix(supervision): add durable watcher loop - #84

Closed
aaugustijn wants to merge 1 commit into
kunchenguid:mainfrom
aaugustijn:fix-watcher-events-q2
Closed

aaugustijn wants to merge 1 commit into
kunchenguid:mainfrom
aaugustijn:fix-watcher-events-q2

Conversation

@aaugustijn

Copy link
Copy Markdown

Summary

  • add bin/fm-watch-loop.sh as a home-scoped continuous watcher wrapper that restarts the one-shot watcher after every wake
  • update guard and firstmate instructions to prefer the durable loop, while keeping fm-watch-arm.sh for one-shot verification / auto-rearm harnesses
  • add a regression test proving two separate status writes surface through one persistent loop

Reproduction

  • reproduced the failure in a temporary FM_HOME: fm-watch-arm.sh caught the first status signal, exited, and left no live watcher for the next status write

Tests

  • tests/fm-watcher-lock.test.sh
  • tests/fm-wake-queue.test.sh
  • tests/fm-wake-daemon-lifecycle-e2e.test.sh
  • tests/fm-daemon.test.sh
  • for test_script in tests/*.test.sh; do ""; done
  • bash -n bin/fm-watch-loop.sh bin/fm-watch.sh bin/fm-guard.sh tests/fm-watcher-lock.test.sh
  • direct smoke: fm-watch-loop.sh surfaced two status signals without manual re-arm

Not run: shellcheck bin/.sh tests/.sh (shellcheck is not installed in this environment).

@aaugustijn

Copy link
Copy Markdown
Author

Closing: this was opened without explicit approval. Keeping the watcher fix local-only.

@aaugustijn aaugustijn closed this Jun 25, 2026
@aaugustijn
aaugustijn deleted the fix-watcher-events-q2 branch June 25, 2026 18:12
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