Add the file access protocol, Linux file service and client - #340
Merged
Merged
Conversation
SaladDay
force-pushed
the
aos/file-protocol
branch
from
October 1, 2026 00:16
9ce0af9 to
6c92fbf
Compare
internal/sandboxfs defines the Runtime–file service protocol on sandboxwire framing: node and handle operations shaped like FUSE, typed failures with effects, capabilities with admission, golden fixtures, a decoder fuzz target and a generic client and server. Request IDs follow sandboxwire.RequestSequence. Describe reports the service identity, and Attach is limited to the Link export grants. apps/sandboxio/internal/fileservice implements it on Linux. It serves the one export world from a root the caller isolates, keys nodes by mount ID, device and inode, keeps symlinks and proc magic links opaque, and provides handles that survive unlink, atomic append, renameat2 modes, getdents cookies, flock that interoperates with native processes and incarnation checks. Add docs/file-access-protocol.md and its AGENTS.md and development.md rows.
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.
Adds the Runtime–file service protocol: the agent host uses it to read and write the sandbox file system. The protocol is FUSE-shaped and handle-based, and phase 1 is the Uncached profile.
internal/sandboxfs/protocol.godefines the protocol:NodeRef,HandleID,Attr,DirEntry;Capabilities, typed failures and the semanticErrno;internal/sandboxwire.CancelRequestitself.EffectPossible.apps/sandboxio/internal/fileserviceis the Linux service:O_PATH|O_NOFOLLOWnode table and a handle table;*atlookups. Symlinks, including proc magic links, stay opaque: the service never follows one, and it reopens only descriptors it holds after checking their type;(mount ID, dev, ino)with generation fencing, so bind aliases never merge;renameat2modes, probed at startup;flockon the handle's own fd, which interoperates with native processes;Describereports the service identity (uid/gid).Attachneeds a grant, and a read-only grant makes the attachment read-only.world.oac-sandbox-ioroots it at/, and the Provider's sandbox setup owns the topology's isolation. There is no userspace containment probe.sandboxwire.RequestSequence.docs/file-access-protocol.mddocuments it, with an AGENTS.md boundary row and repository-map rows forinternal/sandboxfsandapps/sandboxio.Checks:
go test -raceon the protocol and service packagesFuzzDecode, 30 sgo veton linux amd64, arm64 and 386; gofmtPart of the agent-outside-sandbox work, milestone M1, lane L1a.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.