gate: a branch taken per operating system needs a test that injects one - #509
Conversation
Owner
Author
|
This pull request is part of a Mergify stack:
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5ede4904-9e80-419f-8b01-70487cd603c6) |
This was referenced Sep 12, 2026
A guard's screen-lock and idle probes returned early on anything but macOS. The suite was green on a Mac and red on Linux CI with "unexpectedly None", because the branch under test only ever ran on the author's machine. The coverage gate now asks any detector that reads sys.platform for a test that passes a platform in. Backtested against the tests as first written: fires. Against the fixed ones: silent. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KU2pPKob4MJ1NqjsfTNyYJ Change-Id: I0ebec990b0153ad5e64e4725cbe045d4cd428ed4
EdbertChan
force-pushed
the
stack/EdbertChan/reflect/ui-input-guard-hook-freshness-20260908/refuse-quoted-cmd-string-passed-login-shell--acc7d623
branch
from
September 13, 2026 05:55
d76e1e5 to
7d7ef8b
Compare
EdbertChan
force-pushed
the
stack/EdbertChan/reflect/ui-input-guard-hook-freshness-20260908/branch-taken-per-operating-system-needs-test--0ebec990
branch
from
September 13, 2026 05:55
1ec58f5 to
c17c8d3
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_80a80e17-fd28-4b60-9c0a-d5be721a00fc) |
Owner
Author
Revision history
|
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
This check helps maintainers trust that hook checks cover the paths their tools may take.
Checks passed on one computer but failed in Linux automation.
The check did not require a chosen operating system.
It now requires each check to supply that choice, so both paths are exercised.
Review Claim
Require operating-system branches to be tested with an explicit operating-system choice.
Review Lane
behavior
Review Unit
engine-runtime
Safety Invariant
Only test-coverage detection changes; runtime hooks and detectors keep their existing behavior.
Slice Rationale
This slice adds the missing coverage rule and its focused tests. It stays separate from runtime hook changes because none are included.
Non-goals
Test Plan
Test Plan
python3 -m unittest tests/test_check_hook_test_coverage.pyThe focused tests cover a missing platform injection, a supplied platform injection, and a detector without an operating-system branch. Backtested against the tests as first written: fires. Against the fixed ones: silent.
Depends-On: #508
Revert Plan
Revert Plan
git revert <sha>or equivalent.Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01KU2pPKob4MJ1NqjsfTNyYJ