← Back to Pull requests

src: set function names in SetFastMethod helpers #67869

Open
unknown opened this pull request with 192 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 29, 2026 11:57 UTC
Author

SetMethodFromTemplate() only calls function->SetName() when its set_function_name argument is true. SetMethod() and SetMethodNoSideEffect() pass true, but the three SetFastMethod()/SetFastMethodNoSideEffect() overloads that install a function on an object pass false, so the functions they register have an empty name. This shows in util.types: v22 moved its predicates from SetMethodNoSideEffect() to SetFastMethodNoSideEffect(), and since then util.types.isProxy.name and most of the other C++ predicates are ''.

This makes SetMethodFromTemplate() always set the name and drops the parameter. Thanks to konard for the report.

Fixes: https://github.com/nodejs/node/issues/67826

The new test checks that every util.types function is named after its property (except isArrayBufferView, which is ArrayBuffer.isView). It fails with v25.6.1 and passes with this change. Since other bindings registered through these helpers now get names too, I ran tools/test.py for parallel/test-{util,process,buffer,v8,bootstrap,url,perf,timers,crypto}* locally (545 tests), and they pass, as do make format-cpp, cpplint and tools/checkimports.py. The tests above ran on a build of an earlier main with the equivalent change, because SetMethodFromTemplate() was introduced after that (#67496); on current main I checked that src/util.cc compiles.

AI disclosure: I used an AI assistant to help write the test and this description. I reproduced the issue, reviewed the change and ran the tests above myself.

Diff: 192 lines (+144 / -48) across 2 files Reviewer: jasnell Review duration: 2098m
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 192 lines diff across 2 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.315
Real PR Conversation Timeline
1 comments
"Review active on #67869"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 35.9% (MEDIUM) · Higher = larger blast radius
35.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 19.2% · Safe to merge
19.2%
Repository