Repository navigation
fix(test-execution): reject incomplete Vitest execution evidence - #712
Merged
proffesor-for-testing merged 2 commits intoSep 27, 2026
Merged
proffesor-for-testing merged 2 commits into
proffesor-for-testing merged 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 done
12 tasks
proffesor-for-testing
approved these changes
Sep 27, 2026
proffesor-for-testing
left a comment
Owner
There was a problem hiding this comment.
Thanks @rudycelekli — this closes a real false-pass hole. Checked against real Vitest 4.1.4 on every case (pass, fail, skip/todo, empty file, no files, module crash, --passWithNoTests): each writes the owned report, so legitimate runs aren't rejected, and the Jest/Mocha paths are untouched. 298/298 focused tests pass merged with current main; the Performance Gates red is the known RVF timing flake fixed in #718. Merging.
Two small follow-ups if you're up for them:
- In
test-executor.ts(~L577/581) a missing/malformed report becomes a plainError, so the CLI path counts it as N failed tests while the MCP handler reportsTestRunnerExecutionError. UsingTestRunnerExecutionErrorthere would give CLI/MCP parity (same forreport.read()throwing intest-execution-handlers.ts:228). - Todo-only files/phases count as "zero tests" in the phase executor and flaky detector (only
numPendingTests/pendingare counted, notnumTodoTests).
proffesor-for-testing
merged commit Sep 27, 2026
fa50f61
into
proffesor-for-testing:main
19 of 20 checks passed
1 task done
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