Repository navigation
fix(runtime-core): reject oversized frames before they reach the sidecar - #2066
Conversation
|
This PR was not deployed automatically as @eersnington does not have access to the Railway project. In order to get automatic PR deploys, please add @eersnington to your workspace on Railway. |
📟 Pip-Boy ·
|
| package (linux-x64-gnu) | @latest |
base | this PR | Δ vs base | packages |
|---|---|---|---|---|---|
@rivet-dev/agentos-core |
458.2 MB | 325.9 MB | 325.9 MB | +3.4 KB (+0.0%) | 10 (0) |
@rivet-dev/agentos-runtime-core |
253.6 MB | 253.6 MB | 253.6 MB | +3.4 KB (+0.0%) | 6 (0) |
`@rivet-dev/agentos-core` details
| platform | base | this PR | Δ |
|---|---|---|---|
| linux-x64-gnu | 325.9 MB | 325.9 MB | +3.4 KB (+0.0%) |
| linux-arm64-gnu | 323.1 MB | 323.1 MB | +3.4 KB (+0.0%) |
| darwin-arm64 | 302.4 MB | 302.4 MB | +3.4 KB (+0.0%) |
| darwin-x64 | 311.9 MB | 311.9 MB | +3.4 KB (+0.0%) |
| win32-x64 | 182.3 MB | 182.3 MB | +3.4 KB (+0.0%) |
Entrypoints (own code, minified; third-party imports excluded)
| entrypoint | base | this PR | Δ | imports | exports |
|---|---|---|---|---|---|
. |
291.6 KB | 292.7 KB | +1.1 KB (+0.4%) | — | +SidecarFrameTooLarge |
`@rivet-dev/agentos-runtime-core` details
| platform | base | this PR | Δ |
|---|---|---|---|
| linux-x64-gnu | 253.6 MB | 253.6 MB | +3.4 KB (+0.0%) |
| linux-arm64-gnu | 250.9 MB | 250.9 MB | +3.4 KB (+0.0%) |
| darwin-arm64 | 230.1 MB | 230.2 MB | +3.4 KB (+0.0%) |
| darwin-x64 | 239.6 MB | 239.6 MB | +3.4 KB (+0.0%) |
| win32-x64 | 110.0 MB | 110.0 MB | +3.4 KB (+0.0%) |
Entrypoints (own code, minified; third-party imports excluded)
| entrypoint | base | this PR | Δ | imports | exports |
|---|---|---|---|---|---|
. |
248.0 KB | 249.1 KB | +1.1 KB (+0.5%) | — | +SidecarFrameTooLarge |
./sidecar-client |
24.6 KB | 25.0 KB | +448 B (+1.8%) | — | +SidecarFrameTooLarge |
./sidecar-errors |
1.1 KB | 1.5 KB | +448 B (+40.8%) | — | +SidecarFrameTooLarge |
./sidecar-process |
24.6 KB | 25.0 KB | +448 B (+1.8%) | — | +SidecarFrameTooLarge |
All 6 packages · linux-x64-gnu
| package (linux-x64-gnu) | @latest |
base | this PR | Δ vs base | packages |
|---|---|---|---|---|---|
@rivet-dev/agentos-core |
458.2 MB | 325.9 MB | 325.9 MB | +3.4 KB (+0.0%) | 10 (0) |
@rivet-dev/agentos-node-pty |
7.6 KB | 18.0 KB | 18.0 KB | 0 | 1 (0) |
@rivet-dev/agentos-posix |
253.6 MB | 253.6 MB | 253.6 MB | +3.4 KB (+0.0%) | 7 (0) |
@rivet-dev/agentos-runtime-core |
253.6 MB | 253.6 MB | 253.6 MB | +3.4 KB (+0.0%) | 6 (0) |
@rivet-dev/agentos-sandbox |
495.5 MB | 363.5 MB | 363.5 MB | +3.4 KB (+0.0%) | 85 (0) |
@rivet-dev/agentos-toolchain |
130.8 KB | 141.2 KB | 141.2 KB | 0 | 2 (0) |
🧹 Rust dependencies
Skipped: this PR doesn't change any Rust code or dependencies.
🦀 Binaries
Skipped: this PR doesn't change any Rust code.
⏱ Timing
| job | wall time | slowest step |
|---|---|---|
zizmor |
8s | checkout · 2s |
changes |
26s | checkout · 23s |
footprint |
2m49s | Pack the base · 47s |
⏭ native · ${{ matrix.platform }} |
— | skipped |
⏭ self-test |
— | skipped |
⏭ hygiene |
— | skipped |
report |
27s | setup-node · 10s |
🔭 Full CI trace for this commit
One OpenTelemetry trace of CI and Pip-Boy for 79b018e: every job and step, with the sizes above attached. Run after CI finishes.
pnpm install --frozen-lockfile --filter 'pipboy...'
pnpm --filter pipboy pipboy trace --sha 79b018e389834b47c66a84d48ca3cc33ceb73eecAdd --otlp <url> to send it to any OTLP/HTTP collector.
Agent instruction: From a rivet-dev/agentos checkout, run the commands above, then read the trace file the last command prints. List the slowest jobs and steps and explain where CI time went.
5e0d87c to
36c921a
Compare
The TypeScript client wrote frames without checking the sidecar's negotiated max_frame_bytes. An oversized frame made the sidecar exit, which took down every VM on it. The client now rejects such a frame with SidecarFrameTooLarge before it writes it, like the Rust client does. A write still in flight when its transport is disposed now logs a late stream error (for example EPIPE) instead of crashing the host. Fixes #2051.
36c921a to
79b018e
Compare
Fixes #2051.
A
writeFileover the 16 MiB frame limit stopped the shared sidecar, which took down every VM on it, and then an uncaughtEPIPEcrashed the host process.max_frame_bytesfrom the handshake and rejects an oversized one with a typedSidecarFrameTooLargebefore writing it, as the Rust client already does. The sidecar and its other VMs stay up.errorlistener. A lateEPIPEis logged to stderr instead of crashing the host.resource-limits.mdxdocuments the frame limit and the per-request ceiling forwriteFileafter base64.writeFilefrom VM A, VM B on the same sidecarmainSidecarProcessExitedSidecarFrameTooLargeEPIPE