Skip to content

execd: stderr apart, per-command env, job stdin writes and a signal op - #671

Merged
jaredLunde merged 7 commits into
mainfrom
execd-job-protocol
Nov 18, 2026
Merged

jaredLunde merged 7 commits into
mainfrom
execd-job-protocol

Conversation

@jaredLunde

Copy link
Copy Markdown
Contributor

One release of the job protocol's four gaps (plan: execd-gaps, D1-D10): a job's stderr told from its stdout on one offset clock; a command's own env (EXECD_* refused, applied after the user switch under EXECD_RUN_AS); positional, idempotent writes to a kept job's stdin; a named signal op.

Spec + execd + verifier checks (JOBS_STREAMS, EXEC_ENV, JOBS_STDIN, JOBS_SIGNAL_OP) + mock flags + Rust/TS/Python clients + matrix scenarios + fixtures + ARCHITECTURE/README. Perf numbers in crates/execd/ARCHITECTURE.md "Performance".

Proofs: verifier red on the unchanged execd (4 new checks only), tests/jobproto.rs 9/9 red on baseline and green here, 17 mutations red, execd suite green, E2B matrix (static musl build) jobs./exec/stream.* PASS on rust, ts, python, python-async.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LBGuEttMZVcyx4YEaaAvWE

jaredLunde and others added 3 commits November 17, 2026 13:19
One release of the job protocol's four gaps: a job's stderr told from its stdout on one
offset clock (frames keyed by pipe, `stderr_ranges` in read, one bit per byte in the ring and a
sidecar per chunk), a command's own `env` (EXECD_ names refused, applied after the user switch
under EXECD_RUN_AS), positional idempotent writes to a kept job's stdin (`stdin_open`, `write`),
and a named `signal` op. Spec, execd, verifier checks (JOBS_STREAMS, EXEC_ENV, JOBS_STDIN,
JOBS_SIGNAL_OP), mock flags, Rust/TS/Python clients, matrix scenarios, fixtures and docs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LBGuEttMZVcyx4YEaaAvWE
…g, h2 P3, P5)

- tests for every mutation (stdin fd release, window ranges, leader+child signal, runtime scan, HOME vs EXECD_HOME, EOF while alive)
- signal_job delivers once to each process; signal_job_once removed
- the lib tests no longer hang when pipe-user-pages-soft is exceeded (full_pipe never waits for room)
- job `data` borrowed from the request Value
- sandbox-mcp: env, stdin_open, job_write, job_signal, stderr_ranges; mcp driver implements all four features
- P3 over one h2c connection, P5 writer sweep

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LBGuEttMZVcyx4YEaaAvWE
The request body is read into one buffer sized by Content-Length, and a write's base64 is
decoded once in jobs::serve and removed from the request before anything waits. Per queued
128 KiB write: 516 KiB -> 186 KiB (4.1x -> 1.45x payload).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LBGuEqmuH3r35k31s2EJ8X
@jaredLunde
jaredLunde enabled auto-merge November 17, 2026 23:47
@jaredLunde
jaredLunde added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit ba1984a Nov 18, 2026
31 checks passed
@jaredLunde
jaredLunde deleted the execd-job-protocol branch November 18, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant