Skip to content

test: unflake debugger and REPL tests#64718

Open
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:fix-macos-test-flakes
Open

test: unflake debugger and REPL tests#64718
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:fix-macos-test-flakes

Conversation

@mcollina

@mcollina mcollina commented Jul 24, 2026

Copy link
Copy Markdown
Member

Refs: https://github.com/nodejs/node/actions/runs/30080039199/job/89439279468?pr=64339

The macOS job exposed two independent test races:

  • test-debugger-extract-function-name only checks formatting from the exec
    command, but synchronized on an unrelated initial-break message. Run it
    against an auto-resumed, long-lived target and synchronize directly on the
    debugger prompt instead.
  • test-repl-user-error-handler could receive an inspector
    Promise was collected evaluation error before the user error it intended to
    assert. Give this focused handleError test a synchronous VM evaluator,
    submit the throwing and follow-up expressions separately, and await clean
    REPL teardown.

Validation:

  • python3 tools/test.py parallel/test-debugger-extract-function-name parallel/test-repl-user-error-handler
  • targeted ESLint
  • commit-message validation

@nodejs-github-bot nodejs-github-bot added debugger Issues and PRs related to the debugger subsystem. needs-ci PRs that need a full CI run. labels Jul 24, 2026

@avivkeller avivkeller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, but note that the flake won't be entirely resolved until https://chromium-review.googlesource.com/c/v8/v8/+/8123081 lands1

Footnotes

  1. Running async, as you've done, makes this far more unlikely, but there's still a (albeit <0.1% chance, per my testing) chance of it catching itself, if GC occurs at a poor time

@avivkeller avivkeller added the repl Issues and PRs related to the REPL subsystem. label Jul 24, 2026
@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 24, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 24, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.15%. Comparing base (c558c8e) to head (dd871fa).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #64718    +/-   ##
========================================
  Coverage   90.15%   90.15%            
========================================
  Files         741      743     +2     
  Lines      242251   242408   +157     
  Branches    45624    45650    +26     
========================================
+ Hits       218391   218533   +142     
- Misses      15351    15367    +16     
+ Partials     8509     8508     -1     

see 53 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@avivkeller avivkeller added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 25, 2026
@avivkeller

Copy link
Copy Markdown
Member

@mcollina

=== release test-debug-prompt ===
Path: sequential/test-debug-prompt
Error: Command: out/Release/node /home/runner/work/node/node/node/test/sequential/test-debug-prompt.js

Run the debugger function-formatting checks against an auto-resumed,
long-lived target so they do not depend on initial-break rendering.

Use a synchronous VM evaluator for the REPL handleError test. Submit the
throwing input separately and wait for clean REPL teardown.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina
mcollina force-pushed the fix-macos-test-flakes branch from 58ed4da to dd871fa Compare July 25, 2026 08:01
@avivkeller avivkeller added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 25, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 25, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. debugger Issues and PRs related to the debugger subsystem. needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants