fix(agent-core): retry volatile DPI re-apply on cold boot - #449
fix(agent-core): retry volatile DPI re-apply on cold boot#449iamshakibali wants to merge 2 commits into
Conversation
Greptile SummaryThis PR upgrades the volatile-settings re-apply logic for cold-booted devices from a one-shot confirm to a bounded retry of
Confidence Score: 5/5Safe to merge. The retry logic is self-contained in plan_reapply, the budget drains correctly to zero, and offline/reconnect/system-wake paths are unaffected. The HashSet to HashMap change is mechanically straightforward: the decrement-and-drain logic is correct, the mutual exclusion between the first-sighting block and the retry loop prevents any double-write or budget corruption within a tick, and the new test covers the full countdown path. Files Needing Attention: No files require special attention. All changes are confined to the plan_reapply function and its test suite in orchestrator.rs.
|
| Filename | Overview |
|---|---|
| crates/openlogi-agent-core/src/orchestrator.rs | Core retry logic change: HashSet to HashMap for followup budget, new VOLATILE_REAPPLY_CONFIRM_RETRIES constant, decrement loop in plan_reapply, and matching test coverage. Logic is internally consistent with no new bugs introduced. |
Reviews (3): Last reviewed commit: "Merge branch 'master' into fix/agent-cor..." | Re-trigger Greptile
The MX Master 3s is slow to enumerate after a power cycle, so the single confirming re-apply could time out against a still-booting device and DPI would revert to the hardware default. Retry for a bounded run of ticks instead of one-shot.
8f0d34a to
2f30b24
Compare
What
Change the volatile-settings re-apply for first-sighted devices from one-shot to bounded-retry.
Why
The MX Master 3s is slow to enumerate after a reboot. The single confirming re-apply could time out against a still-booting mouse, so DPI (which lives in device RAM and clears on power cycle) reverted to the hardware default and stayed there until the next sleep/wake.
How
reapply_followupchanges fromHashSet<String>(one confirm) toHashMap<String, u8>(retry budget per device key).VOLATILE_REAPPLY_CONFIRM_RETRIES = 4(~8s at the 2s inventory cadence).Files
crates/openlogi-agent-core/src/orchestrator.rsTest
plan_reapply_retries_a_first_sighting_for_a_bounded_runcovers the decrement-and-exhaust path.-D warnings+ fmt clean.