Finalize filesystem error semantics - #52
Merged
Merged
Conversation
PATH_ESCAPE is workspace-scope escape only; the new error vocabulary bumps WIRE_PROTOCOL to 3. Co-authored-by: Cursor <cursoragent@cursor.com>
Route find canonicalize through fs_error_body, assert FILE_OPERATION_FAILED on UDS and MCP, and treat PATH_ESCAPE as a containment violation. 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.
Summary
codespace-fsFsError1:1 onto product codes:FILE_NOT_FOUND,PATH_NOT_DIRECTORY,FILE_OPERATION_FAILED, plus existingSYMLINK_REJECTED/SPECIAL_FILE_REJECTED. Runner owns a singlefs_error_bodytranslator (includingfindroot canonicalize); rollback no longer sends filesystem I/O asINVALID_PATCH.PATH_ESCAPEis a workspace/path containment violation: a../or absolute request, or afindwalk result outsideworkspace.root.FILE_OPERATION_FAILEDmeans containment held and the operation itself failed.WIRE_PROTOCOL2 → 3 becauseErrorBodyproduct codes travel on that JSON. Handshake mismatch remains before-dispatch.ENOTDIR/ escape / symlink / fifo / genericIoon runner, MCPread/find, and UDS. MCP fifo assertsSPECIAL_FILE_REJECTEDonly. Deleted-rootfindassertsFILE_OPERATION_FAILEDon runner, UDS, and MCP. No new I/O, sandbox, or MCP tool names.Reference note
O_NOFOLLOW+fchmodresolution/limitation:.github/notes/pr51-linux-chmod-blocker.mdTest plan
cargo fmtcargo clippy --offline --all-targets -- -D warningscargo test --offline -p codespace-runner(includingfind_on_deleted_rootand UDSuds_find_on_deleted_root_is_file_operation_failed)cargo test --offline -p codespace-server --test read_find --test security(FIFO exactSPECIAL_FILE_REJECTED; MCPfindon deleted root isFILE_OPERATION_FAILED)./scripts/check-no-model-deps.shpython3 -B scripts/check_docs.py