fix(cli): require daemon mode for automatic host updates

Merged
KI
2mo ago
+65-1

What & why

Follow-up to #7735. superset start --auto-update previously accepted foreground mode, whose launcher watches the original host process. A successful update replaces that process and causes the launcher to report an unexpected exit; a slow restart can also let the foreground health watchdog kill the updater before rollback completes.

Require --daemon when --auto-update is enabled, rejecting invalid combinations before organization lookup or host startup. The error points to superset start --daemon --auto-update. Update flag help and host-update documentation, and cover omitted/false daemon flags plus valid combinations with regression tests.

How I tested it

  • 11 focused start-command and host-spawn tests passed.
  • CLI package typecheck passed.
  • Repository lint, bun run check:i18n, bun run check:plugins, and git diff --check passed.
  • Full repository typecheck passed (42 tasks).
  • Full repository tests failed outside the changed files: desktop reported 34 failures in Git/worktree and shell-environment tests; host-service integration tests also reported failures (including session-folder name deduplication). These failures were not investigated or established as pre-existing in this PR.
  • No live update/restart was performed; tests exercise command validation and host spawn wiring.

Checklist

  • PR title follows conventional commits (type(scope): subject)
  • bun run lint and bun run typecheck pass (CI fails on lint warnings too)
  • "Allow edits from maintainers" is checked on fork PRs (same-repository branch)

Summary by CodeRabbit

  • New Features
    • The --auto-update option now requires --daemon, with guidance shown if used without it.
  • Documentation
    • Clarified that automatic updates restart the host hourly and documented how foreground monitoring may misreport or interrupt a slow updater restart.