From the 0.9.14 refactor backlog.
thread::sleep in production paths: cloud_dispatch.rs ~1613 (sandbox-ready poll loop), lane/src/runtime.rs ~1401 (10 ms), plus others outside tests. On the runtime they park a worker thread. Convert to tokio::time::interval with cancellation, or a notify on the resource itself. Audit first — some are already under spawn_blocking.
- ~30 non-test files mix
async fn with std::fs:: (tools/file_search, read_media, terminal_session, revert_turn, tool_preparation, turn_loop helpers). Decide one convention and enforce it once: (a) tool I/O uses tokio::fs, or (b) execute_planned_tools runs handlers on the blocking pool (spawn_blocking per batch — 81 sites already use the pattern). (b) is the ponytail answer for tools that read big files.
Deliverable: the convention written down in docs plus the sites moved. Size: M.
From the 0.9.14 refactor backlog.
thread::sleepin production paths:cloud_dispatch.rs~1613 (sandbox-ready poll loop),lane/src/runtime.rs~1401 (10 ms), plus others outside tests. On the runtime they park a worker thread. Convert totokio::time::intervalwith cancellation, or a notify on the resource itself. Audit first — some are already underspawn_blocking.async fnwithstd::fs::(tools/file_search,read_media,terminal_session,revert_turn,tool_preparation,turn_loophelpers). Decide one convention and enforce it once: (a) tool I/O usestokio::fs, or (b)execute_planned_toolsruns handlers on the blocking pool (spawn_blockingper batch — 81 sites already use the pattern). (b) is the ponytail answer for tools that read big files.Deliverable: the convention written down in docs plus the sites moved. Size: M.