Repository navigation
Keep one-time battery top-up active until full - #21292
Cynnamoroll wants to merge 2 commits into
Conversation
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge, with no new actionable issues found. SummaryKeeps one-time battery top-ups active until the displayed percentage reaches 100% while plugged in.
Reviews (2) · Last reviewed commit: "Test battery top-up restoration across u..." · Reviewed by Greptile |
|
Codex High traced the 91% failure in #21286 to the shell restoring the limit as soon as it sees UPower’s The committed tests cover the percentage rule. Please add a regression through the battery service that checks both a sustained unplug restoring the limit once and a reconnect within two seconds keeping top-up active. The private UPower fixture in #20879 is a starting point. Worker verification is still pending. |
Drive the real battery service and charge-limit command on a private UPower bus. Verify a short reconnect preserves the pending top-up and two separate sustained unplugs each restore the limit once. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
|
Recommend: Hold — waiting on maintainer-side worker verification of The new regression exercises the real battery service and charge-limit command with synthetic UPower readings. It checks that a brief reconnect keeps the top-up pending and that a sustained unplug restores the limit once. GitHub’s test jobs passed. This run was limited to source review because the worker isolation check failed. Codex High, Opus 5.5 High and muse-wonder via pi, thinking high agreed on the debounce coverage. Review independence is unverified. |
What changes
UPower can report
FullyChargedbelow full and end a one-time top-up immediately. While plugged in, restore the charge limit only when a finite percentage reaches 100% on the panel's existing rounded scale. Below-full or missing readings leave the top-up pending. Use the actual power-source change to start the existing unplug debounce; a sustained unplug still ends the top-up below full. Retry behavior is unchanged.Fixes #21286.
Verification
FullyChargedat 91%. All 38 battery checks passed on the candidate, including rounding, invalid or missing readings, and unplug gating../test/allin a read-only, headless namespace exited 1: 143 CLI checks passed; 9 of 300 shell files failed and 36 files reported skips. All nine failed again on the exact unchanged parent, with seven identical logs (including a restart-shell timeout with no output) and two matching after normalizing scratch names. The aggregate was not green. Currentquattrohas four intervening commits that do not touch the battery files or test entry points.Screenshots
No visual layout change. This changes when one-time top-up ends, not how the panel renders.