Skip to content

test: health-path crash-loop backoff shares machinery with reap path #36

@arcaven

Description

@arcaven

What to test

PR #21 unified crash-loop backoff; PR #24 routed the reap path through the same machinery. Skippy's sh -c 'exit 1' crashloop test exercises only the reap path (pane vanishes). The health path (pane alive, healthcheck fails) is a separate code route that feeds the same backoff state. Confirm it behaves identically.

Test plan

Apply a manifest with a long-running command and an intentionally-failing healthcheck:

workspace:
  name: health-crashloop
teams:
  - name: flaky
    roles:
      - name: sleeper
        replicas: 1
        runtime:
          command: sleep
          args: ["3600"]
        restart_policy: always
        healthcheck:
          type: heartbeat
          timeout: "2s"
          failure_threshold: 1

The sleep 3600 keeps the pane alive, but heartbeat checks expect periodic marvel heartbeat signals from the session — none will arrive, so the healthcheck fails every 2 seconds.

Watch marvel events and marvel daemon logs for the health: session ... failed line plus the restart #N, next backoff=... cadence.

Pass

  • Health failures trigger the same exponential backoff (30s, 60s, 2m, 4m, 5m cap).
  • RoleHealth.RestartCount increments identically to the reap path.
  • marvel get sessions shows the same crashloop-backoff state transitions.
  • Backoff events emitted with the same Kind the reap path uses.

Fail

  • Different backoff schedule.
  • RestartCount does not increment.
  • No events emitted.
  • Reap path and health path produce diverging state for the same role.

Related: PR #21, PR #24.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority.p2Medium — should address this sprintscope.in-scopeAccepted, will work ontriage.completeTriage done, ready for worktype.testTest-only changes or a request to verify shipped behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions