feat(python): complete the Pyodide FS backend — symlink/readlink + setattr→host#141
Closed
NathanFlurry wants to merge 1 commit into
Closed
feat(python): complete the Pyodide FS backend — symlink/readlink + setattr→host#141NathanFlurry wants to merge 1 commit into
NathanFlurry wants to merge 1 commit into
Conversation
…tattr->host (chmod/chown/utimes)
|
🚅 Deployed to the secure-exec-pr-141 environment in rivet-frontend
🚅 Deployed to the secure-exec-pr-141 environment in secure-exec
|
Member
Author
|
Superseded by #142 (combined with the sockets work). |
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.
Closes the remaining gaps in the Pyodide custom Emscripten FS backend so it implements every node_op / stream_op the FS layer can dispatch (verified against the authoritative MEMFS
ops_tablein current emscriptenmain).Before this PR
symlink(dir node) was anENOSYSstub —os.symlink()failedreadlink(link node) was missing — host symlinks weren't representable,os.readlink()unwiredsetattrupdated the in-isolate node only —os.chmod/os.chown/os.utimenever reached the host VFS(
allocate/statfs/fsync/pollare not hooks the current FS layer dispatches — confirmed against emscripten source — so they're correctly absent.)Changes
fsSymlink/fsReadlink/fsSetattr(+target/mode/uid/gid/atimeMs/mtimeMswire fields and aSymlinkTargetresponse payload). JS numbers cross the bridge asf64, so the wire fields aref64and narrowed.kernel.symlink/read_link/chmod+chown+utimes. Kernel-direct, no shadow mirror — guest Python writes/creates live only in the kernel VFS, so mirroring create/modify ops into the host-side shadow would leave empty stubs that a later shadow→kernel sync resurrects over real content. (Delete/rename still mirror, to remove stale wire-written entries.)symlink/readlinknode ops + a link-node ops table,createWorkspaceNodenow routes symlink-mode nodes, andsetattrpropagates mode/uid/gid/atime/mtime to the host.Test
python_runtime_supports_symlink_readlink_and_metadata:os.symlink+os.readlink(in-process and host cross-check),os.path.islink,os.chmod(reflected on the host VFS),os.utime. Fullpython_suitestays green (caught + fixed a content-resurrection regression from the initial shadow-mirroring approach).🤖 Generated with Claude Code