fix(watch): add durable active watcher session#108
Open
JTInventory wants to merge 1 commit into
Open
Conversation
6fe8cdf to
74f6879
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_HOMEand 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--tmuxmodes, records only the current home instate/.watch-session.lock, and avoids broad process killing.Validation
bash tests/fm-watcher-lock.test.shbash tests/fm-wake-queue.test.shbash tests/fm-wake-daemon-lifecycle-e2e.test.shbash tests/fm-watch-session.test.shbash -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.shfor test_script in tests/*.test.sh; do echo "== $test_script"; bash "$test_script" || exit $?; doneNot run:
shellcheck bin/*.sh tests/*.shbecauseshellcheckis not installed in this environment.