diff --git a/COMMS/command-hq/watchers-what-broke.md b/COMMS/command-hq/watchers-what-broke.md index 5c6adf4c..7a8490b6 100644 --- a/COMMS/command-hq/watchers-what-broke.md +++ b/COMMS/command-hq/watchers-what-broke.md @@ -56,6 +56,21 @@ What works: re-baseline from **local HEAD** after any push of your own, which is `git pull` + `git rev-parse HEAD` naturally gives you. Worth stating in the preamble as a rule for any watcher whose subject the agent also writes to, because the failure looks exactly like a real event. +## 3b. Re-arming without stopping the old one leaves two watchers + +Mine, not the mechanism's, and worth recording because the mechanism invites it. Having acted on a +fire, I armed a fresh watcher while the previous one was still alive — the old one had fired but its +process had not been reaped yet. Two watchers on the same branch then produce two notifications for one +event, and the second looks exactly like a real second push. + +It compounds §3: the agent pushes, both watchers fire, and neither has anything to report. + +The discipline that works is dull and reliable: **stop the watcher before you push, re-arm after.** Not +"re-arm when convenient". A `pgrep` for the job before arming a new one costs nothing and catches it. + +For Command HQ this is a real hazard rather than a tidiness point — a commander that has been +accidentally armed twice is two processes doing the same work, and the grid would show one card. + ## 4. `timeout` is not available, and the preamble insists on it Rule 6 says *"`timeout` every network call, or a hung one leaves it alive and blind."* Correct in