mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 18:45:53 +00:00
daf2ad7ff9
Completes the wrapper-teardown rule across the remaining branches. The QNAP install and both uninstall paths still used a bare pkill -f "start-pulse-agent.sh" and still stopped the agent before its wrapper. The bare pattern is narrower than it looks and wider than it should be. It does NOT match a co-installed agent's supervisor, so the sibling case was already safe; what it does match is anything where the unescaped dot stands in for another character and the unbounded tail keeps going, including a .bak copy of the wrapper and an editor session holding it open. Escaping the dot and bounding the far end removes both without narrowing the intended match. Ordering is the more consequential half. A wrapper is a watchdog, so stopping the agent while its wrapper still loops only races the respawn. QNAP and the uninstall paths now stop the supervisor first, which is what the contracts already required of every branch that writes and launches a wrapper. Uninstall keeps a deliberately broader match than install, with no leading path separator, so it still reaches a wrapper invoked by a relative path or stranded at a superseded location. Both contracts now carry that distinction and the teardown ordering rule, which each had stated only for install. Guarded by two tests that pin every wrapper kill in the file rather than one branch: one requires the escaped dot and the bounded tail everywhere, the other walks each stop block and fails if an agent kill precedes its wrapper kill. Both were confirmed to fail against the pre-fix QNAP block.