Repository navigation
fix(agent-crdt): preserve a hand-wired autogrow link across the follower's own CRDT echo - #18375
Conversation
…CRDT echo Reproduces, at the unit level, the reload-after-hand-wire regression agentAutogrowHandWiredLinkSurvivesSend.spec.ts left as a follow-up: a link the user hand-wires onto an autogrow spare slot can read back disconnected (originNodeId null) once the CRDT follower reconciles the mint port's own echo of that same connect, and the corruption survives a later same-session reload while the follower stays bound. Currently failing: the follower's reconcile of a `connect` that displaces the slot's local, optimistic link with the doc-confirmed one leaves the slot reading back disconnected. Claude-Session: https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6
…h useLinkStore LinkMap (graph.links) caches its resolved links keyed on useLinkStore's revision counter. A CRDT connect mutation registers a link's topology in the store synchronously (graphMutations.ts's commit()), but agentNodeMaterializer.ts only gives it a live LiteGraph facade (materializeLinkAdapter) on the next reconcile pass. When that connect displaces an existing occupant at the same input slot, commit() reads the slot's live .link to detach the old one -- which resolves through graph.links -- in the gap between those two steps: the new topology is registered (the revision the read is keyed against already reflects it) but not yet materialized. LinkMap caches "no facade" for it, and because adoption alone never touches the revision counter, nothing tells LinkMap to recompute once the facade actually lands. The slot reads back disconnected from then on, until something unrelated happens to bump the revision again. A hand-wire onto a freshly grown autogrow spare hits this directly: the mint port's own echo of that connect displaces the slot's local, optimistic link with the doc-confirmed one. Usually a later, unrelated store write self-heals the cache shortly after. A same-session reload is exactly the case with nothing left to do that. useLinkStore gains notifyAdapterAdopted(), which only bumps its revision counter. materializeLinkAdapter calls it right after adopting a topology's facade -- the one adoptLinkTopology call site whose registration can run strictly before its adoption (the other two, registerLinkTopology and replaceLinkTopology, register and adopt in the same call, so their own revision bump already postdates their adoption). Fixes the regression agentCrdtProjection.reconnectAdoptionRace.test.ts added in the previous commit, and the reload-after-hand-wire gap agentAutogrowHandWiredLinkSurvivesSend.spec.ts left as a follow-up. Claude-Session: https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 07c337679d250b5a7af810adb73e26449fc6e676
Full docs: ADR-DEVEX-LINT-0015 🎭 Playwright: ✅ 2087 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 9.96 MB gzip 🔴 +336 BDetailsSummary
Category Glance App Entry Points — 3.87 kB (baseline 3.87 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.44 MB (baseline 1.44 MB) • 🟢 -50 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 132 kB (baseline 132 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 14 added / 14 removed / 4 unchanged Panels & Settings — 639 kB (baseline 639 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 18 unchanged User & Accounts — 37.9 kB (baseline 37.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 5 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 123 kB (baseline 123 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 9 unchanged Data & Services — 3.91 MB (baseline 3.91 MB) • 🔴 +430 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 577 kB (baseline 577 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 19 added / 19 removed / 19 unchanged Vendor & Third-Party — 17.4 MB (baseline 17.4 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 17.8 MB (baseline 17.8 MB) • ⚪ 0 BBundles that do not match a named category
Status: 74 added / 74 removed / 228 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-22T05:43:11.731Z",
"gitSha": "777049cd487b4b79e619f02fd09ce77fddc7c174",
"branch": "fix/agent-crdt-reload-link-adoption-race",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 1996.1400000000253,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.548,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 466.604,
"heapDeltaBytes": 13196128,
"heapUsedBytes": 74605576,
"domNodes": -260,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 8.511999999999999,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2005.659000000037,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.322999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 448.50500000000005,
"heapDeltaBytes": 12503196,
"heapUsedBytes": 74621664,
"domNodes": -261,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.463000000000001,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1741.0429999999906,
"styleRecalcs": 45,
"styleRecalcDurationMs": 15.512,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 793.092,
"heapDeltaBytes": 12605124,
"heapUsedBytes": 74273620,
"domNodes": -260,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 161.58700000000002,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1772.4170000000186,
"styleRecalcs": 45,
"styleRecalcDurationMs": 16.755,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 835.4860000000001,
"heapDeltaBytes": -916508,
"heapUsedBytes": 66562924,
"domNodes": -261,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 168.254,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.1159999999809,
"styleRecalcs": 32,
"styleRecalcDurationMs": 15.017000000000001,
"layouts": 6,
"layoutDurationMs": 1.2459999999999998,
"taskDurationMs": 321.942,
"heapDeltaBytes": 2148292,
"heapUsedBytes": 64327484,
"domNodes": 77,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 10.449,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1740.7220000000052,
"styleRecalcs": 32,
"styleRecalcDurationMs": 14.886999999999999,
"layouts": 6,
"layoutDurationMs": 1.0170000000000001,
"taskDurationMs": 332.61600000000004,
"heapDeltaBytes": 2273812,
"heapUsedBytes": 64035936,
"domNodes": 78,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 11.226999999999997,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 645.5100000000016,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.721999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 459.8420000000001,
"heapDeltaBytes": 18107548,
"heapUsedBytes": 80407452,
"domNodes": 18,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 171.322,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 645.5479999999625,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.627999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 444.84000000000003,
"heapDeltaBytes": 18237336,
"heapUsedBytes": 80381724,
"domNodes": 18,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 170.88,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1169.0420000000472,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 829.5939999999999,
"heapDeltaBytes": 35983372,
"heapUsedBytes": 101249908,
"domNodes": 0,
"jsHeapTotalBytes": 18771968,
"scriptDurationMs": 70.58099999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 555,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1197.573000000034,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 845.1289999999999,
"heapDeltaBytes": -15287188,
"heapUsedBytes": 72591688,
"domNodes": -297,
"jsHeapTotalBytes": 20054016,
"scriptDurationMs": 72.95800000000001,
"eventListeners": -217,
"totalBlockingTimeMs": 546,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 860.5110000000309,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 480.3759999999997,
"heapDeltaBytes": 14502888,
"heapUsedBytes": 89604284,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 170.64700000000005,
"eventListeners": 0,
"totalBlockingTimeMs": 241,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 849.0390000000616,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 436.6960000000004,
"heapDeltaBytes": 14038628,
"heapUsedBytes": 89950460,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 167.24900000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 233,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "extension-clean-combined-draw",
"durationMs": 11144.880000000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10250.245,
"heapDeltaBytes": -1794528,
"heapUsedBytes": 73521636,
"domNodes": -6,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 8495.003,
"eventListeners": 0,
"totalBlockingTimeMs": 1430,
"frameDurationMs": 18.886666666666617,
"p95FrameDurationMs": 50
},
{
"name": "extension-clean-combined-draw",
"durationMs": 10028.580999999918,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9153.636,
"heapDeltaBytes": 11780108,
"heapUsedBytes": 93938548,
"domNodes": -18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 7559.359,
"eventListeners": 0,
"totalBlockingTimeMs": 1047,
"frameDurationMs": 18.890000000000025,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10610.01299999998,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9751.471,
"heapDeltaBytes": 16767536,
"heapUsedBytes": 91845168,
"domNodes": -4,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 8091.923,
"eventListeners": 0,
"totalBlockingTimeMs": 1182,
"frameDurationMs": 18.886666666666617,
"p95FrameDurationMs": 50
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 10882.929999999988,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10006.146,
"heapDeltaBytes": -7223240,
"heapUsedBytes": 74715544,
"domNodes": -14,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 8370.105000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 1446,
"frameDurationMs": 18.889999999999965,
"p95FrameDurationMs": 50
},
{
"name": "large-graph-idle",
"durationMs": 2040.7820000000356,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.745000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 563.4300000000001,
"heapDeltaBytes": 2248528,
"heapUsedBytes": 83469464,
"domNodes": -242,
"jsHeapTotalBytes": -1806336,
"scriptDurationMs": 33.477000000000004,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2033.0060000000003,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.266999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 564.0039999999999,
"heapDeltaBytes": -3273444,
"heapUsedBytes": 83707156,
"domNodes": -245,
"jsHeapTotalBytes": -1019904,
"scriptDurationMs": 38.291000000000004,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2173.3899999999835,
"styleRecalcs": 68,
"styleRecalcDurationMs": 12.693999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1472.5349999999996,
"heapDeltaBytes": -2114468,
"heapUsedBytes": 80057948,
"domNodes": -244,
"jsHeapTotalBytes": 516096,
"scriptDurationMs": 849.701,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2308.0099999999675,
"styleRecalcs": 69,
"styleRecalcDurationMs": 14.453999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1732.8620000000003,
"heapDeltaBytes": -14806420,
"heapUsedBytes": 67473148,
"domNodes": -258,
"jsHeapTotalBytes": 552960,
"scriptDurationMs": 878.695,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3532.5370000000476,
"styleRecalcs": 63,
"styleRecalcDurationMs": 12.534,
"layouts": 60,
"layoutDurationMs": 12.886999999999999,
"taskDurationMs": 1656.757,
"heapDeltaBytes": 8184608,
"heapUsedBytes": 74028540,
"domNodes": -3,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 782.85,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3531.464000000028,
"styleRecalcs": 62,
"styleRecalcDurationMs": 11.629999999999997,
"layouts": 60,
"layoutDurationMs": 13.180999999999997,
"taskDurationMs": 1588.399,
"heapDeltaBytes": 8423756,
"heapUsedBytes": 74762648,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 822.093,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "legacy-node-drag",
"durationMs": 3041.3469999999734,
"styleRecalcs": 43,
"styleRecalcDurationMs": 6.447999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1864.501,
"heapDeltaBytes": 23311360,
"heapUsedBytes": 89566464,
"domNodes": 6,
"jsHeapTotalBytes": 942080,
"scriptDurationMs": 961.938,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2955.541999999923,
"styleRecalcs": 46,
"styleRecalcDurationMs": 8.643999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1786.279,
"heapDeltaBytes": 21403200,
"heapUsedBytes": 85729224,
"domNodes": -247,
"jsHeapTotalBytes": 942080,
"scriptDurationMs": 987.5830000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2005.4850000000215,
"styleRecalcs": 6,
"styleRecalcDurationMs": 5.049000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 513.206,
"heapDeltaBytes": 20238992,
"heapUsedBytes": 84205088,
"domNodes": -247,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 31.269999999999992,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2049.2360000000645,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.056,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 586.967,
"heapDeltaBytes": -6437012,
"heapUsedBytes": 82555344,
"domNodes": -247,
"jsHeapTotalBytes": 28672,
"scriptDurationMs": 34.569,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 589.0700000000493,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.104000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 401.874,
"heapDeltaBytes": 13737200,
"heapUsedBytes": 83301304,
"domNodes": 20,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 144.269,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 589.0459999999393,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.332,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 408.123,
"heapDeltaBytes": 14007676,
"heapUsedBytes": 83413092,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 147.097,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2021.1679999999888,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.017,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 464.7100000000001,
"heapDeltaBytes": -5215024,
"heapUsedBytes": 64572976,
"domNodes": -276,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 7.913,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2004.6950000000834,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.239999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 455.3550000000001,
"heapDeltaBytes": -4885288,
"heapUsedBytes": 64795380,
"domNodes": -276,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 7.525,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1718.8390000000027,
"styleRecalcs": 44,
"styleRecalcDurationMs": 13.197000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 740.382,
"heapDeltaBytes": 12766500,
"heapUsedBytes": 76428568,
"domNodes": -275,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 106.554,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1705.075000000079,
"styleRecalcs": 45,
"styleRecalcDurationMs": 14.024999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 731.752,
"heapDeltaBytes": 16580804,
"heapUsedBytes": 80098516,
"domNodes": -275,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 107.462,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 949.3140000000722,
"styleRecalcs": 16,
"styleRecalcDurationMs": 28.389000000000003,
"layouts": 5,
"layoutDurationMs": 12.936,
"taskDurationMs": 723.152,
"heapDeltaBytes": -6266576,
"heapUsedBytes": 81543336,
"domNodes": 13667,
"jsHeapTotalBytes": 11010048,
"scriptDurationMs": 29.841,
"eventListeners": 2383,
"totalBlockingTimeMs": 140,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8510.275000000036,
"styleRecalcs": 251,
"styleRecalcDurationMs": 37.153,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6012.241,
"heapDeltaBytes": 657540,
"heapUsedBytes": 82306444,
"domNodes": -244,
"jsHeapTotalBytes": 1302528,
"scriptDurationMs": 2947.7320000000004,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8458.990999999969,
"styleRecalcs": 250,
"styleRecalcDurationMs": 37.05799999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5911.19,
"heapDeltaBytes": -636232,
"heapUsedBytes": 80414836,
"domNodes": -241,
"jsHeapTotalBytes": -40960,
"scriptDurationMs": 2816.37,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16763.290999999983,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16273.251999999999,
"heapDeltaBytes": -48879164,
"heapUsedBytes": 190731764,
"domNodes": -8061,
"jsHeapTotalBytes": -15970304,
"scriptDurationMs": 256.204,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17308.73699999995,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16670.173,
"heapDeltaBytes": -38176224,
"heapUsedBytes": 197071004,
"domNodes": -8061,
"jsHeapTotalBytes": -12181504,
"scriptDurationMs": 262.26899999999995,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 20576.18100000002,
"styleRecalcs": 171,
"styleRecalcDurationMs": 17.59000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20166.115999999998,
"heapDeltaBytes": -72731212,
"heapUsedBytes": 168719820,
"domNodes": -8061,
"jsHeapTotalBytes": -19533824,
"scriptDurationMs": 917.2139999999999,
"eventListeners": -14928,
"totalBlockingTimeMs": 99,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 21252.14299999993,
"styleRecalcs": 166,
"styleRecalcDurationMs": 17.728999999999967,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20895.797,
"heapDeltaBytes": -56311504,
"heapUsedBytes": 168985104,
"domNodes": -8061,
"jsHeapTotalBytes": -17571840,
"scriptDurationMs": 922.261,
"eventListeners": -14928,
"totalBlockingTimeMs": 130,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 5987.514000000033,
"styleRecalcs": 20,
"styleRecalcDurationMs": 81.299,
"layouts": 20,
"layoutDurationMs": 24.680999999999994,
"taskDurationMs": 5912.043000000001,
"heapDeltaBytes": -26778144,
"heapUsedBytes": 190887792,
"domNodes": -8061,
"jsHeapTotalBytes": 9949184,
"scriptDurationMs": 110.067,
"eventListeners": -14928,
"totalBlockingTimeMs": 448,
"frameDurationMs": 18.330000000000048,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 6121.733000000063,
"styleRecalcs": 20,
"styleRecalcDurationMs": 78.16099999999999,
"layouts": 20,
"layoutDurationMs": 21.720000000000002,
"taskDurationMs": 5980.094,
"heapDeltaBytes": -64404060,
"heapUsedBytes": 176687376,
"domNodes": -8061,
"jsHeapTotalBytes": 4780032,
"scriptDurationMs": 104.167,
"eventListeners": -14928,
"totalBlockingTimeMs": 369,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8380.937000000016,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8102.196000000001,
"heapDeltaBytes": 790868,
"heapUsedBytes": 183541432,
"domNodes": 0,
"jsHeapTotalBytes": -21757952,
"scriptDurationMs": 127.17699999999998,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 8384.578000000034,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8181.566,
"heapDeltaBytes": -16632788,
"heapUsedBytes": 177982776,
"domNodes": -1,
"jsHeapTotalBytes": -30146560,
"scriptDurationMs": 121.326,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 121.91599999994196,
"styleRecalcs": 9,
"styleRecalcDurationMs": 21.223,
"layouts": 5,
"layoutDurationMs": 2.075,
"taskDurationMs": 91.90499999999999,
"heapDeltaBytes": 3204476,
"heapUsedBytes": 64871712,
"domNodes": 129,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 11.659999999999998,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "workflow-execution",
"durationMs": 447.57400000003145,
"styleRecalcs": 16,
"styleRecalcDurationMs": 25.918000000000003,
"layouts": 4,
"layoutDurationMs": 2.005,
"taskDurationMs": 112.709,
"heapDeltaBytes": 4904564,
"heapUsedBytes": 70111916,
"domNodes": 123,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 10.288,
"eventListeners": 81,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff. Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md |
|
Hosted unit checks pass. Reload assertions are restored in the companion PR; the failing-test execution receipt still needs source identity and exit status. Full context for agent readersUpdated September 22, 06:18 UTC: the supplied failing/passing rerun output is retained as author-supplied replacement evidence, not recovered original red evidence. The hosted unit job independently completed successfully. Review remains pinned to the current source. The remaining receipt request is narrower: attach any retained full checkout SHA, clean/modified worktree identity, exact command and exit status for those replacement runs. The pasted assertion failure and passing result are useful but do not capture that provenance. If these details were not recorded, state that; do not reconstruct them as captured output. If your existing source-writer runtime remains admitted, use it for one bounded replacement red/green pair at the committed test-only and fixed revisions, capturing those fields before each test and the actual exit afterward. Do not install dependencies, start a replacement runtime or writer, or change product source for this receipt. If the existing runtime is no longer admitted, report that prerequisite. Missing original logs are not a demonstrated product defect. Correction to the 06:03 observation: the browser persistence test now restores the awaited reload and exact slot-origin/export assertions, with the production fix temporarily cherry-picked. The former removed-coverage state is historical. Its current browser run was still running at the last read; the body explicitly says the restored local browser execution was not completed. A passing result tied to the actual served build is still required. Passing the reduced historical case or this unit test alone does not prove that restored boundary. Both PRs identify the same Claude session, so this follows the existing source route and creates no competing writer. The independent review will return its adjudicated findings separately. No merge qualification, release-target acceptance or production action is implied. Glossary: execution receipt means the original command and output tied to the tested source; reduced test means the browser case after its reload assertions were deleted. |
|
Raw command + output for the red -> green sequence, as requested. Red: Fails exactly where expected: the post-hand-wire assertion, with the slot reading back Green: Both runs were done in the same working tree via Generated by Claude Code |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #18375 +/- ##
==========================================
+ Coverage 83.35% 84.31% +0.95%
==========================================
Files 2998 2281 -717
Lines 147088 129704 -17384
Branches 38033 33164 -4869
==========================================
- Hits 122605 109355 -13250
+ Misses 23194 20054 -3140
+ Partials 1289 295 -994
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 729 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Cherry-picks d94c035 (the fix from #18375, "keep a hand-wired autogrow link's facade in sync with useLinkStore") onto this branch and restores the loadGraphData()-reload assertion that d2f3a18 removed after CI showed it failing deterministically -- that failure was this exact bug, not a flake. The restored block is byte-identical to the version removed in d2f3a18. This is a temporary duplication: once #18375 merges to main and this branch rebases, the cherry-picked commit becomes a no-op (already upstream). Claude-Session: https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6
|
Re-ran red/green in isolated Red (failing test, test-only commit)
Green (fix commit)
Method notes: each run happened in its own Generated by Claude Code |
…CRDT echo Completes the #18375 cherry-pick: the fix commit (d94c035, cherry-picked here as 068b679) says it fixes the regression this test covers, but only the fix commit was cherry-picked, not the test commit (upstream 2c33b91) that exercises it. Port it so the branch actually carries the regression coverage its own fix commit claims to satisfy. Verified passing on this branch with the cherry-picked fix in place. Claude-Session: https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6
… gap" This reverts commit 4223fca. That commit's theory doesn't hold: CI failed again on the exact same symptom (image_2's originNodeId reading back null after the in-page loadGraphData() reload) with #18375's fix genuinely present and correct on this branch (verified via the previous commit's regression test, extended to also cover a later turn reconnecting a different, already-occupied slot before the reload -- still passes at the unit/store level). So this isn't #18375's LinkMap-revision-cache race recurring; it's the separate, pre-existing gap d2f3a18 already diagnosed and deferred ("how the CRDT follower's post-navigation reconcile pass interacts with a same-session local reload"), still unfixed. Restoring back to that state and updating the comment with this finding, rather than re-asserting on an unresolved gap. Claude-Session: https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6
…urn (Comfy-Org#18327) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789965308493739)_ ## Summary Follow-up, test-only PR stacked on Comfy-Org#18279 (per reviewer request, so it does not block that PR's merge or QA). Adds the missing black-box coverage for the bug Comfy-Org#18279 fixes: existing coverage was Vitest unit tests that call the store's merge function and `LGraph.serialize()` directly in-memory, with no test that goes through the real pipeline — the agent panel UI, a real CRDT sync, a real canvas connection, and a real chat-composer Send. ## Changes - **What**: A new Playwright spec (`agentAutogrowHandWiredLinkSurvivesSend.spec.ts`) and its fixture. It boots the real agent panel against a fake CRDT host, sends one chat message so an agent-wired link lands on an autogrow node's first slot, has the user hand-wire a second source into the resulting free slot on the live canvas, sends a second chat message whose simulated response reconnects the *first* slot to a different source (the same kind of CRDT slot-sync event that used to corrupt the array), and asserts the hand-wired slot keeps its own name and link — via exact (`toEqual`, not `arrayContaining`) checks on the resulting image inputs and on the exported workflow's link list, including confirming the displaced seed link is gone outright. - **Breaking**: none (test-only). - **Dependencies**: none. ## Update 2: reload assertion reverted again — Comfy-Org#18375 does not close this gap The "reload assertion restored" update below turned out to be wrong. CI (`playwright-video-new-tests`, run 35692982760) failed again on the exact same symptom — `image_2`'s `originNodeId` reading back `null` after the in-page `loadGraphData()` reload — with Comfy-Org#18375's fix (`d94c0357b`, cherry-picked here as `068b679ba`) genuinely present and correct on this branch. Verified the fix is real and correctly applied: `notifyAdapterAdopted()`/its call site are present on this branch's head, and the upstream regression test for it (`agentCrdtProjection.reconnectAdoptionRace.test.ts`, upstream commit `2c33b91c8` — omitted from the original cherry-pick, now added here) passes. I also extended that unit test to add the missing piece — a later turn reconnecting a different, already-occupied slot (mirroring `sendSecondTurnAndReconnectFirstSlot`) before the reload — and it still passes at the unit/store level. So the browser failure is not Comfy-Org#18375's `LinkMap`-revision-cache race recurring. It's the separate, pre-existing gap `d2f3a1872` originally diagnosed and deferred: how the agent CRDT follower's reconcile pass interacts with a same-session `loadGraphData()` call while it's still subscribed. That gap remains unfixed and needs real browser-level tracing (e.g. into `useAgentCrdtFollower.ts`'s `watch(getGraph, ...)` reconcile trigger vs. `app.ts`'s `loadGraphData()` clear/configure sequence) to pin down — out of scope for this test-only PR. Reverted the reload assertion back to the `d2f3a1872` state and updated its comment with this finding, so it doesn't re-assert on a known-open gap. ## Update: reload assertion restored, CRDT fix included via temporary cherry-pick (historical, see Update 2) The reload/export round-trip assertion noted as removed below has been restored. Comfy-Org#18375 fixes the underlying CRDT gap (a `LinkMap` cache-invalidation race between a connect's registration and its materialization), proven there with a red-then-green unit test. This branch cherry-picks that fix commit (`d94c0357b`) so the restored assertion has real, currently-passing coverage in CI right now, rather than a promise of coverage once something else merges. This turned out to be an incorrect theory — see Update 2 above. ## Original scope note: reload/export round-trip assertion removed (historical, now reverted-to above) An earlier version of this test also drove `window.app.loadGraphData()` in-page and re-asserted the link layout across that reload, with the agent CRDT follower left subscribed to the same workflow throughout. That assertion was removed in d2f3a18 because CI showed it failing deterministically — the same `image_2` slot losing its link on every retry, with or without `SLOW_MO` — which ruled out flakiness and pointed to a real, pre-existing gap in how the agent's CRDT follower reconciles when `loadGraphData()` is called in-session while it's still subscribed. That gap is unrelated to the `mergeSlotsByName` fix (Comfy-Org#18279) this test covers, and remains unfixed (see Update 2). The remaining assertions still fully exercise this PR's actual coverage target: a hand-wired spare slot survives a live agent turn that reconnects a different slot on the same node, checked via exact link-list assertions immediately after that turn. ## Review Focus - The reconnect target for the second agent turn is deliberately the group's *first* slot (not a `grow` op). Growing a second slot lands on an index the doc and the client's client-only autogrow spare disagree about, which trips the (unrelated, working-as-intended) autogrow shape-normalization logic and makes for a confusing test. Reconnecting slot 0 isolates the exact "replace vs. merge" bug the fix addresses. - I verified this is a real regression test, not a vacuous one: with the two files Comfy-Org#18279 fixes (`src/stores/nodeDataStore.ts`, `src/workbench/extensions/agent/crdt/graphMutations.ts`) temporarily reverted to their pre-fix `main` versions, this spec fails (the hand-wired slot silently loses its slot); restoring the fix, it passes. - The same-session reload path is a known, currently-open gap (see Update 2) — not exercised by this PR's assertions. ## Verification - `pnpm exec playwright test agentAutogrowHandWiredLinkSurvivesSend --project=cloud` — 1 passed (prior to restoring the reload assertion). - Confirmed RED against pre-fix `nodeDataStore.ts`/`graphMutations.ts`, GREEN against the fix. - `pnpm exec vitest run` on the cherry-picked and added CRDT unit tests — all pass, including the extended reconnect+reload scenario. - `pnpm exec eslint`, `pnpm exec oxfmt`, `pnpm typecheck` — clean on the changed files; pre-commit hooks (oxfmt, oxlint, eslint, typecheck, typecheck:browser) passed on both new commits. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6 --- _Generated by [Claude Code](https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
A CRDT insert_workflow op that adds several nodes and the links between them in one batch (no subgraph, no reconnect of an existing slot) reads back with every node materialized correctly but every link silently missing. Root cause: comfy-multi-player's insert_workflow applier mints a fresh, non-numeric doc id for every inserted node AND link (remap.ts's derivedId, e.g. insert:<opId>:root:link:201), so a batch can never collide with an existing id. ecsFollowerAdapter.ts's readSemanticLink narrows a link's doc id through Number(tuple[0]) and requires Number.isInteger on the result; a derived string id always fails that check. On the full-reconcile path (the first frame a session binds, or any frame after a rejected batch) the unreadable link is filtered out with no error reported, while nodes in the same batch commit fine since readSemanticNode has no such constraint. On the incremental path it is worse: the same failed Number() conversion also breaks removeLinks's non-negative-integer check in graphMutations.ts's prepare(), rejecting the whole batch including the node adds sharing it. This is a different code path from #18375's LinkMap revision-cache race: that fix only matters when a connect displaces an existing occupant on an already-live slot, which never happens for a batch of brand-new nodes and brand-new links. RED only; no fix included. Claude-Session: https://claude.ai/code/session_01UqyourCBfi97xzpBx2W7oY
) <!-- ccr-slack-attribution --> _Requested by **Jo Zhang** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790058330774449?thread_ts=1790058330.774449&cid=C0BGH348Z0C)_ Fixes a bug where an agent's `insert_workflow` batch — several brand-new nodes plus the links between them, applied as one CRDT op, not a subgraph paste — materialized the nodes correctly (including widget values) but dropped every link between them, with no error surfaced. **Root cause:** `comfy-multi-player`'s `insert_workflow` applier used to mint a fresh, non-numeric doc id for every node *and* link it inserts (`remap.ts`'s `derivedId`, e.g. `insert:<opId>:root:link:201`). `ecsFollowerAdapter.ts`'s `readSemanticLink` narrowed a link's doc id with `Number(tuple[0])` and required `Number.isInteger` on the result — a derived string id always failed that check, so the link was treated as unreadable: - On the full-reconcile path (a session's first frame, or any frame after a previously-rejected batch), the unreadable link was silently filtered out of the batch with no error reported, while every node in the same batch read and committed fine (`readSemanticNode` has no such numeric constraint). - On the incremental path it was worse: the same failed `Number()` conversion also fed `removeLinks`'s id check, rejecting the *whole* batch — including the node adds sharing it. **Fix:** rather than working around the non-numeric derived id in the frontend, `comfy-multi-player` is pinned to [PR Comfy-Org#245](Comfy-Org/comfy-multi-player#245) ("fix: mint genuine numeric link ids for insert_workflow (ADR-033)"), now merged to `main` at commit `b475423`, which mints a real numeric link id for every link an `insert_workflow` batch inserts, upstream. `ecsFollowerAdapter.ts`'s `readSemanticLink` now just validates that identity: `resolveLinkId` accepts only a real non-negative safe-integer link id, and `resolveLinkMapKey` (via `parseLinkId`) cross-checks that id against the link's own doc map key, retiring any live link whose map key and tuple id diverge instead of materializing something inconsistent. `graphMutations.ts` needed no change — its non-negative-integer guards already accept the validated id. **Dependency pin:** `@comfyorg/comfy-multi-player` is temporarily pinned, via a `pnpm-workspace.yaml` catalog entry, to a codeload tarball of commit `b475423` on comfy-multi-player's `main` branch (where PR Comfy-Org#245 has now merged), rather than a published npm version — because that fix hasn't been published to npm yet. This anchors the pin to a permanent `main` commit instead of the now-merged (and possibly soon-deleted) feature branch, so it won't break if that branch is removed. Once comfy-multi-player publishes a release containing Comfy-Org#245, this pin should be replaced with the released npm version string. **Not the same bug as Comfy-Org#18375:** that fix addresses a `LinkMap` revision-cache race that only matters when a `connect` displaces an existing occupant on an already-live slot (e.g. an autogrow hand-wire). This batch has no existing occupant and no live node for either target before the op arrives, so that code path never triggers here. **Tests:** `agentInsertWorkflowLinks.regression.test.ts` covers: - Initial (full-reconcile) and incremental projection of a link with a genuine numeric id. - Collision preservation for ids that formerly collided under the old hash scheme. - Malformed ids and map-key/tuple divergence, both retired instead of materialized. - Reload, standalone disconnect, and reinsertion of a link. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01UqyourCBfi97xzpBx2W7oY --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Amp <amp@ampcode.com>
## Summary Backports six merged `main` Agent fixes to `cloud/1.54` and repairs the `agentCanvasLagsToolCallCompletion` e2e spec that #18586 landed with, which fails `typecheck:browser` on the current branch tip. ## Changes - **What**: `cherry-pick -x` of #17568, #17628, #16491, #18453, #17767 and #18603, in `main` merge order. The spec fix uses `entryButton` and the "Worked for" summary instead of the labels #18622 removed, and adds `HostDoc.graph()` to the conversation host-doc fixture. #18391 itself is already on the line via #18586 and is unchanged here. - **Excluded**: #18066 (Christian's request), #16908 (refactor), #18375 (needs its `src/lib/litegraph/` half). ## Review Focus - #18603 forwards two new onboarding telemetry events for every user, not only Agent users. - `AgentPanelRoot.vue` changes come from #16491 and #17767 on top of #18391's merged code; `useAgentCrdtFollower.ts` is identical to the tip. - Merging the tip resolved two conflicts: the spec (this copy) and `AgentPanelRoot.test.ts` (the tip's #18391 test plus these picks). - Second batch (#16856, #18204, #18229, #17327, #18251, #16985, #18224) follows on this tip. Linear: [PM-1656](https://linear.app/comfyorg/issue/PM-1656) ## Screenshots (if applicable) No new visuals; #17568 and #17767 were reviewed on `main`. --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Maanil Verma <vermaMaanil97@gmail.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: Alexander Brown <drjkl@comfy.org>
## Summary Ports to `core/1.54` every merged `main` Agent fix that `cloud/1.54` carries and core does not (the Agent UI catch-up from #18622, the cloud-only CRDT and workflow fixes, and the round-2 fixes), so both release lines are symmetric ahead of the local-agent rollout. ## Changes - **What**: `cherry-pick -x`, in three groups: - Agent UI, as in #18622: #17339, #17908, #17420, #18348, #18043, #17621 (without its two `src/lib/litegraph/` files; a 5 px HUD offset in `SideToolbar.vue` compensates), #17471, #17690. - Cloud-only fixes: #18063, #18073, #18064, #18033, #18289, #18604, #18616, #18376. - Round 2: #17568, #17628, #16491, #18453, #17767, #18431 (from #18571), #18603. - **Already on `core/1.54`**: #17439 (#18161), #17912 (#18186), #18391 (#18595). - **Excluded**: #17730 (core lacks its three files), #18421 (dead code on core builds), #16917 (conflicts with later core changes), #18066 (Christian's request), #18375 and #18251 (need their litegraph hunks). ## Review Focus - On this line the Agent panel registers only in cloud builds (`src/extensions/core/index.ts:41-44`); the shared chrome from #17621 and #17471 and the host telemetry from #18376 and #18603 ship in every build. - `HostTelemetrySink.ts` and its test equal `main`'s files (#18376, then #18603 on top). - #18064: `agentConversationHostDoc.test.ts` keeps this line's file; #18063's new test uses `main`'s version (multi-player 0.3.x stamps). - Supersedes #18571 and the closed #18637. Linear: [PM-1657](https://linear.app/comfyorg/issue/PM-1657), [PM-1656](https://linear.app/comfyorg/issue/PM-1656) ## Screenshots (if applicable) Visual changes are the ones reviewed on `main` and carried to cloud in #18622. --------- Co-authored-by: uytieu <uytieu@users.noreply.github.com> Co-authored-by: ryan-di <ryan.weihao.di@gmail.com> Co-authored-by: jaeone lee <89377375+jaeone94@users.noreply.github.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Comfy Org PR Bot <snomiao+comfy-pr@gmail.com> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Hunter <huntcsg@users.noreply.github.com> Co-authored-by: Maanil Verma <vermaMaanil97@gmail.com>
The host echoes every accepted human batch back as a doc_update stamped with the sending tab's actor. The follower merged that frame into the doc and then re-applied it to the live graph as an agent-remote patch, so every local edit round-tripped through the applier (FE-2509, the frame source behind #18089's lost keystrokes and #18375's null-origin hand-wired link). The follower now recognises its own actor before projection: the frame is still merged into the doc, but the collected changes are discarded instead of applied, and the frame counts as skipped. Catch-up frames are never skipped, since a resubscribe can replay state this tab wrote but whose graph was since replaced. Supersedes the echo-gating half of #18210. Amp-Thread-ID: https://ampcode.com/threads/T-01a0d248-f130-743a-a0a7-d90e3334772b
Summary
A link the user hand-wires onto an agent autogrow node's spare slot could read back disconnected (
originNodeId: null) once the CRDT follower reconciled the mint port's own echo of that connect — and the corruption survived a later same-sessionloadGraphData()reload while the follower stayed bound to the same doc, which is exactly whatagentAutogrowHandWiredLinkSurvivesSend.spec.tsleft as a follow-up.Root cause
Not reload-specific — reload just removes the only thing that was masking it. It's a cache-invalidation gap between two separately-timed steps:
connectmutation registers a link's topology inuseLinkStore(graphMutations.ts'scommit()), synchronously, insideAgentCrdtProjection.applyFrame.agentNodeMaterializer.ts'sreconcileAgentAdaptersgives that topology its live LiteGraph facade (materializeLinkAdapter,LLink.ts) on the next pass, insidereconcileLiveGraph.When a
connectreplaces an existing occupant at the same input slot,graphMutations.ts'scommit()callsdetachLinkSlotsfor the displaced occupant, which reads the slot's live.link. For a slot already backed by a realNodeInputSlot, that resolves throughgraph.links(LinkMap.ts), a cache keyed onuseLinkStore's revision counter. That read lands between steps 1 and 2: the new topology is registered (the revision the read is keyed against already reflects it) but not yet materialized, soLinkMapcaches "no facade" for it. Because step 2 alone never touches the revision counter, nothing tellsLinkMapto recompute once the facade actually lands — the slot reads back disconnected from then on, until something unrelated bumps the revision again.A hand-wire onto a freshly grown autogrow spare is exactly this: the slot's local, optimistic link (minted by the plain
LGraphNode.connect()call the drag makes) gets displaced by the doc-confirmed one the mint port's own op echoes back. Ordinarily some later, unrelated store write (an agent's next turn, a widget edit, a layout write) bumps the revision counter again shortly after and self-heals the cache before anyone reads it. A same-session reload is exactly the case with nothing left to do that:loadGraphDataclears and rebuilds the graph from its own serialization (already missing the link, since the corruption predates the reload), and the follower, still bound to the same doc, reconciles the fresh graph without ever unbinding or resubscribing.Fix
useLinkStoregainsnotifyAdapterAdopted(), which only bumps its revision counter (no topology change).materializeLinkAdapter(LLink.ts) calls it right after adopting a topology's live facade — the oneadoptLinkTopologycall site whose registration can run strictly before its adoption. The other two call sites (registerLinkTopology,replaceLinkTopology) register and adopt in the same call, so their own revision bump already postdates their adoption and needs no change.Test
agentCrdtProjection.reconnectAdoptionRace.test.tsdrives the realAgentCrdtProjection/EcsFollowerAdapter/graphMutations/useLinkStore/LLinkcode against a real@comfyorg/comfy-multi-playerdoc (mint/applyOps, the same patternagentCrdtProjection.tabReturn.test.tsandecsFollowerAdapter.integration.test.tsuse) — no browser needed. It reproduces the agent's first turn, the user's hand-wire (both the live connect and the mint port's own echoedconnectop), and a same-session reload while the follower stays bound, asserting the hand-wired slot's origin at each point.Committed red-then-green: the first commit adds the test against unmodified
mainand fails at the hand-wire assertion withorigin: null; the second commit adds the fix and the same test passes, including through the reload.How
pnpm vitest run src/workbench/extensions/agent/crdt/agentCrdtProjection.reconnectAdoptionRace.test.ts— 1 passed.pnpm vitest run src/workbench/extensions/agent src/stores/nodeDataStore.test.ts src/stores/linkStore.test.ts src/core/graph/widgets/dynamicWidgets.test.ts src/lib/litegraph— 252 files, 3859 passed, 15 expected fail, 5 skipped. No regressions.pnpm typecheck— passed.oxfmt --check/eslinton touched files — clean (the pre-existingimport-x/no-restricted-pathswarnings onLLink.tspredate this change and are unrelated).knip --cache) passed on both commits.🤖 Generated with Claude Code
https://claude.ai/code/session_01PqHg3D8o2RbujF1t4dz4J6
Generated by Claude Code