Skip to content

assert,util: fix stale nested cycle memo entries - #62509

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
BridgeAR:BridgeAR/2026-03-29-fix-comparison
Apr 9, 2026
Merged

nodejs-github-bot merged 1 commit into
nodejs:mainfrom
BridgeAR:BridgeAR/2026-03-29-fix-comparison

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

Temporary nested cycle-tracking entries could remain in the memory set after a successful comparison. If a later sibling comparison reused one of those objects, deepStrictEqual could incorrectly fail for equivalent structures.
This cleans up the temporary nested entries after the nested comparison returns.

Fixes: #62422

Temporary nested cycle-tracking entries could remain in the memory set
after a successful comparison. If a later sibling comparison reused one
of those objects, deepStrictEqual could incorrectly fail for equivalent
structures.
This cleans up the temporary nested entries after the nested
comparison returns.

Fixes: nodejs#62422
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Mar 30, 2026
@codecov

codecov Bot commented Mar 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.71%. Comparing base (784ca7b) to head (3fb03d9).
⚠️ Report is 512 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62509      +/-   ##
==========================================
- Coverage   89.77%   89.71%   -0.07%     
==========================================
  Files         673      692      +19     
  Lines      203840   214043   +10203     
  Branches    39180    41058    +1878     
==========================================
+ Hits       182998   192024    +9026     
- Misses      13156    14095     +939     
- Partials     7686     7924     +238     
Files with missing lines Coverage Δ
lib/internal/util/comparisons.js 99.71% <100.00%> (+<0.01%) ⬆️

... and 295 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.

@BridgeAR BridgeAR added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Mar 30, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Mar 30, 2026