feat(registry): filesystem native-parity — stat mode bits, chmod, access#264
Open
NathanFlurry wants to merge 1 commit into
Open
feat(registry): filesystem native-parity — stat mode bits, chmod, access#264NathanFlurry wants to merge 1 commit into
NathanFlurry wants to merge 1 commit into
Conversation
Teach the VM's filesystem layer POSIX permission semantics so native C tools (vim, coreutils) behave like Linux: - wasi-libc patch exposes host permission bits through new host_fs.fd_mode / path_mode imports so stat/fstat/lstat return real mode bits (0644/0755) - chmod/fchmod implemented via the host_fs bridge (previously ENOSYS) - access() reflects the mode's rwx bits (X_OK no longer always succeeds) - truncate/ftruncate update the size stat reports; fd metadata stays coherent - fixes an intermittent EFAULT on create/write under wasm heap growth This fixes vim opening every file readonly and 'touch: Bad address', with a comprehensive fs_probe.c that is diffed 1:1 against native Linux.
|
🚅 Environment secure-exec-pr-264 in rivet-frontend has no services deployed. 🚅 Deployed to the secure-exec-pr-264 environment in secure-exec
|
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.
host_fs.fd_mode/path_modeimports sostat/fstat/lstatreturn real Unix mode bits (0644/0755) instead of zero — this is what made vim open every file readonlychmod/fchmodimplemented via thehost_fsbridge (previouslyENOSYS)access()reflects the mode's rwx bits (X_OKno longer always succeeds)truncate/ftruncateupdate the sizestatreports; fd metadata stays coherent with path metadataEFAULT("Bad address") on file create/write under wasm heap growth (thetouch/:wfailures)fs_probe.c, a comprehensive filesystem edge-case probe diffed 1:1 against native Linux (paired with a vitest guard in agentos)Verified in real
just shell: vim opens writable,:wwrites,touchsucceeds; the native-parity test passes.