fix(runtime): supervise remaining durable tokio::spawn sites #120

Merged
rawan merged 1 commit from fix/issue-38-supervise-spawns into integration 2026-06-15 09:17:03 +00:00
Member

Summary

Finishes the rollout of supervised task spawning to the remaining durable tokio::spawn sites. The spawn_supervised helper already existed and covered ~10 runtime workers plus the listener tasks; this completes coverage of the always-on gateways, the scheduler loop, and the long-lived reader loops, and adds panic-logging for selected fire-and-forget one-shots.

Changes

  • New spawn_logged(name, fut) helper in supervise.rs (log-only, no restart) + unit test.
  • Restart-supervised (spawn_supervised): telegram gateway, admin HTTP/SSE server, cron recurring-job loop.
  • Log-only (spawn_logged): lsp reader, rpc client reader, subagent-start hooks, cron one-shot, mcp request handler, telegram reminder one-shot.
  • Left unchanged by design: per-request / per-connection / job-scoped / infrastructure (spawn_with_context) / test spawns. A grep sweep confirmed every remaining raw tokio::spawn outside tests is a deliberate non-durable spawn.

Tests

2313 passed, 0 failed across engine + runtime (includes the supervise tests); adapters has no unit tests. Workspace builds with no new warnings.

Notes

  • Reader loops are log-only rather than restart-supervised because their non-Clone I/O handles cannot be rebuilt after the underlying process/connection closes.

Closes #38

## Summary Finishes the rollout of supervised task spawning to the remaining durable `tokio::spawn` sites. The `spawn_supervised` helper already existed and covered ~10 runtime workers plus the listener tasks; this completes coverage of the always-on gateways, the scheduler loop, and the long-lived reader loops, and adds panic-logging for selected fire-and-forget one-shots. ## Changes - New `spawn_logged(name, fut)` helper in `supervise.rs` (log-only, no restart) + unit test. - Restart-supervised (`spawn_supervised`): telegram gateway, admin HTTP/SSE server, cron recurring-job loop. - Log-only (`spawn_logged`): lsp reader, rpc client reader, subagent-start hooks, cron one-shot, mcp request handler, telegram reminder one-shot. - Left unchanged by design: per-request / per-connection / job-scoped / infrastructure (`spawn_with_context`) / test spawns. A grep sweep confirmed every remaining raw `tokio::spawn` outside tests is a deliberate non-durable spawn. ## Tests 2313 passed, 0 failed across engine + runtime (includes the supervise tests); adapters has no unit tests. Workspace builds with no new warnings. ## Notes - Reader loops are log-only rather than restart-supervised because their non-`Clone` I/O handles cannot be rebuilt after the underlying process/connection closes. Closes #38
Add a log-only spawn_logged helper and bring the remaining always-on /
durable background tasks under supervision:

- spawn_supervised (restart+backoff): telegram gateway, admin HTTP/SSE
  server, cron recurring-job loop
- spawn_logged (panic-log only): lsp reader, rpc client reader, plus the
  subagent-start hooks, cron one-shot, mcp request handler and telegram
  reminder one-shots

Per-request / per-connection / job-scoped / infrastructure / test spawns
are left unchanged by design.

#38
rawan merged commit 61022075f3 into integration 2026-06-15 09:17:03 +00:00
rawan deleted branch fix/issue-38-supervise-spawns 2026-06-15 09:17:03 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_shrimp!120
No description provided.