Skip to content

Fix the low-battery flap tests for the four-argument shouldWarnLowBattery - #19689

Merged
dhh merged 1 commit into
quattrofrom
fix-battery-flap-test
Nov 21, 2026
Merged

dhh merged 1 commit into
quattrofrom
fix-battery-flap-test

Conversation

@dhh

@dhh dhh commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

battery-test.sh fails on quattro, so every PR's Tests check is red. #11161 removed UPower's onBattery from shouldWarnLowBattery, which now reads the battery's own state, and #19293, merged after it, added tests that still pass onBattery. Every argument lands one slot over, so "battery warns only once across AC flaps while low" counts no warnings.

The model is right; only the tests change. Plugging in and out now shows as the battery's state, so the flap test alternates it between discharging and charging, and the other three new assertions drop the extra argument. The flap test still fails on the model from before #19293, so it keeps guarding that fix.

🤖 Generated with Claude Code

…tery

#19293 added tests that still passed UPower's onBattery, which #11161 had
already removed from shouldWarnLowBattery, so every argument landed one slot
over and the AC-flap test failed. Plugging in and out now shows as the
battery's own state, so the flap test alternates it between discharging and
charging. The test still fails on the model from before #19293.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the corrected tests match the model and preserve the repeated-warning check.

Summary

Fixes the battery tests to match the four-argument shouldWarnLowBattery.

  • Battery warning tests use the model’s four inputs.

Reviews (1) · Last reviewed commit: "Fix the low-battery flap tests for the f..." · Reviewed by Greptile

@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 in Codex (effort not exposed to this session) checked the diff against BatteryModel.js and its Service.qml caller; the changed calls match the four-argument interface. I classified this as a bug fix, but the configured second classifier, deepseek-v4p1-flash, returned no usable class, so classification remains unsettled. Tests were not run and no verification labels were added. This waits for classification before worker verification.

@dhh
dhh merged commit efcf615 into quattro Nov 21, 2026
2 checks passed
@dhh
dhh deleted the fix-battery-flap-test branch November 21, 2026 18:31
@emirb emirb added this to the 4.6.0 milestone Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants