Skip to content

fix(nodeDataStore): log console.error on id collision (FE-1810) - #15708

Closed
christian-byrne wants to merge 1 commit into
feature/ecs-migrationfrom
fix/fe-1810-node-data-store-collision-diagnostic
Closed

christian-byrne wants to merge 1 commit into
feature/ecs-migrationfrom
fix/fe-1810-node-data-store-collision-diagnostic

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Summary

  • Adds console.error on the if (incumbent) return undefined branch of registerNode in src/stores/nodeDataStore.ts, matching the wording and style used by linkStore.ts:210 and rerouteStore.ts:131
  • Updates the two existing collision tests to assert the error is emitted (spy + restore pattern)

Without this, a genuine identity violation — two distinct NodeState objects claiming the same id — was silent at the console, indistinguishable from the normal id-collision retry path in LGraph.ts:1171. Nodes could be silently re-minted with new ids that appear in serialized workflows.

Closes FE-1810.

Test plan

  • pnpm vitest run src/stores/nodeDataStore.test.ts — two collision tests now assert console.error is called once with a message matching /belongs to graph/
  • Confirm no new errors appear in the normal (non-collision) registration path

🤖 Generated with Claude Code

…ore/rerouteStore

Silent rejection made genuine identity violations indistinguishable from
ordinary id collisions at the call site, causing the re-mint loop in
LGraph.ts to silently rename nodes without any console signal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 23, 2026
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6673dc1f-1914-4285-875f-3f7cf1523e35

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 08/23/2026, 07:05:01 AM UTC

Links

🎭 Playwright: ✅ 1989 passed, 0 failed · 2 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1968 / ❌ 0 / ⚠️ 2 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.2 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.6 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 65.9 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 59.3 MB heap
large-graph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.8 MB heap
large-graph-pan: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 18ms TBT · 77.2 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 6ms TBT · 73.1 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 3ms TBT · 67.9 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.8 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 83.6 MB heap
subgraph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.3 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.0 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 147ms TBT · 95.2 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 4ms TBT · 77.6 MB heap
vue-large-graph-idle: · 56.3 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 170.2 MB heap
vue-large-graph-pan: · 56.2 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 73ms TBT · 168.6 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.7 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 7ms
canvas-idle: layout count 0
canvas-idle: style recalc count 7
canvas-idle: task duration 566ms
canvas-idle: script duration 11ms
canvas-idle: TBT 0ms
canvas-idle: heap used 67.2 MB
canvas-idle: DOM nodes -282
canvas-idle: event listeners -155
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 4ms
canvas-mouse-sweep: style recalc duration 49ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 80
canvas-mouse-sweep: task duration 1410ms
canvas-mouse-sweep: script duration 179ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 69.6 MB
canvas-mouse-sweep: DOM nodes -281
canvas-mouse-sweep: event listeners -155
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 19ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 398ms
canvas-zoom-sweep: script duration 17ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 65.9 MB
canvas-zoom-sweep: DOM nodes 76
canvas-zoom-sweep: event listeners 21
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 7ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 10
dom-widget-clipping: task duration 460ms
dom-widget-clipping: script duration 34ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 59.3 MB
dom-widget-clipping: DOM nodes 15
dom-widget-clipping: event listeners 2
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 4ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 4
large-graph-idle: task duration 650ms
large-graph-idle: script duration 45ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 73.8 MB
large-graph-idle: DOM nodes -281
large-graph-idle: event listeners -183
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 11ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 65
large-graph-pan: task duration 2944ms
large-graph-pan: script duration 1044ms
large-graph-pan: TBT 18ms
large-graph-pan: heap used 77.2 MB
large-graph-pan: DOM nodes -280
large-graph-pan: event listeners -164
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 8ms
large-graph-zoom: style recalc duration 12ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 66
large-graph-zoom: task duration 2896ms
large-graph-zoom: script duration 996ms
large-graph-zoom: TBT 6ms
large-graph-zoom: heap used 73.1 MB
large-graph-zoom: DOM nodes -121
large-graph-zoom: event listeners -87
legacy-node-drag: avg frame time 17ms
legacy-node-drag: p95 frame time 17ms
legacy-node-drag: layout duration 0ms
legacy-node-drag: style recalc duration 5ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 41
legacy-node-drag: task duration 2312ms
legacy-node-drag: script duration 250ms
legacy-node-drag: TBT 3ms
legacy-node-drag: heap used 67.9 MB
legacy-node-drag: DOM nodes -288
legacy-node-drag: event listeners 0
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 4ms
minimap-idle: layout count 0
minimap-idle: style recalc count 4
minimap-idle: task duration 611ms
minimap-idle: script duration 43ms
minimap-idle: TBT 0ms
minimap-idle: heap used 67.8 MB
minimap-idle: DOM nodes -277
minimap-idle: event listeners -169
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 10ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 45
subgraph-dom-widget-clipping: task duration 529ms
subgraph-dom-widget-clipping: script duration 141ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 83.6 MB
subgraph-dom-widget-clipping: DOM nodes 16
subgraph-dom-widget-clipping: event listeners 8
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 9ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 8
subgraph-idle: task duration 560ms
subgraph-idle: script duration 10ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 61.3 MB
subgraph-idle: DOM nodes -297
subgraph-idle: event listeners -216
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 5ms
subgraph-mouse-sweep: style recalc duration 43ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 79
subgraph-mouse-sweep: task duration 1224ms
subgraph-mouse-sweep: script duration 130ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 67.0 MB
subgraph-mouse-sweep: DOM nodes -296
subgraph-mouse-sweep: event listeners -216
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 16ms
subgraph-transition-enter: style recalc duration 34ms
subgraph-transition-enter: layout count 14
subgraph-transition-enter: style recalc count 19
subgraph-transition-enter: task duration 993ms
subgraph-transition-enter: script duration 34ms
subgraph-transition-enter: TBT 147ms
subgraph-transition-enter: heap used 95.2 MB
subgraph-transition-enter: DOM nodes 13671
subgraph-transition-enter: event listeners 2383
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 37ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 246
viewport-pan-sweep: task duration 9960ms
viewport-pan-sweep: script duration 3414ms
viewport-pan-sweep: TBT 4ms
viewport-pan-sweep: heap used 77.6 MB
viewport-pan-sweep: DOM nodes -277
viewport-pan-sweep: event listeners -127
vue-large-graph-idle: avg frame time 18ms
vue-large-graph-idle: p95 frame time 17ms
vue-large-graph-idle: layout duration 0ms
vue-large-graph-idle: style recalc duration 0ms
vue-large-graph-idle: layout count 0
vue-large-graph-idle: style recalc count 0
vue-large-graph-idle: task duration 17068ms
vue-large-graph-idle: script duration 357ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 170.2 MB
vue-large-graph-idle: DOM nodes -6550
vue-large-graph-idle: event listeners -7475
vue-large-graph-pan: avg frame time 18ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 20ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 169
vue-large-graph-pan: task duration 21142ms
vue-large-graph-pan: script duration 956ms
vue-large-graph-pan: TBT 73ms
vue-large-graph-pan: heap used 168.6 MB
vue-large-graph-pan: DOM nodes -6552
vue-large-graph-pan: event listeners -7470
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 22ms
workflow-execution: layout count 3
workflow-execution: style recalc count 12
workflow-execution: task duration 109ms
workflow-execution: script duration 6ms
workflow-execution: TBT 0ms
workflow-execution: heap used 67.7 MB
workflow-execution: DOM nodes 116
workflow-execution: event listeners 73
Raw data
{
  "timestamp": "2026-08-23T07:16:57.074Z",
  "gitSha": "f17bb14b5fe4f2e49d8dd4ecabe8d6af32d43dd5",
  "branch": "fix/fe-1810-node-data-store-collision-diagnostic",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2051.4799999999977,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 7.412999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 604.4750000000001,
      "heapDeltaBytes": -9138868,
      "heapUsedBytes": 60500556,
      "domNodes": -282,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 12.506,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-idle",
      "durationMs": 2055.1120000000083,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 7.300000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 527.711,
      "heapDeltaBytes": 11297392,
      "heapUsedBytes": 80388544,
      "domNodes": -281,
      "jsHeapTotalBytes": 4710400,
      "scriptDurationMs": 9.727000000000002,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2474.1450000000214,
      "styleRecalcs": 82,
      "styleRecalcDurationMs": 53.70700000000001,
      "layouts": 12,
      "layoutDurationMs": 4.071,
      "taskDurationMs": 1507.1509999999998,
      "heapDeltaBytes": -371860,
      "heapUsedBytes": 68382324,
      "domNodes": -279,
      "jsHeapTotalBytes": 6545408,
      "scriptDurationMs": 188.34699999999998,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2272.0829999999523,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 45.058,
      "layouts": 12,
      "layoutDurationMs": 3.4539999999999997,
      "taskDurationMs": 1312.376,
      "heapDeltaBytes": 8673988,
      "heapUsedBytes": 77624740,
      "domNodes": -283,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 169.898,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1738.1359999999972,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 17.999999999999996,
      "layouts": 6,
      "layoutDurationMs": 0.65,
      "taskDurationMs": 407.574,
      "heapDeltaBytes": 3071212,
      "heapUsedBytes": 65119680,
      "domNodes": 75,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 21.636999999999997,
      "eventListeners": 21,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1738.422999999898,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 19.291,
      "layouts": 6,
      "layoutDurationMs": 0.652,
      "taskDurationMs": 388.431,
      "heapDeltaBytes": 4094644,
      "heapUsedBytes": 73072908,
      "domNodes": 76,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 11.860000000000001,
      "eventListeners": 21,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 720.1439999999479,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 6.209000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 456.468,
      "heapDeltaBytes": -6723504,
      "heapUsedBytes": 62080436,
      "domNodes": 14,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 33.702,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 739.4530000000259,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 7.485000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 463.33000000000004,
      "heapDeltaBytes": -6900532,
      "heapUsedBytes": 62227012,
      "domNodes": 16,
      "jsHeapTotalBytes": 6553600,
      "scriptDurationMs": 34.527,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2052.3129999999696,
      "styleRecalcs": 3,
      "styleRecalcDurationMs": 3.479000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 685.2049999999999,
      "heapDeltaBytes": 4748008,
      "heapUsedBytes": 87926664,
      "domNodes": -281,
      "jsHeapTotalBytes": 3629056,
      "scriptDurationMs": 46.333,
      "eventListeners": -183,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2039.0209999999342,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 3.785,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 615.2350000000001,
      "heapDeltaBytes": -22593016,
      "heapUsedBytes": 66773112,
      "domNodes": -281,
      "jsHeapTotalBytes": 4452352,
      "scriptDurationMs": 42.99900000000001,
      "eventListeners": -183,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 4230.282999999986,
      "styleRecalcs": 64,
      "styleRecalcDurationMs": 10.300999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3023.5460000000003,
      "heapDeltaBytes": -13319380,
      "heapUsedBytes": 77904116,
      "domNodes": -286,
      "jsHeapTotalBytes": 4677632,
      "scriptDurationMs": 1085.58,
      "eventListeners": -179,
      "totalBlockingTimeMs": 36,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-pan",
      "durationMs": 3807.9549999999927,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 11.040999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2864.745,
      "heapDeltaBytes": 19562552,
      "heapUsedBytes": 83980588,
      "domNodes": -273,
      "jsHeapTotalBytes": 2322432,
      "scriptDurationMs": 1002.6240000000001,
      "eventListeners": -149,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 4795.017999999971,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 12.006999999999996,
      "layouts": 60,
      "layoutDurationMs": 7.841000000000001,
      "taskDurationMs": 2933.115,
      "heapDeltaBytes": 12116640,
      "heapUsedBytes": 81250020,
      "domNodes": 24,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 1025.3429999999998,
      "eventListeners": 12,
      "totalBlockingTimeMs": 2,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 4666.482999999971,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 12.245999999999997,
      "layouts": 60,
      "layoutDurationMs": 8.171,
      "taskDurationMs": 2859.163,
      "heapDeltaBytes": -16714688,
      "heapUsedBytes": 72147340,
      "domNodes": -265,
      "jsHeapTotalBytes": 5464064,
      "scriptDurationMs": 967.2199999999999,
      "eventListeners": -185,
      "totalBlockingTimeMs": 10,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.80000000000109
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3466.318000000001,
      "styleRecalcs": 41,
      "styleRecalcDurationMs": 4.874,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2395.785,
      "heapDeltaBytes": -1013704,
      "heapUsedBytes": 71718212,
      "domNodes": -288,
      "jsHeapTotalBytes": -827392,
      "scriptDurationMs": 267.108,
      "eventListeners": 1,
      "totalBlockingTimeMs": 3,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3289.109999999937,
      "styleRecalcs": 41,
      "styleRecalcDurationMs": 4.917000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2228.5939999999996,
      "heapDeltaBytes": -1702728,
      "heapUsedBytes": 70639752,
      "domNodes": -287,
      "jsHeapTotalBytes": -40960,
      "scriptDurationMs": 232.868,
      "eventListeners": -1,
      "totalBlockingTimeMs": 3,
      "frameDurationMs": 16.666666666666636,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2060.9359999999697,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 4.34,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 625.7359999999999,
      "heapDeltaBytes": -22009896,
      "heapUsedBytes": 69177040,
      "domNodes": -280,
      "jsHeapTotalBytes": 2879488,
      "scriptDurationMs": 41.64799999999999,
      "eventListeners": -185,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2047.4790000000667,
      "styleRecalcs": 3,
      "styleRecalcDurationMs": 2.9770000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 596.416,
      "heapDeltaBytes": -19633828,
      "heapUsedBytes": 73054488,
      "domNodes": -273,
      "jsHeapTotalBytes": -1576960,
      "scriptDurationMs": 44.72599999999999,
      "eventListeners": -153,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 757.0400000000177,
      "styleRecalcs": 45,
      "styleRecalcDurationMs": 9.398,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 526.198,
      "heapDeltaBytes": 18223312,
      "heapUsedBytes": 87643724,
      "domNodes": 16,
      "jsHeapTotalBytes": 6029312,
      "scriptDurationMs": 141.52700000000002,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 758.391999999958,
      "styleRecalcs": 45,
      "styleRecalcDurationMs": 9.937000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 531.233,
      "heapDeltaBytes": 18146572,
      "heapUsedBytes": 87749712,
      "domNodes": 16,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 139.533,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2057.7990000000455,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 9.334999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 590.091,
      "heapDeltaBytes": -12770368,
      "heapUsedBytes": 56949996,
      "domNodes": -296,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 10.462000000000002,
      "eventListeners": -201,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2011.8509999999787,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 7.88,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 530.146,
      "heapDeltaBytes": 2066504,
      "heapUsedBytes": 71631992,
      "domNodes": -298,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 9.246999999999998,
      "eventListeners": -231,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 2022.48400000002,
      "styleRecalcs": 80,
      "styleRecalcDurationMs": 44.03600000000001,
      "layouts": 16,
      "layoutDurationMs": 4.802,
      "taskDurationMs": 1249.7549999999999,
      "heapDeltaBytes": -4851440,
      "heapUsedBytes": 64523064,
      "domNodes": -295,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 131.49000000000004,
      "eventListeners": -201,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1978.2559999999876,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 41.73,
      "layouts": 16,
      "layoutDurationMs": 4.404,
      "taskDurationMs": 1198.602,
      "heapDeltaBytes": 13084064,
      "heapUsedBytes": 75946316,
      "domNodes": -297,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 127.61600000000001,
      "eventListeners": -231,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1449.895999999967,
      "styleRecalcs": 19,
      "styleRecalcDurationMs": 34.29199999999999,
      "layouts": 14,
      "layoutDurationMs": 15.613999999999999,
      "taskDurationMs": 992.9119999999998,
      "heapDeltaBytes": 18016472,
      "heapUsedBytes": 99808464,
      "domNodes": 13671,
      "jsHeapTotalBytes": 10485760,
      "scriptDurationMs": 33.589999999999996,
      "eventListeners": 2383,
      "totalBlockingTimeMs": 147,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.80000000000109
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 12814.025000000016,
      "styleRecalcs": 245,
      "styleRecalcDurationMs": 35.467,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 9936.107,
      "heapDeltaBytes": -11975560,
      "heapUsedBytes": 78641884,
      "domNodes": -281,
      "jsHeapTotalBytes": 3858432,
      "scriptDurationMs": 3462.345,
      "eventListeners": -127,
      "totalBlockingTimeMs": 7,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 12983.271000000059,
      "styleRecalcs": 246,
      "styleRecalcDurationMs": 38.923,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 9984.098999999998,
      "heapDeltaBytes": -6754860,
      "heapUsedBytes": 84019368,
      "domNodes": -272,
      "jsHeapTotalBytes": 2023424,
      "scriptDurationMs": 3364.77,
      "eventListeners": -127,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 17772.591999999975,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17057.755,
      "heapDeltaBytes": -40495888,
      "heapUsedBytes": 177081532,
      "domNodes": -6548,
      "jsHeapTotalBytes": 249856,
      "scriptDurationMs": 349.63,
      "eventListeners": -7475,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 17807.104999999978,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17078.929,
      "heapDeltaBytes": -31385568,
      "heapUsedBytes": 179881904,
      "domNodes": -6552,
      "jsHeapTotalBytes": -7016448,
      "scriptDurationMs": 364.407,
      "eventListeners": -7475,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 21424.66999999999,
      "styleRecalcs": 172,
      "styleRecalcDurationMs": 20.033000000000023,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 21104.358,
      "heapDeltaBytes": -35423284,
      "heapUsedBytes": 176094552,
      "domNodes": -6556,
      "jsHeapTotalBytes": -6492160,
      "scriptDurationMs": 919.5389999999999,
      "eventListeners": -7471,
      "totalBlockingTimeMs": 106,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 21476.55599999996,
      "styleRecalcs": 166,
      "styleRecalcDurationMs": 20.352000000000036,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 21180.343,
      "heapDeltaBytes": -34393520,
      "heapUsedBytes": 177522404,
      "domNodes": -6548,
      "jsHeapTotalBytes": -8429568,
      "scriptDurationMs": 992.7379999999999,
      "eventListeners": -7469,
      "totalBlockingTimeMs": 39,
      "frameDurationMs": 17.780000000000047,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 120.8599999999933,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 19.366,
      "layouts": 2,
      "layoutDurationMs": 0.5850000000000001,
      "taskDurationMs": 90.32199999999999,
      "heapDeltaBytes": 3432028,
      "heapUsedBytes": 69945976,
      "domNodes": 113,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 5.027,
      "eventListeners": 49,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 479.75000000008095,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 24.298000000000002,
      "layouts": 3,
      "layoutDurationMs": 0.7070000000000001,
      "taskDurationMs": 128.434,
      "heapDeltaBytes": 5434448,
      "heapUsedBytes": 72004236,
      "domNodes": 119,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 7.932999999999999,
      "eventListeners": 97,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    }
  ]
}

@github-actions github-actions Bot added the risk:R2 PR risk grade (advisory shadow check; grader-owned) label Aug 23, 2026
@codecov

codecov Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                    Coverage Diff                    @@
##           feature/ecs-migration   #15708      +/-   ##
=========================================================
+ Coverage                  82.31%   82.32%   +0.01%     
=========================================================
  Files                       1900     1900              
  Lines                     107652   107655       +3     
  Branches                   34061    33594     -467     
=========================================================
+ Hits                       88610    88628      +18     
+ Misses                     18706    18689      -17     
- Partials                     336      338       +2     
Flag Coverage Δ
e2e 68.00% <100.00%> (+0.03%) ⬆️
unit 73.93% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/stores/nodeDataStore.ts 98.50% <100.00%> (+0.04%) ⬆️

... and 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@christian-byrne

Copy link
Copy Markdown
Contributor Author

This implements the fix FE-1810 originally proposed, and that proposal was corrected on the ticket before this PR was opened. Flagging here because this is non-draft and the second box of its own test plan is the exact risk.

1. It fires on the ordinary load path, and that has already been measured once.

registerNode returns undefined for any incumbent that is not the same object in the same owning graph. Its only production caller treats that as a retry signal:

// LGraph.ts:1171
while (!registerNodeState(this, node)) node.id = mintNodeId(state)

Subgraph.state returns rootGraph.state, so subgraphs share the root's id counter while nodeDataStore's bucket is root-flat, and ids arriving through configure() or paste are observed, not minted. A collision there is ordinary input, not a bug.

Prior evidence, from BE-5048's worker on 2026-07-30 (PR #14443, merged into matt/be-5050-node-shell-state): the equivalent assert "throws on real LGraph.configure/subgraph-dedup paths (LGraph.test.ts, proxyWidgetMigration.test.ts)". A console.error will not fail those tests the way a throw does, so the suite can stay green while every affected workflow load prints an error at runtime. That is what the unchecked box "Confirm no new errors appear in the normal (non-collision) registration path" needs to establish, and the two updated unit tests do not establish it — both construct a collision deliberately.

2. The message is wrong in the case the caller actually hits.

Node ${state.id} belongs to graph ${incumbent.graphId}; graph ${graphScope.owningGraphId} cannot overwrite it.

A different NodeState at the same id in the same owning graph reaches this branch, and the message then reads Node 7 belongs to graph A; graph A cannot overwrite it. That is the same defect #15700 filed against linkStore's ownership error four minutes before this PR was opened. If the log stays, branch on incumbent.graphId === graphScope.owningGraphId first.

3. Where the actionable diagnostic belongs.

The store cannot say anything useful, because it does not know whether the caller will resolve the collision. The re-mint site does, and it has the information a reader needs:

node id 7 was displaced to 42; links serialized against 7 may mis-resolve

That matters because link restoration keys on the serialized id after the re-mint has already happened. LGraph.ts:2346-2349:

const originNode = this.getNodeById(newLink.oid)
const targetNode = this.getNodeById(newLink.tid)
if (!originNode || !targetNode) continue

So a displaced node's links either attach to whichever node kept the id, or hit that bare continue.

Suggested resolution: move the log to LGraph.ts:1171 with both ids, or keep it here but gate it on the genuine-violation case only, and either way answer the open question first — whether the configure/subgraph-dedup collision that trips it is itself a defect. That question has been waiting on a human since 2026-07-30.

Context: FE-1810 comment thread, and decisions.md D-gl-A2 in the ecs-migration workspace.

@christian-byrne

Copy link
Copy Markdown
Contributor Author

Three open PRs are rewriting these same four lines right now. Cross-posting to all three so whoever triages sees it from whichever one they opened first.

PR What it does to if (incumbent) in nodeDataStore.registerNode Opened
#15708 console.error(...) then return undefined 07:03:16Z
#15720 console.error(...) then return undefined, plus a widgetValueStore rationale comment 09:13:53Z
#15726 assert(false, ...) then return undefined 09:16:01Z

Whichever merges first, the other two conflict. #15708 and #15720 are also the same change built twice, two hours apart.

On which to keep: #15726's assert on this particular branch is the one measured red in July. BE-5048's worker reported on 2026-07-30 that the duplicate-NodeState assert "throws on real LGraph.configure/subgraph-dedup paths (LGraph.test.ts, proxyWidgetMigration.test.ts)", and assert() throws under import.meta.env.DEV. #15726's other two asserts (cross-root re-registration, identity drift on unregister) do not have that problem and are worth keeping. Detail in #15726 (comment)

On whether to log here at all: the rejection is the retry protocol for the only production caller (LGraph.ts:1171, while (!registerNodeState(this, node)) node.id = mintNodeId(state)), and ids arriving through configure() or paste are observed rather than minted, so this branch is reached on ordinary workflow loads. The actionable diagnostic is at the re-mint site, where both the old and the new id are in hand and where LGraph.ts:2346-2349 will resolve links against the stale serialized id.

Also worth checking before merge: the message Node ${id} belongs to graph ${incumbent.graphId}; graph ${scope.owningGraphId} cannot overwrite it. reads Node 7 belongs to graph A; graph A cannot overwrite it. for a same-owning-graph duplicate. #15700 filed the identical defect against linkStore's version.

@christian-byrne

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate: #15720 contains the same nodeDataStore console.error change (with a [nodeDataStore] prefix) plus the widgetValueStore axis documentation required by the collision-contract decision. FE-1810 consolidates into FE-1811. This and #15720 were the same change built twice, two hours apart, by concurrent agents.

zeus-onl pushed a commit to zeus-onl/ComfyUI_frontend that referenced this pull request Aug 25, 2026
…alisation (Comfy-Org#15729)

Two test files, no product change. Both cover things the 2026-08-24 soak
plan is about to rely on.

## 1. Interrupted workflow load (Gate 1 P0 Comfy-Org#2)

`docs/architecture/ecs/ecs-verification-audit.md` lists as its second P0
gap: *"failed or interrupted workflow load. Force a configure callback
to throw after some nested definitions register, then load another
workflow. Assert no node/link/reroute/layout/widget ownership leaks from
the failed graph."* Nothing covered it.

`LGraph.configure` is not transactional. Its `try`/`finally` restores
the shadow-diff flag and dispatches `configured`, but it does not roll
back the entities already registered when a node's `onConfigure` throws.
What keeps a later load clean is `resetAfterClear()`, which clears every
graph-scoped store under `this.id` before the id is reassigned.
`LGraph.interruptedConfigure.test.ts` pins that: two nested subgraph
definitions, four root nodes, a link, a reroute and a group, with the
last node throwing; then a second workflow is loaded and nothing is left
owned by the failed graph id across `linkStore`, `nodeDataStore`,
`rerouteStore`, `layoutStore` and `widgetValueStore`.

It also pins, as characterisation rather than endorsement, that a load
which threw dispatches `configured` exactly as a successful one does, so
no listener can tell them apart.

## 2. Slot mirrors are rebuilt from link records on load

`slotMirrorNormalisationOnLoad.test.ts`. A saved workflow carries two
views of a connection: the link records, and the legacy slot mirrors
(`input.link`, `output.links`). On this branch the mirrors are derived
(`NodeInputSlot.link` returns `linkIdOf(this)`; the constructor strips
the serialized mirror before `Object.assign`), so a file-level
disagreement between the two does not survive the load. That is a real
behaviour difference from `main` and it decides what a third-party
link-repair tool can still find. Measured on `main` at `296fc5cd07` with
the same fixture, 3 of these 4 tests fail with the corrupt values
preserved through load and through a save/reload round trip.

## Mutation verification

Tests are detectors, not decoration. Each assertion arm was perturbed
and confirmed to fail with the exact expected diff, then reverted:

| Mutation | Result |
| --- | --- |
| Drop `useNodeDataStore().clearGraph` + `layoutStore.clearGraph` from
`resetAfterClear` | 1 failure, `layouts: [101, 102, 103, 104]` |
| Drop the link/reroute/widget/preview `clearGraph` calls from
`resetAfterClear` | 1 failure, `widgets` non-empty |
| Also drop `unregisterAllLinkTopologies` + `unregisterAllRerouteChains`
from `teardownOwnedGraphs` | `links: [11]`, `reroutes: [1]` |
| Also drop `unregisterNodeState` | `nodes: ['101', '102', '103',
'104']` |
| `configure` skips `clear()` on the load *after* a failed load (failure
path only) | 2 failures |
| `NodeInputSlot` keeps the serialized mirror instead of deriving it |
`expected null to be 3` |

The fifth row is also the proof that the gap was real rather than
assumed. With that mutation applied and the new file removed, the full
unit suite stays green: **1231 files, 16830 passed, 21 expected fail, 13
skipped, exit 0**. With the file present, 2 of its 4 tests go red. Scope
of that claim: the vitest suite at `f1bfb313d6`; the 314 `browser_tests`
specs were not executed, and the nearest neighbour there
(`workflowPersistence.spec.ts:290`) is a completed load with placeholder
nodes, not an aborted one.

## Gates

- `pnpm test:unit`: 1233 files, 16838 passed, 21 expected fail, 13
skipped, exit 0
- `vue-tsc --noEmit`: exit 0, 0 errors, 0 `TS2688`
- `pnpm lint`: exit 0 (4 pre-existing warnings, none in these files)
- `pnpm format:check`: exit 0, 4863 files
- `knip`: output byte-identical with and without these files
- Pre-commit hooks watched running in this worktree, not assumed

Not covered by any open stacked PR as of 2026-08-23 09:15Z. Checked
Comfy-Org#15723, Comfy-Org#15721, Comfy-Org#15720, Comfy-Org#15708, Comfy-Org#15689, Comfy-Org#15615, Comfy-Org#15613, Comfy-Org#15544, Comfy-Org#15502,
Comfy-Org#14257. The nearest are Comfy-Org#15721 (call-site atomicity for
`add`/`connect`/`replaceNodeInputs`, not graph-level `configure`
failure) and Comfy-Org#15613 (store scope clearing on a *successful*
`configure`).

## Note on the `configured` characterisation

Dispatching `configured` from the `finally` is **pre-existing, not
introduced here**: `LGraph.ts` has the same `finally {
endNamedValuesShadowDiffLoad(); this.events.dispatch('configured') }` at
`main` `296fc5cd07` (`:2734-2736`) as at `f1bfb313d6`. What changed with
this branch is the size of the half-built state a listener sees when it
fires, because `configure` now registers into five external stores. The
assertion is there to make the behaviour visible and to make a future
change to it deliberate - if it is decided that a failed load should not
dispatch, flip the assertion rather than deleting the test.

---------

Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: Amp <amp@ampcode.com>
@huang47 huang47 added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026 — with ChatGPT Codex Connector
@huang47 huang47 removed the risk:R2 PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:high PR risk grade (advisory shadow check; grader-owned) size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants