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.
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:
The
sleep 3600keeps the pane alive, butheartbeatchecks expect periodicmarvel heartbeatsignals from the session — none will arrive, so the healthcheck fails every 2 seconds.Watch
marvel eventsandmarvel daemon logsfor thehealth: session ... failedline plus therestart #N, next backoff=...cadence.Pass
RoleHealth.RestartCountincrements identically to the reap path.marvel get sessionsshows the samecrashloop-backoffstate transitions.Kindthe reap path uses.Fail
Related: PR #21, PR #24.