Skip to content

fix(cli): three-valued start status prevents destructive restart after health timeout - #446

Merged
aliasunder merged 3 commits into
mainfrom
worktree-health-timeout-start-status
Aug 15, 2026
Merged

fix(cli): three-valued start status prevents destructive restart after health timeout#446
aliasunder merged 3 commits into
mainfrom
worktree-health-timeout-start-status

Conversation

@aliasunder

Copy link
Copy Markdown
Owner

Summary

  • After a health-poll timeout, the Connect box said "Start the server:" while the spinner had just said the container is still starting in the background. Running that start command kills the still-syncing container and restarts from scratch — an instruction-following user loops indefinitely on a long first sync.
  • Root cause: offerDockerRun returned boolean, collapsing "never started" and "started but still coming up" into the same false.
  • Widens the return to StartStatus ("running" | "starting" | "not-started") and threads it through both connect-message builders. The "starting" variant shows "starting in the background — check progress: docker logs vault-cortex" instead of the start command.
  • Applies to both local and remote modes.

Test plan

  • 40 message tests pass (7 new for the "starting" state)
  • Both "starting" mutations caught (local + remote)
  • Build passes (server + both CLI configs)
  • Beta publish + pty scenario: transcript shows "starting in the background" after timeout, not "Start the server:"

Generated with Claude Code

…r health timeout

After a health-poll timeout, the Connect box said "Start the server:" while
the spinner had just said "the container keeps starting in the background."
Following that instruction kills the still-syncing container and restarts
from scratch. The root cause: offerDockerRun returned boolean, collapsing
"never started" and "started but still coming up" into the same false.

Widen the return to StartStatus ("running" | "starting" | "not-started")
and thread it through both connect-message builders. The "starting" variant
shows "starting in the background — check progress: docker logs" instead of
the start command that would re-create the container.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread cli/src/init.ts
@umm-actually

umm-actually Bot commented Aug 15, 2026

Copy link
Copy Markdown

umm-actually re-reviewed at 47c1506

No new findings (2 tracked finding(s) across all runs).


umm-actually · deepseek/deepseek-v4-flash-0731

aliasunder and others added 2 commits August 15, 2026 17:43
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The core behavior change — offerDockerRun returning "starting" when the
health check times out — had no integration test through runInit. Add
two tests: local mode verifies the connect message shows "starting in
the background", remote mode verifies the public URL probe is skipped.
Both mutation-verified.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread cli/src/messages.ts
@aliasunder
aliasunder merged commit d20bf18 into main Aug 15, 2026
20 checks passed
@aliasunder
aliasunder deleted the worktree-health-timeout-start-status branch August 15, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant