Repository navigation
fix: tolerate malformed historical tool-call rows in agent history load - #19621
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
📦 Bundle: 9.4 MB gzip 🔴 +2 BDetailsSummary
Category Glance App Entry Points — 5.33 kB (baseline 5.33 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 2.15 MB (baseline 2.15 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration Status: 3 unchanged Views & Navigation — 147 kB (baseline 147 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 18 unchanged Panels & Settings — 669 kB (baseline 669 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens Status: 29 unchanged User & Accounts — 61.1 kB (baseline 61.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 15 unchanged Editors & Dialogs — 341 kB (baseline 341 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 12 unchanged UI Components — 211 kB (baseline 211 kB) • ⚪ 0 BReusable component library chunks Status: 24 unchanged Data & Services — 1.36 MB (baseline 1.36 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 25 unchanged Utilities & Hooks — 2.29 MB (baseline 2.29 MB) • ⚪ 0 BHelpers, composables, and utility bundles Status: 62 unchanged Vendor & Third-Party — 14.3 MB (baseline 14.3 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 19 MB (baseline 19 MB) • ⚪ 0 BBundles that do not match a named category
Status: 1 added / 1 removed / 351 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-10-12T00:36:01.213Z",
"gitSha": "402b47b14d48408318c1a3171fa6fa409b4966ef",
"branch": "fix/agent-history-malformed-tool-call",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2008.8109999999801,
"styleRecalcs": 11,
"styleRecalcDurationMs": 3.7209999999999996,
"layouts": 11,
"layoutDurationMs": 2.857,
"taskDurationMs": 341.526,
"heapDeltaBytes": -3467216,
"heapUsedBytes": 63545320,
"domNodes": -162,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 7.397000000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-idle",
"durationMs": 2023.2340000000022,
"styleRecalcs": 13,
"styleRecalcDurationMs": 5.132000000000001,
"layouts": 13,
"layoutDurationMs": 3.7850000000000006,
"taskDurationMs": 479.51,
"heapDeltaBytes": -9271100,
"heapUsedBytes": 66281120,
"domNodes": -162,
"jsHeapTotalBytes": 8912896,
"scriptDurationMs": 12.561,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1694.40400000002,
"styleRecalcs": 71,
"styleRecalcDurationMs": 15.486,
"layouts": 12,
"layoutDurationMs": 2.8930000000000002,
"taskDurationMs": 616.124,
"heapDeltaBytes": 344892,
"heapUsedBytes": 68047824,
"domNodes": -162,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 111.654,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6656862745098,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1711.8920000000344,
"styleRecalcs": 71,
"styleRecalcDurationMs": 17.537,
"layouts": 11,
"layoutDurationMs": 2.933,
"taskDurationMs": 708.7909999999999,
"heapDeltaBytes": -1632764,
"heapUsedBytes": 66165080,
"domNodes": -162,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 129.468,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665048543689323,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1725.0149999999849,
"styleRecalcs": 19,
"styleRecalcDurationMs": 6.7669999999999995,
"layouts": 14,
"layoutDurationMs": 3.467,
"taskDurationMs": 278.109,
"heapDeltaBytes": 19376948,
"heapUsedBytes": 86972148,
"domNodes": 47,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 12.626999999999999,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384614,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1709.05300000004,
"styleRecalcs": 18,
"styleRecalcDurationMs": 6.019,
"layouts": 14,
"layoutDurationMs": 3.3939999999999997,
"taskDurationMs": 254.53300000000002,
"heapDeltaBytes": 19408780,
"heapUsedBytes": 86979224,
"domNodes": 47,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 10.803999999999998,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666019417475724,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 590.689999999995,
"styleRecalcs": 16,
"styleRecalcDurationMs": 8.12,
"layouts": 12,
"layoutDurationMs": 5.039999999999999,
"taskDurationMs": 405.12199999999996,
"heapDeltaBytes": 393568,
"heapUsedBytes": 67785996,
"domNodes": 0,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 134.094,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66388888888889,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 542.1339999999759,
"styleRecalcs": 15,
"styleRecalcDurationMs": 5.385,
"layouts": 11,
"layoutDurationMs": 2.8640000000000003,
"taskDurationMs": 366.811,
"heapDeltaBytes": 7622744,
"heapUsedBytes": 81721944,
"domNodes": 0,
"jsHeapTotalBytes": 11796480,
"scriptDurationMs": 117.332,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 936.9699999999739,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 561.96,
"heapDeltaBytes": 490716,
"heapUsedBytes": 81467468,
"domNodes": -192,
"jsHeapTotalBytes": 15212544,
"scriptDurationMs": 42.7,
"eventListeners": -105,
"totalBlockingTimeMs": 268,
"frameDurationMs": 25.922222222222217,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 910.5509999999981,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 559.8989999999999,
"heapDeltaBytes": -1572860,
"heapUsedBytes": 81762632,
"domNodes": -192,
"jsHeapTotalBytes": 13639680,
"scriptDurationMs": 39.580000000000005,
"eventListeners": -106,
"totalBlockingTimeMs": 269,
"frameDurationMs": 26.188571428571425,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 670.8240000000387,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 262.4740000000001,
"heapDeltaBytes": -4408296,
"heapUsedBytes": 75592704,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 85.705,
"eventListeners": 0,
"totalBlockingTimeMs": 82,
"frameDurationMs": 20.097058823529416,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 707.8450000000203,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 314.48900000000003,
"heapDeltaBytes": -5563796,
"heapUsedBytes": 74194228,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 95.525,
"eventListeners": 0,
"totalBlockingTimeMs": 91,
"frameDurationMs": 20.59117647058822,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6864.783999999986,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5756.055,
"heapDeltaBytes": 10072068,
"heapUsedBytes": 77219212,
"domNodes": -258,
"jsHeapTotalBytes": -262144,
"scriptDurationMs": 4395.527999999999,
"eventListeners": -68,
"totalBlockingTimeMs": 54,
"frameDurationMs": 20.756969696969694,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6412.2590000000055,
"styleRecalcs": 3,
"styleRecalcDurationMs": 0.9450000000000014,
"layouts": 3,
"layoutDurationMs": 0.742,
"taskDurationMs": 5348.5,
"heapDeltaBytes": -6478660,
"heapUsedBytes": 72712428,
"domNodes": -258,
"jsHeapTotalBytes": -921600,
"scriptDurationMs": 4056.9889999999996,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.502735562310026,
"p95FrameDurationMs": 33.30000000000018
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6327.325999999999,
"styleRecalcs": 3,
"styleRecalcDurationMs": 1.2710000000000012,
"layouts": 3,
"layoutDurationMs": 0.941,
"taskDurationMs": 5216.915999999999,
"heapDeltaBytes": -7183968,
"heapUsedBytes": 72279688,
"domNodes": -258,
"jsHeapTotalBytes": -921600,
"scriptDurationMs": 3893.418,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.738750000000003,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6581.524000000001,
"styleRecalcs": 4,
"styleRecalcDurationMs": 2.6999999999999993,
"layouts": 4,
"layoutDurationMs": 2.1579999999999995,
"taskDurationMs": 5458.116999999999,
"heapDeltaBytes": -23584752,
"heapUsedBytes": 72876024,
"domNodes": -258,
"jsHeapTotalBytes": 7991296,
"scriptDurationMs": 4173.7660000000005,
"eventListeners": -68,
"totalBlockingTimeMs": 33,
"frameDurationMs": 20.70125786163522,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "large-combo-open",
"durationMs": 141.99300000001358,
"styleRecalcs": 21,
"styleRecalcDurationMs": 14.426,
"layouts": 12,
"layoutDurationMs": 2.9929999999999994,
"taskDurationMs": 110.35999999999999,
"heapDeltaBytes": -8099580,
"heapUsedBytes": 84697008,
"domNodes": 917,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 5.968,
"eventListeners": 195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.44285714285713,
"p95FrameDurationMs": 33.30000000000018
},
{
"name": "large-combo-open",
"durationMs": 153.9980000000014,
"styleRecalcs": 21,
"styleRecalcDurationMs": 15.548999999999998,
"layouts": 12,
"layoutDurationMs": 3.596,
"taskDurationMs": 115.24100000000001,
"heapDeltaBytes": 12983424,
"heapUsedBytes": 93613624,
"domNodes": 917,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 6.857,
"eventListeners": 195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.41428571428573,
"p95FrameDurationMs": 49.90000000000009
},
{
"name": "large-graph-idle",
"durationMs": 2010.4729999999904,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.004999999999999,
"layouts": 10,
"layoutDurationMs": 2.215,
"taskDurationMs": 397.283,
"heapDeltaBytes": -2487212,
"heapUsedBytes": 81394728,
"domNodes": -258,
"jsHeapTotalBytes": 3272704,
"scriptDurationMs": 25.682000000000002,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2072.738999999956,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.723,
"layouts": 10,
"layoutDurationMs": 6.154,
"taskDurationMs": 571.326,
"heapDeltaBytes": -5825248,
"heapUsedBytes": 92845796,
"domNodes": -258,
"jsHeapTotalBytes": 2785280,
"scriptDurationMs": 36.09799999999999,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6664,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2534.1339999999946,
"styleRecalcs": 70,
"styleRecalcDurationMs": 9.526,
"layouts": 10,
"layoutDurationMs": 2.5540000000000003,
"taskDurationMs": 1245.3150000000003,
"heapDeltaBytes": 2707980,
"heapUsedBytes": 87499956,
"domNodes": -258,
"jsHeapTotalBytes": 6119424,
"scriptDurationMs": 591.441,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666447368421053,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2793.4829999999806,
"styleRecalcs": 70,
"styleRecalcDurationMs": 8.998000000000003,
"layouts": 9,
"layoutDurationMs": 2.497,
"taskDurationMs": 1274.897,
"heapDeltaBytes": 5590216,
"heapUsedBytes": 91075540,
"domNodes": -258,
"jsHeapTotalBytes": 3235840,
"scriptDurationMs": 590.9649999999999,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666071428571428,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3520.438000000013,
"styleRecalcs": 74,
"styleRecalcDurationMs": 10.283999999999999,
"layouts": 68,
"layoutDurationMs": 13.11,
"taskDurationMs": 1255.587,
"heapDeltaBytes": 1282824,
"heapUsedBytes": 87500316,
"domNodes": 24,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 553.492,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665876777251185,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3608.198000000016,
"styleRecalcs": 73,
"styleRecalcDurationMs": 9.790000000000001,
"layouts": 67,
"layoutDurationMs": 12.566,
"taskDurationMs": 1277.623,
"heapDeltaBytes": -1792568,
"heapUsedBytes": 75839584,
"domNodes": -234,
"jsHeapTotalBytes": 3010560,
"scriptDurationMs": 538.968,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666203703703705,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2834.0029999999956,
"styleRecalcs": 48,
"styleRecalcDurationMs": 8.06,
"layouts": 9,
"layoutDurationMs": 3.601,
"taskDurationMs": 1444.474,
"heapDeltaBytes": 16037996,
"heapUsedBytes": 103311036,
"domNodes": 0,
"jsHeapTotalBytes": 5660672,
"scriptDurationMs": 706.457,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.764497041420118,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "legacy-node-drag",
"durationMs": 3062.8530000000183,
"styleRecalcs": 47,
"styleRecalcDurationMs": 7.048,
"layouts": 8,
"layoutDurationMs": 2.1269999999999993,
"taskDurationMs": 1492.575,
"heapDeltaBytes": 15309864,
"heapUsedBytes": 104300704,
"domNodes": 0,
"jsHeapTotalBytes": 8019968,
"scriptDurationMs": 726.139,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.756830601092897,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2034.6249999999486,
"styleRecalcs": 9,
"styleRecalcDurationMs": 3.302000000000001,
"layouts": 9,
"layoutDurationMs": 2.5199999999999996,
"taskDurationMs": 460.68,
"heapDeltaBytes": -2789640,
"heapUsedBytes": 84692404,
"domNodes": -258,
"jsHeapTotalBytes": 3309568,
"scriptDurationMs": 29.61799999999999,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6655737704918,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "minimap-idle",
"durationMs": 2005.1330000000007,
"styleRecalcs": 10,
"styleRecalcDurationMs": 3.5069999999999997,
"layouts": 10,
"layoutDurationMs": 2.691,
"taskDurationMs": 400.611,
"heapDeltaBytes": -2089672,
"heapUsedBytes": 85388812,
"domNodes": -258,
"jsHeapTotalBytes": 2785280,
"scriptDurationMs": 25.026999999999994,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760327,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 429.1380000000231,
"styleRecalcs": 49,
"styleRecalcDurationMs": 7.409,
"layouts": 12,
"layoutDurationMs": 3.2450000000000006,
"taskDurationMs": 298.86400000000003,
"heapDeltaBytes": 21658348,
"heapUsedBytes": 89609972,
"domNodes": 0,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 98.173,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665384615384603,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 513.4690000001001,
"styleRecalcs": 47,
"styleRecalcDurationMs": 6.556000000000001,
"layouts": 10,
"layoutDurationMs": 2.785,
"taskDurationMs": 339.62499999999994,
"heapDeltaBytes": 1908344,
"heapUsedBytes": 78751296,
"domNodes": 0,
"jsHeapTotalBytes": 12582912,
"scriptDurationMs": 111.18499999999999,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2025.638000000015,
"styleRecalcs": 12,
"styleRecalcDurationMs": 3.9310000000000005,
"layouts": 12,
"layoutDurationMs": 2.9029999999999996,
"taskDurationMs": 353.423,
"heapDeltaBytes": 2565916,
"heapUsedBytes": 70603144,
"domNodes": -180,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 7.827000000000001,
"eventListeners": -114,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66475409836065,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2021.2930000000142,
"styleRecalcs": 15,
"styleRecalcDurationMs": 5.916999999999999,
"layouts": 13,
"layoutDurationMs": 4.106,
"taskDurationMs": 503.842,
"heapDeltaBytes": -10977004,
"heapUsedBytes": 71354776,
"domNodes": -180,
"jsHeapTotalBytes": 9699328,
"scriptDurationMs": 11.604,
"eventListeners": -114,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1676.324999999963,
"styleRecalcs": 76,
"styleRecalcDurationMs": 17.298000000000002,
"layouts": 13,
"layoutDurationMs": 3.023,
"taskDurationMs": 601.8260000000001,
"heapDeltaBytes": 136524,
"heapUsedBytes": 68108220,
"domNodes": -172,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 85.566,
"eventListeners": -112,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666336633663363,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1701.392999999996,
"styleRecalcs": 75,
"styleRecalcDurationMs": 18.284000000000002,
"layouts": 8,
"layoutDurationMs": 2.438,
"taskDurationMs": 666.684,
"heapDeltaBytes": -30372,
"heapUsedBytes": 67032888,
"domNodes": -172,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 95.317,
"eventListeners": -112,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666666,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-transition-enter",
"durationMs": 882.1149999999989,
"styleRecalcs": 19,
"styleRecalcDurationMs": 21.790000000000003,
"layouts": 5,
"layoutDurationMs": 10.655000000000001,
"taskDurationMs": 698.2029999999999,
"heapDeltaBytes": 36056976,
"heapUsedBytes": 114417332,
"domNodes": 15956,
"jsHeapTotalBytes": 16130048,
"scriptDurationMs": 20.578,
"eventListeners": 3244,
"totalBlockingTimeMs": 81,
"frameDurationMs": 20.07727272727274,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8203.972000000022,
"styleRecalcs": 251,
"styleRecalcDurationMs": 25.119,
"layouts": 11,
"layoutDurationMs": 2.7390000000000003,
"taskDurationMs": 3786.966,
"heapDeltaBytes": 10814884,
"heapUsedBytes": 92869872,
"domNodes": -258,
"jsHeapTotalBytes": 4546560,
"scriptDurationMs": 1936.15,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665922920892495,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8464.338999999996,
"styleRecalcs": 250,
"styleRecalcDurationMs": 24.298000000000002,
"layouts": 10,
"layoutDurationMs": 2.2439999999999998,
"taskDurationMs": 4069.1360000000004,
"heapDeltaBytes": -16263444,
"heapUsedBytes": 67690664,
"domNodes": -258,
"jsHeapTotalBytes": 2748416,
"scriptDurationMs": 1897.003,
"eventListeners": -65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66594488188976,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17008.43199999997,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16302.731999999998,
"heapDeltaBytes": 6482468,
"heapUsedBytes": 284458148,
"domNodes": -3330,
"jsHeapTotalBytes": 12640256,
"scriptDurationMs": 222.949,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 29.87574692442882,
"p95FrameDurationMs": 66.59999999999854
},
{
"name": "vue-large-graph-idle",
"durationMs": 16716.971000000056,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15854.312,
"heapDeltaBytes": -12928132,
"heapUsedBytes": 287299636,
"domNodes": -307,
"jsHeapTotalBytes": 667648,
"scriptDurationMs": 212.01500000000001,
"eventListeners": -7,
"totalBlockingTimeMs": 0,
"frameDurationMs": 29.071304347826086,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "vue-large-graph-pan",
"durationMs": 19587.731000000018,
"styleRecalcs": 155,
"styleRecalcDurationMs": 16.769000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19150.637,
"heapDeltaBytes": -5529736,
"heapUsedBytes": 288987532,
"domNodes": -3330,
"jsHeapTotalBytes": 1875968,
"scriptDurationMs": 663.149,
"eventListeners": -651,
"totalBlockingTimeMs": 1,
"frameDurationMs": 35.93137614678899,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-large-graph-pan",
"durationMs": 19519.211999999927,
"styleRecalcs": 138,
"styleRecalcDurationMs": 14.953000000000022,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19193.79,
"heapDeltaBytes": -20384116,
"heapUsedBytes": 283515352,
"domNodes": -3330,
"jsHeapTotalBytes": 7307264,
"scriptDurationMs": 675.304,
"eventListeners": -651,
"totalBlockingTimeMs": 28,
"frameDurationMs": 37.204952380952385,
"p95FrameDurationMs": 83.29999999999927
},
{
"name": "vue-node-resize-workload",
"durationMs": 6145.715999999993,
"styleRecalcs": 20,
"styleRecalcDurationMs": 56.806999999999995,
"layouts": 20,
"layoutDurationMs": 27.595999999999997,
"taskDurationMs": 6002.952,
"heapDeltaBytes": -13253556,
"heapUsedBytes": 285426064,
"domNodes": -3330,
"jsHeapTotalBytes": 19832832,
"scriptDurationMs": 89.55300000000001,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 34.16555555555555,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-node-resize-workload",
"durationMs": 6169.287999999938,
"styleRecalcs": 20,
"styleRecalcDurationMs": 49.117999999999995,
"layouts": 20,
"layoutDurationMs": 23.139999999999993,
"taskDurationMs": 6069.1990000000005,
"heapDeltaBytes": -46675764,
"heapUsedBytes": 251167724,
"domNodes": -3330,
"jsHeapTotalBytes": 2015232,
"scriptDurationMs": 90.26900000000002,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 36.48757396449704,
"p95FrameDurationMs": 66.70000000000073
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8320.959999999957,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8015.898,
"heapDeltaBytes": 940040,
"heapUsedBytes": 271664840,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 118.90099999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 28.480821917808225,
"p95FrameDurationMs": 50.10000000000218
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8195.479999999974,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7870.385999999998,
"heapDeltaBytes": -20375004,
"heapUsedBytes": 259608612,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 104.87200000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 28.51219512195122,
"p95FrameDurationMs": 50.099999999998545
},
{
"name": "workflow-execution",
"durationMs": 94.22899999998435,
"styleRecalcs": 8,
"styleRecalcDurationMs": 10.882000000000001,
"layouts": 8,
"layoutDurationMs": 2.8400000000000003,
"taskDurationMs": 66.67099999999999,
"heapDeltaBytes": 4577764,
"heapUsedBytes": 71814380,
"domNodes": 120,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 7.033999999999999,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 955.5499999999029,
"styleRecalcs": 20,
"styleRecalcDurationMs": 14.095999999999998,
"layouts": 12,
"layoutDurationMs": 3.7989999999999995,
"taskDurationMs": 115.54899999999999,
"heapDeltaBytes": 7662776,
"heapUsedBytes": 75010788,
"domNodes": 121,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 12.592,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66724137931034,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 266.6749999999638,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.9219999999999999,
"layouts": 76,
"layoutDurationMs": 12.508999999999999,
"taskDurationMs": 219.069,
"heapDeltaBytes": -19706852,
"heapUsedBytes": 74416188,
"domNodes": 4,
"jsHeapTotalBytes": 11796480,
"scriptDurationMs": 90.976,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66874999999999,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 243.4729999999945,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.9420000000000001,
"layouts": 76,
"layoutDurationMs": 12.817,
"taskDurationMs": 206.10099999999997,
"heapDeltaBytes": 9148032,
"heapUsedBytes": 94827068,
"domNodes": 4,
"jsHeapTotalBytes": 9175040,
"scriptDurationMs": 87.967,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 387.6149999999825,
"styleRecalcs": 5,
"styleRecalcDurationMs": 3.519,
"layouts": 76,
"layoutDurationMs": 15.961,
"taskDurationMs": 343.322,
"heapDeltaBytes": -1152564,
"heapUsedBytes": 123989828,
"domNodes": 4,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 116.107,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 317.17600000001767,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.71,
"layouts": 76,
"layoutDurationMs": 13.184,
"taskDurationMs": 279.465,
"heapDeltaBytes": -6506508,
"heapUsedBytes": 111503828,
"domNodes": 4,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 92.74000000000001,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66500000000001,
"p95FrameDurationMs": 16.700000000000728
}
]
}🎭 Playwright: ✅ 2262 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 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 🌾 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 f64ad09b42f82ff394e6d658cef271906ccf6ee3
Full docs: ADR-DEVEX-LINT-0015 |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #19621 +/- ##
==========================================
+ Coverage 86.08% 86.87% +0.79%
==========================================
Files 3644 2594 -1050
Lines 173937 145750 -28187
Branches 45888 37860 -8028
==========================================
- Hits 149729 126617 -23112
+ Misses 22199 18747 -3452
+ Partials 2009 386 -1623
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1060 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…ws in agent history load (#19624) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://Comfy-Org.slack.com/archives/C0BGH348Z0C/p1789885354111069)_ Backport of #19621 to `cloud/1.54`. This branch's `zToolCallSummary` / `zPersistedToolCallSummary` / `parseToolCallEntry` code is byte-identical to `main` at the time #19621 was branched (both descend from #19606's `[backport cloud/1.54] feat: use generated ToolCallSummary type for persisted tool-call schema`), so the cherry-pick applied cleanly with no conflicts. ## Before `agentRestClient.ts`'s `getMessages()` calls `zAgentMessages.parse()` (throws, not `safeParse`). Because `zAgentMessage.content.tool_calls` was typed as `z.array(zToolCallSummary)` — the generated schema, which requires `tool_call_id`, closes `status` to `'success' | 'error'`, and requires an integer `duration_ms` — a single non-conforming historical tool-call row threw during `.parse()` and failed the entire array/message/response parse, surfacing as `agent_history_load_failed` instead of gracefully degrading just that one entry. ## After - `agentApiSchema.ts`: the message-parse boundary's `content.tool_calls` is now `z.array(z.unknown())`, so a malformed entry can never throw at `zAgentMessages.parse()`. `zPersistedToolCallSummary` (used only by `parseToolCallEntry`'s own `safeParse`) relaxes the generated schema: `tool_call_id` optional, `status` a bare string, `duration_ms` not required to be an integer. - `agentTranscript.ts`: `parseToolCallEntry` validates only the fields it reads (`.pick()`), restores the `tool_call_id ?? id` fallback for rows predating `tool_call_id`, and `toolCallOk` treats the older `'ok'` status alias the same as `'success'`. - `agentTranscript.test.ts`: restores the pre-tightening fixtures/tests this broke, and adds a regression test that exercises the actual `zAgentMessages.parse()` boundary with a malformed row, confirming the whole history still loads and only that one tool-call entry degrades. ## Verification - Cherry-pick of `f8424cad75` onto `origin/cloud/1.54` applied with zero conflicts. - `pnpm typecheck` — clean. - `pnpm exec vitest run agentTranscript.test.ts agentApiSchema.test.ts agentRestClient.test.ts` — 126/126 passed. Original PR: #19621 Depends on: #19606 (already on this branch) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb --- _Generated by [Claude Code](https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb)_ Co-authored-by: Claude <noreply@anthropic.com>
…s in agent history load (#19626) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://Comfy-Org.slack.com/archives/C0BGH348Z0C/p1789885354111069)_ Backport of #19621 to `core/1.54`. This branch's `zToolCallSummary` / `zPersistedToolCallSummary` / `parseToolCallEntry` code is byte-identical to `main` at the time #19621 was branched (both descend from #19608's `[backport core/1.54] feat: use generated ToolCallSummary type for persisted tool-call schema`), so the cherry-pick applied cleanly with no conflicts. ## Before `agentRestClient.ts`'s `getMessages()` calls `zAgentMessages.parse()` (throws, not `safeParse`). Because `zAgentMessage.content.tool_calls` was typed as `z.array(zToolCallSummary)` — the generated schema, which requires `tool_call_id`, closes `status` to `'success' | 'error'`, and requires an integer `duration_ms` — a single non-conforming historical tool-call row threw during `.parse()` and failed the entire array/message/response parse, surfacing as `agent_history_load_failed` instead of gracefully degrading just that one entry. ## After - `agentApiSchema.ts`: the message-parse boundary's `content.tool_calls` is now `z.array(z.unknown())`, so a malformed entry can never throw at `zAgentMessages.parse()`. `zPersistedToolCallSummary` (used only by `parseToolCallEntry`'s own `safeParse`) relaxes the generated schema: `tool_call_id` optional, `status` a bare string, `duration_ms` not required to be an integer. - `agentTranscript.ts`: `parseToolCallEntry` validates only the fields it reads (`.pick()`), restores the `tool_call_id ?? id` fallback for rows predating `tool_call_id`, and `toolCallOk` treats the older `'ok'` status alias the same as `'success'`. - `agentTranscript.test.ts`: restores the pre-tightening fixtures/tests this broke, and adds a regression test that exercises the actual `zAgentMessages.parse()` boundary with a malformed row, confirming the whole history still loads and only that one tool-call entry degrades. ## Verification - Cherry-pick of `f8424cad75` onto `origin/core/1.54` applied with zero conflicts. - `pnpm typecheck` — clean. - `pnpm exec vitest run agentTranscript.test.ts agentApiSchema.test.ts agentRestClient.test.ts` — 98/98 passed. Original PR: #19621 Depends on: #19608 (already on this branch) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb --- _Generated by [Claude Code](https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb)_ Co-authored-by: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 6 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 1 |
| 🟢 Low | 4 |
| ⚪ Nit | 1 |
Panel: 6/6 reviewers contributed findings.
dante01yoon
left a comment
There was a problem hiding this comment.
I came into this expecting to push back — relaxing a generated schema is normally the wrong direction — and the repo's own history talked me out of it. The regression is real and the fix direction is right. One factual error in a justifying comment is blocking, and one structural gap is worth closing before this lands.
Why I think the premise holds. I checked the history rather than taking "real historical rows can still carry..." on trust. The schema immediately before #19585 (cbe8ee6609^) was:
export const zPersistedToolCallSummary = z.object({
id: z.string(),
// Optional: rows recorded before `tool_call_id` existed have none.
tool_call_id: z.string().optional(),
tool_name: z.string(),
status: z.string().optional(),
duration_ms: z.unknown().optional()
}).passthrough()and its docblock already enumerated the status vocabulary as pending/running/ok/success. So the tolerance you're restoring was deliberate and documented, with the tool_call_id rationale written out in the code, and #19585 dropped it as a side effect of adopting the generated type. That's a regression in the ordinary sense, not a guess.
I also confirmed the generated contract is as strict as you describe (packages/ingest-types/src/zod.gen.ts:399-408): tool_call_id: z.string() required, status: z.enum(['success','error']) closed, duration_ms: z.number().int().optional().
The z.array(z.unknown()) boundary change is the right shape. agentRestClient calls .parse(), not safeParse, on the whole array, so one bad row taking down an entire conversation is a structural hazard independent of which fields are strict. Pushing validation down to a per-entry safeParse that degrades one row is correct, and .pick()-ing only the fields parseToolCallEntry reads is a genuinely good touch — it stops an unread started_at datetime from sinking a usable entry.
One blocking issue and one suggestion, inline.
Addresses the 6 unresolved Cursor bot findings on the agent-history malformed-tool-call backport PR: 1. appendAssistantContent's turn-wide tool-call dedupe now lets a later row's terminal status (success/error/ok) overwrite an earlier row's still-non-terminal (pending/running) part for the same callId, instead of always keeping whichever row was seen first. Fixes a call paused on a run-approval ask (clamped to done/ok:false by an earlier non-live row) reloading as permanently failed even after a later row recorded it as success. 2. zPersistedToolCallSummary's tool_call_id and duration_ms now use .nullish() instead of .optional(), matching the existing zSkillName convention, so an explicit null (e.g. a Go pointer field serialized without omitempty) no longer fails the entry's safeParse. 3. zAgentMessageContent's tool_calls field is now z.unknown() instead of z.array(z.unknown()), so a null or otherwise non-array tool_calls value degrades gracefully (parseToolCalls already guards with Array.isArray) instead of throwing inside zAgentMessages.parse() and losing the whole conversation history. 4. parseToolCallEntry's callId fallback is now `toolCallId || id` instead of `toolCallId ?? id`, so an empty-string tool_call_id falls back to the row's own id instead of colliding every empty-tool_call_id entry onto the same '' key. 5. parseToolCallEntry now drops an id-only entry (no real tool_call_id) on an isLive row instead of seeding a part under the audit id, since the live agent_tool_call frame for that call will arrive keyed by the real tool_call_id and can never reach a part seeded under the audit id, leaving it stuck streaming forever. 6. Reworded toolCallOk's docblock: 'ok' is a reload-only legacy alias that the live path (agentEventTransport.ts) never produces or recognizes (zAgentToolCallData.status is a closed running/success/error enum, and the live resolver only checks status === 'success'), not something the live path treats as success too. Added/extended unit tests covering findings 1, 2, 3, 4, and 5 in agentTranscript.test.ts and agentApiSchema.test.ts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
|
Commit d8cf4d2 addresses all 6 Cursor bot review findings plus the blocking item from @dante01yoon's human review:
Tests/lint/typecheck pass locally: 102/102 targeted unit tests, full extension suite 2654 passed (1 pre-existing unrelated environmental failure), typecheck clean, lint clean. On @dante01yoon's suggestion to link a cloud-side tracking issue for the contract gap (OpenAPI schema vs. the readable corpus): I'm bringing that to @christian-byrne (who requested this backport) for a decision rather than actioning it unilaterally, since it's a scope question beyond matching the upstream fix. Generated by Claude Code |
This comment has been minimized.
This comment has been minimized.
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed at d8cf4d28 (was f207f3d9; the PR roughly doubled, +601/-117).
My previous blocking issue is properly fixed, and I checked the fix rather than the claim. The reworded toolCallOk docblock is now accurate in every detail it cites:
resolveToolCallStatereally is the live resolver —agentEventTransport.ts:238, and:243ispart.ok = status === 'success'.- Its
statusparameter is typed'success' | 'error', so it provably never sees'ok'. zAgentToolCallData.statusisz.enum(['running', 'success', 'error'])atagentApiSchema.ts:223.
It now states the divergence plainly — reload-only legacy alias, live path never produces or recognises it — instead of claiming agreement. That's exactly what I asked for.
The other fixes in this push also read well. z.unknown() for tool_calls with the Array.isArray guard downstream closes a real hole I'd missed (a Go nil slice sends tool_calls: null, which z.array() would have thrown on). toolCallId || id over ?? is right — an empty string is as id-less as a missing field, and ?? would have collided every such row on ''. Dropping a live row's id-only entry rather than seeding it under the audit id is well argued in the comment.
One new blocking issue, inline: the restoration is incomplete in the same category it's fixing. I found it by diffing this head's tolerances against the pre-#19585 schema field by field.
On the contract thread — your answer is the right one. Not filing a tracking issue on someone else's behalf is correct; I'd just ask that @christian-byrne actually lands somewhere, because that thread is the only thing standing between this and a third round of #19585. Leaving it unresolved for his call.
dante01yoon's second review round on #19621 found that status was the one field in zPersistedToolCallSummary not restored to the pre-#19585 baseline's tolerance: it stayed required/non-nullable while tool_call_id and duration_ms were already .nullish(). A historical row missing status, or carrying status: null (a Go pointer field serialized without omitempty), still failed safeParse and dropped the tool-call chip from the restored transcript -- the exact bug class this PR fixes, just not fully closed. Also documents the non-blocking nit: isTerminalStatus(undefined) is true by design, so a tool part reached through an untracked path is treated as already-settled and never overwritten by appendAssistantContent's dedupe. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
|
Commit 291d352 addresses both items from the second review round: Generated by Claude Code |
dante01yoon
left a comment
There was a problem hiding this comment.
Re-reviewed at 291d3524 (was d8cf4d28).
My remaining blocking issue is fixed, and I checked it. status is now z.string().nullish(), which is back to the pre-#19585 baseline (z.string().optional()) and also accepts the Go null case, matching tool_call_id and duration_ms. The new it.for case covers both shapes (no key, explicit null) and asserts that a ToolPart is produced. It replaces the old test that asserted the drop. A status-less row now ends up state: 'done', ok: false. That is the same result toolCallOk gave before #19585 (cbe8ee6609^), so this restores the old behavior rather than inventing a new one.
The isTerminalStatus docblock now says that an unknown status counts as terminal, which was the point I raised in the non-blocking thread.
CI is green at this head (108 pass, 22 skipped).
Non-blocking, outside the diff:
- On the contract thread, it's good that a tracking item exists. Once it has a link, please add it as a
// Remove once …next to thezPersistedToolCallSummaryoverrides. Until then, nothing in the code explains why this schema departs from the generated one, and that is how #19585 happened. - The PR description still says
tool_callsis relaxed toz.array(z.unknown()). It is nowz.unknown().optional()with anArray.isArrayguard downstream. Worth updating, since the description is what the next person will read.
f398df4
|
While this PR was pending review, Merged Generated by Claude Code |
…ry load `agentRestClient.ts`'s `getMessages()` calls `zAgentMessages.parse()` (throws, not safeParse). Since `zAgentMessage.content.tool_calls` was typed as `z.array(zToolCallSummary)` -- the generated schema, which requires `tool_call_id`, closes `status` to `'success' | 'error'`, and requires an integer `duration_ms` -- a single non-conforming historical tool-call row threw during `.parse()` and failed the entire array/message/response parse, surfacing as `agent_history_load_failed` instead of gracefully degrading just that one entry. - agentApiSchema.ts: the message-parse boundary's `content.tool_calls` is now `z.array(z.unknown())`, so a malformed entry can never throw at `zAgentMessages.parse()`. `zPersistedToolCallSummary` (used only by `parseToolCallEntry`'s own `safeParse`) relaxes the generated schema: `tool_call_id` optional, `status` a bare string, `duration_ms` not required to be an integer. - agentTranscript.ts: `parseToolCallEntry` validates only the fields it reads (`.pick()`), restores the `tool_call_id ?? id` fallback for rows predating `tool_call_id`, and `toolCallOk` treats the older `'ok'` status alias the same as `'success'`. - agentTranscript.test.ts: restores the pre-tightening fixtures/tests this broke, and adds a regression test that exercises the actual `zAgentMessages.parse()` boundary with a malformed row, confirming the whole history still loads and only that one tool-call entry degrades.
Addresses the 6 unresolved Cursor bot findings on the agent-history malformed-tool-call backport PR: 1. appendAssistantContent's turn-wide tool-call dedupe now lets a later row's terminal status (success/error/ok) overwrite an earlier row's still-non-terminal (pending/running) part for the same callId, instead of always keeping whichever row was seen first. Fixes a call paused on a run-approval ask (clamped to done/ok:false by an earlier non-live row) reloading as permanently failed even after a later row recorded it as success. 2. zPersistedToolCallSummary's tool_call_id and duration_ms now use .nullish() instead of .optional(), matching the existing zSkillName convention, so an explicit null (e.g. a Go pointer field serialized without omitempty) no longer fails the entry's safeParse. 3. zAgentMessageContent's tool_calls field is now z.unknown() instead of z.array(z.unknown()), so a null or otherwise non-array tool_calls value degrades gracefully (parseToolCalls already guards with Array.isArray) instead of throwing inside zAgentMessages.parse() and losing the whole conversation history. 4. parseToolCallEntry's callId fallback is now `toolCallId || id` instead of `toolCallId ?? id`, so an empty-string tool_call_id falls back to the row's own id instead of colliding every empty-tool_call_id entry onto the same '' key. 5. parseToolCallEntry now drops an id-only entry (no real tool_call_id) on an isLive row instead of seeding a part under the audit id, since the live agent_tool_call frame for that call will arrive keyed by the real tool_call_id and can never reach a part seeded under the audit id, leaving it stuck streaming forever. 6. Reworded toolCallOk's docblock: 'ok' is a reload-only legacy alias that the live path (agentEventTransport.ts) never produces or recognizes (zAgentToolCallData.status is a closed running/success/error enum, and the live resolver only checks status === 'success'), not something the live path treats as success too. Added/extended unit tests covering findings 1, 2, 3, 4, and 5 in agentTranscript.test.ts and agentApiSchema.test.ts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
dante01yoon's second review round on #19621 found that status was the one field in zPersistedToolCallSummary not restored to the pre-#19585 baseline's tolerance: it stayed required/non-nullable while tool_call_id and duration_ms were already .nullish(). A historical row missing status, or carrying status: null (a Go pointer field serialized without omitempty), still failed safeParse and dropped the tool-call chip from the restored transcript -- the exact bug class this PR fixes, just not fully closed. Also documents the non-blocking nit: isTerminalStatus(undefined) is true by design, so a tool part reached through an untracked path is treated as already-settled and never overwritten by appendAssistantContent's dedupe. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
main landed a Zod 4 upgrade while this PR was pending review. Zod 4's z.number() now rejects Infinity/-Infinity at the schema level (Zod 3 only rejected NaN), so zPersistedToolCallSummary's duration_ms field failed safeParse on a non-finite duration and dropped the whole tool-call entry instead of just omitting duration_ms -- the exact leniency this PR's parseDurationMs (agentTranscript.ts) was already relying on. Switch duration_ms to a custom numeric check that accepts any number (including Infinity/-Infinity) but still rejects NaN, matching Zod 3's original behavior for NaN. parseDurationMs's existing Number.isFinite()/non-negative check is unchanged and continues to be what actually omits a bad duration_ms while keeping the rest of the entry. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
f398df4 to
335ae26
Compare
|
Justification: Selective stale-approval exception — Dante’s substantive review 5485068254 approved the repaired behavior at 291d352 and confirmed its blocking finding fixed. The independently reviewed delta through exact head 335ae26 is limited to the current-main rebase/conflict integration, a narrow Zod 4 compatibility repair that preserves the approved historical-shape behavior under the existing tests, and Dante’s requested test-title cleanup; no assertions were weakened and all review threads are resolved. The binding exact-head gate passed with main@f64ad09b, 129 terminal green/neutral/skipped checks, and no later reviewer objection. Post-merge peer review is routed to @dante01yoon. |
|
@dante01yoon Post-merge peer review is requested for the landed Zod 4 integration. The exact merged head was 335ae26; the audited post-291d delta and exact-head gate evidence are recorded immediately above. |
Summary
A single malformed historical tool-call row in a persisted agent conversation throws during schema validation and fails loading the entire conversation's message history, instead of degrading just that one entry.
Changes
content.tool_callsfield (agentApiSchema.ts) from the strict generated schema toz.unknown().optional(), so a malformed entry can never throw insidezAgentMessages.parse()(called, not safe-parsed, byagentRestClient.ts'sgetMessages()).agentTranscript.ts'sparseToolCallEntrynow validates only the fields it actually reads (via.pick()against a relaxedzPersistedToolCallSummary), restores thetool_call_id ?? idfallback for rows that predatetool_call_id, and treats the older'ok'status alias the same as'success'.Review Focus
This is a regression from #19585, which tightened
content.tool_callsto the generated schema (z.array(zToolCallSummary)— requirestool_call_id, closesstatusto'success' | 'error', requires an integerduration_ms). Any historical row that predates one of those fields, or uses the older'ok'status alias, now throws during.parse()and fails the whole array/message/response parse — surfacing asagent_history_load_failedfor the entire conversation rather than degrading gracefully.agentTranscript.test.tsadds a regression test that exercises the actualzAgentMessages.parse()boundary with a malformed row, confirming the whole history still loads and only that one tool-call entry degrades.Before: one malformed historical tool-call row → the whole conversation's history fails to load.
After: only that one tool-call entry degrades; the rest of the conversation loads normally.
Screenshots (if applicable)
N/A — schema/parsing fix, no visual change.
Requested by Christian Byrne
🤖 Generated with Claude Code
https://claude.ai/code/session_01RuB3pFMNyS3AE7JYNFNesb
Generated by Claude Code