← Back to Pull requests

esm: avoid dictionary-mode objects in import() #67554

Closed
unknown closed this pull request without merging on Nov 21, 2026 06:38 UTC
View on GitHub
unknown unknown commented on Nov 17, 2026 17:49 UTC
Author

Import attributes were created in C++ with v8::Object::New() and a null
prototype, once per module request and once per import() call. Every
import() call also created a { __proto__: null } diagnostics_channel
context, which was discarded when module.import had no subscribers. V8
creates all of these in dictionary mode.

Build the attributes from an ordinary object with its prototype set to null,
and only create the trace context when there are subscribers. The attributes
are still frozen with a null prototype.

This is independent of https://github.com/nodejs/node/pull/67552, and the two
merge cleanly.

                                                                       confidence improvement accuracy (*)   (**)  (***)
esm/esm-loader-import.js specifier='./relative-existing.js' n=10000           ***      7.24 %       ±1.13% ±1.50% ±1.96%
esm/esm-loader-import.js specifier='./relative-nonexistent.js' n=10000        ***      1.98 %       ±1.02% ±1.36% ±1.77%
esm/esm-loader-import.js specifier='data:text/javascript,{i}' n=10000                  1.27 %       ±1.82% ±2.42% ±3.16%
esm/esm-loader-import.js specifier='node:os' n=10000                          ***      7.83 %       ±1.36% ±1.81% ±2.36%
esm/esm-loader-import.js specifier='node:prefixed-nonexistent' n=10000        ***      7.27 %       ±1.49% ±1.99% ±2.59%

Refs: https://github.com/nodejs/node/pull/67552

---

AI Generated.

Diff: 179 lines (+134 / -45) across 2 files Reviewer: legendecas Review duration: 5089m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 179 lines diff across 2 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
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
Diff Size diff_size
0.311
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #67554"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% 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.5% (MEDIUM) · Higher = larger blast radius
35.5%
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: 60.5% · Lower = rushed or shallow review
60.5%
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: 14% · Safe to merge
14%
Repository