Skip to content

FE-2033: feat(cmp): insert_workflow op (agent subgraph TDD V1.5) - #17501

Merged
christian-byrne merged 11 commits into
christian-byrne/define-subgraph-opfrom
christian-byrne/cmp-insert-workflow-op
Sep 18, 2026
Merged

christian-byrne merged 11 commits into
christian-byrne/define-subgraph-opfrom
christian-byrne/cmp-insert-workflow-op

Conversation

@christian-byrne

@christian-byrne christian-byrne commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on define_subgraph PR #17454; merge after it.

Full context for agent readers
  • Rebase now shares define_subgraph definition validation, tree-wide ID uniqueness, conflict detection, digest storage, and nested encoding helpers.

The package now accepts insert_workflow with required nodes and optional links, groups, and definitions subgraphs. The shared applier owns deterministic ID remapping from the immutable envelope ID plus each original ID; CLI and cloud producers emit and relay the raw payload. It drops each link whose remapped endpoint is missing without rejecting the remaining insertion, makes exact-envelope replay idempotent, rejects malformed payloads atomically, recursively removes private __* keys from projected content, and converges independently of legal arrival order. Semantic ops remain the replication unit; direct Yjs document merging is not used.

Decision 9 redirects delivery from the retired standalone repository into packages/comfy-multi-player. The accepted choices are package-owned remapping, required nodes with optional remaining workflow sections, and partial per-link endpoint dropping. This change preserves the package invariants for semantic-op replication (KA-1), embedded ordering identity (KA-2), portability (KA-3), deterministic idempotency (KA-4), collision-free IDs (KA-5), no independently merged Yjs updates (FC-1), no runtime coupling (FC-3), and no full-document mutation primitive (FC-4).

Tests cover complete insertion; exact replay; colliding live and concurrent IDs; top-level and nested definitions; opaque widgets; optional sections; groups; recursive private-key scrubbing; both-order convergence; partial dangling-link dropping; interior writes after insertion; malformed payload rejection with byte identity; definition conflicts; legacy fork-shaped IDs; public remapping; batch policy; full-op permutations; and type-negative states. The failing-first spot check produced 22 failures and 2 passes after temporarily removing the applier implementation.

Gates: package build passed; 73 test files and 949 tests passed; purity passed; import graph passed with 18 modules, 53 dependencies, and 0 violations; pins passed with 178 files, 19 citation sites, and 6 pins; profile claims passed with 60 presence and 10 absence claims; CodeRabbit config passed with 5 blocks from 4 profiles; corpus verification passed for 8 files. Root typecheck passed. Root lint passed with 0 errors and 189 pre-existing warnings. git diff --check passed.

Linear: FE-2033

@coderabbitai

coderabbitai Bot commented Sep 12, 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: Team

Run ID: e8a28ec6-714d-43bd-9acb-f6b8681db174

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 Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/12/2026, 08:08:11 AM UTC

Links

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🎭 Playwright: ✅ 1907 passed, 0 failed

📊 Browser Reports
  • chromium: View Report (✅ 1886 / ❌ 0 / ⚠️ 0 / ⏭️ 13)
  • 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 · 64.6 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.9 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 71.5 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.5 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 82.8 MB heap
large-graph-pan: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.1 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.4 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 77.1 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.2 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.0 MB heap
subgraph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 71.0 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.6 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 136ms TBT · 98.4 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 85.0 MB heap
vue-large-graph-idle: · 53.7 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 168.9 MB heap
vue-large-graph-pan: · 55.4 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 164ms TBT · 175.2 MB heap
vue-node-resize-workload: · 54.5 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 451ms TBT · 175.3 MB heap
vue-zoom-out-idle: · 56.3 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 182.0 MB heap
workflow-execution: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.5 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 8ms
canvas-idle: layout count 0
canvas-idle: style recalc count 8
canvas-idle: task duration 604ms
canvas-idle: script duration 12ms
canvas-idle: TBT 0ms
canvas-idle: heap used 64.6 MB
canvas-idle: DOM nodes -280
canvas-idle: event listeners -174
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 5ms
canvas-mouse-sweep: style recalc duration 41ms
canvas-mouse-sweep: layout count 14
canvas-mouse-sweep: style recalc count 76
canvas-mouse-sweep: task duration 961ms
canvas-mouse-sweep: script duration 157ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 72.9 MB
canvas-mouse-sweep: DOM nodes -279
canvas-mouse-sweep: event listeners -175
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 31
canvas-zoom-sweep: task duration 415ms
canvas-zoom-sweep: script duration 15ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 71.5 MB
canvas-zoom-sweep: DOM nodes 77
canvas-zoom-sweep: event listeners 19
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 8ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 11
dom-widget-clipping: task duration 512ms
dom-widget-clipping: script duration 169ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 84.5 MB
dom-widget-clipping: DOM nodes 18
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 5ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 5
large-graph-idle: task duration 696ms
large-graph-idle: script duration 39ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 82.8 MB
large-graph-idle: DOM nodes -270
large-graph-idle: event listeners -173
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 12ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 64
large-graph-pan: task duration 1720ms
large-graph-pan: script duration 804ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 84.1 MB
large-graph-pan: DOM nodes -276
large-graph-pan: event listeners -83
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 14ms
large-graph-zoom: style recalc duration 13ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 62
large-graph-zoom: task duration 1823ms
large-graph-zoom: script duration 805ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 73.4 MB
large-graph-zoom: DOM nodes -276
large-graph-zoom: event listeners -64
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 6ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 40
legacy-node-drag: task duration 2013ms
legacy-node-drag: script duration 993ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 77.1 MB
legacy-node-drag: DOM nodes 0
legacy-node-drag: event listeners 188
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 3ms
minimap-idle: layout count 0
minimap-idle: style recalc count 3
minimap-idle: task duration 709ms
minimap-idle: script duration 36ms
minimap-idle: TBT 0ms
minimap-idle: heap used 84.2 MB
minimap-idle: DOM nodes -273
minimap-idle: event listeners -159
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 11ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 433ms
subgraph-dom-widget-clipping: script duration 145ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 84.0 MB
subgraph-dom-widget-clipping: DOM nodes 19
subgraph-dom-widget-clipping: event listeners 7
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 8ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 9
subgraph-idle: task duration 567ms
subgraph-idle: script duration 11ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 71.0 MB
subgraph-idle: DOM nodes -295
subgraph-idle: event listeners -221
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 6ms
subgraph-mouse-sweep: style recalc duration 40ms
subgraph-mouse-sweep: layout count 18
subgraph-mouse-sweep: style recalc count 78
subgraph-mouse-sweep: task duration 907ms
subgraph-mouse-sweep: script duration 115ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 64.6 MB
subgraph-mouse-sweep: DOM nodes -293
subgraph-mouse-sweep: event listeners -205
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 15
subgraph-transition-enter: style recalc count 19
subgraph-transition-enter: task duration 1033ms
subgraph-transition-enter: script duration 33ms
subgraph-transition-enter: TBT 136ms
subgraph-transition-enter: heap used 98.4 MB
subgraph-transition-enter: DOM nodes 13751
subgraph-transition-enter: event listeners 2385
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 41ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 247
viewport-pan-sweep: task duration 5981ms
viewport-pan-sweep: script duration 2629ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 85.0 MB
viewport-pan-sweep: DOM nodes -268
viewport-pan-sweep: event listeners -141
vue-large-graph-idle: avg frame time 19ms
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 18155ms
vue-large-graph-idle: script duration 313ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 168.9 MB
vue-large-graph-idle: DOM nodes -6548
vue-large-graph-idle: event listeners -7473
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 28ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 176
vue-large-graph-pan: task duration 23393ms
vue-large-graph-pan: script duration 1048ms
vue-large-graph-pan: TBT 164ms
vue-large-graph-pan: heap used 175.2 MB
vue-large-graph-pan: DOM nodes -6548
vue-large-graph-pan: event listeners -7466
vue-node-resize-workload: avg frame time 18ms
vue-node-resize-workload: p95 frame time 17ms
vue-node-resize-workload: layout duration 28ms
vue-node-resize-workload: style recalc duration 77ms
vue-node-resize-workload: layout count 20
vue-node-resize-workload: style recalc count 20
vue-node-resize-workload: task duration 6688ms
vue-node-resize-workload: script duration 143ms
vue-node-resize-workload: TBT 451ms
vue-node-resize-workload: heap used 175.3 MB
vue-node-resize-workload: DOM nodes -6548
vue-node-resize-workload: event listeners -7472
vue-zoom-out-idle: avg frame time 18ms
vue-zoom-out-idle: p95 frame time 17ms
vue-zoom-out-idle: layout duration 0ms
vue-zoom-out-idle: style recalc duration 0ms
vue-zoom-out-idle: layout count 0
vue-zoom-out-idle: style recalc count 0
vue-zoom-out-idle: task duration 9119ms
vue-zoom-out-idle: script duration 170ms
vue-zoom-out-idle: TBT 0ms
vue-zoom-out-idle: heap used 182.0 MB
vue-zoom-out-idle: DOM nodes 0
vue-zoom-out-idle: event listeners -13
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 20ms
workflow-execution: layout count 3
workflow-execution: style recalc count 16
workflow-execution: task duration 113ms
workflow-execution: script duration 11ms
workflow-execution: TBT 0ms
workflow-execution: heap used 69.5 MB
workflow-execution: DOM nodes 143
workflow-execution: event listeners 66
Raw data
{
  "timestamp": "2026-09-12T08:18:05.146Z",
  "gitSha": "e6067789949f8d87a995036c2d127300f98ab34c",
  "branch": "christian-byrne/cmp-insert-workflow-op",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2068.1710000000066,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 7.580999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 583.361,
      "heapDeltaBytes": -1424212,
      "heapUsedBytes": 68275464,
      "domNodes": -281,
      "jsHeapTotalBytes": 4710400,
      "scriptDurationMs": 11.841999999999999,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-idle",
      "durationMs": 2085.1760000000468,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 8.423,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 623.983,
      "heapDeltaBytes": -2550152,
      "heapUsedBytes": 67143404,
      "domNodes": -279,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 12.966999999999999,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1842.7409999999895,
      "styleRecalcs": 74,
      "styleRecalcDurationMs": 38.087,
      "layouts": 14,
      "layoutDurationMs": 4.718,
      "taskDurationMs": 958.213,
      "heapDeltaBytes": 7212380,
      "heapUsedBytes": 77870028,
      "domNodes": -279,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 154.26899999999998,
      "eventListeners": -176,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1907.2090000000799,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 43.181,
      "layouts": 14,
      "layoutDurationMs": 4.983,
      "taskDurationMs": 962.941,
      "heapDeltaBytes": 4846464,
      "heapUsedBytes": 75086472,
      "domNodes": -279,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 159.07500000000002,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1733.0810000000838,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 18.832,
      "layouts": 6,
      "layoutDurationMs": 1.2770000000000001,
      "taskDurationMs": 413.86999999999995,
      "heapDeltaBytes": 5039864,
      "heapUsedBytes": 75810120,
      "domNodes": 75,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 14.414999999999997,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1738.4389999999712,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 19.817999999999994,
      "layouts": 6,
      "layoutDurationMs": 1.289,
      "taskDurationMs": 416.3279999999999,
      "heapDeltaBytes": 4365264,
      "heapUsedBytes": 74090492,
      "domNodes": 78,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 14.840000000000002,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 822.0200000000091,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 8.557999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 552.714,
      "heapDeltaBytes": 18530696,
      "heapUsedBytes": 88770140,
      "domNodes": 18,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 179.42,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 694.3649999999479,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 7.9399999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 471.131,
      "heapDeltaBytes": 18760240,
      "heapUsedBytes": 88536252,
      "domNodes": 18,
      "jsHeapTotalBytes": 4456448,
      "scriptDurationMs": 159.338,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2059.193999999991,
      "styleRecalcs": 5,
      "styleRecalcDurationMs": 6.855000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 691.641,
      "heapDeltaBytes": 10683892,
      "heapUsedBytes": 86724776,
      "domNodes": -270,
      "jsHeapTotalBytes": -1413120,
      "scriptDurationMs": 41.49999999999999,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2040.2700000000777,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 3.7289999999999996,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 700.2159999999999,
      "heapDeltaBytes": 11247408,
      "heapUsedBytes": 87019796,
      "domNodes": -270,
      "jsHeapTotalBytes": -888832,
      "scriptDurationMs": 35.95000000000001,
      "eventListeners": -172,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2354.1999999999916,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 13.433,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1739.6319999999998,
      "heapDeltaBytes": 11402976,
      "heapUsedBytes": 87721500,
      "domNodes": -273,
      "jsHeapTotalBytes": -401408,
      "scriptDurationMs": 811.289,
      "eventListeners": -172,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2423.8189999999804,
      "styleRecalcs": 62,
      "styleRecalcDurationMs": 9.628999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1700.1,
      "heapDeltaBytes": 22821796,
      "heapUsedBytes": 88630688,
      "domNodes": -278,
      "jsHeapTotalBytes": 225280,
      "scriptDurationMs": 797.566,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3757.4069999999438,
      "styleRecalcs": 62,
      "styleRecalcDurationMs": 13.369999999999996,
      "layouts": 60,
      "layoutDurationMs": 14.329999999999998,
      "taskDurationMs": 1827.2900000000002,
      "heapDeltaBytes": 10234776,
      "heapUsedBytes": 76943024,
      "domNodes": -274,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 806.336,
      "eventListeners": -138,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3661.8839999999864,
      "styleRecalcs": 61,
      "styleRecalcDurationMs": 12.291999999999998,
      "layouts": 60,
      "layoutDurationMs": 14.095,
      "taskDurationMs": 1819.1799999999998,
      "heapDeltaBytes": 10276732,
      "heapUsedBytes": 76960544,
      "domNodes": -277,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 804.4019999999999,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3145.870000000002,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 5.892999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2033.131,
      "heapDeltaBytes": 921868,
      "heapUsedBytes": 69003540,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 1014.2550000000001,
      "eventListeners": 188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3090.035000000057,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 5.483000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1992.347,
      "heapDeltaBytes": 22803760,
      "heapUsedBytes": 92738192,
      "domNodes": 0,
      "jsHeapTotalBytes": 679936,
      "scriptDurationMs": 971.3400000000001,
      "eventListeners": 188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2038.6869999999817,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 3.4750000000000023,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 683.3479999999998,
      "heapDeltaBytes": -15247640,
      "heapUsedBytes": 88574296,
      "domNodes": -269,
      "jsHeapTotalBytes": -2162688,
      "scriptDurationMs": 35.757999999999996,
      "eventListeners": -144,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "minimap-idle",
      "durationMs": 2032.8570000000354,
      "styleRecalcs": 2,
      "styleRecalcDurationMs": 2.0279999999999987,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 734.541,
      "heapDeltaBytes": 10764428,
      "heapUsedBytes": 87955192,
      "domNodes": -277,
      "jsHeapTotalBytes": -1413120,
      "scriptDurationMs": 36.626000000000005,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 623.2909999999947,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 11.292,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 432.758,
      "heapDeltaBytes": 15096772,
      "heapUsedBytes": 88253340,
      "domNodes": 20,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 144.227,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 622.9610000000321,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 11.474000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 433.59100000000007,
      "heapDeltaBytes": 15147464,
      "heapUsedBytes": 87845088,
      "domNodes": 18,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 145.267,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2008.831999999984,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.055,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 550.5889999999999,
      "heapDeltaBytes": 2544228,
      "heapUsedBytes": 75255008,
      "domNodes": -294,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 10.263000000000002,
      "eventListeners": -222,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2014.8350000000619,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.413,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 582.513,
      "heapDeltaBytes": 1073840,
      "heapUsedBytes": 73703116,
      "domNodes": -295,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 10.858999999999996,
      "eventListeners": -220,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1822.749999999985,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 40.56799999999999,
      "layouts": 18,
      "layoutDurationMs": 6.019,
      "taskDurationMs": 903.7679999999999,
      "heapDeltaBytes": -10663320,
      "heapUsedBytes": 62105092,
      "domNodes": -293,
      "jsHeapTotalBytes": 4448256,
      "scriptDurationMs": 112.263,
      "eventListeners": -190,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1757.0769999999811,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 39.989999999999995,
      "layouts": 18,
      "layoutDurationMs": 5.786,
      "taskDurationMs": 910.6840000000001,
      "heapDeltaBytes": 218976,
      "heapUsedBytes": 73273060,
      "domNodes": -293,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 117.528,
      "eventListeners": -220,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1400.9379999999965,
      "styleRecalcs": 19,
      "styleRecalcDurationMs": 33.824999999999996,
      "layouts": 15,
      "layoutDurationMs": 15.948000000000004,
      "taskDurationMs": 1033.083,
      "heapDeltaBytes": 20054676,
      "heapUsedBytes": 103227176,
      "domNodes": 13751,
      "jsHeapTotalBytes": 10485760,
      "scriptDurationMs": 32.608999999999995,
      "eventListeners": 2385,
      "totalBlockingTimeMs": 136,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8541.926999999987,
      "styleRecalcs": 246,
      "styleRecalcDurationMs": 40.43300000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5895.754999999999,
      "heapDeltaBytes": 24009256,
      "heapUsedBytes": 89325892,
      "domNodes": -268,
      "jsHeapTotalBytes": 749568,
      "scriptDurationMs": 2636.211,
      "eventListeners": -126,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8504.688999999984,
      "styleRecalcs": 247,
      "styleRecalcDurationMs": 41.160000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6065.389000000001,
      "heapDeltaBytes": 13511968,
      "heapUsedBytes": 88869820,
      "domNodes": -268,
      "jsHeapTotalBytes": 385024,
      "scriptDurationMs": 2621.4919999999997,
      "eventListeners": -156,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18356.60199999995,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18069.392,
      "heapDeltaBytes": -22454420,
      "heapUsedBytes": 172366484,
      "domNodes": -6548,
      "jsHeapTotalBytes": -811008,
      "scriptDurationMs": 316.69800000000004,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 18.333333333333332,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18436.75200000007,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18239.713,
      "heapDeltaBytes": -34157468,
      "heapUsedBytes": 181907028,
      "domNodes": -6548,
      "jsHeapTotalBytes": 7806976,
      "scriptDurationMs": 309.16900000000004,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 18.890000000000025,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 23914.536999999997,
      "styleRecalcs": 178,
      "styleRecalcDurationMs": 29.514999999999958,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 23786.359,
      "heapDeltaBytes": -19967512,
      "heapUsedBytes": 190889988,
      "domNodes": -6548,
      "jsHeapTotalBytes": -6549504,
      "scriptDurationMs": 1047.581,
      "eventListeners": -7467,
      "totalBlockingTimeMs": 187,
      "frameDurationMs": 18.333333333333332,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 23117.744000000017,
      "styleRecalcs": 174,
      "styleRecalcDurationMs": 26.837,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 22999.903000000002,
      "heapDeltaBytes": -26609400,
      "heapUsedBytes": 176530892,
      "domNodes": -6548,
      "jsHeapTotalBytes": 2596864,
      "scriptDurationMs": 1047.579,
      "eventListeners": -7465,
      "totalBlockingTimeMs": 140,
      "frameDurationMs": 17.773333333333238,
      "p95FrameDurationMs": 16.700000000004366
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 6773.994000000016,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 78.86100000000002,
      "layouts": 20,
      "layoutDurationMs": 29.357999999999997,
      "taskDurationMs": 6723.4259999999995,
      "heapDeltaBytes": -11804416,
      "heapUsedBytes": 192645412,
      "domNodes": -6548,
      "jsHeapTotalBytes": 13881344,
      "scriptDurationMs": 137.461,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 450,
      "frameDurationMs": 18.330000000000048,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 6725.531000000046,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 76.00299999999999,
      "layouts": 20,
      "layoutDurationMs": 26.005,
      "taskDurationMs": 6652.425000000001,
      "heapDeltaBytes": -30888080,
      "heapUsedBytes": 175047292,
      "domNodes": -6548,
      "jsHeapTotalBytes": 12001280,
      "scriptDurationMs": 147.55200000000002,
      "eventListeners": -7471,
      "totalBlockingTimeMs": 452,
      "frameDurationMs": 18.33666666666674,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 9233.878000000004,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 9125.855000000001,
      "heapDeltaBytes": 19616608,
      "heapUsedBytes": 191489300,
      "domNodes": 0,
      "jsHeapTotalBytes": -1572864,
      "scriptDurationMs": 157.25999999999996,
      "eventListeners": -14,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 9242.699000000015,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 9112.555,
      "heapDeltaBytes": 19440824,
      "heapUsedBytes": 190208576,
      "domNodes": 0,
      "jsHeapTotalBytes": 2883584,
      "scriptDurationMs": 183.38599999999994,
      "eventListeners": -12,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 502.29400000000624,
      "styleRecalcs": 16,
      "styleRecalcDurationMs": 19.448,
      "layouts": 3,
      "layoutDurationMs": 1.647,
      "taskDurationMs": 122.193,
      "heapDeltaBytes": 5028304,
      "heapUsedBytes": 73991904,
      "domNodes": 143,
      "jsHeapTotalBytes": 786432,
      "scriptDurationMs": 11.958,
      "eventListeners": 65,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 456.06499999996686,
      "styleRecalcs": 16,
      "styleRecalcDurationMs": 20.548,
      "layouts": 2,
      "layoutDurationMs": 1.1689999999999998,
      "taskDurationMs": 103.36,
      "heapDeltaBytes": 4945784,
      "heapUsedBytes": 71849528,
      "domNodes": 142,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 10.152000000000001,
      "eventListeners": 67,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    }
  ]
}

🔬 E2E Coverage

Metric Covered Total Pct
Lines 49582 74307 66.7% 🟡
Functions 0 0 — —
Branches 0 0 — —
Top 10 files by uncovered lines
File Coverage Missed
src/LGraphCanvas.ts 67.2% 1165
src/LGraphNode.ts 69.4% 390
src/extensions/core/cameraInfo/CameraInfoViewport.ts 2.0% 343
src/renderer/extensions/layerEditor/composables/useLayerEditorSession.ts 40.1% 332
src/platform/workspace/stores/billingOperationStore.ts 8.2% 303
src/platform/workspace/stores/workspaceAuthStore.ts 36.0% 288
src/platform/workspace/stores/teamWorkspaceStore.ts 37.7% 261
src/LGraph.ts 78.8% 259
src/scripts/app.ts 71.7% 251
src/scripts/pnginfo.ts 21.4% 221

@codecov

codecov Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0.35211% with 283 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/comfy-multi-player/src/applier.ts 0.00% 180 Missing ⚠️
packages/comfy-multi-player/src/remap.ts 0.00% 95 Missing ⚠️
packages/comfy-multi-player/src/doc.ts 0.00% 6 Missing ⚠️
packages/comfy-multi-player/src/stamps.ts 0.00% 2 Missing ⚠️
@@                          Coverage Diff                           @@
##           christian-byrne/define-subgraph-op   #17501      +/-   ##
======================================================================
- Coverage                               80.90%   80.73%   -0.18%     
======================================================================
  Files                                    2485     2486       +1     
  Lines                                  129020   129294     +274     
  Branches                                35200    33446    -1754     
======================================================================
  Hits                                   104389   104389              
- Misses                                  24116    24390     +274     
  Partials                                  515      515              
Flag Coverage Δ
e2e 66.75% <ø> (-0.01%) ⬇️
unit 76.79% <0.35%> (-0.20%) ⬇️
website-unit 57.23% <ø> (ø)

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

Files with missing lines Coverage Δ
packages/comfy-multi-player/src/types.ts 90.90% <100.00%> (ø)
packages/comfy-multi-player/src/stamps.ts 64.28% <0.00%> (-2.39%) ⬇️
packages/comfy-multi-player/src/doc.ts 55.20% <0.00%> (-0.89%) ⬇️
packages/comfy-multi-player/src/remap.ts 0.00% <0.00%> (ø)
packages/comfy-multi-player/src/applier.ts 39.63% <0.00%> (-7.31%) ⬇️

... and 10 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.

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 12, 2026
@christian-byrne
christian-byrne force-pushed the christian-byrne/cmp-insert-workflow-op branch from 18930e5 to 98636fc Compare September 12, 2026 02:06
@christian-byrne
christian-byrne changed the base branch from christian-byrne/ecw-106-comfy-multi-player-workspace to christian-byrne/define-subgraph-op September 12, 2026 02:06

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • P1: Validate submitted node and link ids before deterministic remapping. Missing and normalized-duplicate ids are currently accepted, while exact duplicates return collision codes instead of malformed_op.
  • Deterministic remapping, replay idempotence, tree-wide definition collision rejection, partial link dropping, nested definition addressability, and private-key projection scrubbing passed reviewer probes.
Full context for agent readers

Reviewed exact head a924cb7c2e444abf27b021cc76506455724c91c3 against merge base 3e01e26be8db108ccae970df267d4820274ba54d with base branch christian-byrne/define-subgraph-op; the base PR's define_subgraph changes were excluded.

Verified with repo-provisioned Node v25.9.0 and pnpm 11.13.1 after pnpm install --frozen-lockfile. Package pnpm test -- --reporter=verbose passed 949/949 tests. check:purity, check:imports, check:pins, check:profile-claims, check:coderabbit, verify:corpus, and build all passed; import analysis covered 18 modules and 53 dependencies, pin analysis covered 178 files and 19 citation sites, profile claims covered 60 presence and 10 absence claims, CodeRabbit generated 5 blocks from 4 profiles, and corpus verification covered 8 files. Root pnpm typecheck passed. Root pnpm lint passed with 0 errors and 189 warnings.

A temporary 13-test reviewer probe was removed afterward. Seven tests passed. Six tests failed at the same raw-id validation boundary: exact duplicate node and link ids returned node_id_collision / link_id_collision; normalized duplicates 1 / "1" were accepted; nodes and links with omitted ids were accepted. Rejected exact duplicates remained byte-identical and did not consume op_id.

The default offline check:pins run does not verify remote SHA reachability; the requested gate itself passed. No requested runtime behavior was otherwise left unverified.

Reject missing and normalized-duplicate raw node or link IDs atomically as malformed_op before deterministic ID remapping.
…entity test

Fixes TS7053 reported by the package typecheck gate (tsconfig.test.json) in the follower-contract CI job.

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • One P1: raw node/link ID validation is still missing inside carried definitions.
  • All requested package and root gates passed.
Full context for agent readers

Reviewed exact head 21c4459ce8a37e1e0348842cbcd77c3ab5a72bad against base 3e01e26be8db108ccae970df267d4820274ba54d (christian-byrne/define-subgraph-op).

The top-level pre-remap checks correctly reject exact duplicates, normalized duplicates such as 1 and "1", and missing node/link IDs. The recursive definition-input walk only validates definition IDs and nesting shape, so equivalent malformed IDs in definition-interior graphs reach remapping first. Four reviewer probes (definition node normalized duplicate, definition node missing ID, definition link normalized duplicate, definition link missing ID) were all applied rather than rejected as malformed_op; the focused run was 5 passed / 4 failed. Rejection remained atomic in covered rejection paths, but these payloads were accepted, which is the finding anchored inline.

Additional reviewer probes passed for deterministic node/link remapping and exact replay byte identity; individual dangling-link dropping; independent insert order convergence without merging Yjs docs; recursive private-key scrubbing; and tree-wide remapped-definition collision returning byte-identical definition_conflict. Existing tests cover nested definition addressability through a later interior set_widget and the unknown-endpoint no-op path. Temporary probes were removed and the worktree is clean.

Verification:

  • pnpm install --frozen-lockfile (root, Node v25.9.0 / pnpm 11.13.1): passed.
  • pnpm run typecheck (package): passed.
  • pnpm test (package): passed, 73 files / 956 tests.
  • pnpm run check:purity: passed.
  • pnpm run check:imports: passed, 18 modules / 53 dependencies / 0 violations.
  • pnpm run check:pins: passed offline, 178 files / 19 citation sites / 6 pins. Remote pin reachability was not checked because the requested command is the offline mode.
  • pnpm run check:profile-claims: passed, 60 presence / 10 absence claims.
  • pnpm run check:coderabbit: passed, 5 blocks / 4 profiles.
  • pnpm run verify:corpus: passed, 8 files.
  • pnpm typecheck (root): passed.
  • pnpm lint (root): passed with 0 errors and 189 existing warnings.
  • git diff --check refs/review/pr-17501-base...HEAD: passed.

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two findings.

Comment thread packages/comfy-multi-player/README.md Resolved

@christian-byrne christian-byrne left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found two correctness issues in scoped ID remapping; all required gates otherwise pass.

Full context for agent readers

Reviewer-only probes reproduced two gaps in insert_workflow: normalized numeric/string endpoint aliases are treated as missing and silently dropped, and repeated raw nested-definition IDs in distinct graph scopes overwrite each other in the global remap table. The remaining contract probes passed, including depth-3 malformed-ID rejection with byte identity and unconsumed op IDs, recursive dangling-link filtering with a valid sibling retained, opposite-order convergence from one seed, nested-definition addressability, deep private-key scrubbing, exact-replay byte identity, and tree-wide stored-definition collision rejection. Package gates passed (964 tests), as did root typecheck and lint (0 errors; 189 existing warnings).

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Nested dangling links leave stale slot-level references in projected definitions.
  • The README says seven frozen kinds while FROZEN_OPS and its table contain eight.
Full context for agent readers

Reviewed exact head 35af4f7b256b47d11ca8a51cffe5bc69212d8d4a against base 3e01e26be8db108ccae970df267d4820274ba54d (christian-byrne/define-subgraph-op). The fetched remote head matched the requested SHA.

Required gates on Node 25.9.0 (~/.nvm/nvm.sh was absent): root pnpm install --frozen-lockfile passed; package typecheck passed; package tests passed, 73 files and 966 tests; purity passed with runtime roots exactly {yjs}, 14 deny patterns clean, and bare-Node import clean; imports passed, 18 modules, 53 dependencies, 0 violations; pins passed, 178 files, 19 citation sites, 6 pins; profile claims passed, 60 presence and 10 absence claims with 1 expected tombstone; CodeRabbit passed, 5 blocks from 4 profiles; corpus passed, 8 files; root typecheck passed; root lint passed with 0 errors and 189 existing warnings; git diff --check passed.

Reviewer probes exercised all 13 contract points at depth 2-3 where applicable: 13 tests total, 12 passed and 1 failed. The failing probe retained nested link 10 and dropped dangling link 11, but projected outputs[].links as [11, remapped(10)]. Deterministic definition IDs/conflict replay, required/optional fields, ordinary-op definition rejection, recursive raw-ID atomicity, numeric/string aliases, sibling-scoped nested IDs, exact replay and opposite-order convergence, nested interior addressing/child definition resolution, private-key scrubbing, and both UUID/non-UUID unknown-node paths passed. The temporary probe file was removed and git status --short is empty.

Could not verify: none.

Comment thread packages/comfy-multi-player/README.md Resolved

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 2 findings: cmp ownership leaks through a public producer remapper, and op-count documentation remains stale.
  • Required gates passed; reviewer probes passed 13/13.
Full context for agent readers

Reviewed exact head ba68902c0b26390e99c8011e6145f3cce4922bea against stacked base 3e01e26be8db108ccae970df267d4820274ba54d. Pre-review and pre-submit remote checks both matched that head. ~/.nvm/nvm.sh was absent; all gates ran with repo-provisioned Node v25.9.0.

Gates:

  • PASS pnpm install --frozen-lockfile: 10 workspace projects; 1,995 lockfile entries verified.
  • PASS package pnpm run typecheck: build, test tsconfig, and type-surface tsconfig.
  • PASS package pnpm test -- --reporter=verbose: 73 files, 969 tests.
  • PASS package pnpm run check:purity: {yjs} only, 14 deny patterns, bare-Node import clean.
  • PASS package pnpm run check:imports: 18 modules, 53 dependencies, 0 violations.
  • PASS package pnpm run check:pins: 178 files, 19 citation sites, 6 pins.
  • PASS package pnpm run check:profile-claims: 60 presence + 10 absence claims, 1 standing tombstone.
  • PASS package pnpm run check:coderabbit: 5 blocks from 4 profiles.
  • PASS package pnpm run verify:corpus: 8 files.
  • PASS root pnpm typecheck.
  • PASS root pnpm lint: 0 errors, 189 warnings.
  • PASS git diff --check against christian-byrne/define-subgraph-op: 21 changed files.

Temporary Vitest reviewer probes, removed after execution:

  1. PASS deterministic remap plus stored-tree definition_conflict replay byte identity.
  2. PASS required nodes; omitted optional fields accepted.
  3. PASS larger canonical digest in both orders; losing definition_conflict; widget edit retained.
  4. PASS per-link dangling drop with valid sibling retained at depth 2.
  5. PASS ordinary edit definition-payload rejection.
  6. PASS exact/normalized/missing raw node and link IDs at depth 2; byte identity and unconsumed op id.
  7. PASS numeric/string endpoint alias resolution.
  8. PASS sibling-scoped nested IDs distinct; same-scope duplicates malformed.
  9. PASS containing-graph child-definition host resolution and later ID-addressed interior edit.
  10. PASS recursive private-key scrubbing.
  11. PASS normalized dropped-link slot scrubbing and surviving slot-ref remap at depth 2.
  12. PASS UUID-shaped and ordinary unknown heads use the same no-op path.
  13. PASS two inserts replayed as op sets from one seeded snapshot converge in opposite orders.

Probe result: 1 file passed, 13 tests passed. Probe file removed; worktree clean before submission. Nothing requested was unverifiable.

Comment thread packages/comfy-multi-player/README.md Resolved
Addresses review feedback:\nhttps://github.com//pull/17501#discussion_r3995503934\nhttps://github.com//pull/17501#discussion_r3995503936

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • One high-severity finding: a winning definition replacement drops nested widget edits, breaking order convergence.
  • The requested package and root gates pass; the reviewer probes passed 13/14, with the failing probe reproducing the finding.
  • The prior fixes are resolved: remapping is not exported from the package root, and README/index/types consistently state eight implemented kinds.
Full context for agent readers

Reviewed exact head 318fadd4e8b10bbe144aef5aeffbba301cbf6576 against stacked base 3e01e26be8db108ccae970df267d4820274ba54d (christian-byrne/define-subgraph-op). The initial remote check matched this head; submission is guarded by a second immediate remote-head check.

Finding: definitionWidgetEdits only collects stamp paths with path.length === 2. Nested set_widget paths are length 3 or greater, so replacing a lower-digest definition with a higher-digest definition restores root edits but silently loses nested edits. A probe that defines a root with a nested definition, edits the nested value from 2 to 80, then applies the higher digest projects 2; applying the higher digest first and then the same edit projects 80. This violates decision 3 and KA-4 order convergence.

Gates:

  • PASS root pnpm install --frozen-lockfile on Node v25.9.0: 10 workspace projects, already up to date.
  • PASS package pnpm run typecheck: build, test tsconfig, and negative type-surface tsconfig.
  • PASS package pnpm test -- --reporter=verbose: 73 files, 967 tests.
  • PASS package pnpm run check:purity: runtime roots exactly {yjs}, 14 deny patterns, bare-Node import clean.
  • PASS package pnpm run check:imports: 18 modules, 52 dependencies, 0 violations.
  • PASS package pnpm run check:pins: 178 files, 19 citation sites, 6 pins, offline.
  • PASS package pnpm run check:profile-claims: 60 presence and 10 absence claims, 1 standing tombstone.
  • PASS package pnpm run check:coderabbit: 5 blocks from 4 profiles.
  • PASS package pnpm run verify:corpus: 8 files.
  • PASS root pnpm typecheck.
  • PASS root pnpm lint: 0 errors, 191 emitted warnings (2 oxlint and 189 ESLint), all outside this package.
  • PASS git diff --check against the base: 0 whitespace errors.

Temporary Vitest probes, removed after execution:

  1. PASS package root has no remapper export and exposes eight frozen kinds.
  2. PASS deterministic remap, byte-identical replay, and tree-wide definition collision rejection.
  3. PASS nodes-only payload with links/groups/definitions absent.
  4. FAIL digest winner in both orders with root and nested widget retention: root edit survives, nested edit reverts from 80 to 2 after replacement.
  5. PASS depth-2 dangling-link drop, valid sibling survival, and recursive slot-reference scrubbing.
  6. PASS depth-3 normalized duplicate raw node IDs reject byte-identically without consuming the op id.
  7. PASS depth-2 exact duplicate raw link IDs reject atomically.
  8. PASS depth-2 missing raw link ID rejects atomically.
  9. PASS numeric/string endpoint aliases resolve to the remapped nodes.
  10. PASS sibling-scoped nested IDs differ and containing-graph child host types resolve.
  11. PASS inserted nested definitions remain addressable by later id-addressed set_widget.
  12. PASS recursive private-key scrub and ordinary-op definition-payload rejection.
  13. PASS UUID-shaped and non-UUID unknown path heads share the no-op path.
  14. PASS two independent inserts replayed from one seed in opposite legal orders converge.

KA-1 static check found no Y.mergeUpdates in package source or tests; replica setup uses one seeded snapshot and Y.applyUpdate. Probe file was removed and git status --short was empty before submission. No requested check was unverifiable. The pins gate was the requested offline form and did not verify remote pin reachability.

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings at 8491ba33fafadfc3c02be47adde167d06ab586c7.

  • The prior fixes hold under independent probes: raw/scoped ID validation and remapping, recursive dangling-link scrubbing, private-key removal, nested addressing, and all-depth widget-edit retention across digest replacement.
  • Two inserts replayed as op sets converge in opposite orders; no raw Yjs merge was used.
Full context for agent readers

Reviewed PR head 8491ba33fafadfc3c02be47adde167d06ab586c7 against fetched base 3e01e26be8db108ccae970df267d4820274ba54d (christian-byrne/define-subgraph-op). The remote head matched the requested SHA before and immediately before submission.

Gates, all PASS under repository-provisioned Node 25.9.0 and pnpm 11.13.1:

  • pnpm install --frozen-lockfile: 10 workspace projects; 1,995 lock entries passed policy verification.
  • package pnpm run typecheck: build, test TS config, and negative-type TS config passed.
  • package tests: 73 files, 968 tests passed. The requested pnpm test -- --reporter=verbose exited 0 but printed no test summary because Vitest received the extra separator; pnpm test --reporter=verbose produced the meaningful 968-test run.
  • pnpm run check:purity: exact runtime root {yjs}, 14 deny patterns, bare-Node import passed.
  • pnpm run check:imports: 18 modules, 52 dependencies, 0 violations.
  • pnpm run check:pins: 178 files, 19 citation sites, 6 pins passed offline.
  • pnpm run check:profile-claims: 60 presence and 10 absence claims passed; 1 known tombstone remained.
  • pnpm run check:coderabbit: 5 blocks from 4 profiles matched.
  • pnpm run verify:corpus: 8 files passed.
  • root pnpm typecheck: passed with no diagnostics.
  • root pnpm lint: passed with 0 errors and 189 existing warnings.
  • git diff --check 3e01e26be8db108ccae970df267d4820274ba54d...HEAD: passed.

Temporary Vitest probes, 14/14 PASS:

  1. Deterministic remap matched across runs; exact replay was byte-identical; a collision with a remapped definition id nested in the stored tree returned definition_conflict byte-identically without consuming the op id.
  2. A nodes-only payload applied with links, groups, and definitions absent.
  3. The larger canonical SHA-256 definition won in both arrival orders; root and depth-2 widget edits survived replacement.
  4. A depth-2 dangling link was dropped and scrubbed while a valid sibling and its remapped slot references survived.
  5. Depth-3 exact/normalized duplicate and missing node/link ids all returned malformed_op, byte-identically on rejection and retry, without consuming op ids.
  6. String endpoints resolved to the same remapped nodes as numeric ids.
  7. Repeated nested definition ids in sibling scopes were legal and distinct; duplicates in one scope rejected atomically.
  8. A host type resolved to the containing graph's remapped child-definition id.
  9. A later id-addressed set_widget updated a nested definition node.
  10. Recursive __* scrubbing removed node, group, root-definition, nested-definition, and __definition_digest keys.
  11. An ordinary add_node carrying definitions rejected malformed_op byte-identically.
  12. UUID-shaped and non-UUID unknown interior heads both followed the no-op path.
  13. Two independent inserts replayed from one seed converged in opposite orders without merging Yjs docs.
  14. Group ids remapped, and links crossing into or out of a definition boundary were dropped with slot references scrubbed.

The probe file was deleted; the checkout was clean before submission. remapInsertedWorkflowIds remains internal to src/remap.ts and is absent from the package entrypoint. README, src/index.ts, and src/types.ts consistently state eight implemented/frozen kinds.

@christian-byrne christian-byrne changed the title feat(cmp): insert_workflow op (agent subgraph TDD V1.5) FE-2033: feat(cmp): insert_workflow op (agent subgraph TDD V1.5) Sep 14, 2026

@DrJKL DrJKL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. I found no security hole or shipped-code correctness defect at 8491ba33fafadfc3c02be47adde167d06ab586c7. The seven non-blocking follow-ups are tracked in Linear:

  • FE-2276: remove unreachable insertion stamp machinery
  • FE-2277: remove duplicate dangling-link filtering
  • FE-2278: represent recursively validated insertion payloads in types
  • FE-2279: add a group-ID remapping falsifier
  • FE-2280: cover graph-boundary link filtering and slot scrubbing
  • FE-2281: add independent fixed ID vectors
  • FE-2282: correct stale operation counts and PR verification claims
Findings without an inline anchor

FE-2282 also tracks two stale PR-description claims. The current package entrypoint intentionally keeps remapping private, so "public remapping" is no longer covered behavior. The body also reports 949 tests, while the author's exact-head report says 968. These do not affect the implementation.

Prior findings checked at the current head

Each prior concern was independently rechecked and is fixed: top-level and recursive raw-ID validation; nested dangling-link removal; numeric/string endpoint aliases; graph-scoped definition IDs; stale slot-reference scrubbing; private-key removal; nested definition addressing; nested widget retention across digest replacement; the private remapper boundary; and the README's eight-kind count. Five targeted regression probes passed in addition to the committed insertion suite.

Checked and cleared
  • Fallow's test-function size findings are Vitest describe callbacks that group independent cases without shared lifecycle state.
  • The permutation factory and convergence touched-node switch intentionally have one arm per frozen operation.
  • The encoding-loss and widget-edit walkers gained the nested traversal required by this feature without adding a second source of truth.
  • Fallow's baseline was not usable for gating: it compared 212 files against origin/main, not this PR's stacked base, and reported baseline path mismatches. Its two relevant production complexity signals were reconciled into FE-2276 and FE-2277.
Coverage and checks

Standard depth, five independent lanes: correctness, maintainability, idiomaticity, tests, and documentation. All 22 changed files were covered. Local checks at the exact head: root pnpm typecheck passed; focused Vitest passed 41/41; targeted prior-finding probes passed 5/5; scoped ESLint completed with 0 errors and warnings only; git diff --check passed. Scoped oxlint and oxfmt were inconclusive because the repository configuration excludes all package targets, even with ignore overrides. Fallow ran after unshallowing and returned the baseline/scope limitations above.

Exact-head CI snapshot before submission: 105 check runs, 82 successful, 23 skipped, 0 pending, 0 failed.

}
const existing = nodes.get(key);
if (existing) {
const incumbent = stamps.get(JSON.stringify(["insert_workflow_node", key])) as StampKey | undefined;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (P2): These insertion-specific incumbent and target stamps have no legal competing writer. Derived IDs include the immutable op_id, and the applied-op gate stops same-ID replay before dispatch. Keep collision rejection for pre-existing content, but the LWW reads, writes, and loser branches can be removed. Tracked in FE-2276.

if (compareStampKeys(stamp, incumbent) <= 0) return "lww-dropped";
}
seenLinks.add(key);
if (linkHasMissingEndpoint(candidate, (id) => nodes.has(String(id)) || seenNodes.has(String(id)))) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (P3): remapInsertedWorkflowIds already filters root and nested links against each graph’s complete node set, so a surviving remapped link cannot fail this second endpoint check. Removing it leaves one authoritative endpoint policy and avoids implying that inserted links may target existing document nodes. Tracked in FE-2277.

export interface InsertWorkflowOp extends OpBase {
op: "insert_workflow";
/** The template to merge — AUTHORITATIVE, nodes inserted verbatim after id validation. */
workflow: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (P2): This duplicates a looser WorkflowJSON shape, while validation and remapping pass it through assertion chains without a type that represents completed recursive validation. Derive the optional-field payload from WorkflowJSON, parse once into a validated recursive graph type, and let the remapper accept that type. Tracked in FE-2278.

it("merges groups deterministically without dropping existing groups", () => {
const seeded = { ...baseWorkflow(), groups: [{ title: "Base" }] } as WorkflowJSON;
const doc = mint(seeded, catalog);
applyOps(doc, [insertOp({ nodes: [], links: [], groups: [{ title: "Inserted" }] })], catalog);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (P2): This group case omits IDs, so deleting group-ID remapping or making it document-state-dependent would leave the focused suite green despite KA-5. Add an explicit raw group ID and compare distinct operation IDs against an independent expected mapping. Tracked in FE-2279.

expect(hostType(right)).toBe(nestedId(right));
});

it("drops a depth-2 object link with a missing endpoint and keeps its valid sibling", () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (P2): The committed link cases use a missing endpoint, but none pins the top-level/definition ownership boundary that the deleted reviewer probe exercised. Add both cross-boundary directions, one valid sibling, and slot references so only the sibling survives. Tracked in FE-2280.


it("rejects a remapped definition id already present anywhere in the stored tree", () => {
const op = insertOp(template());
const remapped = remapInsertedWorkflowIds(template(), op.op_id);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (P2): This collision fixture asks the production remapper which ID to occupy, then exercises the same remapper. A derivation bug can move both values together and keep the test green. Pin independent node, link, and definition vectors so changing op_id, scope, kind, or raw-ID participation fails. Tracked in FE-2281.


V1 is an op-based Yjs document applier implemented once in the shared `@comfyorg/comfy-multi-player` TypeScript package. The frontend consumes its workspace source directly; the Node doc-host sidecar consumes an exact npm release built from that same source. Semantic ops are the replication unit; the widget catalog is sha256-pinned and fail-closed in the deployed architecture.

ADR-022 adds the seventh implemented kind, `insert_workflow`, for atomic template insertion. The

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (P3): FROZEN_OPS, the README, and the package entrypoint count eight implemented kinds. This should say “eighth”; docs/multiplayer-schema.md:48 has the same stale “seventh” wording. Tracked with the stale PR-body claims in FE-2282.

@DrJKL
DrJKL added this pull request to stack #17874 September 16, 2026 23:01
@DrJKL
DrJKL removed this pull request from stack #17874 September 16, 2026 23:04
@christian-byrne
christian-byrne marked this pull request as draft September 17, 2026 02:55
@christian-byrne
christian-byrne marked this pull request as ready for review September 18, 2026 08:34
@christian-byrne
christian-byrne merged commit c314b6c into christian-byrne/define-subgraph-op Sep 18, 2026
111 checks passed
@christian-byrne
christian-byrne deleted the christian-byrne/cmp-insert-workflow-op branch September 18, 2026 08:58
@DrJKL DrJKL added agent Comfy Agent product, integration, tests or product documentation agent-crdt Agent document synchronization, graph projection or CRDT operations agent-docs Agent product architecture, contracts or documentation agent-test-unit Touches Agent-related unit/component tests or their support labels Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Comfy Agent product, integration, tests or product documentation agent-crdt Agent document synchronization, graph projection or CRDT operations agent-docs Agent product architecture, contracts or documentation agent-test-unit Touches Agent-related unit/component tests or their support flag-exempt risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants