Add the process protocol, Linux process service and client - #337
Merged
Merged
Conversation
Contributor
|
Found 1 test failure on Blacksmith runners: Failure
|
SaladDay
force-pushed
the
aos/process-protocol
branch
from
October 1, 2026 00:19
b4ae990 to
823fea1
Compare
internal/sandboxprocess defines the Runtime–process service protocol on sandboxwire framing, with golden fixtures, a decoder fuzz target and a generic client and server. apps/sandboxio/internal/processservice implements it on Linux: explicit launches through a umask trampoline, pipes or a PTY, POSIX session scopes, signal targets, cancel escalation, replay with acknowledgement, deduplication with tombstones and owner-loss cleanup.
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–process service protocol: the agent host uses it to start and control processes inside a sandbox.
internal/sandboxprocess/protocol.godefines the protocol: 12 operations, events starting at0x4001,ProcessSpec/PTYSpec, capabilities, typed failures and strict codecs oninternal/sandboxwire. The same package has the generic client and server.apps/sandboxio/internal/processserviceis the Linux service:Init()hook);processservice.Reap(ctx), owns every child exit, so the service can run as a child subreaper. It needs pidfd support (Linux 5.3 or later), checked at startup;docs/process-protocol.mddocuments it, and it has an AGENTS.md boundary row and a repository-map row.ScopeCgroupV2is not advertised. RequestIDs strictly increase on a stream, enforced bysandboxwire.RequestSequence.Checks:
go test -race -count=3 ./internal/sandboxprocess ./apps/sandboxio/...FuzzDecode, 30 sgo vet, gofmtinternal/sandboxprocessPart of the agent-outside-sandbox work, milestone M1, lane L2.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.