Skip to content

connect should always imply start for a stopped OR hibernated instance (user expectation) #57

Closed

Description

@scttfrdmn

Expectation

spawn connect <name> should "just work" regardless of the instance's current state — if it's stopped or hibernated, connect wakes it and connects. The user shouldn't have to know or care which it is, or run spawn start first.

Current state

Mostly implemented, but worth making explicit + closing gaps:

  • The main connect path auto-starts on State == "stopped" || "stopping" (cmd/connect.go:74). A hibernated instance reports EC2 state stopped (hibernation is StopInstances with Hibernate=true; StartInstance resumes it transparently), so this does cover hibernation today — good. The flag help and comment already say "stopped/hibernated".
  • Gap 1: the app-connect path (cmd/connect.go:240) has a separate auto-start that only checks State == "stopped" — verify it also wakes hibernated and behaves identically. Two divergent auto-start code paths is a smell; consider a single shared helper.
  • Gap 2: there's no test affirming the contract for both states. (Being added in the Tier 2 hardening: ConnectAutoStart now asserts stopped→connect→running, and a new ConnectWakesHibernated asserts hibernated→connect→running with RAM intact.)

Asks

  1. Confirm/normalize so every connect entry point (interactive, one-shot --command, app) auto-starts a stopped and hibernated instance via one shared code path.
  2. Keep --no-start as the opt-out.
  3. Make sure the "Instance is stopped — starting it…" UX message is accurate for hibernated (says "resuming" or similar) — minor, but it's what the user sees.

Context

Raised as a user-expectation item during Tier 2 work. The happy path likely already works for both states; this issue is to guarantee it across all connect paths and lock it with tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:connectarea:lifecycleenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions