[codex] Fix TypeScript computer test contract and reconnect#1502
[codex] Fix TypeScript computer test contract and reconnect#1502iqdoctor wants to merge 1 commit into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes trycua#1501 by preserving the current file transport contract, making reconnect wait for the recreated WebSocket to open, and preventing failed/closed sockets from scheduling uncontrolled background retries. Constraint: TypeScript readText/writeText already mirror the Python generic interface by encoding text through readBytes/writeBytes for chunking, offset, and append support. Rejected: Switching TS readText/writeText back to direct read_text/write_text transport | would diverge from the existing Python generic implementation and lose shared byte-path behavior. Rejected: Leaving close-triggered reconnect unconditional | failed initial connects can leak retry timers after caller disconnects. Confidence: high Scope-risk: narrow Directive: Keep file API tests focused on public method behavior plus the transport defaults actually sent by the implementation; keep WebSocket reconnect ownership explicit. Tested: pnpm --filter @trycua/computer exec vitest run tests/interface/macos.test.ts; pnpm --filter @trycua/computer test --run; pnpm --filter @trycua/computer typecheck; pnpm --filter @trycua/core test --run; pnpm --filter @trycua/agent test --run; pnpm build; pnpm exec prettier --check computer/src/interface/base.ts computer/tests/interface/macos.test.ts; pnpm -r typecheck Not-tested: pnpm -r test, because @trycua/playground has no test files and exits nonzero.
6dc7387 to
fa391b8
Compare
|
@iqdoctor is attempting to deploy a commit to the Cua Team on Vercel. A member of the Team first needs to authorize it. |
Summary
BaseComputerInterface.connect()so reconnect after a closed socket waits for the recreated WebSocket to open before sending commandsdisconnect()MacOSComputerInterfacetests to assert the current byte-transport file contract used by TS and Python generic interfacesoffset: 0andappend: falsetransport parametersCloses #1501.
Validation
Not run:
pnpm -r test, because@trycua/playgroundhas no test files and exits nonzero.Replacement for #1500, recreated via local
ghasiqdoctor.