feat(runtime-core): replace the sidecar frame timeout with a heartbeat silence watchdog#1653
Merged
NathanFlurry merged 4 commits intoJul 8, 2026
Conversation
Member
Author
|
Stack for rivet-dev/agentos
Get stack: |
This was referenced Jul 8, 2026
|
🚅 Deployed to the agentos-pr-1653 environment in agentos
🚅 Environment agentos-pr-1653 in rivet-frontend has no services deployed. |
NathanFlurry
force-pushed
the
stack/feat-runtime-core-env-override-for-the-native-sidecar-frame-timeout-rwrqkykq
branch
from
July 8, 2026 04:07
a8f2d27 to
faab7b6
Compare
NathanFlurry
force-pushed
the
stack/feat-runtime-core-env-override-for-the-native-sidecar-frame-timeout-rwrqkykq
branch
from
July 8, 2026 05:10
faab7b6 to
c8ffbcc
Compare
NathanFlurry
changed the base branch from
main
to
stack/fix-core-deliver-post-boot-mountfs-reconfiguration-reliably-to-the-native-sidecar-nyvvsyxp
July 8, 2026 05:10
This was referenced Jul 8, 2026
NathanFlurry
changed the base branch from
stack/fix-core-deliver-post-boot-mountfs-reconfiguration-reliably-to-the-native-sidecar-nyvvsyxp
to
main
July 8, 2026 06:17
…ircuit - Builds on #1640: also short-circuit on the session record already marked closed (covers exits the kill RPC does not report), and skip the second wait when SIGKILL itself reports the process gone. - Mirror the short-circuit in the agentos-sidecar-core sync engine, with regression tests proving zero dead waits.
…bridge round-trip
- Resolve `realpath("/")` of a js_bridge mount locally (mirroring host_dir): host-side drivers often cannot canonicalize their own root and returned ENOENT, which aborted kernel permission-subject resolution before the readDir bridge call was ever issued.
- Regression test: readdir of a js_bridge mount root against a driver whose realpath always fails.
…native sidecar - `mountFs`/`unmountFs` now return a promise that settles once the sidecar has applied the mount; delivery failures reject instead of being swallowed. - Runtime mount reconfigures resend the boot `packages`/`packagesMountAt`/`toolShimCommands`: Rust `configure_vm` rebuilds the whole VM configuration from each payload, so omitting them stripped the `/opt/agentos` projections and tool shims as a side effect of a post-boot mount. - Runtime `linkSoftware` packages are retained too, so a later `mountFs` no longer unprojects them. - The Rust client `mount_fs` remains in-process-only; sidecar-visible runtime mounts there are a follow-up.
…t silence watchdog
- The native sidecar emits a connection-scoped `StructuredEvent{name:"heartbeat"}` every 10s from a dedicated thread, so beats keep flowing while the dispatch loop is busy inside one long request. No protocol schema change — reuses the existing structured-event variant.
- The host replaces the per-frame 120s timeout with a silence watchdog: any inbound frame resets a 30s clock; sustained total silence kills the sidecar and rejects in-flight requests with a typed `SidecarSilenceTimeout` (stderr tail included).
- Individual requests no longer have a deadline: a legitimately long agent turn runs for minutes without teardown, while a genuinely dead or wedged sidecar is detected in ~30s instead of 2 minutes.
- Removes `NATIVE_SIDECAR_FRAME_TIMEOUT_MS`, the `AGENTOS_SIDECAR_FRAME_TIMEOUT_MS` env override (#1641), and all `frameTimeoutMs` plumbing (spawn options, native-client, protocol-client, frame-rpc, correlation).
- Heartbeats are swallowed at the frame layer on both clients so they never reach event consumers or the bounded event buffer; the Rust client mirrors the watchdog (activity-reset reader, kill + fail-pending on silence).
- Heartbeat cadence and silence window are fixed protocol constants (no env knobs); docs updated.
NathanFlurry
force-pushed
the
stack/feat-runtime-core-env-override-for-the-native-sidecar-frame-timeout-rwrqkykq
branch
from
July 8, 2026 06:17
c8ffbcc to
d9179cc
Compare
NathanFlurry
changed the base branch from
main
to
stack/fix-core-deliver-post-boot-mountfs-reconfiguration-reliably-to-the-native-sidecar-nyvvsyxp
July 8, 2026 06:18
NathanFlurry
changed the base branch from
stack/fix-core-deliver-post-boot-mountfs-reconfiguration-reliably-to-the-native-sidecar-nyvvsyxp
to
main
July 8, 2026 06:18
NathanFlurry
deleted the
stack/feat-runtime-core-env-override-for-the-native-sidecar-frame-timeout-rwrqkykq
branch
July 8, 2026 06:18
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5328
July 8, 2026 06:18
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5338
July 8, 2026 06:18
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5324
July 8, 2026 06:18
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / secure-exec-pr-112
July 8, 2026 06:18
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5320
July 8, 2026 06:18
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5333
July 8, 2026 06:18
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / rivet-pr-5314
July 8, 2026 06:18
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / secure-exec-pr-121
July 8, 2026 06:18
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / secure-exec-pr-111
July 8, 2026 06:18
In progress
railway-app
Bot
requested a deployment
to
rivet-frontend / secure-exec-pr-119
July 8, 2026 06:18
In progress
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.
StructuredEvent{name:"heartbeat"}every 10s from a dedicated thread, so beats keep flowing while the dispatch loop is busy inside one long request. No protocol schema change — reuses the existing structured-event variant.SidecarSilenceTimeout(stderr tail included).NATIVE_SIDECAR_FRAME_TIMEOUT_MS, theAGENTOS_SIDECAR_FRAME_TIMEOUT_MSenv override (feat(runtime-core): env-override the native sidecar frame timeout #1641), and allframeTimeoutMsplumbing (spawn options, native-client, protocol-client, frame-rpc, correlation).