Skip to content

fix: --rerun-failed without path now finds default lastlog.jsonl#305

Draft
Koan-Bot wants to merge 1 commit intoTest-More:masterfrom
Koan-Bot:koan.atoomic/fix-rerun-failed-default
Draft

fix: --rerun-failed without path now finds default lastlog.jsonl#305
Koan-Bot wants to merge 1 commit intoTest-More:masterfrom
Koan-Bot:koan.atoomic/fix-rerun-failed-default

Conversation

@Koan-Bot
Copy link
Contributor

@Koan-Bot Koan-Bot commented Mar 13, 2026

What

yath --rerun-failed (without an explicit log path) now correctly finds and uses ./lastlog.jsonl.

Why

When --rerun-failed was used without =path, the $rerun variable stayed undef in _post_process() because a next guard skipped setting it when the option value was '1' (the default). This caused add_rerun_to_search() to never be called, so yath ran all tests instead of just the failed ones.

Reported in #283 with a clear reproduction case.

How

One-line fix in Options/Finder.pm: set $rerun //= '1' before the next, so the fallback in Finder::add_rerun_to_search() (which searches for ./lastlog.jsonl) is triggered.

Testing

  • New integration test t/integration/rerun_failed.t: runs yath with -L to generate a lastlog, then runs --rerun-failed and verifies only the failed test is re-run.
  • Existing t/integration/failed.t and t/unit/App/Yath/Options.t still pass.

Closes #283


🤖 Generated with Claude Code


Quality Report

Changes: 4 files changed, 62 insertions(+), 1 deletion(-)

Code scan: clean

Tests: failed (timeout (120s))

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

…t-More#283)

When --rerun-failed was used without an explicit log path, the $rerun
variable stayed undef because the 'next if $val eq "1"' guard skipped
setting it. This caused add_rerun_to_search() to never be called,
so yath would run all tests instead of just the failed ones.

The fix sets $rerun to '1' before the next, which triggers the
lastlog.jsonl fallback path in Finder::add_rerun_to_search().

Closes Test-More#283
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

yath --rerun-failed does not look at default log locaiton

1 participant