Sprint 10 in progress: Rust sidecar supervise (A3)
Sprint 10 is still open. This is a mid-sprint build-in-public checkpoint, not a closure post.
A2 shipped a pinned Node binary and esbuild runtime JS. A3 makes the Tauri host actually start and supervise that process: free port, health wait, clean shutdown, and a native HTTP path that survives WebView2 Local Network Access.
Context: ADR-0010 Option A · Sprint 10 worklog · commit 62a6fd8.
What A3 delivered
- Rust spawn — on app setup,
std::process::Commandlaunches bundledmeronq-node+resources/runtime/sidecar.mjs(withMERONQ_MCP_SERVER_ENTRY), or falls back to system Node +tsxfortauri:dev. - Lifecycle — pick a free loopback port, poll
GET /health(up to 20s), expose URL viaget_sidecar_info, kill the process tree on exit (taskkill /Ton Windows). - Dev split —
beforeDevCommandruns Vite only (dev:ui); browser dogfood still usespnpm dev(Node script spawns sidecar + Vite). - Native API path — UI calls go through Rust
sidecar_http(decodes Node’s defaultTransfer-Encoding: chunked). Sidecar CORS also allowshttp://tauri.localhostandAccess-Control-Allow-Private-Networkfor WebView2 LNA.
Dogfood on Windows: badge Sidecar online, Connect/handshake against a real project root — no more Failed to fetch / non-JSON (200) from the native shell.
Why this matters
A packaged or tauri:dev window cannot rely on WebView fetch to 127.0.0.1 the way a browser tab on localhost:1420 can. Supervising Node from Rust closes the A2 → runnable app gap; the invoke proxy makes the UI trustworthy under WebView2.
tauri:dev / packaged
Rust setup
→ meronq-node sidecar.mjs (or node --import tsx …)
→ wait /health
UI
→ invoke sidecar_http
→ loopback GET/POST (chunked OK)
Next in Sprint 10
| Task | Focus |
|---|---|
| A4 | Restart-on-hang watchdog (known write/sync wedge) |
| A5 | tauri build verify on Windows and macOS |
| A6 | Docs + optional CI matrix |
Full recap when Sprint 10 closes.