fix(runner-watch): fall back to the newest flat golden corpus
Follow-up to #712, which fixed the CI materialize step and job_extension_tests but missed the third reader.
Failure
runner-watch::bin/runner-watch tests::replay_workflow_submissions_materializes_scenario_07_workflow panics on every branch that merged main after #710:
checked-in scenario 07 replay metadata should be readable: No such file or directory (os error 2)
at crates/runner-watch/src/main.rs:4876
It formats the golden path with pinned_runner_version() (2.337.0), whose directory holds only nested gh-official/* captures; the flat 07-step-failure flows live under v2.336.0. Observed as shard-1 failures on #692 and #702.
Change
golden_runner_version() now prefers the pinned corpus when its scenario-07 capture exists and otherwise takes the newest corpus that has one — the same rule as #712.
Verification
cargo test -p runner-watch replay_workflow_submissions_materializes_scenario_07_workflow→ pass.cargo fmt --all --checkclean.
Summary by cubic
Fixes the runner-watch scenario-07 replay test panicking with "No such file or directory" when the pinned runner version's golden corpus has no flat capture.
golden_runner_version() now falls back to the newest corpus that has a flat 07-step-failure/flows.jsonl, matching the same rule already applied to the CI materialize step and job_extension_tests.
Summary by CodeRabbit
- Tests
- Golden test fixtures can now use the highest available version when the pinned version’s fixture is missing, with a fallback to the pin when no alternatives are available.