SIGN IN SIGN UP

refactor(agent): log a background write's outcome in one place

Seven sites in hardware.rs matched the same
`Result<Result<T, WriteError>, Elapsed>`: the generic `detach`, the SmartShift
toggle, the Fn-lock write, the DPI write, the reapply's DPI and SmartShift
writes, and the wheel-mode writes. The copies had drifted. No failure arm
logged the device index, and the two DPI timeout arms logged the DPI but not
the index while the others logged the index.

`log_outcome(index, what, result, written)` is the match once. Only the
success line differs between writes, because it carries the value written, so
the caller passes it as `written`. A failure and a timeout keep their wording
("<what> failed", "<what> timed out (device asleep/unresponsive)") and now
always carry the device index; the DPI timeout lines no longer repeat the DPI.
The wheel-mode writes still log an unsupported feature at debug, before
handing the rest to the helper.

Guard: agent-write-outcome-log-owner flags the timeout wording outside
`log_outcome` (7 hits on the parent tree, 0 here).
A
AprilNEA committed
8d3cd931b0f0894d0e8c8eb1f52f64b58605704d
Parent: 620a878