fix(tests): make screenshot expectations platform-aware#8183
Merged
singlerider merged 1 commit intoJun 23, 2026
Merged
Conversation
singlerider
approved these changes
Jun 22, 2026
singlerider
left a comment
Collaborator
There was a problem hiding this comment.
I checked the test gating against the screenshot_command implementation.
🟢 What looks good: the cfg gates mirror the production branches exactly
screenshot_command returns Some only for target_os = "macos" and target_os = "linux", and None otherwise. The existing test now carries #[cfg(any(target_os = "macos", target_os = "linux"))] and the new test carries the exact negation, asserting None. The test coverage tracks the real platform branches with no gap and no overlap, so the suite stays meaningful on Windows and other targets instead of failing on an assumption that only holds on two platforms.
Test-only change, CI green, no outstanding reviews.
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
master(all contributions)ScreenshotTool::screenshot_command(...)returns a supported command.screenshot_command(...)to returnNone.Noneeven though screenshots are not currently supported there.zeroclaw-toolsscreenshot coverage. Runtime behavior is unchanged.bug,risk: high,size: XS,tool,tool:browserValidation Evidence (required)
crates/zeroclaw-tools/src/screenshot.rsand that the new unsupported-platform expectation matches the existingscreenshot_commandimplementation.zeroclaw-toolstest and clippy coverage exercise the touched module.Security & Privacy Impact (required)
NoNoNoNoYes, describe the risk and mitigation:N/ACompatibility (required)
YesNoNoorYesto either:N/ARollback (required for
risk: mediumandrisk: high)git revert <merge-sha>Supersede Attribution (required only when
Supersedes #is used)#<pr> by @<author>, one per line):N/AN/ACo-authored-bytrailers added in commit messages for incorporated contributors?NoNo, why (inspiration-only, no direct code/design carry-over): No superseded PR or contributor-authored code is carried forward.