Skip to content

fix(computer): successful input fails with older Mac nodes - #137755

Merged
steipete merged 1 commit into
mainfrom
steipete/paired-receipts-46d1cd
Oct 21, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/paired-receipts-46d1cd

Conversation

@steipete

@steipete steipete commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes successful computer input being reported as a contract failure when a paired Mac returns cursor coordinates from an older app version.

User Impact

Successful receipts from independently updated older Macs are accepted. The receiver permits only the two known optional numeric fields; unrelated fields and invalid types remain rejected.

Why This Change Was Made

The closed schema at src/plugins/computer-use-contract.ts:338 omits cursorX and cursorY. The tool validates the receipt after dispatch at src/agents/tools/computer-tool-node.ts:586, so this error can follow input that already happened.

The released v2026.8.1 executor dispatches the action and then returns these coordinates. #134689 corrected newer producers but could not change already-installed companions. Adding the fields to the existing receiving schema restores that shipped contract without a second parser or a permissive fallback.

Evidence

  • Base 6544dd51f0ff64f8db6033de696aacd1e5c6628c: both object/JSON receipt regressions fail with COMPUTER_CONTRACT_MISMATCH after one dispatch; 37 existing tool tests pass. Vitest 119.02s, wrapper 152.51s. The runner stops after the failing tool shard, so no base schema-suite result is claimed.
  • Green: all 54 focused tests pass (39 production-tool cases and 15 schema/provider cases). Vitest 145.56s + 9.47s; repository wrapper included dependency/output verification. Targeted core oxlint, oxfmt, line-cap and diff checks pass. Independent isolated Codex review is scoped-clean through P2.
  • The regressions require the accepted receipt to reach the tool result even if its follow-up screenshot fails, and verify exactly one input invocation. Schema tests cover independently optional numeric fields and continued rejection of invalid/unknown fields.
  • Production +3/-0, tests +42/-0, docs +2/-0. Removed the stale patch's duplicate key/type matrix and duplicate malformed-receipt/no-start-marker checks.
  • No real older-companion action, live Gateway, or upgrade was run under this repair phase's bounded testing policy. The regression exercises the production tool/receiver using the released receipt shape; exact-head PR CI supplies broad proof.

Related: #135944 (receipt-validation portion only; lifecycle work is separate).

Current CI and review

Exact-head CI 39565050019 succeeded. The final CI gate and dependency review are green through publisher 39567611137. Fresh ClawSweeper review 39567309750 reviewed this head at 08:17 UTC with zero findings and no before-merge requirements; it keeps the disclosed older-companion live-proof gap as an optional follow-up. No merge was attempted.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Sep 4, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Accept optional numeric cursorX and cursorY fields in computer-action receipts while retaining strict validation.

Example: An older paired Mac returns {"ok":true,"cursorX":12.5,"cursorY":-4} after keyboard input.

  • Before: The input executes, but receipt validation raises COMPUTER_CONTRACT_MISMATCH.
  • After: The receipt is accepted and the successful result reaches the model.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, minimal repair with meaningful production-tool regressions and no findings; confidence remains limited by the absence of demonstrated older-companion execution.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the external-contributor proof gate; its production-tool regressions mock Gateway I/O, and the inspected images belong to the earlier producer repair. The current maintainer-authored body explicitly records bounded validation without a live older-companion run, so the previous native-proof rank-up remains optional.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: An older paired Mac can complete desktop input while the agent receives a contract error and may repeat the action.
Reason: The maintainer-approved repair restores a verified shipped receipt contract; Related wording correctly leaves the broader linked issue's lifecycle work separate.

Merge readiness

✅ Ready for maintainer review

Keep open: current main and v2026.10.5 still reject successful receipts from older Macs, and this PR provides a focused compatibility repair with no actionable correctness findings.

Priority: P1
Reviewed head: 15d9f273b4a573ca15b82d46449f0d6ec2dce512

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The repaired receiver has not been demonstrated through the shipped computer tool against an older Mac companion; the body reports red-base and green-head regressions.
Agent review details

How this fits together

The computer tool dispatches desktop actions through the Gateway to a paired node, then validates its receipt before returning the outcome to the model.

flowchart LR
  A[Model requests input] --> B[Computer tool]
  B --> C[Gateway dispatch]
  C --> D[Paired Mac executes input]
  D --> E[Shared receipt validator]
  E --> F[Tool result]
Loading

Technical review

Best possible solution:

Keep the existing strict receiving schema and admit only the two optional numeric fields emitted by shipped older companions.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: v2026.8.1 returns numeric cursor fields after dispatch, and current main rejects those fields after invocation; no runtime reproduction was executed during this read-only review.

Is this the best way to solve the issue?

The existing shared schema is the smallest complete fix: producer-only changes cannot update installed companions, and no second parser or permissive fallback is needed.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against aba2412fdb7b.

Provenance checked

  • Strict computer-action result envelope changes intended behavior with a stated reason (d19c755: Establish one bounded canonical v2 result envelope while preserving existing node actions and wire behavior.)
  • Canonical receipts from newer Mac producers changes intended behavior with a stated reason (fix(macos): computer input no longer fails after execution #134689: Remove obsolete cursor fields from newer native results while retaining strict receiver validation; this PR explains why independently updated older companions still require narrow receiving compatibility.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit e29a7aa adds src/plugins/computer-use-contract.ts:340 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e29a7aa579b7; files: src/plugins/computer-use-contract.ts)

PR surface

Source +3, Tests +42, Docs +2. Total +47 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 3 0 +3
Tests 2 42 0 +42
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 47 0 +47

Review metrics

Metric Value Why it matters
Production versus test growth Production +3/-0; tests +42/-0 Growth is justified by the shipped receipt contract, transport representations, and independent strict-validation boundaries.
Receipt contract 2 optional numeric fields; 0 new required fields Canonical receipts remain valid while older companion receipts become accepted.

Root-cause cluster

Relationship: partial_overlap
Canonical: #135944
Summary: This PR repairs the receipt-validation portion of the broader paired-Mac report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: The shared SDK-exported wire schema changes acceptance behavior; the maintainer explicitly accepts this additive repair for a verified shipped contract.

Label justifications:

  • P1: An established paired-Mac workflow can report failure after input executes, encouraging duplicate input.
  • merge-risk: 🚨 compatibility: The shared SDK-exported wire schema changes acceptance behavior; the maintainer explicitly accepts this additive repair for a verified shipped contract.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Optionally provide redacted output showing one input through the shipped computer tool against an older companion and successful acceptance of its numeric receipt.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-04T01:43:17.445Z sha 216ad84 :: blocked before merge. :: none
  • reviewed September 23, 2026, 2:52 AM ET / 06:52 UTC (Revision 2) sha unknown :: needs changes before merge. :: none
  • reviewed 2026-10-08T03:39:08.921Z sha 216ad84 :: blocked before merge. :: none

Reviewed October 21, 2026, 4:17 AM ET / 08:17 UTC (Revision 4).

steipete added a commit that referenced this pull request Sep 4, 2026
Bind native input and private references to the exact execution UUID and
original live Gateway route. Reuse the canonical invocation cancellation
registry; fence admission, drain work, release only owned input and retire
references before close completes. Wrong or stale closes cannot affect a
successor, and closing an unacquired execution does not fabricate release.

Make HTTP/RPC requests, CLI/MCP captures and Copilot attempts own the tools
they construct through final cleanup. Remove TTL-driven executable tool
recreation and unissued bearer/header authority. Retain cleanup across warm
CLI transfer; construct Copilot through the existing placement-bound host
surface. Keep returned output and cause diagnostics through the shared
result-finalization prerequisite.

Raw clients must reuse their execution UUID and close in finally. Gateway
and Mac companion must be upgraded together for this ownership repair.
No protocol version, schema, dependency, configuration or product timeout
change is introduced. CUA ownership remains separate.

Lifecycle-only split of #136049 (paired Mac cleanup and failure preservation),
related to #135944 (cleanup hides its cause). Depends on #137821 (CLI actions
replay after continuity failure); receipt compatibility is #137755 and
acknowledged worker outcomes are #137828. Already-landed Talk, Android and
sibling reroute changes are not repeated.

Validation: 2277 targeted tests across 75 files plus five doctor-gate tests;
39 checks for the exact 78 non-Swift integrated paths; full package build;
107 Mac owner tests and 1629 shared tests in the isolated Mac VM, no skips;
fresh isolated Codex autoreview, two complete chunks, P0 scoped-clean.
All 98 integrated source files match the tested/reviewed input. Real signed
companion/input proof remains pending; these are not live desktop claims.

Lifecycle-only production +577, tests +2389, test support +358, tooling +24,
docs +40, assertion ratchet -1. Growth supplies exact native-route and
request/capture/attempt lifetime ownership; old parallel lifetime paths
are removed rather than retained as compatibility shims.
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 23, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 8, 2026
@steipete
steipete force-pushed the steipete/paired-receipts-46d1cd branch from 216ad84 to 15d9f27 Compare October 21, 2026 07:52
@steipete
steipete marked this pull request as ready for review October 21, 2026 07:52
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment @clawsweeper review. Please avoid repeated requests while a review is queued or running; agents should not request reviews automatically.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T08:30:10.570616Z 15d9f27 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper clawsweeper Bot removed the clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. label Oct 21, 2026
@steipete
steipete merged commit 43bb344 into main Oct 21, 2026
202 of 205 checks passed
@steipete
steipete deleted the steipete/paired-receipts-46d1cd branch October 21, 2026 18:21
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
RomneyDa pushed a commit that referenced this pull request Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant