Give node:net's rejected connect hosts Node's ENOTFOUND properties #8648
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 · 183 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.312
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8648"
general
weight: 0.35
littledivy
node:net reports connect failures with Node's errno codes, but not a host that
cloudflare:socketsrefuses before it connects. If the address check rejects a host name, for examplenet.connect(0, 'invalid address')or a name with a character outside[A-Za-z0-9._:[]-],connect()throws a TypeError that reaches the'error'listener with nocode,syscallorhostname:Node's getaddrinfo fails with ENOTFOUND for these hosts, and libraries branch on
err.code.In this patch that TypeError gains
code: 'ENOTFOUND',errno,syscall: 'getaddrinfo'andhostname. It is reported through'lookup'before'error', as an unresolvable host already is. Node never looks up an IP literal, so an IP literal thatconnect()rejects, likefe80::1%eth0, keeps the platform's error. The error's type and message don't change, so this ships without a compatibility flag.The port of
test-net-better-error-messages-port-hostnamenow asserts these properties for both kinds of rejected name, and it fails without the fix. A new case covers the IP literal. The port oftest-net-dns-errorawaited the resolver objects instead of their promises, so its'lookup'assertions never ran. It now waits for them and matches upstream.