fix(imessage): handle rpc stdin write errors#75473
fix(imessage): handle rpc stdin write errors#75473addu2612 wants to merge 1 commit intoopenclaw:mainfrom
Conversation
f1c46a0 to
e4afcc7
Compare
|
Thanks for the context here. I did a careful shell check against current Close as implemented on current main. The iMessage RPC client now has both sides of the requested stdin failure handling: a stream error listener for async EPIPE and a write callback that rejects the pending request, with changelog coverage for the linked crash report; the proof commit is on main and not in the latest shipped release yet. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the current main implementation and close this PR as redundant. If maintainers still want the exact extra iMessage regression test from the branch, that should be a small follow-up on top of main rather than merging an already-implemented duplicate patch. Do we have a high-confidence way to reproduce the issue? Yes. The reproduction path is a closed or errored Is this the best way to solve the issue? Yes for the underlying issue. Handling this in the iMessage-owned RPC client is the narrowest maintainable fix, and adjacent generic stdin write sites were handled separately in the merged #75602 work. Security review: Security review cleared: The PR diff only changes the iMessage client, adds a focused test, and updates the changelog; it does not alter dependencies, CI, packaging, secrets, or downloaded code paths. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 0bb52118e6c8; fix evidence: commit 5c7362fe9d69, main fix timestamp 2026-05-01T21:08:43Z. |
e4afcc7 to
cd2d66f
Compare
Summary
Fixes #75438.
This adds local stdin failure handling for the iMessage RPC client so broken pipe errors reject the affected request instead of escaping through the process-level uncaught exception path.
Changes:
errorlistener to theimsg rpcstdin stream and fail pending requests when the pipe breaksstdin.write()reports an error through its callbackVerification
pnpm exec vitest run extensions/imessage/src/client.stdin-write-error.test.ts extensions/imessage/src/status.test.ts extensions/imessage/src/monitor.watch-subscribe-retry.test.tspnpm exec vitest run extensions/codex/src/app-server/client.test.ts src/infra/unhandled-rejections.test.tspnpm exec oxfmt --check --threads=1 extensions/imessage/src/client.ts extensions/imessage/src/client.stdin-write-error.test.ts CHANGELOG.mdpnpm exec oxlint extensions/imessage/src/client.ts extensions/imessage/src/client.stdin-write-error.test.ts extensions/imessage/src/status.test.ts