Add decoding regression coverage for all idle-detector readers - #89
Open
Marsu6996 wants to merge 1 commit into
Open
Add decoding regression coverage for all idle-detector readers#89Marsu6996 wants to merge 1 commit into
Marsu6996 wants to merge 1 commit into
Conversation
Owner
|
#88 is merged — thanks. This one collided. The same fix went out in v2.6.1 a few minutes ago; it was written and gate-tested before your PR opened, and you had no way to see it — our work happens in a private tree first. Ours routes all four readers through one lenient-decoding helper, including the Linux Your tests are better than what shipped, though. Ours assert end behaviour; your fake |
Marsu6996
force-pushed
the
fix/pmset-unicode-decode
branch
from
July 26, 2026 05:02
79dab27 to
1d231d1
Compare
Marsu6996
marked this pull request as ready for review
July 26, 2026 06:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Repointed against current
mainas requested after the production fix shipped in v2.6.1. This PR now contains regression coverage only; it makes no production-code changes.The shared lenient-decoding helper serves four system readers. The test coverage now exercises all four paths:
ioregHID idle output (existing invalid-UTF-8 test retained);pmset -g log, strengthened so the invalid byte occurs inside an otherwise valid sleep-event line;pmset -gresponsiveness output;busctlJSON output.This is regression coverage for #86.
Type of change
Affected areas
Testing
pytestpasses locallyruff check src/ tests/cleanTargeted validation:
pytest -q tests/test_idle_detector.py: 37 passedruff check tests/test_idle_detector.py: passedgit diff --check: passedFull local suite:
Both failures are checkout-environment mismatches unrelated to this test-only diff:
maindeclares 2.6.1;The pull-request CI will validate the branch in a clean environment. The repository-wide Ruff baseline is not currently clean; the touched file introduces no Ruff diagnostics.
Benchmarks
Not applicable: this PR changes tests only.
Notes for reviewers
The previous implementation change has been removed because v2.6.1 already ships the shared
_run_capturedfix. The branch is rebased onto currentmainand now preserves only the stronger regression coverage requested in review.