Repository navigation
fix(agent): truthful auth scheme and bounded operation tag on PM-1802 reports - #20056
Conversation
… reports Exact-head review of a11f9dc found the diagnostic itself untrustworthy in the two ways that matter most for PM-1802, plus a grouping hazard. 1. The `route` tag carried thread/message/ask ids, and `/workflows` carried the pagination cursor, so every report leaked user-scoped identifiers into Sentry/Datadog tags with unbounded cardinality. Replaced with a closed `AgentApiOperation` union chosen at the call site. Naming the operation rather than normalizing a path back down means adding a call site without extending the vocabulary is a type error, and no regex can drift. 2. `fetchApi` announced `cloud-auth-header` unconditionally after `addCloudAuthHeader`, but that helper attaches nothing when auth is unavailable and already reports `authHeader !== null` through `onAuthHeader`. The unauthenticated request - the single most important case for this alert - was therefore reported as authenticated. The helper now returns the scheme it actually used, so the two callbacks can no longer disagree. 3. The reported exception carried the backend's own response text, which is uncontrolled and fragments issue grouping across one failure mode. Reports now use a constant message; `AgentApiError` still carries the backend text to the caller, and a test pins that split. Tests follow the review's shape. The tag assertions are exact rather than `objectContaining`, because a partial match cannot falsify "this tag set is bounded and carries no identifier", and there are explicit falsifiers for a thread/message/ask id and for a pagination cursor. The scheme cases are now integration tests on `api.fetchApi` - web-session, attached header, missing header, helper throwing, and off-cloud - since the agentRestClient tests invoke `onAuthScheme` by hand and so could not catch the integration bug. Eight of the ten new tests fail on a11f9dc and pass here; the other two pin paths that were already correct. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎨 Storybook: ✅ Built — View Storybook🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since a11f9dc592de7b7f30f6154763206ee1f89b349c
Full docs: ADR-DEVEX-LINT-0015 🎭 Playwright: ✅ 2192 passed, 0 failed📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-10-04T02:30:50.763Z",
"gitSha": "bb53fa77704748f8e60c76ba29be20d5f077e984",
"branch": "op406-fe20046-repair",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2060.0489999999922,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.42,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 453.56300000000005,
"heapDeltaBytes": -30922404,
"heapUsedBytes": 73447136,
"domNodes": -252,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 8.149,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666129032258066,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2039.6910000000616,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.9559999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 422.37800000000004,
"heapDeltaBytes": -28235884,
"heapUsedBytes": 75591464,
"domNodes": -232,
"jsHeapTotalBytes": -2883584,
"scriptDurationMs": 7.855999999999998,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66585365853659,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1754.0370000000394,
"styleRecalcs": 76,
"styleRecalcDurationMs": 16.369,
"layouts": 12,
"layoutDurationMs": 3.9239999999999995,
"taskDurationMs": 755.953,
"heapDeltaBytes": -2424752,
"heapUsedBytes": 65276168,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 157.356,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66571428571429,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1755.0660000000562,
"styleRecalcs": 74,
"styleRecalcDurationMs": 16.826999999999998,
"layouts": 12,
"layoutDurationMs": 3.933,
"taskDurationMs": 753.64,
"heapDeltaBytes": -2765640,
"heapUsedBytes": 65801080,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 157.87599999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665714285714284,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1703.7640000000351,
"styleRecalcs": 32,
"styleRecalcDurationMs": 9.300999999999998,
"layouts": 6,
"layoutDurationMs": 1.092,
"taskDurationMs": 360.87199999999996,
"heapDeltaBytes": 3353888,
"heapUsedBytes": 71155036,
"domNodes": 53,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 13.497000000000002,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1703.7350000000515,
"styleRecalcs": 32,
"styleRecalcDurationMs": 9.616999999999999,
"layouts": 6,
"layoutDurationMs": 1.3219999999999998,
"taskDurationMs": 323.274,
"heapDeltaBytes": 25371036,
"heapUsedBytes": 79606020,
"domNodes": 53,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 10.345,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 704.4219999999655,
"styleRecalcs": 14,
"styleRecalcDurationMs": 3.6719999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 452.859,
"heapDeltaBytes": -7062520,
"heapUsedBytes": 60626408,
"domNodes": 0,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 165.934,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 646.9710000000077,
"styleRecalcs": 13,
"styleRecalcDurationMs": 3.2180000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 424.012,
"heapDeltaBytes": 15241112,
"heapUsedBytes": 69270744,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 156.93099999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.668421052631594,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1162.1000000000095,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 796.82,
"heapDeltaBytes": 15185332,
"heapUsedBytes": 84361332,
"domNodes": 0,
"jsHeapTotalBytes": 9601024,
"scriptDurationMs": 63.121999999999986,
"eventListeners": 0,
"totalBlockingTimeMs": 521,
"frameDurationMs": 33.8235294117647,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1157.8739999999925,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 808.149,
"heapDeltaBytes": 39131704,
"heapUsedBytes": 107240192,
"domNodes": 0,
"jsHeapTotalBytes": 3833856,
"scriptDurationMs": 69.09099999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 519,
"frameDurationMs": 33.8235294117647,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 862.9000000000246,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 475.95100000000025,
"heapDeltaBytes": -7123388,
"heapUsedBytes": 91739648,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 171.19100000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 225,
"frameDurationMs": 24.76000000000001,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 847.2170000000006,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 471.7419999999999,
"heapDeltaBytes": 17077744,
"heapUsedBytes": 119564616,
"domNodes": 0,
"jsHeapTotalBytes": 2887680,
"scriptDurationMs": 165.02199999999993,
"eventListeners": 0,
"totalBlockingTimeMs": 223,
"frameDurationMs": 25,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10641.404000000022,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9750.166,
"heapDeltaBytes": 16291028,
"heapUsedBytes": 97016568,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 8128.361999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 1460,
"frameDurationMs": 34.74771241830066,
"p95FrameDurationMs": 66.69999999999982
},
{
"name": "extension-clean-combined-draw",
"durationMs": 9062.923999999952,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8299.681,
"heapDeltaBytes": 12548956,
"heapUsedBytes": 80346572,
"domNodes": -142,
"jsHeapTotalBytes": -7999488,
"scriptDurationMs": 6819.508,
"eventListeners": -70,
"totalBlockingTimeMs": 685,
"frameDurationMs": 32.379999999999995,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 9710.01899999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8986.918,
"heapDeltaBytes": 14008576,
"heapUsedBytes": 93776768,
"domNodes": 0,
"jsHeapTotalBytes": -7864320,
"scriptDurationMs": 7483.257,
"eventListeners": 0,
"totalBlockingTimeMs": 966,
"frameDurationMs": 33.2181506849315,
"p95FrameDurationMs": 66.60000000000036
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 9573.082999999997,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8884.242,
"heapDeltaBytes": 3199696,
"heapUsedBytes": 83534840,
"domNodes": 0,
"jsHeapTotalBytes": -18350080,
"scriptDurationMs": 7351.505,
"eventListeners": 0,
"totalBlockingTimeMs": 624,
"frameDurationMs": 33.21631944444445,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "large-graph-idle",
"durationMs": 2014.0099999999848,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.7100000000000013,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 462.86400000000003,
"heapDeltaBytes": -10895700,
"heapUsedBytes": 77150908,
"domNodes": 0,
"jsHeapTotalBytes": -225280,
"scriptDurationMs": 29.88500000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2021.1409999999432,
"styleRecalcs": 7,
"styleRecalcDurationMs": 2.907999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 464.35700000000014,
"heapDeltaBytes": 14025388,
"heapUsedBytes": 89894504,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 30.129999999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2184.137000000021,
"styleRecalcs": 67,
"styleRecalcDurationMs": 9.351999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1503.3369999999998,
"heapDeltaBytes": 812108,
"heapUsedBytes": 63696524,
"domNodes": -328,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 803.859,
"eventListeners": -164,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.794615384615387,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2205.8499999999412,
"styleRecalcs": 69,
"styleRecalcDurationMs": 10.5,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1513.6619999999998,
"heapDeltaBytes": -20170340,
"heapUsedBytes": 68821084,
"domNodes": 0,
"jsHeapTotalBytes": 1347584,
"scriptDurationMs": 821.6909999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66641221374046,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3569.2300000000046,
"styleRecalcs": 69,
"styleRecalcDurationMs": 11.741,
"layouts": 60,
"layoutDurationMs": 13.419,
"taskDurationMs": 1573.323,
"heapDeltaBytes": 82080,
"heapUsedBytes": 64928320,
"domNodes": 24,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 749.133,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.74413145539906,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3548.220000000015,
"styleRecalcs": 70,
"styleRecalcDurationMs": 11.996999999999998,
"layouts": 60,
"layoutDurationMs": 13.610000000000001,
"taskDurationMs": 1588.194,
"heapDeltaBytes": 405436,
"heapUsedBytes": 64406332,
"domNodes": 24,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 760.207,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66619718309859,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3068.511000000001,
"styleRecalcs": 47,
"styleRecalcDurationMs": 7.321,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1853.3590000000002,
"heapDeltaBytes": 5407932,
"heapUsedBytes": 73330400,
"domNodes": 0,
"jsHeapTotalBytes": 1572864,
"scriptDurationMs": 983.9069999999999,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.757377049180324,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3050.5580000000236,
"styleRecalcs": 47,
"styleRecalcDurationMs": 7.231999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1811.192,
"heapDeltaBytes": 4289708,
"heapUsedBytes": 73517136,
"domNodes": 0,
"jsHeapTotalBytes": 1310720,
"scriptDurationMs": 940.4330000000001,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.757692307692306,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2012.5600000000077,
"styleRecalcs": 3,
"styleRecalcDurationMs": 1.1729999999999987,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 451.5100000000001,
"heapDeltaBytes": 10580460,
"heapUsedBytes": 74500816,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 28.402000000000005,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2017.834999999991,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.9290000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 446.59799999999996,
"heapDeltaBytes": 10273940,
"heapUsedBytes": 72875060,
"domNodes": -328,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 26.667,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 663.4159999999838,
"styleRecalcs": 48,
"styleRecalcDurationMs": 7.107999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 443.59000000000003,
"heapDeltaBytes": -41604752,
"heapUsedBytes": 62903920,
"domNodes": -250,
"jsHeapTotalBytes": -3670016,
"scriptDurationMs": 144.71300000000002,
"eventListeners": -204,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.664102564102556,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 613.9930000000504,
"styleRecalcs": 46,
"styleRecalcDurationMs": 5.801,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 407.35900000000004,
"heapDeltaBytes": -41683256,
"heapUsedBytes": 63561192,
"domNodes": -248,
"jsHeapTotalBytes": -2621440,
"scriptDurationMs": 140.94,
"eventListeners": -200,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.662857142857163,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2010.4370000000245,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.8360000000000007,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 398.548,
"heapDeltaBytes": 1045824,
"heapUsedBytes": 70270656,
"domNodes": 0,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 7.2349999999999985,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2008.9739999999665,
"styleRecalcs": 11,
"styleRecalcDurationMs": 4.352,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 395.30000000000007,
"heapDeltaBytes": 1130560,
"heapUsedBytes": 70065240,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 7.071999999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1704.6460000000252,
"styleRecalcs": 78,
"styleRecalcDurationMs": 17.438000000000002,
"layouts": 16,
"layoutDurationMs": 5.341,
"taskDurationMs": 710.643,
"heapDeltaBytes": -5925764,
"heapUsedBytes": 63583304,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 106.69,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6656862745098,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1687.9790000000412,
"styleRecalcs": 77,
"styleRecalcDurationMs": 17.415,
"layouts": 16,
"layoutDurationMs": 5.979,
"taskDurationMs": 715.5709999999999,
"heapDeltaBytes": 15028320,
"heapUsedBytes": 69773356,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 108.724,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1367.163000000005,
"styleRecalcs": 17,
"styleRecalcDurationMs": 28.708,
"layouts": 5,
"layoutDurationMs": 12.742000000000003,
"taskDurationMs": 840.814,
"heapDeltaBytes": 24011516,
"heapUsedBytes": 110811712,
"domNodes": 13747,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 26.97999999999999,
"eventListeners": 2383,
"totalBlockingTimeMs": 129,
"frameDurationMs": 19.211111111111123,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8321.810999999969,
"styleRecalcs": 251,
"styleRecalcDurationMs": 33.546,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5273.96,
"heapDeltaBytes": 7667020,
"heapUsedBytes": 95522664,
"domNodes": 0,
"jsHeapTotalBytes": 1015808,
"scriptDurationMs": 2657.88,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.699397590361443,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8286.798999999974,
"styleRecalcs": 253,
"styleRecalcDurationMs": 34.874,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5379.38,
"heapDeltaBytes": 8003208,
"heapUsedBytes": 96525924,
"domNodes": 0,
"jsHeapTotalBytes": 1015808,
"scriptDurationMs": 2693.295,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66592741935484,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16793.743000000006,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16046.609999999997,
"heapDeltaBytes": -37001844,
"heapUsedBytes": 171632972,
"domNodes": -3045,
"jsHeapTotalBytes": 8658944,
"scriptDurationMs": 257.593,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 28.301180438448565,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "vue-large-graph-idle",
"durationMs": 16670.096000000056,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15978.476999999999,
"heapDeltaBytes": -39818460,
"heapUsedBytes": 182339420,
"domNodes": -3045,
"jsHeapTotalBytes": 13684736,
"scriptDurationMs": 248.582,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 28.53767123287671,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "vue-large-graph-pan",
"durationMs": 20951.164000000004,
"styleRecalcs": 175,
"styleRecalcDurationMs": 18.014000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20541.974,
"heapDeltaBytes": -29422320,
"heapUsedBytes": 182012152,
"domNodes": -3045,
"jsHeapTotalBytes": 4886528,
"scriptDurationMs": 889.871,
"eventListeners": -14915,
"totalBlockingTimeMs": 27,
"frameDurationMs": 38.763888888888886,
"p95FrameDurationMs": 83.30000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 21163.483000000044,
"styleRecalcs": 176,
"styleRecalcDurationMs": 17.856000000000012,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20711.961,
"heapDeltaBytes": -35948428,
"heapUsedBytes": 173605284,
"domNodes": -3045,
"jsHeapTotalBytes": 8470528,
"scriptDurationMs": 870.814,
"eventListeners": -14915,
"totalBlockingTimeMs": 7,
"frameDurationMs": 38.34384057971015,
"p95FrameDurationMs": 83.30000000000109
},
{
"name": "vue-node-resize-workload",
"durationMs": 5992.208000000005,
"styleRecalcs": 20,
"styleRecalcDurationMs": 81.33300000000001,
"layouts": 20,
"layoutDurationMs": 23.764000000000006,
"taskDurationMs": 5892.452,
"heapDeltaBytes": 883636,
"heapUsedBytes": 209470996,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 103.99399999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 31.995187165775402,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-node-resize-workload",
"durationMs": 6154.319999999984,
"styleRecalcs": 20,
"styleRecalcDurationMs": 82.02600000000001,
"layouts": 20,
"layoutDurationMs": 23.76700000000001,
"taskDurationMs": 6036.563000000001,
"heapDeltaBytes": -12607184,
"heapUsedBytes": 212252168,
"domNodes": 0,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 105.45500000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 36.70476190476192,
"p95FrameDurationMs": 66.80000000000109
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8539.169000000016,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8142.723000000002,
"heapDeltaBytes": -16169004,
"heapUsedBytes": 180466232,
"domNodes": -3045,
"jsHeapTotalBytes": 11280384,
"scriptDurationMs": 130.135,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 28.63422818791946,
"p95FrameDurationMs": 50.10000000000218
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8544.07600000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8082.609000000001,
"heapDeltaBytes": -14265872,
"heapUsedBytes": 191725124,
"domNodes": -3045,
"jsHeapTotalBytes": 1417216,
"scriptDurationMs": 128.71899999999997,
"eventListeners": -14915,
"totalBlockingTimeMs": 0,
"frameDurationMs": 28.981694915254245,
"p95FrameDurationMs": 50.10000000000218
},
{
"name": "workflow-execution",
"durationMs": 477.62999999997646,
"styleRecalcs": 22,
"styleRecalcDurationMs": 22.896,
"layouts": 5,
"layoutDurationMs": 2.353,
"taskDurationMs": 137.044,
"heapDeltaBytes": 5899124,
"heapUsedBytes": 71002264,
"domNodes": 131,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 13.976999999999997,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.667857142857137,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "workflow-execution",
"durationMs": 125.25000000005093,
"styleRecalcs": 8,
"styleRecalcDurationMs": 10.731,
"layouts": 2,
"layoutDurationMs": 1.0719999999999998,
"taskDurationMs": 75.08900000000001,
"heapDeltaBytes": 3648076,
"heapUsedBytes": 69042616,
"domNodes": 113,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.884999999999995,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.671428571428546,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 773.9610000000994,
"styleRecalcs": 78,
"styleRecalcDurationMs": 94.809,
"layouts": 76,
"layoutDurationMs": 23.580000000000002,
"taskDurationMs": 742.524,
"heapDeltaBytes": 16858992,
"heapUsedBytes": 80306716,
"domNodes": 76,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 300.649,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66382978723404,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 823.7100000000055,
"styleRecalcs": 78,
"styleRecalcDurationMs": 99.136,
"layouts": 76,
"layoutDurationMs": 24.56,
"taskDurationMs": 786.582,
"heapDeltaBytes": 17338564,
"heapUsedBytes": 82094556,
"domNodes": 76,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 318.475,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665306122448985,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1346.0159999999632,
"styleRecalcs": 78,
"styleRecalcDurationMs": 246.893,
"layouts": 76,
"layoutDurationMs": 27.517,
"taskDurationMs": 1319.503,
"heapDeltaBytes": 8468048,
"heapUsedBytes": 113303720,
"domNodes": 76,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 446.96400000000006,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.088607594936708,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 1381.9720000000189,
"styleRecalcs": 78,
"styleRecalcDurationMs": 262.021,
"layouts": 76,
"layoutDurationMs": 28.814,
"taskDurationMs": 1362.117,
"heapDeltaBytes": 8622468,
"heapUsedBytes": 114882980,
"domNodes": 76,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 457.34400000000005,
"eventListeners": 876,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.510126582278495,
"p95FrameDurationMs": 33.29999999999927
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## fix/pm-1802-agent-api-auth-telemetry #20056 +/- ##
========================================================================
- Coverage 85.71% 85.71% -0.01%
========================================================================
Files 2423 2423
Lines 138391 138881 +490
Branches 37515 37670 +155
========================================================================
+ Hits 118617 119035 +418
- Misses 19398 19470 +72
Partials 376 376
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 18 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 5 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 1 |
| 🟢 Low | 3 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
| // here means the next occurrence can be. | ||
| if (response.status === 401 || response.status === 403) { | ||
| reportError(new Error(message), { | ||
| reportError(new Error(AUTH_REJECTED_MESSAGE), { |
There was a problem hiding this comment.
🟡 Medium — The constant message sanitizes only this report: toApiError still returns an AgentApiError carrying the raw backend text, and callers such as recordSendError, handleHistoryLoadError, reportStopFailure and the ask handlers pass that same error to reportError again, so a 401/403 still emits a second, separately-grouped report with uncontrolled backend text. That also means the new test asserting no thread/message/ask id is ever reported proves less than it claims — it only covers the agent_api_auth_rejected call site. Consider sanitizing at those call sites or giving their reports a redacted cause. Raised by 3 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case, claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Fixed at 703f942: auth-rejected AgentApiError objects are marked after the complete bounded diagnostic is emitted, and the shared reporter suppresses later reports of that exact error object. The caller still receives the backend text for UI handling, but catch boundaries cannot emit it as a second grouping identity. The platform test proves the dedupe, and deleting the guard makes it fail.
| surface: 'agent', | ||
| errorType: 'agent_api_auth_rejected', | ||
| tags: { route, status: response.status, authScheme }, | ||
| tags: { operation, status: response.status, authScheme }, |
There was a problem hiding this comment.
🟢 Low — Replacing the reported message with a constant drops the backend's refusal reason (e.g. "Accepted: bearer_jwt, x_api_key") from this report entirely — it is in no tag, no context, and no cause — even though that reason is the datum PM-1802 was originally identified by. For paths whose callers never re-report, such as listCloudWorkflows and uploadImage, the reason is lost outright. ReportErrorOptions.context lands as Sentry extra and does not participate in grouping, so a bounded context: { reason: message } would keep both the stable grouping this change wants and the diagnosis. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Not adding the backend refusal text to telemetry context. It is uncontrolled server text, may contain user-scoped material, and is not needed for this diagnostic now that status, bounded operation, and actual auth scheme are present. The caller-facing AgentApiError retains it. Commit 703f942 additionally prevents that raw error from being re-reported by higher-level catch boundaries.
| @@ -605,12 +622,15 @@ export class ComfyApi extends EventTarget { | |||
|
|
|||
| const authHeader = await getAuthHeaderIfAvailable() | |||
| onAuthHeader?.(authHeader !== null) | |||
There was a problem hiding this comment.
🟢 Low — getAuthHeaderIfAvailable swallows any throw from the auth store and returns null after only a console.warn, so this branch now reports scheme: 'none' — identical to a request that genuinely had no credentials. For PM-1802 "minting the header failed" is the more actionable cause and is now indistinguishable from "no credentials existed", and the exception itself reaches no telemetry sink; consider a distinct scheme value or a reportError inside that catch. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Keeping none here: it describes the request truthfully—no authentication scheme was attached—whether the header was absent or retrieval threw. Splitting acquisition failure is a separate diagnostic dimension, not an auth scheme, and would need its own privacy/boundedness contract. The existing console warning is unchanged.
| @@ -413,7 +451,7 @@ export function createAgentRestClient() { | |||
| authScheme = scheme | |||
There was a problem hiding this comment.
🟢 Low — authScheme is seeded with 'none', which is also a legitimate reported value, so "fetchApi never invoked onAuthScheme" and "nothing authenticated the request" emit an identical tag. Since the point of this change is to make the scheme tag trustworthy, seeding with a distinct sentinel (undefined or 'unreported') would keep a future wrapper or refactor that drops the callback visible instead of silently plausible. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Fixed at 703f942: the local value now starts as the bounded sentinel unreported, with a test where the mocked fetchApi returns a 401 without invoking the callback. none is therefore reserved for an explicit report that the request used no scheme.
| } | ||
|
|
||
| /** The tag set of the most recent `reportError` call. */ | ||
| function reportedTags(): Record<string, unknown> | undefined { |
There was a problem hiding this comment.
⚪ Nit — reportedTags() inspects only the last reportError call, and the tests converted to it dropped toHaveBeenCalledExactlyOnceWith, so a regression that emits duplicate or extra auth-rejection reports for a single failure would now pass silently — a real concern given callers re-report the same error. Pairing the helper with an explicit call-count assertion restores that guarantee. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Fixed at 703f942: reportedTags now asserts reportError was called exactly once before returning the tags, so every test using the helper rejects duplicate emissions.
|
Exact-head review: 703f942 Reviewed the full diff against #20046 and repaired the one material gap found by the automated panel. Result:
Fresh local validation at this head: 138/138 focused tests; typecheck:app; scoped oxfmt and type-aware oxlint; commit/pre-push hooks green. No user-visible behavior changed, so a browser harness case has no observable assertion to make. Hosted checks are rerunning after the repair commit. I did not merge. |
703f942
into
fix/pm-1802-agent-api-auth-telemetry
Summary
Repairs the three problems the exact-head review of
a11f9dc592found in #20046's PM-1802 diagnostic, so that what the alert reports is both truthful and safe to put in a telemetry tag. Based on #20046's head and targeted at its branch, so this diff is only the repair.Changes
routetag carried thread/message/ask ids, and/workflowscarried the pagination cursor, so every report leaked user-scoped identifiers into Sentry/Datadog tags at unbounded cardinality. It is replaced by a closedAgentApiOperationvocabulary named at each call site (get_thread_messages,answer_thread_ask, …).getFetchRouteTemplatewas considered and is too coarse for this ticket; naming the operation also means adding a call site without extending the vocabulary is a type error, where a path-normalizing regex could silently drift.fetchApiannouncedcloud-auth-headerunconditionally afteraddCloudAuthHeader, but that helper attaches nothing when auth is unavailable and already reportsauthHeader !== nullthroughonAuthHeader. The unauthenticated request — the case PM-1802 is actually about — was reported as authenticated. The helper now returns the scheme it used, soonAuthHeaderandonAuthSchemecannot disagree, andnonecovers both off-cloud and header-unavailable.AgentApiErrorstill carries the backend text to the caller, and a test pins that split.browser_tests/case. The caller-facingAgentApiError.messageis asserted unchanged.Review Focus
api.fetchApi, on purpose. TheagentRestClienttests invokeonAuthSchemeby hand, so they cannot falsify an integration bug in who reports what.api.fetchApi.test.tsnow covers web-session, attached header, missing header, the helper throwing, off-cloud, and that the callback is not forwarded tofetchas a request option.objectContaining. A partial match cannot falsify "this tag set is bounded and carries no identifier". There are explicit falsifiers for a thread/message/ask id and for a pagination cursor — the cursor test asserts the real request URL does contain the secret cursor and that the reported tags do not.AuthSchemestays three values. A fourth value for off-cloud would only restateisCloud, which the deploy surface already carries.Test plan
NODE_OPTIONS=--no-experimental-webstorage pnpm vitest run src/scripts/api.fetchApi.test.ts src/workbench/extensions/agent/services/agent/agentRestClient.test.ts— 106/106 (96 at the reviewed head)a11f9dc592fails 8 of the 10 new tests, includingreports none when the cloud auth header was unavailableand both identifier-leak falsifiers. The other two pin paths that were already correct.fetchApi/onAuthHeader— 1795 passed, 1 pre-existing expected-failpnpm typecheck:app, scopedoxlint --type-aware,oxfmt --check, and the pre-push dead-code audit gate are green on the changed files