fix(report): retain serial duration with interrupted retry verdicts

Merged
RU
17d ago
+610-117
  • A serial retry the run interrupts, or one that never reaches its members (collection or launch failure), no longer stands for the members' verdict. The report and every reporter now take the verdict and duration from the last attempt that ran them. Before, JUnit and Markdown timed a failed member by the cut retry (often 0 ms or a few ms).
  • The runner decides once: finishedSerialAttempt (packages/e2e/src/run/serial.ts) sets cutRetry on the attempt record before it is streamed, memberResults reads it from group.attempts, and report.json carries it on each serial attempt (report-v1.schema.json, optional, absent in older reports).
  • outcome() (packages/e2e/src/report/outcome.ts) gains a verdict attempt; durationMs and the failure block come from it. Older reports without cutRetry fall back to isCutSerialRetry on the attempt status.
  • Docs: docs/reference/test.mdx serial rules and the docs/debugging.mdx jq query skip cut attempts.
flowchart LR
  A[Serial attempt finishes] --> B[Set cutRetry on the record]
  B --> C[Stream serialAttemptFinished]
  C --> D[Verdict = last attempt not cut]
  D --> E[report.json, JUnit, Markdown]

Verified

Ran it locally: yes

  • Built CLI, tests/integration/interrupt-signals.test.ts "a serial member keeps its failed attempt time in Markdown and JUnit when Ctrl-C cuts the retry": a serial group with retries: 1 fails in ~200 ms, Ctrl-C lands during the retry.
mainthis branch
JUnit time from the interrupted retry, test fails (expected ... to contain 'time="0.206"')JUnit and Markdown show the failed attempt's ~200 ms
  • Unit: report-outcome, serial-record (drives runSerialUnit with collection failure, launch failure, interruption, and a reached retry; freezes the streamed record), retry, report-junit, report-markdown fail with src reverted to main and pass here.