Skip to content

feat(runtime-core): replace the sidecar frame timeout with a heartbeat silence watchdog#1653

Open
NathanFlurry wants to merge 1 commit into
stack/fix-core-deliver-post-boot-mountfs-reconfiguration-reliably-to-the-native-sidecar-nyvvsyxpfrom
stack/feat-runtime-core-env-override-for-the-native-sidecar-frame-timeout-rwrqkykq
Open

feat(runtime-core): replace the sidecar frame timeout with a heartbeat silence watchdog#1653
NathanFlurry wants to merge 1 commit into
stack/fix-core-deliver-post-boot-mountfs-reconfiguration-reliably-to-the-native-sidecar-nyvvsyxpfrom
stack/feat-runtime-core-env-override-for-the-native-sidecar-frame-timeout-rwrqkykq

Conversation

@NathanFlurry

@NathanFlurry NathanFlurry commented Jul 8, 2026

Copy link
Copy Markdown
Member
  • 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 (feat(runtime-core): env-override the native sidecar frame timeout #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

NathanFlurry commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Stack for rivet-dev/agentos

Get stack: forklift get 1653
Push local edits: forklift submit
Merge when ready: forklift merge 1653

@railway-app

railway-app Bot commented Jul 8, 2026

Copy link
Copy Markdown

🚅 Deployed to the agentos-pr-1653 environment in agentos

Service Status Web Updated (UTC)
agentos 😴 Sleeping (View Logs) Web Jul 8, 2026 at 5:22 am

🚅 Environment agentos-pr-1653 in rivet-frontend has no services deployed.

@NathanFlurry NathanFlurry force-pushed the stack/feat-runtime-core-env-override-for-the-native-sidecar-frame-timeout-rwrqkykq branch from a8f2d27 to faab7b6 Compare July 8, 2026 04:07
@railway-app railway-app Bot temporarily deployed to agentos / agentos-pr-1653 July 8, 2026 04:07 Destroyed
@NathanFlurry NathanFlurry changed the title feat(runtime-core): env override for the native sidecar frame timeout feat(runtime-core): validate, test, and document the sidecar frame timeout override Jul 8, 2026
…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 NathanFlurry force-pushed the stack/feat-runtime-core-env-override-for-the-native-sidecar-frame-timeout-rwrqkykq branch from faab7b6 to c8ffbcc Compare July 8, 2026 05:10
@NathanFlurry NathanFlurry changed the title feat(runtime-core): validate, test, and document the sidecar frame timeout override feat(runtime-core): replace the sidecar frame timeout with a heartbeat silence watchdog Jul 8, 2026
@NathanFlurry 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
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