Repository navigation
Report the notify follower as restarting after update - #18
Merged
Merged
Conversation
bercail update kills the live follower so the desk mod starts the new code. Doctor ran in that gap and reported the follower missing for up to a minute. notify_restart_follower now stamps a restarted_at file before the kill (cleared if the kill fails, and by the new follower on startup). For 90 seconds after the stamp, doctor reports the follower as restarting instead of missing; after that, or with no, invalid, or future stamp, it is missing as before. Doctor still only reads one file.
This was referenced Oct 31, 2026
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.
Problem
Running
bercail doctorright afterbercail updateprintedmissing notify followerfor up to a minute. Update kills the live follower so the new code runs, and the desk mod starts a new one within 60s; doctor ran in that gap.Change
notify_restart_follower(lib/notify.sh) writes arestarted_atstamp in the notify state dir before killing the follower. It removes the stamp if the kill fails, andnotify_runclears it when the new follower starts.doctor_notify(lib/doctor.sh): ifbercail-notifyisn't live and the stamp is withinDOCTOR_NOTIFY_RESTART_WINDOW(90s), it printsrestarting notify follower (...)and doesn't count it as a failure. With no stamp, or an invalid, future or expired one, it reportsmissingas before. Doctor still reads only one file and never waits.Tests
New cases in
tests/notify_test.shuse the fakehc:All
tests/*_test.shpass, excepthandoff_spawn_test.shwhen run from a linked worktree. That one fails on master too and is fixed separately in the notify-repo-coverage PR. ShellCheck shows no new warnings: 18 findings on both master and this branch for the touched files.