fix: separate screen capture and accessibility ownership - #722
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
PR SummaryMedium Risk Overview Bridge observation binding no longer treats Adds signed-bundle tests for valid screen+AX combinations and for rejected invalid owners. Reviewed by Cursor Bugbot for commit f04602e. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 7:19 PM ET / 23:19 UTC. ClawSweeper reviewWhat this changesThe PR separately validates the Accessibility application's identity in screen observations, adds signed-receipt regression tests, and documents the distinction between screen pixels and window authority. Merge readiness✅ Ready for maintainer review This fix remains necessary: current main and v4.3.4 still reject valid screen Accessibility evidence. No actionable patch defect was found. The related reports also contain separate problems that this PR appropriately leaves unresolved. Priority: P1 Review scores
Verification
How this fits togetherPeekaboo's Bridge validates desktop observations returned by a macOS host to a CLI client. Screen observations combine display pixels with Accessibility metadata, which must retain its own application identity without granting window-specific authority to the screenshot. flowchart TD
A[CLI screen observation] --> B[Mac host capture]
B --> C[Display pixels]
B --> D[Accessibility metadata]
C --> E[Screen target validation]
D --> F[Semantic owner validation]
E --> G[Verified observation]
F --> G
G --> H[Client and snapshot consumers]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep screen pixels display-scoped while accepting independently validated Accessibility ownership through the existing canonical identity rules. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the failure: host-routed screen capture with Accessibility detection returns an application PID that current main rejects; --no-elements avoids that evidence. This review did not execute native capture. Is this the best way to solve the issue? Yes. The patch repairs the screen-only validator using the existing identity coalescer, preserves exact-window safeguards, and avoids changing capture engines or routing policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3b6ea75b0002. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: separate screen capture and accessibility ownership This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Host-routed screen captures with Accessibility detection were rejected because the Bridge validator treated the AX application's identity as if it were the screen raster's target. Pixels-only capture worked; adding AX metadata produced the reported “unexpected application evidence” refusal.
Keep screen pixels globally scoped and validate the AX context as separate semantic evidence. Reuse the canonical process-generation/window-receipt validator, and independently check focused-element PID, window, role, and frame when no exact-window receipt is present. The capture target still rejects application/window claims, and unreceipted AX window hints never become exact-window pixel authority.
Addresses the attribution portions of #715 and #710. Premature artifact publication on rejected observations is separate work; this PR does not claim to fix it. ScreenCaptureKit coordination and fallback policies are unchanged.
Validation:
swift test --package-path Core/PeekabooCore --scratch-path Apps/CLI/.build --filter 'PeekabooBridge.*Observation|RemoteDesktopObservation': 51 + 7 tests passed. New signed-bundle cases accept valid independent semantic ownership and reject missing generations, wrong receipt owners/bounds, and contradictory focused-element metadata.Unreleased.