Skip to content

Graceful embedded sidecar shutdown and reaping on every exit path #116

Description

@filipeforattini

Parent

PRD #113 — Desktop hardening & shell resilience.

What to build

Embedded red server children are currently hard-killed, and only on normal app exit. Implement graceful shutdown (SIGTERM, bounded wait for clean exit, force-kill backstop) so the store checkpoints cleanly, plus an idempotent reap routine wired to window-destroyed, exit-requested, and process signals (SIGTERM/SIGINT/SIGHUP) — Tauri only reaps children on graceful window close. Factor lifecycle helpers as pure functions with colocated Rust unit tests, and upgrade the desktop CI job from compile-check to running the crate's tests.

Acceptance criteria

  • Quitting the app by any path (window close, quit, SIGTERM/SIGINT/SIGHUP to the shell) leaves no red server processes
  • The sidecar receives SIGTERM first and is only force-killed after a bounded wait
  • Reopening a database after graceful shutdown works (no model-mismatch class of errors)
  • Rust unit tests cover the pure lifecycle helpers; CI runs the desktop crate's tests

Current blocker

status: blocked
kind: claim-hygiene
summary: Claim healer stopped after 3 heals within 24h. Heal history: 2026-07-31T09:43:23.000Z, 2026-07-31T09:48:22.000Z, 2026-07-31T09:53:22.000Z
next: Resolve the claim state, then clear this blocker for curator release.

Quarantine diagnosis

🤖 Claim-hygiene probe quarantined this issue instead of halting the fleet.

Diagnosis: Claim healer stopped after 3 heals within 24h. Heal history: 2026-07-31T09:43:23.000Z, 2026-07-31T09:48:22.000Z, 2026-07-31T09:53:22.000Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    prd:113Child of PRD #113 (desktop hardening & shell resilience)slice:afkSlice that can run unattended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions