fix(report): retain serial duration with interrupted retry verdicts
Merged
RU
17d ago+610+610+012345678901234567890123456789-117-117-012345678901234567890123456789
- 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) setscutRetryon the attempt record before it is streamed,memberResultsreads it fromgroup.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 averdictattempt;durationMsand the failure block come from it. Older reports withoutcutRetryfall back toisCutSerialRetryon the attempt status.- Docs:
docs/reference/test.mdxserial rules and thedocs/debugging.mdxjq 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": aserialgroup withretries: 1fails in ~200 ms, Ctrl-C lands during the retry.
| main | this 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(drivesrunSerialUnitwith collection failure, launch failure, interruption, and a reached retry; freezes the streamed record),retry,report-junit,report-markdownfail withsrcreverted to main and pass here.