Repository navigation
fix(macos): computer input no longer fails after execution - #134689
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
This comment was marked as spam.
This comment was marked as spam.
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 10:41 PM ET / September 2, 2026, 02:41 UTC. ClawSweeper reviewWhat this changesThe PR removes obsolete cursor coordinates from successful macOS computer-input results, adds canonical wire-envelope assertions, and corrects a CLI startup-respawn test fixture. Merge readinessKeep this PR open for normal completion: current main and stable v2026.8.2 retain the producer/consumer mismatch, while the introduced producer-side repair is the correct boundary and has no actionable review finding. Priority: P1 Review scores
Verification
How this fits togetherThe macOS app executes computer-control actions and serializes their results through the node bridge to the built-in computer tool. The Gateway validates that result against a strict shared schema before presenting success or failure to the agent. flowchart LR
A[Agent computer request] --> B[Gateway computer tool]
B --> C[macOS node bridge]
C --> D[Screen action executor]
D --> E[Shared action result]
E --> F[Strict result validator]
F --> G[Agent-visible outcome]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +10, Other -20. Total -10 across 8 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the producer-side canonical result after exact-head CI is green; keep the strict TypeScript validator rather than weakening or filtering the wire contract downstream. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the released and current-main screen executor emits cursor fields after input, and the strict shared validator rejects those additional fields. This read-only review did not execute contributor-controlled source. Is this the best way to solve the issue? Yes: removing the obsolete producer fields restores the established canonical envelope at its owner while preserving strict validation and keeping legitimate cursor reporting in the existing details-based window action. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b38233ee75c0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
Keep the native bridge assertion focused and exercise both canonical success and obsolete cursor-field rejection at the real TypeScript contract boundary. Preserve the contributor producer repair and the strict consumer. Signed native screen input and actual decoder before/after proof, shared Swift coverage, pinned formatting, and an independent full seven-file review cover the exact final candidate. The full paired Gateway and packaged native suite were not run. Co-authored-by: gaoanze <[email protected]>
|
@clawsweeper re-review The current head removes the obsolete native cursor fields and returns the existing strict success envelope. The PR body includes signed native screen-input proof, matching synthetic before/after captures, unchanged stable decoder compatibility, and the explicit paired-Gateway limitation. Production delta: -16 lines. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Gateway status intentionally skips warning-only respawn. Invoke gateway call without its required method so the fixture follows normal startup respawn and exits before any Gateway RPC. Preserve the startup trace assertion, case count and time limits. The changed case passes on macOS and Linux and the full changed-file gate passes. The original CI help-trace timeout remains unresolved. Preserve the macOS producer repair and its contributor credit. Co-authored-by: gaoanze <[email protected]>
|
Merged via squash.
|
Bind native Peekaboo input and references to the exact execution and live Gateway route. Fence admission, drain operations, release owned input, and invalidate references before completing managed cleanup. Carry tool lifetime ownership through Copilot, HTTP/RPC requests, and CLI/MCP captures. Preserve state across metadata expiry and node inventory changes; await cleanup before settlement and warm-process handoff. Retain nested and acknowledged cleanup failures without losing original errors, cancellation, delivery facts, or prior output. Record terminal replay denial for failed owned cleanup, including frozen thrown errors. Keep the narrow numeric cursor receipt contract for older paired nodes. Use the canonical host constructor and public test loader, preserve Code Mode control identity, remove obsolete test scaffolding and duplicate metadata copies, and shrink the assertion baseline. Keep supervisor v6, worker-result JSON, configuration, dependencies, and storage unchanged. Fixes #135944. Ref #136049. Complements #134689 by @gaoanze888; its native producer repair is retained.
Bind native Peekaboo input and references to the exact execution and live Gateway route. Fence admission, drain operations, release owned input, and invalidate references before completing managed cleanup. Carry tool lifetime ownership through Copilot, HTTP/RPC requests, and CLI/MCP captures. Preserve state across metadata expiry and node inventory changes; await cleanup before settlement and warm-process handoff. Retain nested and acknowledged cleanup failures without losing original errors, cancellation, delivery facts, or prior output. Record terminal replay denial for failed owned cleanup, including frozen thrown errors. Keep the narrow numeric cursor receipt contract for older paired nodes. Use the canonical host constructor and public test loader, preserve Code Mode control identity, remove obsolete test scaffolding and duplicate metadata copies, and shrink the assertion baseline. Keep supervisor v6, worker-result JSON, configuration, dependencies, and storage unchanged. Fixes #135944. Ref #136049. Complements #134689 by @gaoanze888; its native producer repair is retained.
Bind native Peekaboo input and references to the exact execution and live Gateway route. Fence admission, drain operations, release owned input, and invalidate references before completing managed cleanup. Carry tool lifetime ownership through Copilot, HTTP/RPC requests, and CLI/MCP captures. Preserve state across metadata expiry and node inventory changes; await cleanup before settlement and warm-process handoff. Retain nested and acknowledged cleanup failures without losing original errors, cancellation, delivery facts, or prior output. Record terminal replay denial for failed owned cleanup, including frozen thrown errors. Keep the narrow numeric cursor receipt contract for older paired nodes. Use the canonical host constructor and public test loader, preserve Code Mode control identity, remove obsolete test scaffolding and duplicate metadata copies, and shrink the assertion baseline. Keep supervisor v6, worker-result JSON, configuration, dependencies, and storage unchanged. Fixes #135944. Ref #136049. Complements #134689 by @gaoanze888; its native producer repair is retained.
Bind native Peekaboo input and references to the exact execution and live Gateway route. Fence admission, drain operations, release owned input, and invalidate references before completing managed cleanup. Carry tool lifetime ownership through Copilot, HTTP/RPC requests, and CLI/MCP captures. Preserve state across metadata expiry and node inventory changes; await cleanup before settlement and warm-process handoff. Retain nested and acknowledged cleanup failures without losing original errors, cancellation, delivery facts, or prior output. Record terminal replay denial for failed owned cleanup, including frozen thrown errors. Keep the narrow numeric cursor receipt contract for older paired nodes. Use the canonical host constructor and public test loader, preserve Code Mode control identity, remove obsolete test scaffolding and duplicate metadata copies, and shrink the assertion baseline. Keep supervisor v6, worker-result JSON, configuration, dependencies, and storage unchanged. Fixes #135944. Ref #136049. Complements #134689 by @gaoanze888; its native producer repair is retained.
Bind native Peekaboo input and references to the exact execution and live Gateway route. Fence admission, drain operations, release owned input, and invalidate references before completing managed cleanup. Carry tool lifetime ownership through Copilot, HTTP/RPC requests, and CLI/MCP captures. Preserve state across metadata expiry and node inventory changes; await cleanup before settlement and warm-process handoff. Retain nested and acknowledged cleanup failures without losing original errors, cancellation, delivery facts, or prior output. Record terminal replay denial for failed owned cleanup, including frozen thrown errors. Keep the narrow numeric cursor receipt contract for older paired nodes. Use the canonical host constructor and public test loader, preserve Code Mode control identity, remove obsolete test scaffolding and duplicate metadata copies, and shrink the assertion baseline. Keep supervisor v6, worker-result JSON, configuration, dependencies, and storage unchanged. Fixes #135944. Ref #136049. Complements #134689 by @gaoanze888; its native producer repair is retained.
Bind native Peekaboo input and references to the exact execution and live Gateway route. Fence admission, drain operations, release owned input, and invalidate references before completing managed cleanup. Carry tool lifetime ownership through Copilot, HTTP/RPC requests, and CLI/MCP captures. Preserve state across metadata expiry and node inventory changes; await cleanup before settlement and warm-process handoff. Retain nested and acknowledged cleanup failures without losing original errors, cancellation, delivery facts, or prior output. Record terminal replay denial for failed owned cleanup, including frozen thrown errors. Keep the narrow numeric cursor receipt contract for older paired nodes. Use the canonical host constructor and public test loader, preserve Code Mode control identity, remove obsolete test scaffolding and duplicate metadata copies, and shrink the assertion baseline. Keep supervisor v6, worker-result JSON, configuration, dependencies, and storage unchanged. Fixes #135944. Ref #136049. Complements #134689 by @gaoanze888; its native producer repair is retained.
…134689) * fix(macos): emit canonical computer action results * test(macos): verify canonical computer action replies Keep the native bridge assertion focused and exercise both canonical success and obsolete cursor-field rejection at the real TypeScript contract boundary. Preserve the contributor producer repair and the strict consumer. Signed native screen input and actual decoder before/after proof, shared Swift coverage, pinned formatting, and an independent full seven-file review cover the exact final candidate. The full paired Gateway and packaged native suite were not run. Co-authored-by: gaoanze <[email protected]> * test(cli): exercise startup respawn before argument validation Gateway status intentionally skips warning-only respawn. Invoke gateway call without its required method so the fixture follows normal startup respawn and exits before any Gateway RPC. Preserve the startup trace assertion, case count and time limits. The changed case passes on macOS and Linux and the full changed-file gate passes. The original CI help-trace timeout remains unresolved. Preserve the macOS producer repair and its contributor credit. Co-authored-by: gaoanze <[email protected]> --------- Co-authored-by: gaoanze <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
A macOS screen input action could succeed on the desktop and then report
COMPUTER_CONTRACT_MISMATCH. The native result included obsolete cursor fields that the strictcomputer.actconsumer rejects, so retrying the apparent failure could repeat the input.Why This Change Was Made
Return the existing canonical success envelope and remove the obsolete cursor fields/initializer from the native result owner. Native bridge and serialization assertions use that same contract. The shared validator stays strict, and window-action effect, observation, escalation and details fields retain their existing behavior. Production code shrinks by 16 lines.
The first stable release containing this computer-action surface,
v2026.8.1(ea806575e6450e4d1efdfc72c19f04be982a1b9b), already made the Swift cursor fields optional while its TypeScript result schema rejected additional keys. Compiling the unchanged stable Swift decoder against the candidate{"ok":true}result succeeds with both optional cursor values absent. The earlier v1 byte-stability comment concerns the pre-stable shape; this repair retains the working stable wire contract. This evidence does not claim source compatibility for unknown third-party Swift initializer callers.User Impact
Successful screen input returns
{"ok":true}to the existing consumer. Input permissions, lifecycle revalidation, provider selection and failure handling retain their existing behavior.Evidence
A signed isolated macOS fixture ran the actual screen executor, pinned Peekaboo dependency and shared Swift serializer against a synthetic AppKit window. Its produced JSON was then passed through the actual TypeScript strict decoder:
{"ok":true}results accepted.This proves the changed screen-executor and result boundary. It does not claim a full paired Gateway or packaged-app run. The existing background-window live rig exercises another executor, so it would not demonstrate this reported screen-input failure. This limitation explicitly addresses the broader paired-flow request in the previous ClawSweeper review.
All 11 TypeScript contract tests and 18 shared Swift geometry/serialization tests passed. Pinned SwiftFormat checked all six touched Swift files, and independent P0 review found no actionable issues. Exact final-head hosted CI remains pending the maintainer publication cycle. Thanks @gaoanze888 for the producer-contract repair.
Fixes #134621
Before: input reached the synthetic window once, but the returned cursor fields made the strict consumer reject success.
After: the same desktop effect occurs once and the canonical
{"ok":true}result is accepted. The matching screenshots are expected; the decoder verdicts above establish the repaired result behavior.The same PR also corrects a stale CLI startup-respawn test:
gateway statusintentionally skips warning-only respawn, so the fixture now invokesgateway callwithout its required method and expects argument-validation exit 1. This exercises normal startup respawn without a Gateway RPC and retains the existing trace assertion and deadlines. It changes tests only (+4/-1). The changed case passed on macOS and Linux, the complete changed-file gate passed, and the combined eight-file P0 review found no actionable issue.This fixture change does not claim to fix the separate 100-second CI help-trace timeout. The macOS candidate whole-file run had 24 passing tests and two unrelated model-list child timeouts. Fixture execution proof used a newer trusted-main CLI cleanup implementation than this branch; final exact-head hosted CI remains required.