Treat partial UDS writes as TransportAmbiguous - #47
Merged
Merged
Conversation
write_frame I/O after poll_write may have put bytes on the socket, so exec must keep the workspace lease. Encode and !alive stay BeforeDispatch. --runner is a ValueEnum so unknown values are rejected instead of silently using in-process. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Follow-up to #46. Remaining P0 correctness: a partial UDS frame write must not be classified as
TransportBeforeDispatch, and--runnermust not silently fall back to in-process.Summary
UdsRunner::callnow probes whetherwrite_framereached socket I/O. Encode or!alivestaysTransportBeforeDispatch. Anywrite_all/flusherror afterpoll_writeisTransportAmbiguousand closes the torn connection so exec keeps the workspace lease.--runner/CODESPACE_RUNNERis a clapValueEnum(in-process|uds); unknown values are rejected.Contract changes
None. MCP tool schemas,
ErrorCode, andLIVE_TOOLSare unchanged.Tests
cargo fmt --allcargo check --offline --all-targetscargo clippy --offline --all-targets -- -D warningspython3 -B scripts/check_docs.py(operations hashes recorded)cargo testcould not run here: linking failed with Xcode license (ccexit 69). New tests compile under clippy--all-targets.Security scenarios
A write that may have reached the worker is no longer mapped to
BeforeDispatch, soexec_commanddoes notrelease_process()while the worker might still be running. Unknown--runnervalues (udss,container) fail closed instead of running in-process.Out of scope
PTY /
process_resize, linux-sandbox, network, reconnect, approval. This PR is not merged; #46 is already onmain.