SIGN IN SIGN UP

fix(agent): start the HID++ watchers through one named worker shell

The gesture, keyboard and host-switch watchers each hand-rolled the same
shell: `thread::spawn`, `openlogi_core::worker::runtime()`, `block_on(manage)`,
drop the runtime, acknowledge. Their threads were unnamed although
`openlogi_core::worker::spawn(name, run)` exists and the inventory and pairing
watchers use it.

`WatcherHandle::spawn(name, |stop| manage(..))` is that shell once, over
`worker::spawn`. The threads are now `openlogi-gesture-watcher`,
`openlogi-keyboard-watcher` and `openlogi-host-switch-watcher`. Unchanged: the
runtime is dropped before completion is acknowledged.

Behaviour fix: the three disagreed on a worker that cannot start. Gesture and
keyboard acknowledged `Graceful`, so `stop_and_wait` reported a clean stop for
a manager that never ran; host switch acknowledged `Unexpected`. It is
`Unexpected` for all three now (`StopOutcome::Unclean`): nothing stopped
gracefully, and during a process replacement the lifecycle then restarts the
watchers and retries instead of proceeding on a fleet that was never whole.
The failure is also seen where `spawn` is called, because `worker::spawn`
builds the runtime before the thread starts.

Tests: the real shell end to end (stop request in, acknowledgement out), and a
worker that cannot start, through an injected starter.

Guard: agent-watcher-shell-owner flags `worker::runtime()` under watchers/
(3 hits on the parent tree, 0 here).
A
AprilNEA committed
809f314c475cad9d1cacaa06f3b4003bfc9af5bd
Parent: 893f6b9