fix(power): coalesce charge-limit reapply events
All checks were successful
Check / eval (push) Successful in 3m16s

USB-C power event bursts could repeatedly restart and SIGTERM the settling oneshot until systemd reached its start limit. Let successful runs return inactive and use coalescing start jobs for immediate and delayed reapplication.

Verified: V0 nix flake check --no-build, module parse, and git diff --check; V2 focused battery-charge-limit KVM test with a 12-event active-run burst. V3 hardware item #101 remains queued.
This commit is contained in:
2026-07-13 14:09:05 +01:00
parent 2a34c7398b
commit 7bfe1af5b1
6 changed files with 102 additions and 19 deletions

View File

@@ -19,6 +19,21 @@ Template:
---
## 2026-07-13 — #101 charge-limit AC-event burst recovery (this commit)
- **Task:** Fix `nomarchy-battery-charge-limit.service` failing when USB-C
dock power events arrive while its settling write is still active.
- **Did:** The oneshot now returns inactive after success; immediate and
delayed udev paths use coalescing `start` jobs instead of interrupting
`restart` jobs. Strengthened the focused VM with a 12-event Mains burst
during an extended active run and explicit failed/start-limit assertions.
- **Verified:** V0 `nix flake check --no-build`, module parse, and
`git diff --check`; V2
`nix build .#checks.x86_64-linux.battery-charge-limit --no-link -L`
under KVM — the 12-event active-run burst finished inactive/success,
changed InvocationID, and produced no failed/start-limit journal result.
- **Pending:** V3 post-rebuild dock-power burst check in HARDWARE-QUEUE.
- **Next suggestion:** run V3 #101 alongside docking round 4, then #91.
## 2026-07-13 — #100 dock transition recovery (this commit)
- **Task:** Fix the real T14s dangling workspace, closed-lid cable-removal
suspend/apparent crash, and BenQ audio miss after 7ebfab4.