Summary
When a testrun run --retry member fails, the retry/shrinking-replay cycle replaces the last-good recording on disk with a mangled one (artifacts.replaced: true on a failed run). Every subsequent standalone replay of that test then hard-fails in ~3s before any browser work:
{"type":"error","message":"recording_invalid: non_monotonic_steps: expected 8, got 1 at line 8"}
The evidence pack for that follow-up run also fails L1 validation (l1.steps.missing: L1 requires a steps/ directory).
Repro (kane-cli 0.6.4, 2026-07-22)
- A multi-step test with a valid recording (just authored green the same hour).
kane-cli testrun run <paths...> --retry --headless — the member fails on an unrelated replay assertion (see companion issue on stale replay variables) after ~112s of retry cycles.
kane-cli testmd run <same test> → recording_invalid: non_monotonic_steps in 3s; recording unusable.
- Recovery required a prose edit to force a full re-author (in place, same testcase_id).
Control: the same suite re-run without --retry also failed the same members but did not corrupt recordings (artifacts.replaced: false) — the clobbering isolates to the retry path.
Ask
A failed run should never replace last-good artifacts: write retry attempts to a scratch location and promote only on success (or at minimum keep a .bak of the previous recording and restore it when the run ends failed).
Env: kane-cli 0.6.4 · Windows 11 · Node 24 · account toddl
Summary
When a
testrun run --retrymember fails, the retry/shrinking-replay cycle replaces the last-good recording on disk with a mangled one (artifacts.replaced: trueon a failed run). Every subsequent standalone replay of that test then hard-fails in ~3s before any browser work:The evidence pack for that follow-up run also fails L1 validation (
l1.steps.missing: L1 requires a steps/ directory).Repro (kane-cli 0.6.4, 2026-07-22)
kane-cli testrun run <paths...> --retry --headless— the member fails on an unrelated replay assertion (see companion issue on stale replay variables) after ~112s of retry cycles.kane-cli testmd run <same test>→recording_invalid: non_monotonic_stepsin 3s; recording unusable.Control: the same suite re-run without
--retryalso failed the same members but did not corrupt recordings (artifacts.replaced: false) — the clobbering isolates to the retry path.Ask
A failed run should never replace last-good artifacts: write retry attempts to a scratch location and promote only on success (or at minimum keep a
.bakof the previous recording and restore it when the run ends failed).Env: kane-cli 0.6.4 · Windows 11 · Node 24 · account toddl