Skip to content

fix(reporters): fix missing testModules in onTestRunEnd when merging blobs from different root directory test runs - #10348

Merged
sheremet-va merged 3 commits into
vitest-dev:mainfrom
hi-ogawa:fix-merge-report-task-id
May 17, 2026
Merged

sheremet-va merged 3 commits into
vitest-dev:mainfrom
hi-ogawa:fix-merge-report-task-id

Conversation

@hi-ogawa

@hi-ogawa hi-ogawa commented May 14, 2026 •

Copy link
Copy Markdown
Collaborator

Description

The missing testModules in onTestRunEnd was due to TestSpecification.taskId mismatches during merge reports. See the comment below for details.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

hi-ogawa and others added 2 commits May 14, 2026 17:40
Co-authored-by: Codex <noreply@openai.com>
@netlify

netlify Bot commented May 14, 2026

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 73ff100
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6a0591e291838d00089301de
😎 Deploy Preview https://deploy-preview-10348--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hi-ogawa hi-ogawa changed the title fix: missing onTestRunEnd(testModules) when merging blobs from different root directory test runs fix(reporters): missing onTestRunEnd(testModules) when merging blobs from different root directory test runs May 14, 2026
Comment on lines +58 to +65
// merge-reports forces the original task id from the test run
taskIdOverride?: string,
) {
const projectName = project.config.name
this.taskId = generateFileHash(
this.taskId = taskIdOverride ?? generateFileHash(
relative(project.config.root, moduleId),
projectName,
metaOverride ?? { typecheck: pool === 'typescript', __vitest_label__: project.config.mergeReportsLabel },
{ typecheck: pool === 'typescript', __vitest_label__: project.config.mergeReportsLabel },

@hi-ogawa hi-ogawa May 14, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were trying hard to replay taskId hash by passing metaOverride, but it turned out the hash can be still off because of relative(project.config.root, moduleId). So, we now ditch hash replay entirely and just pass over taskIdOverride from the real test run instead.

@hi-ogawa hi-ogawa changed the title fix(reporters): missing onTestRunEnd(testModules) when merging blobs from different root directory test runs fix(reporters): fix missing testModules in onTestRunEnd when merging blobs from different root directory test runs May 14, 2026
hi-ogawa added a commit to hi-ogawa/vitest that referenced this pull request May 14, 2026
@hi-ogawa
hi-ogawa marked this pull request as ready for review May 14, 2026 10:06
sheremet-va
sheremet-va previously approved these changes May 14, 2026
@sheremet-va
sheremet-va merged commit 745b30b into vitest-dev:main May 17, 2026
16 checks passed
@hi-ogawa
hi-ogawa deleted the fix-merge-report-task-id branch May 18, 2026 00:30
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing TestModule when merging blobs from different platform/root

2 participants