Skip to content

fix(app): sharded run accounting - #420

Merged
PhenX merged 3 commits into
PiwiTests:mainfrom
NicolaiHorlacher:fix/sharded-run-accounting
Aug 21, 2026
Merged

fix(app): sharded run accounting#420
PhenX merged 3 commits into
PiwiTests:mainfrom
NicolaiHorlacher:fix/sharded-run-accounting

Conversation

@NicolaiHorlacher

Copy link
Copy Markdown
Contributor

Note: As most commits here are done by claude in this repo, I just let claude fix the issues I found in #419. The code looks valid to me at first glance. But I did not look at the souce code in great detail, as I would normally do when contributing to an open souce project. Think this is something you should keep in mind when reviewing this PR.

What & why

Fixes #419

How was it tested?

Using npm test and by testing it with sharded playwright tests manually.

Checklist

  • PR title follows Conventional Commits (type(scope): subject)
  • Tests added/updated for behavior changes
  • Docs updated if user-facing (apps/docs/, README, or reporter README)

NicolaiHorlacher and others added 3 commits August 21, 2026 12:21
…mpt counters

The sharded finish derived the final status from the accumulated
failedTests counter, which counts failed attempts — so a flaky test
(failed attempt, passed retry) flipped a passed run to failed. The
status is now judged by each test's last attempt per browser, matching
Playwright's verdict and the non-sharded path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The case-files endpoint validated uploads against the run's primary
stream token only, so trace and attachment uploads from every other
shard were rejected with 403. It now accepts shard tokens through the
same fallback the events and finish endpoints already use.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every execution reaches the server as a streamed event and is counted
there; the per-shard finish added the shard totals on top, doubling all
run counters. Finish now only accumulates flakyTests (absent from the
events tally) and corrects the test that had asserted the doubled sums.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@PhenX

PhenX commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

It looks good to me, thanks for this first external pull request 🥳 let's wait for the CI

@PhenX
PhenX merged commit 00d6645 into PiwiTests:main Aug 21, 2026
26 checks passed
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.

bug: sharded runs metadata is displayed wrong in the dashboard

2 participants