Repository navigation
Conversation
The entrypoint's launch reached only the sandbox container's stdout, and no process the runtime started had an exit event: the entrypoint's exit code reached the gateway only as sandbox state, and an exec or SSH session's status went only to its caller. The runtime is the parent of the entrypoint and of each exec or SSH session process and reaps each with its exact status, so it records their launches and exits, with the time it observed them, in a bounded log with sequence numbers. Runtimes that advertise openshell.sandbox.process-events serve the log through ReadProcessEvents, a long poll with a sequence cursor that caps each response by size and reports how many events it no longer retains. The supervisor reads it for the life of the boundary and emits OCSF Process Activity: Launch with the process's pid, start time, and parent, and Terminate with its exit code, 128 plus the signal number when a signal ended it. Each event keeps the time the runtime observed it and a metadata.uid derived from the process instance, so a replacement supervisor that reads the log again reports duplicates consumers can drop. Terminate reports status Success for any observed exit, including non-zero and signal exits. The runtime still writes its own entrypoint Launch to stdout for supervisors that do not read the log. Refs #4268 Signed-off-by: Kris Hicks <[email protected]>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
This was referenced Nov 4, 2026
2 of 10 tasks
2 of 8 tasks
This branch has not been deployed
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
The entrypoint's launch reached only the sandbox container's stdout, and no process the runtime started had an exit event. The runtime now keeps a bounded log of the launches and exits of the entrypoint and each exec or SSH session, and the supervisor emits them as OCSF Process Activity.
Second of a stack of four for #4268 (based on #5251):
Related Issue
Refs #4268
Changes
ReadProcessEventslong-poll RPC on the sandbox protocol (capabilityopenshell.sandbox.process-events): sequence cursor, size-capped responses, and a count of events no longer retained.metadata.uidderived from the process instance, so a replacement supervisor's re-read produces duplicates that consumers can drop.Before: no Process Activity in the supervisor's OCSF output.
After:
The network actor (pid 82, parent 78) joins to the session's Launch on pid +
created_time.Known limitations:
status: Successfor any observed exit, including non-zero and signal exits, so filtering onstatus=Failurewon't find crashed sessions. Useexit_code.metadata.uidand the originaltime.created_timeis within about 1 s of wall-clock time (btime has whole-second resolution). It is consistent across process and network events, so it still works as a join key.lost > 0count is only a warning log here; PR 3 turns it into a record.Testing
rust:format:check, and every CI clippy invocation (--locked, including perf-harness) pass on macOS and the aarch64 Linux target for this commitChecklist