Structured-clone user-timing detail #8852
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.36) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 203 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.318
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8852"
general
weight: 0.35
littledivy
The User Timing spec says
performance.mark(),performance.measure()and thePerformanceMarkconstructor store a structured clone ofdetail, and throw a DataCloneError when it can't be cloned. workerd kept the caller's value instead, so the entry shared the caller's object and a Symbol or function was accepted. Six structured-serialize-detail WPT subtests failed because of this.In this patch the entries store a clone of
detail. Adetailthat can't be cloned throws a DataCloneError, and no entry is recorded.mark()now builds its entry through thePerformanceMarkconstructor, andmeasure()passesdetailto thePerformanceMeasureconstructor.No compat flag: portable code is more likely to expect the standard behaviour, which Node.js and browsers already have, than workerd's current one. What does change for a deployed Worker: a function, a Symbol or another uncloneable
detailnow throws, and changing the original object after the call no longer changes the entry. Primitive and cloneable details read back as before, and an undefineddetailstill reads back as null.The six WPT expected failures are removed. New cases in
perf-hooks-nodejs-testcover:mark(), the constructor andmeasure()The WPT and the new tests both fail without the fix.
//src/wpt:user-timing@,//src/wpt:user-timing@all-autogates,//src/workerd/api/node/tests:perf-hooks-nodejs-test@(including@all-compat-flagsand@all-autogates) and//src/workerd/api/tests:allpass.