Skip to content

test: marvel describe team surfaces RoleHealth during backoff #41

@arcaven

Description

@arcaven

What to test

marvel describe team should surface per-role crash-loop state — RestartCount, LastRestartAt, BackoffUntil — so an operator can see why a role isn't spawning when they expect it to. Critical for debugging saturation or long-backoff scenarios.

Test plan

  1. Apply a crashloop manifest (role that exits quickly, restart_policy: always).
  2. Wait through at least 2-3 restarts.
  3. marvel describe team <name> — verify the output includes each role's RoleHealth.
  4. Trigger saturation (add max_restarts: 2 and re-apply, or wait long enough) and re-run describe team — verify BackoffUntil is far-future.
  5. On a fresh team that has never crashed, verify describe team does NOT show a zero-valued RoleHealth block (shouldn't surface noise).

Pass

  • Per-role section includes RestartCount, LastRestartAt, BackoffUntil.
  • During active backoff, BackoffUntil renders as a human-readable timestamp (absolute or relative-duration, but not a raw UTC integer).
  • Roles with no crash history show nothing or an explicit (never restarted) marker — not a zero-valued struct.
  • Saturation state is visibly distinct from a normal backoff window.

Fail

  • No RoleHealth in output.
  • Raw internal struct fields leak (unformatted durations, UTC-vs-local confusion, zero values shown as real data).
  • Stale values after the state clears.

Related: PR #21.

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