fix(daemon): allow idle recovery after failed relaunch

Merged
TH
13h ago
+187-21

Summary

An uncertain relaunch failure keeps its session and device claim closable without blocking daemon idle recovery. Known refusals do not set the marker; cancellation after lifecycle completion does. Four files changed, including help and recovery docs. Fixes #4237.

PR #4396 also edits session-open-execution.ts; its new-session setup changes are separate from this relaunch path.

Validation

  • Base 45e1372: focused regression failed on idle eligibility. Head 3c24b0a3c27be47215186b25d5c899ae2fe012c2: 14 focused tests passed; new refusal and cancellation tests failed before their fixes.
  • pnpm check:affected --run --head 3c24b0a3c2: passed, receipt run-jHKvi0, exactCommit: true. GitHub coverage and device lanes remain authoritative.
  • Android emulator-5554, checkout daemon 0.21.37-dev: absent-package relaunch failed with APP_NOT_INSTALLED; session and claim remained, close released the claim, and reopen succeeded. On a second failure, the 45-second idle timeout stopped the daemon and released the claim. Snapshot used android-helper 0.21.37-dev. The issue's cleanup timeout was not forced live; it is unit-verified.
  • Linux CI Integration Tests failed at smoke-daemon-clean.test.ts:140. The same Node runner passed 5/5 isolated-file runs on both head and origin/main on macOS; the Linux failure remains unclassified.

šŸ¤– Generated with Claude Code