[codex] Restore sidecar reuse fast paths#98
Merged
Conversation
|
🚅 Environment secure-exec-pr-98 in rivet-frontend has no services deployed. |
f27bd6c to
1784c3b
Compare
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
Sidecaras the public reusable sidecar process object and wiresNodeRuntime.create({ sidecar })through VM boot.sidecaron the default shared sidecar/session behavior.NodeRuntime.dispose()from disposing caller-owned sidecar processes.packages/benchmarks/README.md.Root Cause
The 0.3 path was paying full sidecar/session/VM/runtime/process startup cost in places that should reuse an already-running sidecar and guest Node process. The public API also exposed the wrong mental model: users should pass an object reference, not a wire
sidecar_id.Benchmarks
The checked-in benchmark artifacts are under
packages/benchmarks/results/:coldstart-final.jsoncoldstart-final.logcoldstart-resident-full-matrix-20260619.jsoncoldstart-resident-full-matrix-20260619.logThe reproducible SDK scenarios are documented in
packages/benchmarks/README.mdand runnable withpnpm --dir packages/benchmarks benchafter building a release sidecar.Validation
pnpm --dir packages/core check-typespnpm --dir packages/secure-exec check-typespnpm --dir packages/benchmarks exec tsc --noEmit --module NodeNext --moduleResolution NodeNext --target ES2022 --types node coldstart.bench.ts bench-utils.tsBENCH_BATCH_SIZES=1 BENCH_ITERATIONS=1 BENCH_WARMUP=0 BENCH_SCENARIOS=owned-sidecar,shared-sidecar,resident-runner ... pnpm --silent --dir packages/benchmarks bench:coldstartCARGO_TARGET_DIR=/home/nathan/secure-exec-perf-restore/target cargo check -p secure-exec-client