Skip to content

fix(sidecar): classify new limit constants + tolerate stale sidecar callback responses#133

Merged
NathanFlurry merged 1 commit into
mainfrom
fix/limits-and-stale-sidecar-response
Jun 26, 2026
Merged

fix(sidecar): classify new limit constants + tolerate stale sidecar callback responses#133
NathanFlurry merged 1 commit into
mainfrom
fix/limits-and-stale-sidecar-response

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Summary

Two fixes surfaced while syncing agent-os against latest secure-exec main.

  1. limits_audit (red on main): fix(execution): size the wasm runner V8 heap so warmup stops OOMing #129 and fix: memory leaks #131 added DEFAULT_WASM_RUNNER_HEAP_LIMIT_MB and MAX_TIMER_DELAY_MS without inventory entries, so cargo test -p secure-exec-sidecar --test limits_audit fails on main. Classify them:
    • DEFAULT_WASM_RUNNER_HEAP_LIMIT_MB → policy-deferred (wasm runner V8 heap default; operator-tunable via the WASM_RUNNER_HEAP_LIMIT_MB env override, contained by the per-isolate near-heap guard).
    • MAX_TIMER_DELAY_MS → invariant (clamps a guest timer delay to the JS setTimeout 2^31-1 ms ceiling; a leak guard so a timer thread can't outlive its session).
  2. Stale sidecar callback responses: accept_sidecar_response now drops a sidecar_response with no matching pending request (UnmatchedResponse) or whose request already completed (DuplicateResponse) instead of failing the whole sidecar. Multiple VMs share one sidecar process; a per-VM sidecar_request callback can be answered by the host after that VM is disposed, and the straggler reply must not crash an unrelated VM's startup. Real protocol violations (ownership / response-kind mismatch) stay fatal.

Testing

  • limits_audit 2/2 ✅, cargo fmt --check ✅, cargo clippy -p secure-exec-sidecar -- -D warnings ✅, vm_fetch_kernel_tcp socket tests ✅
  • Downstream (agent-os against this build): full core suite 264 passed / 0 failed — fixed the mount/codex shared-sidecar correlation failures.

🤖 Generated with Claude Code

@railway-app railway-app Bot temporarily deployed to secure-exec / secure-exec-pr-133 June 26, 2026 02:26 Destroyed
@railway-app railway-app Bot temporarily deployed to rivet-frontend / secure-exec-pr-133 June 26, 2026 02:26 Destroyed
…sponses, fix service-test build

Fixes surfaced while syncing agent-os against latest secure-exec main:

1. limits: classify DEFAULT_WASM_RUNNER_HEAP_LIMIT_MB (#129) and MAX_TIMER_DELAY_MS
   (#131) — both added without inventory entries, so limits_audit failed on main.
2. sidecar: accept_sidecar_response drops a stale sidecar_response with no matching
   pending request (UnmatchedResponse) or already completed (DuplicateResponse)
   instead of failing the whole sidecar — a per-VM callback can be answered by the
   host after that VM is disposed on the shared sidecar process. Real protocol
   violations stay fatal.
3. tests: re-export crate::EventSinkTransport into the source-included service test
   crate (#132 added the use in src/service.rs without the matching test re-export,
   breaking 'cargo test -p secure-exec-sidecar --test service' compilation).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@NathanFlurry NathanFlurry force-pushed the fix/limits-and-stale-sidecar-response branch from 1892f6f to 713cda8 Compare June 26, 2026 02:28
@railway-app railway-app Bot temporarily deployed to rivet-frontend / secure-exec-pr-133 June 26, 2026 02:28 Destroyed
@railway-app railway-app Bot temporarily deployed to secure-exec / secure-exec-pr-133 June 26, 2026 02:28 Destroyed
@NathanFlurry NathanFlurry merged commit d8a4435 into main Jun 26, 2026
0 of 3 checks passed
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