René's URL Explorer Experiment


Title: test_runner: --test-force-exit with concurrency silently loses test verdicts (parent reports fewer tests than ran, exit 0) · Issue #64833 · nodejs/node · GitHub

Open Graph Title: test_runner: --test-force-exit with concurrency silently loses test verdicts (parent reports fewer tests than ran, exit 0) · Issue #64833 · nodejs/node

X Title: test_runner: --test-force-exit with concurrency silently loses test verdicts (parent reports fewer tests than ran, exit 0) · Issue #64833 · nodejs/node

Description: Version v26.5.0 (minimal repro below, macOS arm64, Darwin 25.5.0); also observed on v24.18.0 (our CI) Platform macOS arm64 (Darwin 25.5.0), also observed on v24.18.0 elsewhere Subsystem test_runner What steps will reproduce the bug? Run ...

Open Graph Description: Version v26.5.0 (minimal repro below, macOS arm64, Darwin 25.5.0); also observed on v24.18.0 (our CI) Platform macOS arm64 (Darwin 25.5.0), also observed on v24.18.0 elsewhere Subsystem test_runner...

X Description: Version v26.5.0 (minimal repro below, macOS arm64, Darwin 25.5.0); also observed on v24.18.0 (our CI) Platform macOS arm64 (Darwin 25.5.0), also observed on v24.18.0 elsewhere Subsystem test_runner...

Opengraph URL: https://github.com/nodejs/node/issues/64833

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_runner: --test-force-exit with concurrency silently loses test verdicts (parent reports fewer tests than ran, exit 0)","articleBody":"### Version\n\nv26.5.0 (minimal repro below, macOS arm64, Darwin 25.5.0); also observed on v24.18.0 (our CI)\n\n### Platform\n\nmacOS arm64 (Darwin 25.5.0), also observed on v24.18.0 elsewhere\n\n### Subsystem\n\ntest_runner\n\n### What steps will reproduce the bug?\n\nRun many fast test files under `--test-force-exit` with `--test-concurrency` > 1. The parent process silently loses a fraction of the test verdicts: reporters (both built-in `tap` and a custom one) receive fewer `test:pass`/`test:fail` events than tests that actually ran, the parent's own `# tests` summary counter drops by the same amount, and the run still exits 0. No warning or error of any kind.\n\n**Generate 40 files × 50 trivially-passing tests (2000 total):**\n\n```js\n// gen.mjs\nimport fs from 'node:fs';\nconst FILES = 40, TESTS = 50;\nfs.rmSync('tests', { recursive: true, force: true });\nfs.mkdirSync('tests');\nfor (let f = 0; f \u003c FILES; f++) {\n  const lines = [\"import { test } from 'node:test';\"];\n  for (let t = 0; t \u003c TESTS; t++) {\n    lines.push(`test('file ${f} test ${t} — some reasonably long test name padding', () => {});`);\n  }\n  fs.writeFileSync(`tests/f${f}.test.mjs`, lines.join('\\n'));\n}\n```\n\n**Counting reporter (counts leaf verdicts the parent actually received):**\n\n```js\n// count-reporter.mjs\nimport fs from 'node:fs';\nexport default async function* countReporter(source) {\n  let pass = 0, fail = 0;\n  for await (const event of source) {\n    if (event.type === 'test:pass' || event.type === 'test:fail') {\n      if (event.data.details?.type === 'test') {\n        if (event.type === 'test:pass') pass++; else fail++;\n      }\n    }\n  }\n  fs.writeSync(2, `\\nREPORTER-COUNT pass=${pass} fail=${fail} total=${pass + fail}\\n`);\n}\n```\n\n**Run:**\n\n```bash\nnode gen.mjs\nnode --test --test-force-exit --test-concurrency=4 \\\n  --test-reporter=tap --test-reporter-destination=stdout \\\n  --test-reporter=./count-reporter.mjs --test-reporter-destination=stderr \\\n  'tests/*.test.mjs'\n```\n\n### How often does it reproduce? Is there a required condition?\n\nEvery run in our testing (21/21 runs lost verdicts), with a different loss each time. Three consecutive runs of the exact command above on v26.5.0:\n\n| run | exit code | parent `# tests` summary | custom reporter count | actual tests |\n|-----|-----------|--------------------------|-----------------------|--------------|\n| 1   | 0         | `# tests 1835`           | 1835                  | 2000         |\n| 2   | 0         | `# tests 1794`           | 1794                  | 2000         |\n| 3   | 0         | `# tests 1936`           | 1936                  | 2000         |\n\nBoth reporters always agree with each other and with the summary counters — the events never reach the parent at all. Removing `--test-force-exit` (same command otherwise) reports exactly 2000/2000 every time. Loss magnitude varies (we've seen 25–234 of 2000, ~1–12%) and occurs at every concurrency level we tried on a larger real suite; higher concurrency loses more.\n\nRequired conditions in our testing: `--test-force-exit` + `--test-concurrency` > 1 (default process isolation).\n\n### What is the expected behavior? Why is that the expected behavior?\n\nEither every verdict from every child is reported before the forced exit, or the runner fails loudly when it knows it dropped report data. Silent partial results defeat the purpose of a test run: on our production suite (Node v24.18.0, 1351 tests) the parent reported as few as 1168 — and since exit code stays 0 when the lost fragments contain only passes, CI stays green while a meaningful fraction of the suite is unaccounted for. A failing test whose verdict lands in a lost fragment is never printed, so the failure detail can vanish from logs even when the child's non-zero exit still fails the run. (To be precise about what we measured: in the minimal repro the injected failure's verdict happened to survive all 15 sample runs and exit stayed 1; the silent loss of pass verdicts with exit 0 reproduces on every all-pass run.)\n\n### What do you see instead?\n\nFewer tests reported than ran — `# tests 1835` for a 2000-test suite — with exit code 0 and no diagnostic (see table above).\n\n### Additional information\n\nSuspected mechanism: `--test-force-exit` calls `process.exit()` while child→parent report streams are still flushing, so V8-serialized test-event frames from process-isolated children are truncated/dropped before the parent's `FileTest` parser consumes them. This is the same failure class that #54327 reported for *reporter destination files* and #55099 fixed — but that fix only awaits the reporter destinations' `close()` on the parent side before exiting. The flush guarantee was never extended one layer up, to the child→parent report stream itself, which is where these events are being lost (a reporter writing synchronously on every event still never sees them).\n\nRelated, reviewed, and believed distinct:\n- #54327 / #55099 — same class, parent-side reporter destinations only (fixed).\n- #63432 — event *ordering* in process isolation mode; present in v24.18.0 which still exhibits this loss.\n- #62693 / #62704 — `FileTest` frame parser hang on malformed frames (hang, not loss).\n- #49925 — the original `--test-force-exit` feature request.\n\nWe currently work around this in CI with a committed manifest of expected tests plus a completeness gate that re-runs files whose verdicts went missing — it works, but it amounts to reimplementing \"report everything you ran\" outside the runner.\n","author":{"url":"https://github.com/fski","@type":"Person","name":"fski"},"datePublished":"2026-07-30T04:59:58Z","url":"https://github.com/nodejs/node/issues/64833"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:14629280-63b4-45e1-4292-1bdeb39aee73
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB4C4:3865E3:97327D:C510FE:6AED3C3E
html-safe-nonce0348973bbe9f6da2e812263d74ad02cb0c3dd710479a7103435e960fcc9eb982
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEM0OjM4NjVFMzo5NzMyN0Q6QzUxMEZFOjZBRUQzQzNFIiwidmlzaXRvcl9pZCI6IjU3NjE1NDA4NzA5MzQxODI5NzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac81a71c35f8886542dd0d1e03d15cbd5a283eab7ae74464ed1221cfb31c0faf8d
hovercard-subject-tagissue:5016352356
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/64833/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cdcbd0a390d0ab93fcf03605c7ac0f883858d250654cc9477b872a0bc44b8147/nodejs/node/issues/64833
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cdcbd0a390d0ab93fcf03605c7ac0f883858d250654cc9477b872a0bc44b8147/nodejs/node/issues/64833
og:image:altVersion v26.5.0 (minimal repro below, macOS arm64, Darwin 25.5.0); also observed on v24.18.0 (our CI) Platform macOS arm64 (Darwin 25.5.0), also observed on v24.18.0 elsewhere Subsystem test_runner...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefski
hostnamegithub.com
expected-hostnamegithub.com
None26c92a9388ddfad3fa88d132b5d5f0b4747030233dcc4e5efb05f1cbae152184
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec629ad99c254d306375fc8354d04321c2c362236
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/64833#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F64833
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F64833
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/64833
Reloadhttps://github.com/nodejs/node/issues/64833
Reloadhttps://github.com/nodejs/node/issues/64833
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests665 (665)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64833
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64833
#64875https://github.com/nodejs/node/pull/64875
#64857https://github.com/nodejs/node/pull/64857
test_runner: --test-force-exit with concurrency silently loses test verdicts (parent reports fewer tests than ran, exit 0)https://github.com/nodejs/node/issues/64833#top
#64875https://github.com/nodejs/node/pull/64875
#64857https://github.com/nodejs/node/pull/64857
test_runnerIssues and PRs related to the test runner subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22test_runner%22
https://github.com/fski
fskihttps://github.com/fski
on Jul 30, 2026https://github.com/nodejs/node/issues/64833#issue-5016352356
#54327https://github.com/nodejs/node/issues/54327
#55099https://github.com/nodejs/node/pull/55099
Test runner with junit reporter and forceExit flag results in incomplete report #54327https://github.com/nodejs/node/issues/54327
test_runner: close and flush destinations on forced exit #55099https://github.com/nodejs/node/pull/55099
test_runner: dont buffer unordered events in process isolation mode #63432https://github.com/nodejs/node/pull/63432
test_runner: infinite loop in FileTest#drainRawBuffer when child stdout contains FF 0F followed by large size bytes #62693https://github.com/nodejs/node/issues/62693
test_runner: avoid hanging on incomplete v8 frames #62704https://github.com/nodejs/node/pull/62704
test_runner: allow to force exit after all tests finished #49925https://github.com/nodejs/node/issues/49925
https://github.com/Navaneethp007
Navaneethp007https://github.com/Navaneethp007
on Jul 30, 2026https://github.com/nodejs/node/issues/64833#issuecomment-5133590432
https://github.com/avivkeller
avivkellerhttps://github.com/avivkeller
on Jul 30, 2026https://github.com/nodejs/node/issues/64833#issuecomment-5136650647
avivkellerhttps://github.com/avivkeller
test_runnerIssues and PRs related to the test runner subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22test_runner%22
on Jul 30, 2026https://github.com/nodejs/node/issues/64833#event-28746872118
https://github.com/bitpshr
bitpshrhttps://github.com/bitpshr
on Jul 30, 2026https://github.com/nodejs/node/issues/64833#issuecomment-5136856706
https://github.com/Navaneethp007
Navaneethp007https://github.com/Navaneethp007
on Jul 31, 2026https://github.com/nodejs/node/issues/64833#issuecomment-5144119404
#64875https://github.com/nodejs/node/pull/64875
#55099https://github.com/nodejs/node/pull/55099
#64857https://github.com/nodejs/node/pull/64857
@NeverBetterEnoughhttps://github.com/NeverBetterEnough
https://github.com/Navaneethp007
Navaneethp007https://github.com/Navaneethp007
on Aug 15, 2026https://github.com/nodejs/node/issues/64833#issuecomment-5301774385
@krsnaSurajhttps://github.com/krsnaSuraj
#64857https://github.com/nodejs/node/pull/64857
#64875https://github.com/nodejs/node/pull/64875
#64875https://github.com/nodejs/node/pull/64875
#64857https://github.com/nodejs/node/pull/64857
https://github.com/Navaneethp007
Navaneethp007https://github.com/Navaneethp007
on Aug 16, 2026https://github.com/nodejs/node/issues/64833#issuecomment-5307177051
#64875https://github.com/nodejs/node/pull/64875
colinhackshttps://github.com/colinhacks
on Aug 17, 2026https://github.com/nodejs/node/issues/64833#event-29575165385
fix(test suite): a run that DROPS tests can no longer report successhttps://github.com/colinhacks/frizz/commit/112aaefac932912e79b8cd8b15369cce3f5c6423
112aaefhttps://github.com/colinhacks/frizz/commit/112aaefac932912e79b8cd8b15369cce3f5c6423
TianZuo555https://github.com/TianZuo555
on Aug 28, 2026https://github.com/nodejs/node/issues/64833#event-30165343700
test(pi-background-terminals): force exit and serialize test fileshttps://github.com/TianZuo555/pi-extensions/commit/3092f6a5da0199c7ee2b534a8841655ea33262e9
3092f6ahttps://github.com/TianZuo555/pi-extensions/commit/3092f6a5da0199c7ee2b534a8841655ea33262e9
ci: split CI from Release and gate publishing on the full suite (#7)https://github.com/TianZuo555/pi-extensions/commit/c160eaac7ba17055d8324f3e609e036d189bf66a
#7https://github.com/TianZuo555/pi-extensions/pull/7
c160eaahttps://github.com/TianZuo555/pi-extensions/commit/c160eaac7ba17055d8324f3e609e036d189bf66a
https://github.com/0xdhx
0xdhxhttps://github.com/0xdhx
on Aug 29, 2026https://github.com/nodejs/node/issues/64833#issuecomment-5461907421
#64875https://github.com/nodejs/node/pull/64875
colinhackshttps://github.com/colinhacks
on Sep 2, 2026https://github.com/nodejs/node/issues/64833#event-30383846553
feat(questions): mid-prose placement is retired — a question always r…https://github.com/colinhacks/frizz/commit/6868a66bb7547ffef9a23e8cff449685bf6fa549
6868a66https://github.com/colinhacks/frizz/commit/6868a66bb7547ffef9a23e8cff449685bf6fa549
https://github.com/juniordurant
juniorduranthttps://github.com/juniordurant
on Sep 22, 2026https://github.com/nodejs/node/issues/64833#issuecomment-5780610449
#64875https://github.com/nodejs/node/pull/64875
#64875https://github.com/nodejs/node/pull/64875
#64875https://github.com/nodejs/node/pull/64875
trek-ehttps://github.com/trek-e
on Oct 2, 2026https://github.com/nodejs/node/issues/64833#event-32303506494
fix(#5170): test-file children write their results to a blocking stdo…https://github.com/open-gsd/gsd-core/commit/2a3ce074c9620c068932c9264cb94773f05c25ad
#5170https://github.com/open-gsd/gsd-core/issues/5170
2a3ce07https://github.com/open-gsd/gsd-core/commit/2a3ce074c9620c068932c9264cb94773f05c25ad
fix(#5170): run-tests fails a chunk whose registered tests did not al…https://github.com/open-gsd/gsd-core/commit/05feaf3a0c9e1d353dc04439341d636b83fbfb8e
#5170https://github.com/open-gsd/gsd-core/issues/5170
05feaf3https://github.com/open-gsd/gsd-core/commit/05feaf3a0c9e1d353dc04439341d636b83fbfb8e
fix(#5170): test-file children write their results to a blocking stdo…https://github.com/open-gsd/gsd-core/commit/2f6af43aebcf8daede24268145c585ff921e7f39
#5170https://github.com/open-gsd/gsd-core/issues/5170
2f6af43https://github.com/open-gsd/gsd-core/commit/2f6af43aebcf8daede24268145c585ff921e7f39
fix(#5170): run-tests fails a chunk whose registered tests did not al…https://github.com/open-gsd/gsd-core/commit/a46f24e5dc74ece87f3d3a6d7729e145b1ae6a04
#5170https://github.com/open-gsd/gsd-core/issues/5170
a46f24ehttps://github.com/open-gsd/gsd-core/commit/a46f24e5dc74ece87f3d3a6d7729e145b1ae6a04
fix(#5170): test-file children write their results to a blocking stdo…https://github.com/open-gsd/gsd-core/commit/115587edf1b8981439fe62280e4567a67bc8f153
#5170https://github.com/open-gsd/gsd-core/issues/5170
115587ehttps://github.com/open-gsd/gsd-core/commit/115587edf1b8981439fe62280e4567a67bc8f153
refactor(#5170): typed gate evidence and a verdict-driven exit status…https://github.com/open-gsd/gsd-core/commit/84b4dfe84f35e58d4b35d57a54bd92af1b21fbce
#5170https://github.com/open-gsd/gsd-core/issues/5170
84b4dfehttps://github.com/open-gsd/gsd-core/commit/84b4dfe84f35e58d4b35d57a54bd92af1b21fbce
nissa-seruhttps://github.com/nissa-seru
on Oct 18, 2026https://github.com/nodejs/node/issues/64833#event-33550220481
test: npm test makes each test file's stdout blocking, so --test-forc…https://github.com/anima-research/agent-framework/commit/b2c858c6abdd79a7bacf6aa6c1121b59adf6c248
b2c858chttps://github.com/anima-research/agent-framework/commit/b2c858c6abdd79a7bacf6aa6c1121b59adf6c248
test: the Windows skip says what's known, not morehttps://github.com/anima-research/agent-framework/commit/f40e2aa0f79e00ed5b83cdb123be975d7ce56c86
f40e2aahttps://github.com/anima-research/agent-framework/commit/f40e2aa0f79e00ed5b83cdb123be975d7ce56c86
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/64833
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64833
test_runnerIssues and PRs related to the test runner subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22test_runner%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.