test(daemon): pin that sessionless screenshot refusals never capture

TH
5h ago
+20-6

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 70122cd passed, exactCommit=true (receipt run-pg79WO).
  • Mutation check (local, not committed): in dispatchGenericForLockedScope, binding a hand-built Android device and calling captureScreenshot before the refusal makes both tests fail on captureScreenshot not.toHaveBeenCalled.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.