test(daemon): pin that sessionless screenshot refusals never capture
TH
5h ago+20+20+01234567890123456789-6-6-0123456789
Summary
Follow-up to the last review thread on #4289. The two sessionless screenshot tests checked only the refusal shape, so a regression that captured before refusing would still pass. Both tests now keep the runtime fixture and assert that captureScreenshot never ran. Both tests seed the inventory with one matching device, so a capture would have a device to run on, and assert that nothing was bound.
1 file changed. Test-only, so no device run is needed.
Validation
pnpm vitest run packages/daemon/src/server/__tests__/request-router-screenshot.test.ts -t sessionless: 2 of 2 pass.- Gate:
pnpm check:affected --run --head 70122cdpassed,exactCommit=true(receiptrun-pg79WO). - Mutation check (local, not committed): in
dispatchGenericForLockedScope, binding a hand-built Android device and callingcaptureScreenshotbefore the refusal makes both tests fail oncaptureScreenshotnot.toHaveBeenCalled.
🤖 Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.