Repository navigation
Conversation
…on-status Conflicts: go/internal/api/api_control_feedback_test.go
miravoss26
left a comment
There was a problem hiding this comment.
Adds a device-managed calibration state: new set_calibrating host call, DriverHealth.Calibrating, dispatch/planning suspended for that battery, scoped manual hold rejected with 409 (and the UI disables Install hold). Tests cover the API rejection and the feedback state. Security screen: nothing found (no new deps, hosts, secrets or authz changes).
IsOnline()now returns false while calibrating. Fine for dispatch, but every other consumer ofIsOnline(health endpoint, driver inventory, support report, any offline alerting) will now read a calibrating battery as offline. The new test asserts this on purpose; worth a quick grep that nothing pages on it.- The flag has no timeout. If a driver sets
set_calibrating(true)and then stops calling (crash, bad poll), control stays suspended until stale-status logic marks it offline anyway. Probably acceptable, but say so if intended. battery_calibratingis added tocontrolVerificationLost's exclusion list, good: no false 'lost control' during calibration.
Safe to merge from my read, with the first point as a check rather than a blocker.
|
A battery under calibration is unavailable for control. The device manages its own charge and discharge during calibration, and FTW setpoints or manual holds could interrupt that process. The battery can still report telemetry, but planning and dispatch must exclude it from controllable capacity until the device reports that calibration is complete. |
When Pixii calibrates its batteries, it can continue to charge while the FTW setpoint remains at 0 W. This is normal device-managed operation. Show Calibrating under Are we in control?, keep measurements live, and suspend power dispatch and planning for the calibrating battery.
Disable Install hold for that battery and explain why. Reject the same scoped request at the API. An all-batteries override can still apply to other eligible batteries.
The Pixii driver change is in srcfl/device-drivers#228. The bundled driver pin can follow once that change lands.
Validation
make verifypassed locally. GitHub's web, Go, race and full-stack jobs passed on the updated PR head.