fix(test-execution): reject incomplete Vitest execution evidence - #712
Open
rudycelekli wants to merge 2 commits into
Open
rudycelekli wants to merge 2 commits into
rudycelekli wants to merge 2 commits into
Conversation
rudycelekli
force-pushed
the
fix/vitest-report-files
branch
from
September 23, 2026 02:28
0726bc5 to
8d2607b
Compare
1 task
12 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Vitest 4/5 writes its JSON report to a per-run
--outputFile, but the shared reader could substitute stdout if the owned file was missing or empty. A stale or unrelated passing JSON string could then be accepted as this run's evidence. A second false-pass path remained when the owned report existed: retry, flaky detection, and phase scheduling could accept passing assertions even though the runner exited nonzero after writing the report.Require the owned report for all five Vitest consumers. Retry now requires the process exit and parsed report to agree, including its Jest and Mocha parsing paths. Flaky detection and phase scheduling use the shared runner-verdict rules to reject execution failures without failed assertions while retaining ordinary assertion failures for analysis and threshold evaluation. The async test executor also keeps its report directory until a timed-out child closes and cleans up synchronous spawn failures.
Verification
passed: true, flaky detection recorded a passing test, and phase scheduling returnedsuccess: truefor a passing report followed by exit code 1.AQE_PROJECT_ROOTandTMPDIRbefore imports.npm run typecheck,npm run build, changed-source ESLint, andgit diff --checkpass.Failure modes
tests/unit/shared/vitest-json-report.test.tsandtests/unit/domains/test-execution/test-executor-vitest-report.test.ts.tests/unit/domains/test-execution/vitest-missing-report-consumers.test.ts.tests/unit/domains/test-execution/test-executor-vitest-report.test.ts.tests/integration/test-runner-outcomes.test.ts.Required check (issue #401)
Optional context
npm-publish.yml/tests/fixtures/init-corpus/: no