Repository navigation
fix: keep hand-wired autogrow connections on their real slot after an agent slot sync (PM-1449) - #18279
Conversation
… sync nodeDataStore's updateNodeSlots reassigns state.inputs/outputs instead of splicing in place, detaching them from the live LGraphNode's own arrays. A later hand-made connection (e.g. growing an autogrow port) never reaches the store, so LGraph.serialize() — what changeTracker's captureCanvasState() calls on every message send — reads the stale slot list and attributes the live link to whatever input sits at the same index in that stale array.
updateNodeSlots reassigned state.inputs/state.outputs to a new array instead of mutating the existing one. LGraphNode binds its own _inputs and _outputs to that same array once, at construction, so the reassignment silently detached the store's copy from the live canvas node's slots. Any hand-made connection after that point (e.g. growing an autogrow port) updated the live node but never reached the store, so LGraph.serialize() — called on every message send via changeTracker's captureCanvasState() — read the stale array and attributed the live link to whichever input occupied the same index there, misreporting a correctly-wired connection as targeting the wrong slot. Splicing in place (matching updateNode's existing pattern for the same store) keeps both views of the same array in sync.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ✅ 2070 passed, 0 failed · 4 flaky📊 Browser Reports
🎨 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 bee30122cea34ce5ee496e40d7638b5a239a85f8
Full docs: ADR-DEVEX-LINT-0015 📦 Bundle: 9.96 MB gzip 🔴 +668 BDetailsSummary
Category Glance App Entry Points — 3.87 kB (baseline 3.87 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.46 MB (baseline 1.46 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 132 kB (baseline 132 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 14 added / 14 removed / 4 unchanged Panels & Settings — 639 kB (baseline 639 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 18 unchanged User & Accounts — 37.9 kB (baseline 37.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 8 added / 8 removed / 3 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 123 kB (baseline 123 kB) • ⚪ 0 BReusable component library chunks
Status: 9 added / 9 removed / 7 unchanged Data & Services — 3.88 MB (baseline 3.88 MB) • 🔴 +2.19 kBStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 577 kB (baseline 577 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 22 added / 22 removed / 16 unchanged Vendor & Third-Party — 17.4 MB (baseline 17.4 MB) • 🟢 -1.89 kBExternal libraries and shared vendor chunks
Status: 2 added / 2 removed / 16 unchanged Other — 17.8 MB (baseline 17.8 MB) • ⚪ 0 BBundles that do not match a named category
Status: 94 added / 94 removed / 208 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-22T01:11:04.573Z",
"gitSha": "99226f7db9a9498871d956ec2f3c71ca74342d6f",
"branch": "fix/pm-1449-autogrow-slot-shift-on-message-send",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 1990.53600000002,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.116000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 443.383,
"heapDeltaBytes": 8831332,
"heapUsedBytes": 76079244,
"domNodes": -263,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 7.896,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 1991.73600000006,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.768000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 441.113,
"heapDeltaBytes": -1250456,
"heapUsedBytes": 60973844,
"domNodes": -263,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.509000000000002,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1772.329999999954,
"styleRecalcs": 75,
"styleRecalcDurationMs": 25.43,
"layouts": 14,
"layoutDurationMs": 4.297000000000001,
"taskDurationMs": 815.567,
"heapDeltaBytes": 2204056,
"heapUsedBytes": 64428412,
"domNodes": -261,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 161.691,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1798.5270000000355,
"styleRecalcs": 74,
"styleRecalcDurationMs": 26.250999999999998,
"layouts": 14,
"layoutDurationMs": 4.234,
"taskDurationMs": 828.09,
"heapDeltaBytes": 168804,
"heapUsedBytes": 61178160,
"domNodes": -263,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 164.548,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1722.4499999999807,
"styleRecalcs": 32,
"styleRecalcDurationMs": 14.137000000000002,
"layouts": 6,
"layoutDurationMs": 0.9819999999999998,
"taskDurationMs": 324.79,
"heapDeltaBytes": 2197488,
"heapUsedBytes": 64401228,
"domNodes": 76,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 10.086999999999998,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1666.9130000000223,
"styleRecalcs": 32,
"styleRecalcDurationMs": 14.386,
"layouts": 6,
"layoutDurationMs": 1.084,
"taskDurationMs": 321.084,
"heapDeltaBytes": 2190248,
"heapUsedBytes": 64365716,
"domNodes": 77,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 10.384000000000004,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 630.4309999999873,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.334000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 434.51399999999995,
"heapDeltaBytes": 18247460,
"heapUsedBytes": 80314888,
"domNodes": 16,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 169.06,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 613.4089999999333,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.933000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 432.598,
"heapDeltaBytes": 18847212,
"heapUsedBytes": 79533896,
"domNodes": 18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 165.926,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1153.9999999999964,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 817.1800000000001,
"heapDeltaBytes": 31726592,
"heapUsedBytes": 97103352,
"domNodes": 0,
"jsHeapTotalBytes": 19034112,
"scriptDurationMs": 70.16499999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 547,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1190.921000000003,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 845.5350000000001,
"heapDeltaBytes": 32276024,
"heapUsedBytes": 99441316,
"domNodes": 0,
"jsHeapTotalBytes": 18509824,
"scriptDurationMs": 72.383,
"eventListeners": 0,
"totalBlockingTimeMs": 563,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 840.5569999999898,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 463.57399999999996,
"heapDeltaBytes": 14684332,
"heapUsedBytes": 90984468,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 162.352,
"eventListeners": 0,
"totalBlockingTimeMs": 226,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 845.536999999922,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 471.90699999999987,
"heapDeltaBytes": 14281812,
"heapUsedBytes": 90718988,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 167.78500000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 232,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10271.735999999975,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9348.509999999998,
"heapDeltaBytes": 12374532,
"heapUsedBytes": 93818776,
"domNodes": -16,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 7966.779999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 1297,
"frameDurationMs": 20,
"p95FrameDurationMs": 50
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11415.145999999935,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10512.884999999998,
"heapDeltaBytes": -4207400,
"heapUsedBytes": 72573532,
"domNodes": -270,
"jsHeapTotalBytes": 8642560,
"scriptDurationMs": 8791.929,
"eventListeners": -174,
"totalBlockingTimeMs": 1538,
"frameDurationMs": 19.996666666666716,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10463.596000000052,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9636.925,
"heapDeltaBytes": 11633556,
"heapUsedBytes": 93423560,
"domNodes": -12,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 8022.42,
"eventListeners": 0,
"totalBlockingTimeMs": 1058,
"frameDurationMs": 20,
"p95FrameDurationMs": 50.100000000000364
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10354.635999999915,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9481.971,
"heapDeltaBytes": -13323644,
"heapUsedBytes": 69238804,
"domNodes": -18,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 7899.2,
"eventListeners": 0,
"totalBlockingTimeMs": 946,
"frameDurationMs": 18.890000000000025,
"p95FrameDurationMs": 50
},
{
"name": "large-graph-idle",
"durationMs": 2056.3789999999926,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.750000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 569.769,
"heapDeltaBytes": -1803668,
"heapUsedBytes": 79249276,
"domNodes": -254,
"jsHeapTotalBytes": 290816,
"scriptDurationMs": 34.25800000000001,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2019.1560000000663,
"styleRecalcs": 6,
"styleRecalcDurationMs": 5.722000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 541.926,
"heapDeltaBytes": 2496332,
"heapUsedBytes": 83580460,
"domNodes": -248,
"jsHeapTotalBytes": -1806336,
"scriptDurationMs": 32.17500000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2288.7660000000096,
"styleRecalcs": 68,
"styleRecalcDurationMs": 13.858000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1692.6669999999997,
"heapDeltaBytes": -165052,
"heapUsedBytes": 80789380,
"domNodes": -220,
"jsHeapTotalBytes": 1789952,
"scriptDurationMs": 872.685,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2302.577000000042,
"styleRecalcs": 65,
"styleRecalcDurationMs": 10.020999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1610.5639999999999,
"heapDeltaBytes": 19821708,
"heapUsedBytes": 83997056,
"domNodes": -255,
"jsHeapTotalBytes": 749568,
"scriptDurationMs": 848.3069999999999,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3546.401000000003,
"styleRecalcs": 61,
"styleRecalcDurationMs": 9.954999999999998,
"layouts": 60,
"layoutDurationMs": 12.400999999999998,
"taskDurationMs": 1657.7600000000002,
"heapDeltaBytes": 9183016,
"heapUsedBytes": 74644684,
"domNodes": -258,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 793.891,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3460.4479999999285,
"styleRecalcs": 62,
"styleRecalcDurationMs": 10.674,
"layouts": 60,
"layoutDurationMs": 12.285,
"taskDurationMs": 1490.995,
"heapDeltaBytes": 8162568,
"heapUsedBytes": 73871396,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 780.5569999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3046.7279999999732,
"styleRecalcs": 43,
"styleRecalcDurationMs": 7.087,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1866.044,
"heapDeltaBytes": 18368056,
"heapUsedBytes": 84032968,
"domNodes": -252,
"jsHeapTotalBytes": 1990656,
"scriptDurationMs": 972.7560000000001,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3046.1429999999154,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.688999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1858.762,
"heapDeltaBytes": 21289264,
"heapUsedBytes": 87018724,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 977.476,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2007.454999999993,
"styleRecalcs": 3,
"styleRecalcDurationMs": 2.252999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 511.0619999999999,
"heapDeltaBytes": 20468224,
"heapUsedBytes": 84479264,
"domNodes": -253,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 32.60300000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2058.6020000000644,
"styleRecalcs": 7,
"styleRecalcDurationMs": 7.453999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 591.909,
"heapDeltaBytes": -6513732,
"heapUsedBytes": 82202524,
"domNodes": -252,
"jsHeapTotalBytes": -233472,
"scriptDurationMs": 32.937,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 565.3560000000084,
"styleRecalcs": 46,
"styleRecalcDurationMs": 9.791999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 394.729,
"heapDeltaBytes": 13953932,
"heapUsedBytes": 83733508,
"domNodes": 18,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 147.042,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 555.7219999999461,
"styleRecalcs": 48,
"styleRecalcDurationMs": 11.046999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 390.037,
"heapDeltaBytes": 13344348,
"heapUsedBytes": 76740904,
"domNodes": 22,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 143.624,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1991.7990000000145,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.368000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 441.079,
"heapDeltaBytes": -2958288,
"heapUsedBytes": 59713172,
"domNodes": -276,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 6.691999999999998,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1990.3920000000426,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.505,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 447.17300000000006,
"heapDeltaBytes": 12727636,
"heapUsedBytes": 76189952,
"domNodes": -276,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.191,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1723.6919999999714,
"styleRecalcs": 78,
"styleRecalcDurationMs": 24.980000000000004,
"layouts": 18,
"layoutDurationMs": 4.507000000000001,
"taskDurationMs": 753.247,
"heapDeltaBytes": 17696792,
"heapUsedBytes": 81088192,
"domNodes": -275,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 103.00500000000001,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1723.4720000000152,
"styleRecalcs": 78,
"styleRecalcDurationMs": 24.426999999999996,
"layouts": 18,
"layoutDurationMs": 4.787,
"taskDurationMs": 768.808,
"heapDeltaBytes": 6260968,
"heapUsedBytes": 69912236,
"domNodes": -277,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 105.88600000000001,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 966.8719999999666,
"styleRecalcs": 18,
"styleRecalcDurationMs": 29.745999999999995,
"layouts": 5,
"layoutDurationMs": 14.849999999999998,
"taskDurationMs": 717.908,
"heapDeltaBytes": 20144936,
"heapUsedBytes": 103143876,
"domNodes": 13667,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 28.807000000000006,
"eventListeners": 2383,
"totalBlockingTimeMs": 146,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8393.18800000001,
"styleRecalcs": 251,
"styleRecalcDurationMs": 37.151,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5768.746,
"heapDeltaBytes": -18190348,
"heapUsedBytes": 68697832,
"domNodes": -218,
"jsHeapTotalBytes": 5795840,
"scriptDurationMs": 2862.387,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8382.585999999947,
"styleRecalcs": 247,
"styleRecalcDurationMs": 34.085,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5736.831999999999,
"heapDeltaBytes": -672692,
"heapUsedBytes": 80356616,
"domNodes": -248,
"jsHeapTotalBytes": -1056768,
"scriptDurationMs": 2802.0899999999997,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16652.245999999992,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16046.838999999998,
"heapDeltaBytes": -49726348,
"heapUsedBytes": 173893304,
"domNodes": -8061,
"jsHeapTotalBytes": -14094336,
"scriptDurationMs": 252.78999999999996,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 16614.641000000007,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16007.289999999997,
"heapDeltaBytes": -35267748,
"heapUsedBytes": 195041372,
"domNodes": -8061,
"jsHeapTotalBytes": -10498048,
"scriptDurationMs": 278.711,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 15746.510999999999,
"styleRecalcs": 81,
"styleRecalcDurationMs": 11.785000000000018,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15218.567000000001,
"heapDeltaBytes": -45958620,
"heapUsedBytes": 168780448,
"domNodes": -8061,
"jsHeapTotalBytes": -12853248,
"scriptDurationMs": 834.392,
"eventListeners": -14928,
"totalBlockingTimeMs": 6,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20382.638999999926,
"styleRecalcs": 164,
"styleRecalcDurationMs": 16.569,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20099.515,
"heapDeltaBytes": -42256212,
"heapUsedBytes": 168945080,
"domNodes": -8061,
"jsHeapTotalBytes": -11603968,
"scriptDurationMs": 876.946,
"eventListeners": -14928,
"totalBlockingTimeMs": 139,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6044.6379999999635,
"styleRecalcs": 20,
"styleRecalcDurationMs": 77.10399999999998,
"layouts": 20,
"layoutDurationMs": 22.529000000000007,
"taskDurationMs": 5943.724,
"heapDeltaBytes": -53570456,
"heapUsedBytes": 182405420,
"domNodes": -8061,
"jsHeapTotalBytes": 14700544,
"scriptDurationMs": 100.99400000000001,
"eventListeners": -14928,
"totalBlockingTimeMs": 406,
"frameDurationMs": 17.779999999999987,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6022.351999999955,
"styleRecalcs": 20,
"styleRecalcDurationMs": 82.51,
"layouts": 20,
"layoutDurationMs": 23.652000000000008,
"taskDurationMs": 5928.178,
"heapDeltaBytes": -36494268,
"heapUsedBytes": 181183272,
"domNodes": -8061,
"jsHeapTotalBytes": 10350592,
"scriptDurationMs": 108.58599999999998,
"eventListeners": -14928,
"totalBlockingTimeMs": 373,
"frameDurationMs": 18.886666666666617,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8394.092999999997,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8133.179999999999,
"heapDeltaBytes": 14425980,
"heapUsedBytes": 197995308,
"domNodes": 0,
"jsHeapTotalBytes": -7340032,
"scriptDurationMs": 125.29300000000009,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8348.747000000003,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8182.693,
"heapDeltaBytes": -20953556,
"heapUsedBytes": 170803820,
"domNodes": 0,
"jsHeapTotalBytes": -23592960,
"scriptDurationMs": 125.104,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 112.23399999994399,
"styleRecalcs": 7,
"styleRecalcDurationMs": 15.935999999999998,
"layouts": 4,
"layoutDurationMs": 2.263,
"taskDurationMs": 84.21799999999999,
"heapDeltaBytes": 3191252,
"heapUsedBytes": 64934872,
"domNodes": 127,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 9.116000000000001,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 110.50999999997657,
"styleRecalcs": 8,
"styleRecalcDurationMs": 12.646,
"layouts": 2,
"layoutDurationMs": 0.66,
"taskDurationMs": 82.55100000000002,
"heapDeltaBytes": 3066844,
"heapUsedBytes": 64708724,
"domNodes": 108,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.833,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 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 |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 3 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 1 |
| 🟢 Low | 1 |
Panel: 8/8 reviewers contributed findings.
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #18279 +/- ##
==========================================
+ Coverage 83.24% 84.23% +0.98%
==========================================
Files 2976 2278 -698
Lines 146345 129345 -17000
Branches 37781 35021 -2760
==========================================
- Hits 121829 108954 -12875
+ Misses 23240 20095 -3145
+ Partials 1276 296 -980
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 714 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Cursor Review flagged three real issues with the splice-in-place fix: 1. Splicing writes straight through to the live LGraphNode's slot arrays now that they are never detached from the store. A CRDT 'connect' mutation's snapshot of a node's inputs/outputs can be shorter than, or order shared names differently from, the live array (e.g. it does not know about a slot the user grew by hand), and a blind splice would delete or reorder live slots while linkStore's index-keyed topology and LLink.target_slot/origin_slot kept pointing at the old position — misattributing a live link to a different slot, the exact failure this fix targets. 2. Splicing replaces every slot object wholesale, discarding runtime state bound to the old object identity (e.g. a SubgraphNode host's `_subgraphSlot` binding). 3. The two splices were not validated up front, so a malformed payload for one side could leave the store half-applied. Replace the splice with a by-name merge: a slot present in both is updated in place (its object identity, and any slot the incoming list omits, are preserved untouched); a slot absent from the existing array is appended. Both arrays are validated before either is touched. Assigning through toRaw() rather than the reactive proxy matters here: `link`/`links` are deprecated accessors that resolve by finding `this` in `this.node.inputs`/`outputs` via `===`. Going through the reactive proxy invokes them with the raw instance as `this` while the array holds the proxy, so the identity search fails; the raw instance keeps `this` consistent with what the array actually holds.
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: changes requested
Pre-merge blocker:
- [P1] The matched-slot merge writes through
toRaw, so Vue dependents are not invalidated. I reproduced a direct label read changing toremotewhile a cached computed over the same store slot stayedundefined.
Findings without an anchorable line
- [P2] The PR description still says
updateNodeSlotssplices both arrays and asks reviewers to check self-aliased splice calls. The final head uses a by-name merge; the splice exists only in intermediate commit1801ddda0b. Please update the summary, before/after section, and review focus to describe the code that will ship. - [P2]
Breaking: noneand the claims that both sides "always" see every update and serialization "always" reflects live topology are too broad. This head changes the action from replacement semantics to preserve-order, preserve-omission merge semantics, and the raw write currently leaves reactive consumers stale. Please state the bounded merge contract instead. - [P3] The PR says PR #18021's fix is "byte-for-byte the same change." Only the two intermediate splice statements match. The comments differ, and the final by-name merge differs further. Please narrow or remove that comparison.
Existing findings confirmed or contested
- I confirmed the earlier warning that the splice could remove or reorder live slots without repairing link indices against
1801ddda0b. The current by-name merge addresses it by retaining existing order and omitted slots. - I confirmed the earlier warning that the splice replaced identity-bound slot objects against
1801ddda0b. The current matched-object assignment addresses that part. - I confirmed the earlier warning about variadic and half-applied splices against
1801ddda0b. The variadic calls are gone, and both top-level values are checked before mutation. I separately commented on why that malformed-input guard does not belong at this typed internal boundary.
Checked and cleared
No additional candidates were rejected after reconciliation.
Coverage
- Depth: standard.
- Lanes: correctness, maintainability, idiomaticity, tests, and documentation.
- Standard lenses included blast radius, regression risk, idempotence, shared-state separation, boundary discipline, root-cause analysis, deletion-first maintainability, comment review, reader load, TypeScript, type-system discipline, unit-test quality, mock-boundary quality, setup consolidation, and proof of behavior.
- I traced both changed files in full and followed
updateNodeSlotsthrough its CRDT callers, slot classes,LGraphNode,linkStore, Vue node rendering, and serialization. - Local checks at
a7530e388341b04d259bf28dfc577415268b227d: focused unit tests 44 passed;pnpm typecheckpassed; focused ESLint passed; focused oxfmt passed;pnpm fallow:auditreported no issues in the two changed files. A fullpnpm lintinvocation with file arguments reached workspace packages and failed because those root-relative paths do not exist inpackages/billing-contract; the focused lint and the PR'slint-and-formatcheck passed. - CI for this SHA has 103 completed check runs: 85 successful, 18 skipped, none failed or pending. The combined commit status is successful.
| // reactive proxy invokes them with the raw instance as `this` while the | ||
| // array holds the proxy, so the identity search fails; operating on the | ||
| // raw instance keeps `this` consistent with what the array holds. | ||
| Object.assign(toRaw(existing[index]), incomingSlot) |
There was a problem hiding this comment.
[P1] Writing through toRaw changes direct reads but bypasses Vue dependency tracking. I reproduced this with the real store and LGraphNode: after this merge, node.inputs[0].label was remote, but an already-evaluated computed over store.getNode(...).inputs[0].label remained undefined. Vue node rendering consumes these reactive slot fields, so agent updates can leave the reactive renderer stale until an unrelated write occurs. Please assign serializable fields through the reactive proxy instead of the raw target, avoid driving topology through the deprecated link/links mirrors, and add a computed invalidation regression test. The current store tests do not catch this; a proxy-assignment mutant still passed all 21 tests.
There was a problem hiding this comment.
Fixed in efa149a. Confirmed the repro you described locally (a cached computed over store.getNode(...).inputs[0].label stayed stale after a toRaw-based merge), and added a regression test for exactly that (keeps a cached computed over a merged slot field up to date) — verified it fails when the assignment goes through toRaw() and passes when it goes through the reactive slot object.
Fields are now assigned through the reactive proxy, never toRaw. link/links are still excluded from that assignment, but only when the matched slot has already been upgraded to a NodeInputSlot/NodeOutputSlot class instance (checked at runtime via a prototype-chain accessor probe — those fields become identity-resolving deprecated accessors once upgraded, and real topology is already in linkStore by then). A slot still tracked as a plain descriptor (e.g. in the CRDT-only graphMutations.test.ts/ecsFollowerAdapter.integration.test.ts harnesses, which never upgrade slots to litegraph class instances) has no such accessor, and link/links are its only record of connectivity there — those still merge normally. Ran the full agent CRDT suite (50 files, 762 passed) plus the litegraph node/slot suites (114 passed) to confirm both cases are covered with 0 regressions.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| if (!state || state.graphId !== graphScope.owningGraphId) return false | ||
| state.inputs = slots.inputs | ||
| state.outputs = slots.outputs | ||
| if (!Array.isArray(slots.inputs) || !Array.isArray(slots.outputs)) |
There was a problem hiding this comment.
[P3] This check adds boundary validation to an internal typed action. Every production caller passes NodeState arrays prepared in graphMutations or existing state arrays, and the new test can reach this branch only with @ts-expect-error. The guard also checks only that the values are arrays, not that their elements are valid slots, so it gives partial validation and false confidence. Please keep unknown-data validation at the CRDT preparation boundary and remove this guard and its suppression-only test.
There was a problem hiding this comment.
Removed in efa149a: the Array.isArray guard in updateNodeSlots and its now-suppression-only test are both gone. Agreed it was partial validation on an internal typed boundary that only @ts-expect-error test code could reach.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| existing: INodeInputSlot[], | ||
| incoming: readonly INodeInputSlot[] | ||
| ): void { | ||
| mergeSlotsByName(existing, incoming) |
There was a problem hiding this comment.
Nit: [P3] mergeInputSlots and mergeOutputSlots are one-line aliases around mergeSlotsByName. They add no input/output policy or validation, which is the exact alias-helper pattern prohibited by docs/guidance/engineering.md. Please call the generic helper directly and remove both wrappers and their now-unused type imports.
There was a problem hiding this comment.
Removed in efa149a: mergeInputSlots/mergeOutputSlots are gone, both call sites in updateNodeSlots now call mergeSlotsByName directly (passing 'link'/'links' respectively), and the now-unused INodeInputSlot/INodeOutputSlot type imports are removed.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| // graphMutations.ts) syncs a node's slots — every message a user sends | ||
| // triggers changeTracker's captureCanvasState(), which calls | ||
| // LGraph.serialize(); that reads each node's slots from this store | ||
| // (serialiseStoredNodes), not from the live node directly. |
There was a problem hiding this comment.
Nit: [P3] Please remove the explanatory blocks at lines 322-326, 343-344, 361-365, and 392-394. The test names and assertions already state serialization, insertion, omission preservation, and identity. Copying the graphMutations/changeTracker/serializer call chain here adds drift. This first block is already inaccurate: message submission captures through prepareForSave() only for the active target workflow and active tracker, not unconditionally for every message.
There was a problem hiding this comment.
Removed in efa149a — all four comment blocks are gone, including the inaccurate one on the PM-1449 test. Also removed a similar comment I'd added while rewriting the reorder test for the point below, for the same reason.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| graph.add(node) | ||
| const original = node.inputs[0] | ||
| const marker = {} | ||
| ;(original as unknown as { _hostBinding: object })._hostBinding = marker |
There was a problem hiding this comment.
[P3] These two as unknown as assertions invent a test-only _hostBinding property that no authoritative slot type owns. expect(node.inputs[0]).toBe(original) already fails if the slot object is replaced, so the marker does not add a distinct falsifier. Please remove the marker and both assertions, or construct a real typed binding through its production owner if that specific behavior needs coverage.
There was a problem hiding this comment.
Removed in efa149a: the _hostBinding marker and both as unknown as assertions are gone. Agreed expect(node.inputs[0]).toBe(original) already falsifies identity loss on its own.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| expect(node.isInputConnected(1)).toBe(true) | ||
|
|
||
| const scope = graphScope(graph.id, graph.id) | ||
| const shorterAndReordered = [ |
There was a problem hiding this comment.
[P2] shorterAndReordered contains only one shared name, so it cannot represent a different relative order and does not test the never ... reorders claim. A merge that preserves omitted slots but moves shared slots into incoming order can pass this test and still shift index-keyed links. Please use at least two shared names in reversed incoming order, retain a connected omitted slot, and assert the shared live/store array identity and final order.
There was a problem hiding this comment.
Rewritten in efa149a: the node now has three inputs (a, b, c), the incoming snapshot shares a and c in reversed order and omits b (which is connected), and the assertions now check registeredState(graph, node)?.inputs is the same array reference as the live node.inputs, that the final order is unchanged (a, b, c), that liveA/liveC keep their original array slots by identity, and that b's connection survives.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
…in data Addresses DrJKL's human review on top of the Cursor Review fix: - [P1 blocker] Assigning through toRaw() bypassed Vue's dependency tracking for every merged field, not just link/links: a cached computed over a merged slot field stayed stale until an unrelated write. Assign through the reactive slot object instead. link/links are still excluded from the assignment, but only when the matched slot has already been upgraded to a NodeInputSlot/NodeOutputSlot class instance (detected via hasAccessor, since those fields become deprecated identity-resolving accessors at that point) — a slot the store tracks before that upgrade has no such accessor, and link/links are its only record of connectivity, so those still merge like any other field. Added a regression test that fails when the assignment goes through toRaw. - [P3] Removed the Array.isArray guard in updateNodeSlots and its now-suppression-only test: it validated an internal typed action only test code with @ts-expect-error could reach, and only checked "is an array", not "is a valid slot list". - [P3] Removed the mergeInputSlots/mergeOutputSlots one-line aliases; callers invoke mergeSlotsByName directly, and the now-unused INodeInputSlot/INodeOutputSlot imports are gone. - [P3] Removed the test-only _hostBinding marker and its `as unknown as` assertions; `expect(node.inputs[0]).toBe(original)` already falsifies identity loss on its own. - [P2] Rewrote the "never removes or reorders" test with two shared names in reversed incoming order and a connected omitted slot, and added assertions for the shared live/store array identity and the final order — the single-shared-name version couldn't actually exercise reordering. - [Nit] Removed the explanatory comment blocks the test names and assertions already covered.
|
@DrJKL Replying to the two review findings that had no anchorable line, since I addressed both in the PR description (rewritten as of efa149a):
Also fixed the P1 blocker and the remaining P3/nit findings from your line comments — replied on each thread individually. Leaving all of your threads unresolved for you to close. |
This comment has been minimized.
This comment has been minimized.
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: changes requested.
I confirmed that all 12 prior ledger findings are addressed at this head, including the reactive write, the order-preservation falsifier, the typed-boundary cleanup, and the stale PR-description claims. Three new inline findings remain.
[P1] The required playwright-tests (cloud) check is failing on this SHA: 28 Agent replay, reattachment, graph-activity, tab-switch, and document-acceptance tests failed through every retry while 286 passed. The common failure is that expected links never render. Because this PR changes the Agent slot-sync path those tests exercise, I cannot treat this as unrelated without a diagnosis and a green rerun.
[P2] The PR body says captureCanvasState() runs on every message send. The send path requests a workflow draft, and capture is conditional on an active attached workflow and the change tracker guards. Please describe the observable boundary instead, such as “the next active-target workflow draft snapshot serializes the stale state.”
[P3] The verification section says full typecheck, lint, and format are enforced by every pre-commit hook. .husky/pre-commit runs lint-staged, unused-i18n, and frozen-dirs, not those full commands. Please remove that parenthetical while retaining the checks actually run.
Local checks: focused Vitest 44/44 passed; typecheck, focused ESLint, oxlint, full format check, and changed-file fallow passed. CI: 83 success, 22 skipped, 2 failed (playwright-tests (cloud) and aggregate e2e-status).
| } | ||
| const target = existing[index] | ||
| if (hasAccessor(toRaw(target), linkKey)) { | ||
| const { [linkKey]: _link, ...fields } = incomingSlot |
There was a problem hiding this comment.
[P2] Computed-key destructuring reads incomingSlot[linkKey] before discarding it. The production connect path passes origin.inputs or target.outputs unchanged for the opposite side, so live NodeInputSlot.link and NodeOutputSlot.links getters run here and emit false deprecation callbacks. I reproduced both callbacks with real slot classes while topology remained intact. Please copy enumerable own fields while filtering linkKey without reading it, retain direct assignment for plain descriptors, and add a live input/output self-alias regression test that observes the accessor side effect as well as topology.
There was a problem hiding this comment.
Fixed in 117845c: the merge now copies incomingSlot's enumerable own fields via Object.keys, skipping linkKey without ever reading its value (no more destructuring). Direct assignment for plain descriptors is unchanged.
Also confirmed this was the root cause of the CI playwright-tests (cloud) failure, not just a false-deprecation warning: graph.links was actually missing a link in that suite's failures, matching this exact self-alias read side effect on the untouched side's live slots. Details in the PR body's new "Follow-up" section.
Added the self-alias regression test you asked for (never reads the deprecated link accessor merging a node's own unchanged live slots into itself in nodeDataStore.test.ts): it constructs a real connected LGraphNode pair, calls updateNodeSlots with the same live array passed as both existing and incoming for the unchanged side (mirroring graphMutations.ts's exact call shape), and spies on NodeInputSlot.prototype.link/NodeOutputSlot.prototype.links to assert neither getter is invoked. Verified it fails against the prior destructuring implementation and passes against this fix.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| * | ||
| * `linkKey` (`link` for inputs, `links` for outputs) is excluded from the | ||
| * assignment for an already-upgraded matched slot: the caller | ||
| * (`graphMutations.ts`'s `connect` case) already established real topology |
There was a problem hiding this comment.
[P3] This ordering claim is not true for removal: removeLink() calls detachLinkSlots() / updateNodeSlots() before linkStore.deleteLink(). The invariant is that linkStore owns class-slot connectivity and callers update it separately, not that topology is always established first. Please state that invariant without the ordering claim.
There was a problem hiding this comment.
Fixed in 117845c: reworded to state the real invariant without the ordering claim — linkStore owns connectivity for a class-instance slot, and callers update it separately from this store (there is no ordering guarantee, citing removeLink's detachLinkSlots/updateNodeSlots-before-deleteLink sequence as the counter-example).
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| import type { UUID } from '@/utils/uuid' | ||
|
|
||
| /** | ||
| * Whether `key` resolves through a getter/setter pair somewhere in `obj`'s |
There was a problem hiding this comment.
Nit: [P3] This says “getter/setter pair,” but hasAccessor() only checks for a getter. The current slot properties happen to have both; please describe the predicate the helper actually implements.
There was a problem hiding this comment.
Fixed in 117845c: reworded to "resolves through a getter" — matches what the helper actually checks (typeof descriptor.get === 'function', no setter check).
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
…slot merge graphMutations.ts's connect case passes a node's own live inputs/outputs array back as both existing and incoming for the side it didn't just connect, so every slot there matches itself by identity. Destructuring incomingSlot to exclude linkKey still reads it first, which on an upgraded slot invokes the deprecated link/links getter and its legacy cache resync as a side effect on what should be a no-op merge. Copy enumerable own fields via Object.keys instead, skipping linkKey without ever reading it. Also fixes two stale comments (hasAccessor only checks a getter, not a getter/setter pair; linkStore's topology isn't always established before updateNodeSlots runs, e.g. removeLink calls it before deleteLink) and adds a regression test that spies on the deprecated accessors to prove they're never invoked for this self-alias case.
|
Addressing the three findings without an anchorable line from the second "changes requested" review: [P1] [P2] PR body's [P3] PR body's pre-commit-hook overclaim — Removed the "enforced by this repo's pre-commit hooks on every commit" parenthetical. Verification section now says |
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: follow-up requested.
The current head fixes all six findings from my previous review. The deprecated getter regression is red at efa149a and green here for both input and output accessors. The active-target snapshot wording, topology-order comment, hook description, and getter-only description are also corrected. Current CI is clean: 85 checks passed and 19 were skipped, including successful cloud Playwright and aggregate E2E checks. Three non-blocking inline findings remain.
Prior findings addressed
- [P1] The prior 28-failure cloud run is green on this head.
- [P2] The self-aliased merge no longer reads
linkorlinks; the focused test fails on the previous head and passes here. - [P2] The PR body now bounds capture to the next active-target draft snapshot. I traced send through
workflow.draft(),targetWorkflowDraft(), andprepareForSave(). - [P3] The source comment no longer claims topology is always established before the merge.
- [P3] The PR body now distinguishes the pre-commit hook from the full checks run manually.
- [P3] The accessor comment now says getter, matching
descriptor.get.
Checked and cleared
- I rejected the concern that
Object.keyscan rebind a slot to a foreign node. Every production caller supplies prepared serializable descriptors or live/spread slots from that same target node. - I kept the local
pop()!fixture assertion. The test adds that slot on the immediately preceding line and performs no intervening mutation. - I confirmed the message-send path does synchronously prepare and capture the active target before reading
activeState. - I did not treat unattached local command logs as a documentation defect. Current local checks and CI do not contradict the reported runs.
Coverage
Standard-depth correctness, maintainability, idiomaticity, tests, and documentation lanes reviewed both changed files and the current PR body. Focused Vitest passed 22/22. Typecheck, scoped ESLint, type-aware oxlint, full format checking, and changed-file Fallow passed. Fallow reported no issue in either changed file.
| * `inputs`/`outputs` array passed back as both `existing` and `incoming` | ||
| * for the side it didn't just connect, so every slot there matches itself | ||
| * by identity. Reading `incomingSlot[linkKey]` in that case is reading the | ||
| * live getter on the slot itself, which resyncs its legacy link cache as a |
There was a problem hiding this comment.
[P2] This mechanism overstates what the getters do and what the prior cloud run proves. NodeInputSlot.link only warns and reads linkStore; NodeOutputSlot.links refreshes a private legacy view. Neither getter invokes the setter or removes topology from graph.links. The green rerun establishes correlation, but not the stated cache-mutation cause for all 28 failures. Please narrow this comment and the PR body to the verified deprecated-accessor read unless a focused reproducer shows that a getter read alone removes a graph link.
There was a problem hiding this comment.
Fair — I tried to construct a reproducer (a single self-alias merge, and a sequential 3-node/3-connect scenario) and couldn't get a getter read alone to remove anything from graph.links. Narrowed the comment in 745d526 to just the verified deprecated-accessor read with its own side effect, dropping the "resyncs its cache as a real mutation" causal framing. Same change in the PR body's follow-up section: it now states the green rerun as correlation, not a proven cause for all 28 failures, and that the fix removes the read because it's unwanted on its own terms, independent of its downstream effect.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| for (const key of Object.keys(incomingSlot) as (keyof Slot)[]) { | ||
| if (key !== linkKey) target[key] = incomingSlot[key] | ||
| } | ||
| } else { |
There was a problem hiding this comment.
[P2] This plain-descriptor branch is an explicit compatibility contract, but no test protects its distinct link/links behavior. I changed both branches to skip the connectivity key and all 22 owning tests still passed. Please add one table-driven test covering matched plain input and output descriptors with literal connectivity IDs, so simplifying the live-accessor rule cannot silently break headless/plain state.
There was a problem hiding this comment.
Added in 745d526: a table-driven it.for test covering a matched plain input descriptor and a matched plain output descriptor, each with literal link/links ids, asserting the connectivity field is copied from the incoming descriptor. Verified it fails (both rows) against a mutant that skips the connectivity key in that branch, the same change you described making.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| * field. Every field is assigned through the reactive slot object itself | ||
| * (never `toRaw`), so Vue's dependents (e.g. the node renderer) invalidate. | ||
| * | ||
| * The excluded key's value is never read either, even to discard it: |
There was a problem hiding this comment.
Nit: [P3] This new caller walkthrough makes the helper docblock 35 lines and couples it to graphMutations.ts, private LGraphNode binding details, and a specific removal order. That coupling already produced the stale ordering claim fixed in this commit. Please keep the durable contract here: preserve established array/object identity and order, avoid class connectivity accessors, and copy connectivity for plain records. The caller scenario belongs in the regression test.
There was a problem hiding this comment.
Trimmed in 745d526: the docblock is now just the durable contract (identity/order preservation, no live connectivity accessors, plain records copy connectivity). Dropped the graphMutations.ts/LGraphNode-binding/removal-order walkthrough entirely — that scenario already lives as an inline comment on the self-alias regression test (never reads the deprecated link accessor merging a node's own unchanged live slots into itself), which is where it belongs.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
Soften the merge comment: the deprecated link/links getters are verified to warn and read linkStore/refresh a private legacy view, but I could not reproduce them removing a link from graph.links on their own (tried both a single self-alias merge and a sequential multi-connect scenario). Drop the unproven "resyncs its cache as a real mutation" claim and just note the verified side effect. Trim mergeSlotsByName's docblock to the durable contract (identity/order preservation, no live connectivity accessors, plain records copy connectivity) and drop the caller-specific graphMutations.ts/LGraphNode walkthrough — that detail already lives in the self-alias regression test's comment. Add a table-driven test covering the plain-descriptor branch's connectivity-field merge for both inputs and outputs, so a future change to the live-accessor rule can't silently stop copying link/links for a still-plain slot.
|
The I attempted to trigger a re-run of the failed job via the GitHub API, but it returned Generated by Claude Code |
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: ready to approve.
This head addresses all three findings from my previous review. The getter explanation now distinguishes verified behavior from CI correlation, the plain-descriptor branch has independent input and output falsifiers, and the helper comment is limited to its durable contract. I found no new actionable issue.
Prior findings addressed
- [P2] The source and PR body no longer claim that getter cache synchronization removed graph topology. They distinguish the input and output getter behavior and call the green cloud rerun correlation rather than causation.
- [P2] The two-row plain-descriptor test covers input
linkand outputlinks. Independent omission mutants fail the corresponding rows. - [P3] The helper docblock no longer repeats caller, private-field, or removal-order walkthroughs.
Checked and cleared
- I rejected the suggestion that the reported 1890-test count predates this follow-up. The previous body reported 1888, while this head adds two table rows and reports 1890. Current focused and CI results do not contradict that count.
- The transient shard artifact-upload failure is cleared in the current check snapshot. All 104 checks are complete: 85 passed and 19 were skipped.
Coverage
Standard-depth correctness, maintainability, idiomaticity, tests, and documentation lanes reviewed both changed files and the PR body. Focused Vitest passed 24/24. The two new rows passed, and input/output omission mutants each failed as expected. Typecheck, scoped ESLint, type-aware oxlint, full format checking, and changed-file Fallow passed. Fallow reported no issue in either changed file.
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: changes requested.
Three blocking failures remain on this head:
- [P1] A snapshot that inserts a slot in the middle is appended instead, while
linkStorekeeps the incoming index. My focusedLGraphreproduction turned live[a, c]plus incoming[a, b, c]into[a, c, b], leaving the link oncinstead ofb. - [P1] Duplicate slot names are supported, but the name-to-index map keeps only the last occurrence. My focused reproduction left the first duplicate stale and applied both incoming records to the second.
- [P1] CRDT slot records are not reduced to serializable fields before this merge. My focused reproduction supplied an enumerable
_nodefield and replaced the liveNodeInputSlotowner with the wire payload.
Findings without an anchorable line
- [P2] The Verification command names
src/composables/graph/dynamicWidgets.test.ts, which does not exist. The file issrc/core/graph/widgets/dynamicWidgets.test.ts. Running the corrected command at this head passed 123 files with 1,913 tests and 7 expected failures, so the stated 122-file and 1,890-test result did not include this suite. - [P2] Review Focus says connectivity is excluded only for upgraded
NodeInputSlotorNodeOutputSlotinstances. The implementation checks for any getter with that key anywhere in the prototype chain. Please describe the implemented predicate or make the representation explicit in the type/API. - Nit: [P3] “Both were confirmed correct in isolation” overstates one focused dynamic-widgets test and does not establish correctness of the whole reconcile path. State the tested behavior instead.
- Nit: [P3] The open/merged labels for related PRs and the cloud-job status are mutable. Remove those labels or date and link the observations.
- Nit: [P3] Remove the generated-with-Claude trailer and raw session URL. They add no durable review evidence.
- Nit: [P3] The body repeats the same array-identity, accessor, and reactivity contract across Changes, Before/After, Root cause, Follow-up, Verification, and Review Focus. Keep one root-cause paragraph, one contract, and reproducible checks.
- Nit: [P3] Scope the universal wording to this action. The patch makes
updateNodeSlotspreserve an existing shared array reference; it does not prove every store/live pair is always shared.
Prior findings
All findings from my earlier reviews remain addressed on this head. The final cleanup also removed the introduced explanatory comments and replaced the repeated inline Pick with NodeSlots.
Checked and cleared
- Incoming plain descriptors do not remain plain when appended to a live node. The slot-array proxy upgrades indexed writes to
NodeInputSlotorNodeOutputSlot. - I did not accept the claim that every omitted optional field must be deleted. The ingress code intentionally preserves omitted display metadata, and other absent fields include runtime-owned state.
- I kept the identity and computed tests separate because they protect distinct behavior; combining them would conflict with the repository's one-behavior-per-test guidance.
- The PR diff contains two files. A contrary 33-file result compared the head directly with the moving base tip instead of using the merge base.
- REST and Linear reads confirmed the current related-PR states and the PM-1449 to PM-1442 parent relationship. The remaining issue is that mutable status prose will stale.
- Exact-head typecheck, ESLint, type-aware oxlint, oxfmt, and Fallow passed. The commit hook also completed lint-staged successfully.
Coverage
Deep correctness, maintainability, idiomaticity, tests, and documentation lanes reviewed both changed files and the PR body. Dedicated lenses covered blast radius, regression history, idempotence, shared state, boundaries, root cause, deletion-first design, comments, architecture, type safety, unit-test quality, test setup, proof, and technical writing.
Focused Vitest passed 24/24. The corrected broad suite passed 123 files, 1,913 tests, and 7 expected failures. Four focused negative tests failed as expected for the three blockers and the separately rejected omitted-field hypothesis. Typecheck, scoped ESLint, type-aware oxlint, format, and changed-file Fallow passed. Current CI has 84 successful checks, 15 skipped checks, one check still running, and no failures.
| incoming: readonly Slot[], | ||
| linkKey: keyof Slot | ||
| ): void { | ||
| const indexByName = new Map(existing.map((slot, index) => [slot.name, index])) |
There was a problem hiding this comment.
[P1] This map keeps only the last index for each name, but duplicate slot names are a supported graph state. I reproduced two existing same inputs receiving two incoming records: the first stayed stale and both updates landed on the second. Please use a stable identity or consume same-name indices occurrence by occurrence, and add input/output regressions.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| for (const incomingSlot of incoming) { | ||
| const index = indexByName.get(incomingSlot.name) | ||
| if (index === undefined) { | ||
| existing.push(incomingSlot) |
There was a problem hiding this comment.
[P1] Appending an incoming-only slot breaks the index contract used by the connect path. linkStore records topology against the incoming arrays before this merge. With live [a, c], incoming [a, b, c], and a link at incoming index 1, I reproduced live [a, c, b] with the link still attached to c. Please reconcile structural insertion with topology and add this exact serialization case.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| const target = existing[index] | ||
| if (hasGetterInPrototypeChain(toRaw(target), linkKey)) { | ||
| for (const key of Object.keys(incomingSlot) as (keyof Slot)[]) { | ||
| if (key !== linkKey) target[key] = incomingSlot[key] |
There was a problem hiding this comment.
[P1] The CRDT preparation path accepts arbitrary record keys and force-casts the result, so this loop writes wire fields directly into live slot internals. A focused head test with an enumerable _node field replaced NodeInputSlot._node with the payload object. Parse an allowlisted serializable DTO before mutating a live class instance.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| continue | ||
| } | ||
| const target = existing[index] | ||
| if (hasGetterInPrototypeChain(toRaw(target), linkKey)) { |
There was a problem hiding this comment.
[P2] Prototype shape now selects connectivity ownership, but the action signature exposes only one structural slot type. Any structural implementation with a getter is treated as link-store-backed, and a future live implementation without this exact getter would take the plain-record path. Please make the live/plain representation or operation explicit instead of discovering business policy through reflection.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| function mergeSlotsByName<Slot extends { name: string }>( | ||
| existing: Slot[], | ||
| incoming: readonly Slot[], | ||
| linkKey: keyof Slot |
There was a problem hiding this comment.
Nit: [P3] keyof Slot does not encode the contract this parameter needs. name, type, or label all compile even though only input link and output links are valid. Correlate slot direction with its connectivity key through direction-specific functions or a discriminated tuple.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| expected: [toLinkId(2), toLinkId(3)] | ||
| } | ||
| ])( | ||
| 'copies a matched plain $slotKind descriptor’s connectivity field, since it has no live accessor', |
There was a problem hiding this comment.
Nit: [P3] This title includes the implementation rationale and is harder to scan than the behavior. A direct name such as updates connectivity on matched plain $slotKind slots keeps the contract while leaving the reason to the production design.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| }) | ||
|
|
||
| node.addInput('videos.video1', 'IMAGE') | ||
| const grown = node.inputs.pop()! |
There was a problem hiding this comment.
Nit: [P3] The non-null assertion hides the fixture precondition and grown is vague. Use const grownInput = node.inputs.pop(); assert(grownInput) before the splice so a failed setup stops at the violated condition.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| outputs: [...node.outputs] | ||
| }) | ||
|
|
||
| expect(node.inputs[0]).toBe(original) |
There was a problem hiding this comment.
[P2] The array, object-identity, omission/order, and computed invalidation regressions all use live inputs. The output cases only cover a plain links descriptor and a self-aliased getter spy, so an asymmetric output-array replacement still passes. Add an output row with a distinct incoming descriptor and assert the original output array/object plus reactivity or omission behavior.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| expect(node.isInputConnected(0)).toBe(true) | ||
| expect(source.isOutputConnected(0)).toBe(true) | ||
|
|
||
| inputLinkGetter.mockRestore() |
There was a problem hiding this comment.
Nit: [P3] These terminal restores duplicate the repository's restoreMocks lifecycle and establish no later phase in this test. Delete both calls and let Vitest restore the spies even when an assertion fails.
There was a problem hiding this comment.
Tracked as FE-2654. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: approved.
I re-reviewed the complete final diff at b23f40b and found no remaining blocking or nonblocking findings. The previous middle-insertion, duplicate-name, and untrusted-slot-field failures are fixed. The implementation now uses explicit live-slot classes instead of prototype reflection, and the output-side identity/reactivity and cleanup gaps are covered.
Local verification passed: 123 affected test files with 1,919 tests and 7 expected failures, full typecheck, scoped ESLint, type-aware oxlint, oxfmt, commit hooks, and pre-push knip. At submission, remote checks reported 2 successful, 21 queued, 3 skipped, and no failures.
|
|
… agent slot sync (PM-1449) (#18279) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789985885071859)_ A hand-wired connection into an autogrow port could be serialized against the wrong input after an agent slot sync. `updateNodeSlots` replaced the store's slot arrays even though the live `LGraphNode` retained the original arrays, leaving serialization and the canvas with different slot layouts. - Preserve the registered input and output arrays and patch matching slot objects in place. - Match duplicate names occurrence by occurrence. Insert incoming-only slots before the next matching live slot while retaining existing-only slots and their order. - Treat `NodeInputSlot` and `NodeOutputSlot` connectivity as link-store-owned explicitly, without probing prototypes or reading deprecated `link`/`links` accessors. - Reduce CRDT slot records to supported serialized fields before they reach live slot objects. - Cover the PM-1449 serialization path, middle insertion, duplicate input/output names, external runtime fields, live output identity/reactivity, partial snapshots, and self-aliased live slots. The `updateNodeSlots` signature is unchanged. `LGraphNode` binds its slot arrays to the registered `NodeState` when it is constructed. Reassigning `state.inputs` or `state.outputs` later detached the store from the live node. Subsequent local autogrow and connection changes updated the canvas array, while `LGraph.serialize()` read the stale store array and associated positional topology with the wrong slot. The fix keeps the shared arrays stable. Existing slot objects also remain stable so Vue dependents continue to invalidate through the reactive object. Connectivity remains authoritative in `linkStore` for live slot classes and in the descriptor for plain store records. - #18021 addresses the same array-detachment root cause for queued execution. - #18101 covers a separate dynamic-widget slot-offset issue. - #18275 changes agent input reconciliation and may overlap when either PR rebases onto the other. - `pnpm vitest run src/stores/nodeDataStore.test.ts` — 29 passed. - `pnpm vitest run src/workbench/extensions/agent/crdt/graphMutations.test.ts` — 50 passed, 1 expected failure. - `pnpm vitest run src/workbench/extensions/agent src/stores/nodeDataStore.test.ts src/core/graph/widgets/dynamicWidgets.test.ts` — 123 files, 1,919 passed, 7 expected failures. - `pnpm typecheck` — passed. - Scoped ESLint, type-aware oxlint, and oxfmt checks — passed. - Commit hook checks and pre-push `knip --cache` — passed. Fixes PM-1449 (child of PM-1442). --------- Co-authored-by: Amp <amp@ampcode.com>
… agent slot sync (PM-1449) (#18279) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789985885071859)_ A hand-wired connection into an autogrow port could be serialized against the wrong input after an agent slot sync. `updateNodeSlots` replaced the store's slot arrays even though the live `LGraphNode` retained the original arrays, leaving serialization and the canvas with different slot layouts. - Preserve the registered input and output arrays and patch matching slot objects in place. - Match duplicate names occurrence by occurrence. Insert incoming-only slots before the next matching live slot while retaining existing-only slots and their order. - Treat `NodeInputSlot` and `NodeOutputSlot` connectivity as link-store-owned explicitly, without probing prototypes or reading deprecated `link`/`links` accessors. - Reduce CRDT slot records to supported serialized fields before they reach live slot objects. - Cover the PM-1449 serialization path, middle insertion, duplicate input/output names, external runtime fields, live output identity/reactivity, partial snapshots, and self-aliased live slots. The `updateNodeSlots` signature is unchanged. `LGraphNode` binds its slot arrays to the registered `NodeState` when it is constructed. Reassigning `state.inputs` or `state.outputs` later detached the store from the live node. Subsequent local autogrow and connection changes updated the canvas array, while `LGraph.serialize()` read the stale store array and associated positional topology with the wrong slot. The fix keeps the shared arrays stable. Existing slot objects also remain stable so Vue dependents continue to invalidate through the reactive object. Connectivity remains authoritative in `linkStore` for live slot classes and in the descriptor for plain store records. - #18021 addresses the same array-detachment root cause for queued execution. - #18101 covers a separate dynamic-widget slot-offset issue. - #18275 changes agent input reconciliation and may overlap when either PR rebases onto the other. - `pnpm vitest run src/stores/nodeDataStore.test.ts` — 29 passed. - `pnpm vitest run src/workbench/extensions/agent/crdt/graphMutations.test.ts` — 50 passed, 1 expected failure. - `pnpm vitest run src/workbench/extensions/agent src/stores/nodeDataStore.test.ts src/core/graph/widgets/dynamicWidgets.test.ts` — 123 files, 1,919 passed, 7 expected failures. - `pnpm typecheck` — passed. - Scoped ESLint, type-aware oxlint, and oxfmt checks — passed. - Commit hook checks and pre-push `knip --cache` — passed. Fixes PM-1449 (child of PM-1442). --------- Co-authored-by: Amp <amp@ampcode.com>
## Summary - Mouse-driven reference-image alignment coverage only; no product fix claimed. - Five source links and the empty trailing slot are asserted. - Unrelated runtime changes removed from this PR. <details><summary>Full context for agent readers</summary> The [original report](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789782395656129) described port/label drift while stress-testing the in-app agent. This test uses mouse connections, not agent synchronization. It must not be used to close that incident. [The agent slot-identity fix](Comfy-Org#18279) remains separate. The earlier test failure was a fixed-coordinate drag losing its target during canvas auto-pan. Keeping the viewport stable makes this mouse scenario pass without a product-code change. This is coverage of working behavior, not a reproduced product regression or a TDD bug-fix claim. The takeover rebuilds the test on current main rather than carrying parent-branch widget-rebinding and formatting changes. Primary commit authorship is preserved; the co-author trailer is removed as requested. The retained test now checks the exact five source identities, ordered image_1 through image_6 slots, row labels, and link-endpoint alignment. It captures the full workflow and an enlarged node. Local Chromium QA passed, including three consecutive runs without retries. Browser TypeScript, scoped lint and format passed. Fresh hosted CI and actual bot review remain required before merge; the previous CodeRabbit success status represented a skipped review. Cross-model review: Gemini Skeptic and Evidence-Seeded lenses completed. Refreshed slot indexes inside each alignment retry. Rejected tolerance widening without evidence of rounding failures, and rejected an asynchronous-autogrow claim after inspecting the synchronous connection callback and the drag helper's existing frame wait. The architecture-lens alternate provider was not verified as a different model and is not counted as cross-model evidence. Glossary: autogrow means creating the next empty input automatically; QA means exercising the rendered application; CI means hosted automated checks; TDD means a test demonstrated failing before its corresponding production fix. </details> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: christian-byrne <cbyrne@comfy.org>
…eir real slot after an agent slot sync (PM-1449) (#18279) (#18340) Backport of #18279 to `cloud/1.54`. Manual cherry-pick — the automated backport reported a merge conflict. ## Summary (from #18279) A hand-wired connection into an autogrow port could be serialized against the wrong input after an agent slot sync. `updateNodeSlots` replaced the store's slot arrays even though the live `LGraphNode` retained the original arrays, leaving serialization and the canvas with different slot layouts. The fix preserves the registered input/output arrays and patches matching slot objects in place instead of replacing them, matching duplicate names occurrence by occurrence. ## Conflict resolution Conflicts were in `src/stores/nodeDataStore.ts` and `src/stores/nodeDataStore.test.ts`: - `src/stores/nodeDataStore.ts`: `updateNodeSlots` on `cloud/1.54` still had the pre-fix naive assignment (`state.inputs = slots.inputs`; `state.outputs = slots.outputs`). Took the incoming version, which calls the new `mergeSlotsByName` helper (added earlier in the same diff, which applied cleanly) for both inputs and outputs. - `src/stores/nodeDataStore.test.ts`: two conflicts. The import line conflicted because `cloud/1.54`'s test file already pulls in `createTestingPinia`/`setActivePinia`/`beforeEach` (used by describe blocks not present on `main`), while the incoming diff needed `vi` for its new spies. Resolved by keeping both sets of imports. The second conflict was a pure addition (a new `'keeps live slot edits visible after a remote slot sync'` test) with no `cloud/1.54`-side change, so it was taken as-is. **Is this a real conflict, or a stacking conflict?** I checked the three other PRs the backport bot flagged as still open against `cloud/1.54` (#18336, #18333, #18330). None of them touch `src/stores/nodeDataStore.ts` or `src/stores/nodeDataStore.test.ts`, so this is not a stacking conflict with those PRs — it's a genuine divergence: `cloud/1.54` simply hadn't yet picked up the array-mutation-in-place semantics that #18279 introduces on `main`. ## Verification - `pnpm vitest run src/stores/nodeDataStore.test.ts` — 31 passed. - `pnpm vitest run src/workbench/extensions/agent/crdt/graphMutations.test.ts` — 48 passed, 1 expected failure (matches #18279's own reported result). - `pnpm typecheck` — passed. - `pnpm oxlint` (on changed files) — no new warnings/errors. - `oxfmt --check` on changed files — all correctly formatted. <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789965308493739)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6 --- _Generated by [Claude Code](https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6)_ Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Amp <amp@ampcode.com>
…ir real slot after an agent slot sync (PM-1449) (#18339) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789965308493739)_ ## Summary Backport of #18279 to `core/1.54`. The automated backport failed with a merge conflict, so this is a manual cherry-pick of merge commit `566c343fb95e77ee04c4dc3aa02ea40bcb416e66`. A hand-wired connection into an autogrow port could be serialized against the wrong input after an agent slot sync. `updateNodeSlots` replaced the store's slot arrays even though the live `LGraphNode` retained the original arrays, leaving serialization and the canvas with different slot layouts. The fix preserves the registered input/output arrays and patches matching slot objects in place instead of reassigning them. ## Conflict resolution Conflicts were in `src/stores/nodeDataStore.ts` and `src/stores/nodeDataStore.test.ts`: - `nodeDataStore.ts`: `updateNodeSlots` conflicted because `core/1.54`'s current version does a plain array reassignment (`state.inputs = slots.inputs`), while #18279 replaces that with the occurrence-aware `mergeSlotsByName` in-place patch, which is the entire point of this fix. Took the incoming (PR) side; `mergeSlotsByName`/`patchInputSlot`/`patchOutputSlot`/`copyInputSlot`/`copyOutputSlot` all merged in cleanly elsewhere in the file. - `nodeDataStore.test.ts`: an import conflict (`core/1.54` already has `createTestingPinia`/`setActivePinia`/`beforeEach` for existing tests; #18279 added `vi` for its new tests) was resolved by merging both import sets. A second conflict was a pure addition (`keeps live slot edits visible after a remote slot sync` test) with nothing on the `core/1.54` side to reconcile against, so it was taken as-is. `src/workbench/extensions/agent/crdt/graphMutations.ts` and its test file auto-merged cleanly with no conflicts. ## Is this a real conflict or a stacking conflict? Checked #18337, #18334, and #17872 (the other open PRs against `core/1.54` the backport bot flagged as possible stacking candidates): none of them touch `src/stores/nodeDataStore.ts` or `nodeDataStore.test.ts`. This is a real, direct conflict between #18279's rewrite of `updateNodeSlots` and `core/1.54`'s pre-existing simpler implementation, not a stacking conflict with any of those three PRs. ## Verification - `pnpm vitest run src/stores/nodeDataStore.test.ts` — 31 passed. - `pnpm vitest run src/workbench/extensions/agent/crdt/graphMutations.test.ts src/core/graph/widgets/dynamicWidgets.test.ts` — 71 passed, 1 expected failure (matches the original PR's reported results). - `pnpm typecheck` — passed. - `eslint` on the 4 changed files — passed. - Working tree matches the 4 files changed by #18279 exactly (`nodeDataStore.ts`, `nodeDataStore.test.ts`, `graphMutations.ts`, `graphMutations.test.ts`), no stray diffs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6 --- _Generated by [Claude Code](https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6)_ Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Amp <amp@ampcode.com>
…urn (Comfy-Org#18327) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789965308493739)_ ## Summary Follow-up, test-only PR stacked on Comfy-Org#18279 (per reviewer request, so it does not block that PR's merge or QA). Adds the missing black-box coverage for the bug Comfy-Org#18279 fixes: existing coverage was Vitest unit tests that call the store's merge function and `LGraph.serialize()` directly in-memory, with no test that goes through the real pipeline — the agent panel UI, a real CRDT sync, a real canvas connection, and a real chat-composer Send. ## Changes - **What**: A new Playwright spec (`agentAutogrowHandWiredLinkSurvivesSend.spec.ts`) and its fixture. It boots the real agent panel against a fake CRDT host, sends one chat message so an agent-wired link lands on an autogrow node's first slot, has the user hand-wire a second source into the resulting free slot on the live canvas, sends a second chat message whose simulated response reconnects the *first* slot to a different source (the same kind of CRDT slot-sync event that used to corrupt the array), and asserts the hand-wired slot keeps its own name and link — via exact (`toEqual`, not `arrayContaining`) checks on the resulting image inputs and on the exported workflow's link list, including confirming the displaced seed link is gone outright. - **Breaking**: none (test-only). - **Dependencies**: none. ## Update 2: reload assertion reverted again — Comfy-Org#18375 does not close this gap The "reload assertion restored" update below turned out to be wrong. CI (`playwright-video-new-tests`, run 35692982760) failed again on the exact same symptom — `image_2`'s `originNodeId` reading back `null` after the in-page `loadGraphData()` reload — with Comfy-Org#18375's fix (`d94c0357b`, cherry-picked here as `068b679ba`) genuinely present and correct on this branch. Verified the fix is real and correctly applied: `notifyAdapterAdopted()`/its call site are present on this branch's head, and the upstream regression test for it (`agentCrdtProjection.reconnectAdoptionRace.test.ts`, upstream commit `2c33b91c8` — omitted from the original cherry-pick, now added here) passes. I also extended that unit test to add the missing piece — a later turn reconnecting a different, already-occupied slot (mirroring `sendSecondTurnAndReconnectFirstSlot`) before the reload — and it still passes at the unit/store level. So the browser failure is not Comfy-Org#18375's `LinkMap`-revision-cache race recurring. It's the separate, pre-existing gap `d2f3a1872` originally diagnosed and deferred: how the agent CRDT follower's reconcile pass interacts with a same-session `loadGraphData()` call while it's still subscribed. That gap remains unfixed and needs real browser-level tracing (e.g. into `useAgentCrdtFollower.ts`'s `watch(getGraph, ...)` reconcile trigger vs. `app.ts`'s `loadGraphData()` clear/configure sequence) to pin down — out of scope for this test-only PR. Reverted the reload assertion back to the `d2f3a1872` state and updated its comment with this finding, so it doesn't re-assert on a known-open gap. ## Update: reload assertion restored, CRDT fix included via temporary cherry-pick (historical, see Update 2) The reload/export round-trip assertion noted as removed below has been restored. Comfy-Org#18375 fixes the underlying CRDT gap (a `LinkMap` cache-invalidation race between a connect's registration and its materialization), proven there with a red-then-green unit test. This branch cherry-picks that fix commit (`d94c0357b`) so the restored assertion has real, currently-passing coverage in CI right now, rather than a promise of coverage once something else merges. This turned out to be an incorrect theory — see Update 2 above. ## Original scope note: reload/export round-trip assertion removed (historical, now reverted-to above) An earlier version of this test also drove `window.app.loadGraphData()` in-page and re-asserted the link layout across that reload, with the agent CRDT follower left subscribed to the same workflow throughout. That assertion was removed in d2f3a18 because CI showed it failing deterministically — the same `image_2` slot losing its link on every retry, with or without `SLOW_MO` — which ruled out flakiness and pointed to a real, pre-existing gap in how the agent's CRDT follower reconciles when `loadGraphData()` is called in-session while it's still subscribed. That gap is unrelated to the `mergeSlotsByName` fix (Comfy-Org#18279) this test covers, and remains unfixed (see Update 2). The remaining assertions still fully exercise this PR's actual coverage target: a hand-wired spare slot survives a live agent turn that reconnects a different slot on the same node, checked via exact link-list assertions immediately after that turn. ## Review Focus - The reconnect target for the second agent turn is deliberately the group's *first* slot (not a `grow` op). Growing a second slot lands on an index the doc and the client's client-only autogrow spare disagree about, which trips the (unrelated, working-as-intended) autogrow shape-normalization logic and makes for a confusing test. Reconnecting slot 0 isolates the exact "replace vs. merge" bug the fix addresses. - I verified this is a real regression test, not a vacuous one: with the two files Comfy-Org#18279 fixes (`src/stores/nodeDataStore.ts`, `src/workbench/extensions/agent/crdt/graphMutations.ts`) temporarily reverted to their pre-fix `main` versions, this spec fails (the hand-wired slot silently loses its slot); restoring the fix, it passes. - The same-session reload path is a known, currently-open gap (see Update 2) — not exercised by this PR's assertions. ## Verification - `pnpm exec playwright test agentAutogrowHandWiredLinkSurvivesSend --project=cloud` — 1 passed (prior to restoring the reload assertion). - Confirmed RED against pre-fix `nodeDataStore.ts`/`graphMutations.ts`, GREEN against the fix. - `pnpm exec vitest run` on the cherry-picked and added CRDT unit tests — all pass, including the extended reconnect+reload scenario. - `pnpm exec eslint`, `pnpm exec oxfmt`, `pnpm typecheck` — clean on the changed files; pre-commit hooks (oxfmt, oxlint, eslint, typecheck, typecheck:browser) passed on both new commits. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6 --- _Generated by [Claude Code](https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
|
|
|
|
|
|
## Summary - Mouse-driven reference-image alignment coverage only; no product fix claimed. - Five source links and the empty trailing slot are asserted. - Unrelated runtime changes removed from this PR. <details><summary>Full context for agent readers</summary> The [original report](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789782395656129) described port/label drift while stress-testing the in-app agent. This test uses mouse connections, not agent synchronization. It must not be used to close that incident. [The agent slot-identity fix](#18279) remains separate. The earlier test failure was a fixed-coordinate drag losing its target during canvas auto-pan. Keeping the viewport stable makes this mouse scenario pass without a product-code change. This is coverage of working behavior, not a reproduced product regression or a TDD bug-fix claim. The takeover rebuilds the test on current main rather than carrying parent-branch widget-rebinding and formatting changes. Primary commit authorship is preserved; the co-author trailer is removed as requested. The retained test now checks the exact five source identities, ordered image_1 through image_6 slots, row labels, and link-endpoint alignment. It captures the full workflow and an enlarged node. Local Chromium QA passed, including three consecutive runs without retries. Browser TypeScript, scoped lint and format passed. Fresh hosted CI and actual bot review remain required before merge; the previous CodeRabbit success status represented a skipped review. Cross-model review: Gemini Skeptic and Evidence-Seeded lenses completed. Refreshed slot indexes inside each alignment retry. Rejected tolerance widening without evidence of rounding failures, and rejected an asynchronous-autogrow claim after inspecting the synchronous connection callback and the drag helper's existing frame wait. The architecture-lens alternate provider was not verified as a different model and is not counted as cross-model evidence. Glossary: autogrow means creating the next empty input automatically; QA means exercising the rendered application; CI means hosted automated checks; TDD means a test demonstrated failing before its corresponding production fix. </details> --------- Co-authored-by: christian-byrne <cbyrne@comfy.org>
## Summary - Mouse-driven reference-image alignment coverage only; no product fix claimed. - Five source links and the empty trailing slot are asserted. - Unrelated runtime changes removed from this PR. <details><summary>Full context for agent readers</summary> The [original report](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789782395656129) described port/label drift while stress-testing the in-app agent. This test uses mouse connections, not agent synchronization. It must not be used to close that incident. [The agent slot-identity fix](#18279) remains separate. The earlier test failure was a fixed-coordinate drag losing its target during canvas auto-pan. Keeping the viewport stable makes this mouse scenario pass without a product-code change. This is coverage of working behavior, not a reproduced product regression or a TDD bug-fix claim. The takeover rebuilds the test on current main rather than carrying parent-branch widget-rebinding and formatting changes. Primary commit authorship is preserved; the co-author trailer is removed as requested. The retained test now checks the exact five source identities, ordered image_1 through image_6 slots, row labels, and link-endpoint alignment. It captures the full workflow and an enlarged node. Local Chromium QA passed, including three consecutive runs without retries. Browser TypeScript, scoped lint and format passed. Fresh hosted CI and actual bot review remain required before merge; the previous CodeRabbit success status represented a skipped review. Cross-model review: Gemini Skeptic and Evidence-Seeded lenses completed. Refreshed slot indexes inside each alignment retry. Rejected tolerance widening without evidence of rounding failures, and rejected an asynchronous-autogrow claim after inspecting the synchronous connection callback and the drag helper's existing frame wait. The architecture-lens alternate provider was not verified as a different model and is not counted as cross-model evidence. Glossary: autogrow means creating the next empty input automatically; QA means exercising the rendered application; CI means hosted automated checks; TDD means a test demonstrated failing before its corresponding production fix. </details> --------- Co-authored-by: christian-byrne <cbyrne@comfy.org>
Requested by Christian Byrne · Slack thread
Summary
A hand-wired connection into an autogrow port could be serialized against the wrong input after an agent slot sync.
updateNodeSlotsreplaced the store's slot arrays even though the liveLGraphNoderetained the original arrays, leaving serialization and the canvas with different slot layouts.Changes
NodeInputSlotandNodeOutputSlotconnectivity as link-store-owned explicitly, without probing prototypes or reading deprecatedlink/linksaccessors.The
updateNodeSlotssignature is unchanged.Root cause
LGraphNodebinds its slot arrays to the registeredNodeStatewhen it is constructed. Reassigningstate.inputsorstate.outputslater detached the store from the live node. Subsequent local autogrow and connection changes updated the canvas array, whileLGraph.serialize()read the stale store array and associated positional topology with the wrong slot.The fix keeps the shared arrays stable. Existing slot objects also remain stable so Vue dependents continue to invalidate through the reactive object. Connectivity remains authoritative in
linkStorefor live slot classes and in the descriptor for plain store records.Related work
Verification
pnpm vitest run src/stores/nodeDataStore.test.ts— 29 passed.pnpm vitest run src/workbench/extensions/agent/crdt/graphMutations.test.ts— 50 passed, 1 expected failure.pnpm vitest run src/workbench/extensions/agent src/stores/nodeDataStore.test.ts src/core/graph/widgets/dynamicWidgets.test.ts— 123 files, 1,919 passed, 7 expected failures.pnpm typecheck— passed.knip --cache— passed.Fixes PM-1449 (child of PM-1442).