Skip to content

test: cover RuleLogic edge cases - #25

Merged
wized2 merged 1 commit into
wized2:betafrom
anubhavaanand:test/rulelogic-edge-cases
Nov 13, 2026
Merged

wized2 merged 1 commit into
wized2:betafrom
anubhavaanand:test/rulelogic-edge-cases

Conversation

@anubhavaanand

@anubhavaanand anubhavaanand commented Nov 11, 2026 •

Copy link
Copy Markdown

Summary

Adds the RuleLogic edge cases requested in #23:

  • SSID: blank pattern/current, case differences, quoted SSIDs, and leading/trailing spaces
  • Time window: start == end, windows ending at midnight, and 23:59 -> 00:00
  • Day mask: zero mask, all days set, and Sunday/Saturday boundaries
  • Battery: thresholds 0/100, first run with prevPercent = -1, and crossing both boundary thresholds

No production code changed, and no test exposed a production bug. start == end currently covers that single minute because the window bounds are inclusive; the test has a comment documenting that behavior. All 32 unit tests pass.

Target

  • beta (default)
  • main (stable hotfix only)

Checklist

  • PR targets beta unless hotfix
  • Tests for RuleLogic / pure helpers when applicable
  • No INTERNET / trackers added

Verification

./gradlew testStableDebugUnitTest
BUILD SUCCESSFUL — 32 tests, 0 failures

Closes #23.

Copilot AI balanced review requested due to automatic review settings November 11, 2026 17:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@anubhavaanand

Copy link
Copy Markdown
Author

The Build & Release workflow is sitting in action_required because this is my first PR here. Could you approve the run? Local ./gradlew testStableDebugUnitTest passes with 32 tests.

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