← Back to Pull requests

lib: stop refreshing composite AbortSignals #67543

Closed
unknown closed this pull request without merging on Nov 19, 2026 14:16 UTC
View on GitHub
unknown unknown commented on Nov 17, 2026 14:06 UTC
Author

Since #66014, AbortSignal.any() follows its sources as soon as it creates a composite, so aborting a source aborts every composite that follows it right away. The aborted and reason getters and throwIfAborted() still walked the composite's sources on every call. Profiling throwIfAborted() on a two-source composite put 91% of the time in that walk, most of it in WeakRef.prototype.deref(), which adds its target to the kept objects of the current job.

That walk can't find anything anymore: a composite is always aborted by the time one of its sources is. So this removes refreshCompositeSignal() and adds a benchmark for throwIfAborted(). test-abortsignal-any-source-gc already checks each accessor after a source has been aborted and collected.

node benchmark/abort_controller/abort-signal-throw-if-aborted.js, release builds of main and this branch, Linux x64, 30 interleaved runs per binary:

| kind | improvement | 95% CI |
|---|---|---|
| controller | 7.38% | ± 3.84% |
| timeout | 6.84% | ± 3.04% |
| any | 1652.02% | ± 37.91% |
| mixed | 430.80% | ± 12.60% |

The aborted getter gets the same speedup. In the existing abort_controller benchmarks, any with listen is 7% faster and addAbortListener is 2-3.5% slower. Its optimized code is the same apart from the removed check (same inlining, no deopts), so I think that one is code layout, but it shows up consistently.

Diff: 176 lines (+132 / -44) across 2 files Reviewer: panva Review duration: 2890m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 176 lines diff across 2 files
0.35
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.310
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #67543"
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.4% (MEDIUM) · Higher = larger blast radius
35.4%
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.0% · Safe to merge
14.0%
Repository