Repository navigation
fix(first-run-tour): fail a run the queue never accepted - #15091
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 19 minutes Limit details: You’ve used the included review currently available. Your 92 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe first-run tour now gives submitted runs 15 seconds to appear in queued jobs. Unaccepted runs fail at the deadline. Accepted runs cancel the acceptance timer and continue through worker waits and offline grace. Tests cover these states. ChangesFirst-run tour acceptance
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: 🟡 Moderate · up to When an accepted run loses its queue entry before reaching a terminal status, the tour can remain on the Result step in a generating state forever. The current change does not handle that transition, so merge should wait for the failure path and regression coverage to be added. Possibly related PRs
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant User
participant FirstRunTourController
participant ExecutionStore
participant AcceptanceTimer
User->>FirstRunTourController: click Run
FirstRunTourController->>AcceptanceTimer: start 15-second deadline
ExecutionStore-->>FirstRunTourController: queuedJobs acknowledgement
FirstRunTourController->>AcceptanceTimer: cancel deadline
AcceptanceTimer-->>FirstRunTourController: expire without acknowledgement
FirstRunTourController->>FirstRunTourController: mark run failed
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1982 passed, 0 failed · 1 flaky📊 Browser Reports
📦 Bundle: 9.11 MB gzip 🔴 +1.11 kBDetailsSummary
Category Glance App Entry Points — 3.71 kB (baseline 3.71 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.38 MB (baseline 1.38 MB) • 🔴 +3.13 kBGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed / 2 unchanged Views & Navigation — 124 kB (baseline 124 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 17 unchanged Panels & Settings — 591 kB (baseline 591 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens Status: 27 unchanged User & Accounts — 27.5 kB (baseline 27.5 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 11 unchanged Editors & Dialogs — 125 kB (baseline 125 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 8 unchanged UI Components — 67.1 kB (baseline 67.1 kB) • ⚪ 0 BReusable component library chunks Status: 14 unchanged Data & Services — 3.53 MB (baseline 3.53 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 17 unchanged Utilities & Hooks — 549 kB (baseline 549 kB) • ⚪ 0 BHelpers, composables, and utility bundles Status: 37 unchanged Vendor & Third-Party — 18.1 MB (baseline 18.1 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 14.1 MB (baseline 14.1 MB) • ⚪ 0 BBundles that do not match a named category
Status: 1 added / 1 removed / 284 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-23T01:14:04.354Z",
"gitSha": "adec35859d282a55e068ee02dc04233ee2fec7e5",
"branch": "fix/14619-tour-unaccepted-run",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2039.0140000000088,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.864999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 476.437,
"heapDeltaBytes": -4862084,
"heapUsedBytes": 56753076,
"domNodes": -283,
"jsHeapTotalBytes": 3923968,
"scriptDurationMs": 6.185,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-idle",
"durationMs": 2056.1689999999544,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.242999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 496.812,
"heapDeltaBytes": 17268784,
"heapUsedBytes": 79200260,
"domNodes": -284,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 6.2189999999999985,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1910.8789999999658,
"styleRecalcs": 74,
"styleRecalcDurationMs": 39.867,
"layouts": 12,
"layoutDurationMs": 3.682,
"taskDurationMs": 946.6069999999999,
"heapDeltaBytes": -3790416,
"heapUsedBytes": 57706656,
"domNodes": -283,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 113.575,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1843.5029999999415,
"styleRecalcs": 74,
"styleRecalcDurationMs": 36.001,
"layouts": 12,
"layoutDurationMs": 3.62,
"taskDurationMs": 851.774,
"heapDeltaBytes": 3762688,
"heapUsedBytes": 66188368,
"domNodes": -283,
"jsHeapTotalBytes": 6283264,
"scriptDurationMs": 108.42999999999999,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1666.275999999982,
"styleRecalcs": 29,
"styleRecalcDurationMs": 14.299999999999999,
"layouts": 6,
"layoutDurationMs": 0.5689999999999998,
"taskDurationMs": 334.63100000000003,
"heapDeltaBytes": 3166820,
"heapUsedBytes": 65939644,
"domNodes": 76,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 8.393999999999998,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1681.3079999999445,
"styleRecalcs": 31,
"styleRecalcDurationMs": 15.261999999999999,
"layouts": 6,
"layoutDurationMs": 0.62,
"taskDurationMs": 342.402,
"heapDeltaBytes": 3241840,
"heapUsedBytes": 65743016,
"domNodes": 76,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 8.166,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 575.8860000000254,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.159000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 352.668,
"heapDeltaBytes": 10906316,
"heapUsedBytes": 73349588,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 55.10600000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 557.3709999999892,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.319999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 348.676,
"heapDeltaBytes": 10692928,
"heapUsedBytes": 72032344,
"domNodes": 16,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 55.213,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2056.09800000002,
"styleRecalcs": 9,
"styleRecalcDurationMs": 10.434,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 597.2169999999999,
"heapDeltaBytes": -4806336,
"heapUsedBytes": 72036096,
"domNodes": -279,
"jsHeapTotalBytes": -1839104,
"scriptDurationMs": 12.559999999999999,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2039.9889999999914,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.7040000000000015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 587.116,
"heapDeltaBytes": -13826928,
"heapUsedBytes": 62877888,
"domNodes": -283,
"jsHeapTotalBytes": 3403776,
"scriptDurationMs": 12.808,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2149.5630000000006,
"styleRecalcs": 68,
"styleRecalcDurationMs": 12.097999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1165.035,
"heapDeltaBytes": -2547256,
"heapUsedBytes": 74941036,
"domNodes": -245,
"jsHeapTotalBytes": -303104,
"scriptDurationMs": 342.34700000000004,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2101.937000000021,
"styleRecalcs": 67,
"styleRecalcDurationMs": 12.792999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1168.8229999999999,
"heapDeltaBytes": -7818388,
"heapUsedBytes": 69921608,
"domNodes": -276,
"jsHeapTotalBytes": 221184,
"scriptDurationMs": 342.079,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3086.0250000000065,
"styleRecalcs": 65,
"styleRecalcDurationMs": 14.118000000000002,
"layouts": 60,
"layoutDurationMs": 6.651999999999999,
"taskDurationMs": 1341.9409999999998,
"heapDeltaBytes": -2322564,
"heapUsedBytes": 76812320,
"domNodes": -272,
"jsHeapTotalBytes": -2101248,
"scriptDurationMs": 372.409,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3136.512000000039,
"styleRecalcs": 64,
"styleRecalcDurationMs": 13.065,
"layouts": 60,
"layoutDurationMs": 7.091,
"taskDurationMs": 1296.652,
"heapDeltaBytes": -7753888,
"heapUsedBytes": 70050080,
"domNodes": 10,
"jsHeapTotalBytes": 6328320,
"scriptDurationMs": 376.597,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2216.509999999971,
"styleRecalcs": 45,
"styleRecalcDurationMs": 8.975,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1401.834,
"heapDeltaBytes": 10523920,
"heapUsedBytes": 89712040,
"domNodes": 10,
"jsHeapTotalBytes": 7270400,
"scriptDurationMs": 454.08000000000004,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2241.826999999944,
"styleRecalcs": 45,
"styleRecalcDurationMs": 9.401999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1440.835,
"heapDeltaBytes": 10820928,
"heapUsedBytes": 91093720,
"domNodes": -250,
"jsHeapTotalBytes": -372736,
"scriptDurationMs": 467.178,
"eventListeners": 31,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2042.716999999982,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.986,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 596.907,
"heapDeltaBytes": -9181968,
"heapUsedBytes": 74041284,
"domNodes": -268,
"jsHeapTotalBytes": 4190208,
"scriptDurationMs": 14.519,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2078.6149999998997,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.216,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 608.987,
"heapDeltaBytes": -10283492,
"heapUsedBytes": 72810948,
"domNodes": -278,
"jsHeapTotalBytes": 3665920,
"scriptDurationMs": 13.299999999999995,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 574.6959999999603,
"styleRecalcs": 45,
"styleRecalcDurationMs": 9.008000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 376.9049999999999,
"heapDeltaBytes": 11372444,
"heapUsedBytes": 73834876,
"domNodes": 16,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 116.143,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 553.7499999999227,
"styleRecalcs": 44,
"styleRecalcDurationMs": 8.093000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 375.06899999999996,
"heapDeltaBytes": 11795064,
"heapUsedBytes": 74591900,
"domNodes": 14,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 117.07500000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2041.1320000000046,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.047,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 469.82499999999993,
"heapDeltaBytes": -428216,
"heapUsedBytes": 62302528,
"domNodes": -280,
"jsHeapTotalBytes": 3923968,
"scriptDurationMs": 5.710999999999999,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2006.8519999999808,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.081,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 464.4630000000001,
"heapDeltaBytes": 18162348,
"heapUsedBytes": 81091644,
"domNodes": -280,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 5.612000000000001,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1722.340000000031,
"styleRecalcs": 76,
"styleRecalcDurationMs": 34.571999999999996,
"layouts": 16,
"layoutDurationMs": 4.607,
"taskDurationMs": 781.54,
"heapDeltaBytes": -4600780,
"heapUsedBytes": 57503168,
"domNodes": -280,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 81.495,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1723.1709999999794,
"styleRecalcs": 77,
"styleRecalcDurationMs": 34.19,
"layouts": 16,
"layoutDurationMs": 4.343,
"taskDurationMs": 774.675,
"heapDeltaBytes": 4577384,
"heapUsedBytes": 66600616,
"domNodes": -281,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 79.13000000000001,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 1398.9649999999756,
"styleRecalcs": 19,
"styleRecalcDurationMs": 31.358000000000004,
"layouts": 14,
"layoutDurationMs": 14.592,
"taskDurationMs": 911.0350000000003,
"heapDeltaBytes": -6066476,
"heapUsedBytes": 88482364,
"domNodes": 13673,
"jsHeapTotalBytes": 12845056,
"scriptDurationMs": 17.148999999999997,
"eventListeners": 2373,
"totalBlockingTimeMs": 141,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8197.168000000034,
"styleRecalcs": 249,
"styleRecalcDurationMs": 33.745999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4069.5550000000003,
"heapDeltaBytes": -12001572,
"heapUsedBytes": 63650816,
"domNodes": -283,
"jsHeapTotalBytes": 3403776,
"scriptDurationMs": 1041.15,
"eventListeners": -163,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8280.182999999965,
"styleRecalcs": 251,
"styleRecalcDurationMs": 36.991,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4065.6639999999998,
"heapDeltaBytes": 116936,
"heapUsedBytes": 77046312,
"domNodes": -274,
"jsHeapTotalBytes": -40960,
"scriptDurationMs": 1065.9350000000002,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 16678.17299999996,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15868.975,
"heapDeltaBytes": -45104744,
"heapUsedBytes": 180534908,
"domNodes": -8316,
"jsHeapTotalBytes": -18657280,
"scriptDurationMs": 101.738,
"eventListeners": -16391,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 16818.9900000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15968.968999999997,
"heapDeltaBytes": -31293192,
"heapUsedBytes": 180654724,
"domNodes": -8312,
"jsHeapTotalBytes": -18436096,
"scriptDurationMs": 104.84599999999999,
"eventListeners": -16393,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20029.89599999995,
"styleRecalcs": 171,
"styleRecalcDurationMs": 16.517000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 19508.745,
"heapDeltaBytes": -33617216,
"heapUsedBytes": 192989116,
"domNodes": -8312,
"jsHeapTotalBytes": -17416192,
"scriptDurationMs": 396.70399999999995,
"eventListeners": -16389,
"totalBlockingTimeMs": 114,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 20914.470000000052,
"styleRecalcs": 174,
"styleRecalcDurationMs": 17.68900000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20307.039,
"heapDeltaBytes": -17587888,
"heapUsedBytes": 194301900,
"domNodes": -8312,
"jsHeapTotalBytes": -12955648,
"scriptDurationMs": 415.495,
"eventListeners": -16387,
"totalBlockingTimeMs": 91,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 110.13300000001891,
"styleRecalcs": 8,
"styleRecalcDurationMs": 13.317,
"layouts": 2,
"layoutDurationMs": 0.4559999999999999,
"taskDurationMs": 75.715,
"heapDeltaBytes": 3165056,
"heapUsedBytes": 65416756,
"domNodes": 114,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 5.539999999999998,
"eventListeners": 49,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 456.90300000001116,
"styleRecalcs": 13,
"styleRecalcDurationMs": 21.15,
"layouts": 4,
"layoutDurationMs": 1.2859999999999998,
"taskDurationMs": 105.874,
"heapDeltaBytes": 4934028,
"heapUsedBytes": 66999000,
"domNodes": 121,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.738999999999998,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #15091 +/- ##
==========================================
+ Coverage 80.85% 81.87% +1.02%
==========================================
Files 1882 1887 +5
Lines 122908 107250 -15658
Branches 38597 30063 -8534
==========================================
- Hits 99375 87812 -11563
+ Misses 22971 19090 -3881
+ Partials 562 348 -214
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 453 files with indirect coverage changes 🚀 New features to boost your workflow:
|
| executionErrorStore.hasNodeError || executionErrorStore.hasPromptError | ||
| ], | ||
| ([status, refused], previous) => { | ||
| if (status !== undefined) stopAcceptDeadline() |
There was a problem hiding this comment.
SHOULD FIX — Insufficient credits after execution_start is still an indefinite promise.
This clear disarms the deadline the moment execution_start lands. But INSUFFICIENT_CREDITS / WORKSPACE_INSUFFICIENT_CREDITS are runtime execution_error payloads (accountPreconditionRouting.ts) — an API node charging credits mid-run — so for that variant the job was accepted, got a machine, and reported 'running' before the refusal arrives.
What then happens in executionStore.handleExecutionError:
- the first
setWorkflowStatus(..., { status: 'failed', showStatus: false })skipsapplyWorkflowStatus, so no status change reaches this watcher; handleAccountPreconditionErrorreturnstruebeforerecordExecutionError, sohasNodeError/hasPromptErrorstay false and therefusedterm cannot fire;resetExecutionStatedoes not clearworkflowStatus(unlikehandleExecutionInterrupted, which callsclearWorkflowStatus), so the status never drops toundefinedand theprevious?.[0] === 'running'branch cannot fire either;- the acceptance deadline was already cleared by this line.
Net result: "Hang tight — your result lands right here the moment it's ready", forever. #14619 is only fixed when the refusal beats execution_start. A clearWorkflowStatus(workflow) in handleAccountPreconditionError would let the existing previous === 'running' branch cover this.
There was a problem hiding this comment.
confirmed real. going out as its own PR rather than this one, since it changes executionStore behavior app-wide and this PR is scoped to the tour controller and its tests. will link it here.
verified the mechanism you described: handleAccountPreconditionError (:680-691) calls only clearInitializationByJobId and resetExecutionState, neither of which touches workflowStatus, and resetExecutionState (:795-806) deletes queuedJobs[jobId] and the jobIdToWorkflow entry but leaves the status at running. so it is not only the tour card, anything reading getWorkflowStatus is stuck on a run that already ended.
handleExecutionInterrupted (:492-493) already does the exact clearWorkflowStatus you suggested, so that is the shape the follow-up uses. one ordering note for whoever picks it up: the workflow has to be read out of jobIdToWorkflow before resetExecutionState deletes it.
There was a problem hiding this comment.
follow-up PR is up: #15161
it uses the handleExecutionInterrupted shape you pointed at, with a test that fails without the fix (control checked: expected 'running' to be undefined). full unit suite green, 15931 passed.
one thing that turned up while scoping it, worth your call rather than mine: handleServiceLevelError and handleCloudValidationError have the identical omission, neither clears workflowStatus either. but there is an existing test at executionStore.test.ts:933 explicitly asserting service-level errors leave the status at running, so that behavior is currently pinned as intentional. left both alone and flagged it in the PR rather than quietly changing three code paths at once.
| } | ||
| function startAcceptDeadline() { | ||
| stopAcceptDeadline() | ||
| acceptTimer = setTimeout(() => { |
There was a problem hiding this comment.
BLOCKER — This is a deadline on execution_start, not on acceptance — it fails healthy queued runs.
The only signal that clears it is executionStore.getWorkflowStatus, and the only writer of 'running' is handleExecutionStart. Acceptance and execution start are not the same event:
- Cloud sends a
"Waiting for a machine"notification thatexecutionStore.handleNotificationtracks ininitializingJobIds— the job is accepted and has aprompt_id, but there is no workflow status until a worker picks it up. Machine allocation routinely exceeds 15s. - Locally, any prompt queued behind another job is in the same position.
So: accepted cloud run, 30s to allocate. At t=15s runState flips to 'failed' and the Result step renders result.failed — "That run didn't finish. Nothing landed here. Close the tour and try running again." A user who does what the card says closes the tour and submits a second paid run. At t=30s execution_start arrives and the card silently flips back to result.generating.
The store already knows about real acceptance: storeJob sets submissionAcceptedAt and populates jobIdToWorkflow, and isJobInitializing exposes the waiting-for-a-machine state. Keying the deadline off one of those (or at minimum suppressing it while isJobInitializing) would distinguish "never acknowledged" from "acknowledged and waiting", which is what the doc comment claims this does.
There was a problem hiding this comment.
addressed on the current head, no change needed here.
the deadline keys off tourRunAccepted, which reads queuedJobs entries carrying the tour workflow, not the workflow status. an accepted cloud job sitting in initializingJobIds waiting on machine allocation therefore disarms it immediately, so the 30s allocation case you walked through no longer fails the run or tells the user to submit a second paid one.
the reasoning for not keying on status, including the waiting-for-a-machine case, is written up at :89-99, and there is a test for it (leaves a run accepted but still waiting for a machine alone).
| } | ||
|
|
||
| runState.value = 'generating' | ||
| startAcceptDeadline() |
There was a problem hiding this comment.
SHOULD FIX — 15s < 20s: this silently preempts the offline grace for any run that hasn't reported yet.
OFFLINE_GRACE_MS is 20s and exists so that "a blink of connection loss must not fail a run that is still going". But the acceptance deadline armed here runs on the same clock and expires 5s earlier, and both are gated on runState === 'generating' — so for the window between Run and the first status, the grace period is effectively 15s.
Concretely: click Run at t=0; socket drops at t=1s and arms the 20s grace; socket reconnects at t=17s and delivers the buffered execution_start. The grace timer would have let that run survive, but the acceptance deadline already failed it at t=15s, showing "That run didn't finish. Close the tour and try running again" for a live run before flipping back to "Hang tight" two seconds later.
This isn't covered by the new tests either: generatingRun() now always acknowledges with 'running' first, so every offline-grace test exercises only the post-status path. The pre-status socket drop — the one this interacts with — has no test.
There was a problem hiding this comment.
addressed on the current head.
acceptance arrives on the queuePrompt HTTP response rather than the socket, so a dropped connection cannot block it, and a run that was accepted at all disarms the 15s deadline before the 20s grace becomes relevant. the two timers no longer race.
the pre-status socket drop you flagged as untested now has one, lets the offline grace outlive the acceptance deadline, which drops the socket immediately after acceptance and asserts the run is still generating at 20s.
benjcooley
left a comment
There was a problem hiding this comment.
Reviewed the deadline mechanism against executionStore / accountPreconditionRouting. The direction is right, but the deadline is keyed off workflow status, and absence of a workflow status is not the same condition as "the queue never accepted the run". That conflation produces one false-failure regression and leaves the headline bug unfixed in its most likely variant.
| # | Severity | File:line | Issue |
|---|---|---|---|
| 1 | BLOCKER | useFirstRunTourController.ts:105 |
Deadline only clears on execution_start, not acceptance. An accepted cloud job waiting on machine allocation (initializingJobIds), or a locally queued prompt, gets failed at t=15s — the card tells the user to close the tour and run again, prompting a duplicate paid submission, then silently reverts to "generating". Key off submissionAcceptedAt / isJobInitializing instead. |
| 2 | SHOULD FIX | useFirstRunTourController.ts:77 |
INSUFFICIENT_CREDITS is a runtime execution_error, so for an API-node mid-run charge the job already reported 'running' and this line has disarmed the deadline. showStatus: false suppresses the watcher, handleAccountPreconditionError returns before recordExecutionError (so refused stays false), and resetExecutionState never clears workflowStatus (so the previous === 'running' branch can't fire). #14619 stays broken in that path. |
| 3 | SHOULD FIX | useFirstRunTourController.ts:144 |
15s accept deadline preempts the deliberate 20s OFFLINE_GRACE_MS for any run before its first status: a drop at t=1s with reconnect at t=17s would have survived, but is failed at t=15s. Untested — the reworked generatingRun() always acknowledges with 'running', so no test covers the pre-status socket drop. |
Details in the inline comments.
A submission the backend refuses never gets a prompt_id, so no workflow status ever appears and none of the run-state branches can fire. Account preconditions - sign-in, subscription, credits - are deliberately kept out of the error stores by ComfyApp.queuePrompt, so the refused term cannot see them either. The Result card was left promising a result forever. A paid subscriber out of credits is the reachable case: canRunWorkflows is isActiveSubscription && (!isFreeTier || ...), which is true for them, so the paywall branch never postpones the tour. Give acceptance a deadline rather than the run. Any status at all clears it, so a job that is merely slow is never cut short - the case the offline-grace tests already pin. The existing generatingRun helper never acknowledged its run, which is what an unacknowledged submission looks like. It now reports a status, matching what the queue actually does, and the unacknowledged case is covered by its own test. Closes #14619 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0c752f8 to
5d94272
Compare
@benjcooley's blocker: the deadline cleared on workflow status, whose only writer is `handleExecutionStart`. Acceptance and execution start are not the same event - cloud accepts a job and reports "Waiting for a machine", leaving it in `initializingJobIds` with no status at all until a worker is allocated, which routinely takes longer than any deadline short enough to be useful. So a healthy queued run was failed at t=15s and told the user to close the tour and run again - inviting a duplicate paid submission - before silently reverting to "generating". Keys off the job the queue stores on acceptance instead. A refused submission never gets one, which is the condition this was always trying to detect. That also settles the grace-period interaction: acceptance arrives on the queuePrompt response rather than the socket, so a run accepted at all disarms this deadline immediately and leaves the connection question to the longer `OFFLINE_GRACE_MS`. A drop before the first status now gets its full 20s. Both regressions are covered, and both fail against the reviewed implementation: reverting to the status-keyed clear fails exactly these two and leaves the other 52 passing.
|
@benjcooley — all three verified independently before I touched anything, and 1. BLOCKER — fixedConfirmed the mechanism you described, line by line: So the failure mode is exactly as you wrote it: healthy accepted run → failed at Now keyed on the job the queue stores on acceptance: const tourRunAccepted = computed(() =>
Object.values(executionStore.queuedJobs).some(
(job) => job.workflow === tourWorkflow.value
)
)A refused submission never gets one — which is the condition this was always 3. SHOULD FIX — fixed by the same changeYou were right that 15s silently capped the deliberate 20s grace. Keying on You were also right that nothing covered it — 2. SHOULD FIX — confirmed, and I want your call before implementingVerified: Where I stopped: the only thing that observably happens is
I'd rather not pick (b) unilaterally and hand you an API change you didn't ask One thing worth flagging either way: the QA plan for this feature told testers |
benjcooley
left a comment
There was a problem hiding this comment.
Re-review at b69793b
Verified this round against the real executionStore/app.ts, and by running the suite from a clean export of this head.
| # | Severity | Status | Finding |
|---|---|---|---|
| 1 | BLOCKER | new | The key deadline test is order-dependent: it fails when run in isolation on this head (vitest ... -t 'leaves an accepted run past the acceptance deadline alone' → received 'failed') and passes in the full file only because mocks.queuedJobs is never reset in beforeEach. CI's green is an artifact of test order. Inline comment on acceptRun. |
| 2 | BLOCKER (same root) | new | The status-based disarm was removed rather than joined with the acceptance disarm — a run reporting 'running' whose acceptance the controller never observed is failed at 15s mid-run (window documented at executionStore.ts:462; also storeJob's own catch in app.ts). Inline comment on the tourRunAccepted watch. |
| 3 | SHOULD FIX | carried, unfixed | WS-delivered INSUFFICIENT_CREDITS after acceptance still leaves the card promising forever: showStatus: false skips applyWorkflowStatus, handleAccountPreconditionError returns before any error-store write, nothing clears the stale 'running'. Fine as a follow-up issue. |
| 4 | resolved | — | Acceptance-keyed deadline design is sound and fixes the original blocker: storeJob fires on the queuePrompt response for local and cloud (before machine allocation), queuedJobs is deep-reactive, job.workflow is the same ComfyWorkflow instance as tourWorkflow, entries are evicted on terminal states. The headline #14619 case (HTTP refusal → PromptExecutionError → no storeJob → deadline fires) is verified fixed. |
| 5 | resolved | — | Offline-grace preemption: acceptance arrives on the HTTP path and disarms independent of the socket; covered by the new test. |
The production fix is close — the remaining blockers are one line in the controller plus making the test file honest about state between tests.
|
|
||
| /** The queue storing a job, which is what acceptance actually looks like. */ | ||
| function acceptRun(workflow: unknown) { | ||
| mocks.queuedJobs.value = { 'job-1': { workflow } } |
There was a problem hiding this comment.
BLOCKER — this write leaks into every later test; the deadline test only passes by that leak.
beforeEach resets every mock except mocks.queuedJobs, and TOUR_WORKFLOW is module-level, so after the first acceptRun() every subsequent test runs with tourRunAccepted === true and startAcceptDeadline() early-returns — the deadline is suppressed, not disarmed. On a clean export of this head:
vitest run src/renderer/extensions/firstRunTour/tour/useFirstRunTourController.test.ts \
-t 'leaves an accepted run past the acceptance deadline alone'
# FAIL: expected 'generating', received 'failed'
while the full file passes 54/54. So the suite is order-dependent (.only, sharding, or a reorder breaks CI), and that test's own requirement — "a job that answered must never be cut short" — is not currently verified at all.
Note from trialing the obvious fix: resetting mocks.queuedJobs.value = {} in beforeEach plus restoring the status disarm makes the full file pass, but the isolated -t run still failed — the status watcher never saw the finishRun write in isolation, which points at an additional wiring subtlety between vi.resetModules() in freshController and the hoisted mock refs. Please validate whatever fix lands with the isolated run, not just the file run.
There was a problem hiding this comment.
Follow-up — I chased the "wiring subtlety" to ground. Three distinct things, each demonstrated by a run on a clean export of this head, no speculation:
1. The order-dependence is wider than one test. Adding only mocks.queuedJobs.value = {} to beforeEach (controller untouched) fails four tests in the full file:
leaves an accepted run past the acceptance deadline alonekeeps waiting when the socket comes backleaves a run that is still reporting alonelets a recovered socket cancel every retry that preceded it
All four assert that a run with a 'running' status survives past 15s; today they pass only because this acceptRun write leaks a matching queuedJobs entry into them.
2. The isolated-run failure has a second, pre-existing cause. The store-mock factories run on the first dynamic import — which is mid-test for whichever test runs first — and each factory replaces the hoisted holder, discarding whatever the test already wrote to it. A probe inside the workflowStore factory during an isolated run:
[probe] workflowStore factory RUN; discarding activeWorkflow holder with value= { path: 'tour.json' }
After that, beginTour reads null, tourWorkflow stays null, and every getWorkflowStatus(tourWorkflow.value) lookup key-misses. That's why the pre-PR test says so when the run produced nothing also fails in isolation (expected 'idle' to be 'failed') — this trap predates your PR and hits the whole file under -t/.only. (The engine mock is immune for exactly the right reason: reactive(mocks.engine) wraps the same object.)
3. A combination validated green both ways (54/54 full file, plus isolated runs of the deadline test, the D2 test, and the socket-return test):
- controller: restore
if (status !== undefined) stopAcceptDeadline()alongside the acceptance watch beforeEach: addmocks.queuedJobs.value = {}- factories: seed instead of discard —
mocks.activeWorkflow = shallowRef(mocks.activeWorkflow.value),mocks.queuedJobs = shallowRef(mocks.queuedJobs.value),mocks.workflowStatus = shallowRef(new Map(mocks.workflowStatus.value)),mocks.linearMode = shallowRef(mocks.linearMode.value),mocks.executionErrors = reactive({ ...mocks.executionErrors })
Item 2 is pre-existing, so splitting it into its own PR is reasonable — the blockers here hang on item 1 plus the controller line.
There was a problem hiding this comment.
Clarification — my last comment buried a dependency and it's causing confusion. Plain version.
There are three fixes. They do different jobs:
- Controller: put back
if (status !== undefined) stopAcceptDeadline()next to the acceptance watch. This fixes the behavior bug. - Test file: add
mocks.queuedJobs.value = {}tobeforeEach. This makes the four leak-shielded tests honest. - Test file: make each mock factory carry the holder's value into the new ref instead of throwing it away:
mocks.activeWorkflow = shallowRef(mocks.activeWorkflow.value)— same pattern forworkflowStatus,queuedJobs,linearMode,executionErrors. This — and only this — fixes isolated runs.
What each step gets you (every row verified by running it):
| Applied | vitest run <file> |
vitest run <file> -t '<one test>' |
|---|---|---|
| nothing (head as-is) | 54/54, but 4 tests pass only via leaked state | deadline test fails |
| 1 + 2 | 54/54, honest | still fails |
| 1 + 2 + 3 | 54/54 | passes |
The sentence I should have written the first time: fixes 1+2 alone will never make an isolated run pass. Only fix 3 does that. The isolated failure without fix 3 is not caused by anything in this PR. The mock factories run in the middle of whichever test executes first, and they throw away values that test already wrote (probe output: the factory discarded activeWorkflow = { path: 'tour.json' } mid-test). In a full run the "first test" is a starting-section test that doesn't care. In an isolated run, your test is the first test, so it always gets hit.
So pick one of two paths and validate accordingly:
- Fix 3 goes in this PR: run both commands above. Both must be green.
- Fix 3 goes to a follow-up: validate with the full-file run only. Isolated runs stay red until the follow-up lands, and that red is the pre-existing trap — not your change, and not a signal about fixes 1+2.
There was a problem hiding this comment.
fixed in 2e0ba75, all three fixes including the factory seeding, so this validates both ways.
reproduced your control first: adding only the queuedJobs reset failed precisely the four tests you named, nothing else.
after the full fix, full file is 54/54 and the isolated runs pass, including the deadline test, says so when the run produced nothing, keeps waiting when the socket comes back, leaves a run that is still reporting alone, lets a recovered socket cancel every retry that preceded it, lets the offline grace outlive the acceptance deadline, and both acceptance tests.
also checked the tests are honest now rather than passing some other way: reverting only the controller line re-fails exactly those four.
thanks for chasing the factory behavior to ground, the mid-test holder replacement is not something I would have found from the failure alone.
| * leaves the connection question to `OFFLINE_GRACE_MS`. | ||
| */ | ||
| watch(tourRunAccepted, (accepted) => { | ||
| if (accepted) stopAcceptDeadline() |
There was a problem hiding this comment.
BLOCKER (same root) — this replaced the status disarm instead of joining it.
With if (status !== undefined) stopAcceptDeadline() gone, a run that reported 'running' but whose acceptance this computed never observed is failed at 15s mid-run. That window is real: handleExecutionStart creates the queuedJobs entry without .workflow when execution_start beats the queuePrompt HTTP response (documented at executionStore.ts:462), and storeJob can also fail outright (it has its own try/catch in app.ts). In both cases tourRunAccepted stays false while the run is visibly running — and the deadline cuts a live run short. This is exactly the isolated-run test failure flagged in the test file.
Keep both disarms: acceptance (this watch) or any workflow status (the previous line in the status watcher). A refused submission produces neither signal, so #14619 stays caught either way.
There was a problem hiding this comment.
Follow-up with data: removing the leak (a one-line beforeEach reset of mocks.queuedJobs, controller untouched) fails four tests in the full file — the deadline test plus keeps waiting when the socket comes back, leaves a run that is still reporting alone, and lets a recovered socket cancel every retry that preceded it. Every "a run that answered must never be cut short" guarantee in the file currently depends on this missing disarm. Restoring this line + that reset makes all 54 pass in file order and in isolation (validated on a clean export of this head). Full mechanism on the test-file thread.
There was a problem hiding this comment.
Human Ben: Above - Fable on MAX. Seemed as if Opus was not resolving to a fix. Fable set up some test runs to figure out the real behavior. I suggest also validating to be certain.
There was a problem hiding this comment.
fixed in 9dfd953, both disarms now.
one correction on the mechanism though, since neither case you cited actually reaches it. storeJob sets queuedJob.workflow and jobIdToWorkflow adjacently (executionStore.ts:868-869), and setWorkflowStatus buffers when jobIdToWorkflow misses (:257-261). so when execution_start beats the queuePrompt response the status is buffered rather than applied, and both signals flush together once storeJob lands. and if storeJob throws, jobIdToWorkflow is never set either, so no status ever reaches the map and a status disarm could not fire anyway.
the gap that does bite: resetExecutionState deletes queuedJobs[jobId] (:803) without clearing workflowStatus. watchers batch, so an accept-then-reset inside one tick reads false to false, the watcher never fires, and the deadline stays armed against a run whose status says running.
so the line is right, just for a different reason than the thread describes. the comment on the acceptance watch now names that path so nobody deletes it again.
|
@christian-byrne On 2: neither (a) nor (b) — there's a third signal already in place, and you built half of it in this revision.
This covers both runtime variants with no new store surface and no dialog coupling:
Normal completion is safe because both eviction paths delete only after the terminal status is applied ( Optional, independent of the tour: In-PR vs follow-up: your call, both work — the gate for this PR is the two blockers on the review threads (restore the status disarm alongside the acceptance watch, and the test-state fixes). Note the tests for these two variants only mean something once the |
There was a problem hiding this comment.
I don't think this case can actually happen, and I'd like to see a repro before we add a 15s timer to everyone's run.
The tour only shows to a brand new account.
Comfy.TutorialCompleted is saved on the server against the user record, not in the browser. And it only ever gets set to true — nothing sets it back to false. So you see the tour once per account, ever.
A brand new account is on FREE tier.
For FREE, canRunWorkflows already checks the same two things the backend refuses on:
Backend (prompt.go) |
Frontend (freeTierExecutionPermitted) |
|---|---|
!hasFunds |
available > 0 |
!hasFunds && HasAPINode(...) |
!hasInvalidNodes |
So if a FREE user is out of runs, or opens an API-node template with no funds, canRunWorkflows is false, the click hits engine.postpone(), and they get the paywall. The request never leaves the browser.
So where does the paid-user-with-no-credits case come from?
To reach the Run step you need a brand new account with the flag still false. That account is FREE, and the guard above catches it first. You can't subscribe mid-tour either, the template flow doesn't do that.
Which account state actually produces this? If it's config drift between the frontend's remoteConfig values and the backend's FlagFreeTierWorkflowSubmissionEnabled, those really are separate sources of truth and could disagree, but then the fix belongs at the config layer, not a timer on every run. And the mid-run INSUFFICIENT_CREDITS case is a different bug this doesn't fix anyway.
Separate gap, worth its own issue:
In handleStartupOutcome, a mobile user fails isFirstRunCandidate() because of the isDesktopWidth check, falls through, and we call markTutorialCompleted() on them anyway. That marks the tour done on their account even though they never saw it.
Open the same account on desktop later and the early return skips everything, so they never get onboarded. Signing up on a phone and moving to a laptop is normal, so we're quietly burning the tour for those users. We probably shouldn't mark it completed when the only thing that failed is the screen width.
|
@MaanilVerma Two corrections from the code, then the repro state you asked for. 1. The timer is not on everyone's run. 2. Your FREE-tier chain is correct — but tour candidacy never checks the tier. The reachable state: a brand-new member of a paid team workspace with an empty credit pool.
Repro: drain a paid workspace's credits, invite a fresh account, open the editor on desktop, click Run at the tour's Run step. "Invited to the team workspace, team is out of credits this month" is a normal enterprise onboarding day, not an exotic state. Note this also holds against a skip-gate fix at tour start: with a shared pool, another member's job can drain the balance between tour start and the Run click. Whatever gating exists up front, the card still needs an answer for a submission that got no reply. That is all the timer is. Where you're right:
Separate from all of this: my changes-requested review of this head stands on implementation grounds (two blockers on the review threads, fixes validated there). Premise and implementation are independent questions; this comment settles the premise one. |
…tatus `resetExecutionState` drops a job from `queuedJobs` without clearing its workflow status, so `tourRunAccepted` can read false while the run reports `running`. Watchers batch, so an accept-then-reset inside one tick is never observed and the deadline stays armed against a live run. Acceptance and status now both disarm it. A refused submission produces neither, so #14619 stays caught. Addresses review feedback: #15091 (comment)
…loss The note claimed the status watcher wins because it is registered first. Verified otherwise: moving it below the acceptance watch leaves all 58 tests green, because it applies the terminal status from the same flush either way. Order is not what makes this safe, so stop implying a reordering would break it. Addresses review feedback: #15091 (comment)
…omfy-Org#15161) ## Summary A runtime credits refusal leaves the workflow's execution status stuck at `running` forever. ## Changes - **What**: `handleAccountPreconditionError` in `src/stores/executionStore.ts` now clears the workflow's `workflowStatus` entry before resetting execution state. Mechanism on `main`: - `handleExecutionError` calls `handleAccountPreconditionError(e.detail)` and returns early when it returns true. These errors (`INSUFFICIENT_CREDITS` / `WORKSPACE_INSUFFICIENT_CREDITS`, routed via `resolveAccountPrecondition`) open their own modal and are deliberately kept out of the error panel and error count. - `handleAccountPreconditionError` only called `clearInitializationByJobId` then `resetExecutionState`. - `resetExecutionState` deletes `queuedJobs[jobId]` and the `jobIdToWorkflow` entry, but never touches `workflowStatus`. These are runtime errors: the job was accepted, got a machine, and `execution_start` already wrote `running` before the refusal arrives. So the status map keeps `running` indefinitely, and every reader of `getWorkflowStatus` (status badges, the first-run tour result card) promises a result that will never arrive. `handleExecutionInterrupted` already does the right thing and is the precedent this copies. Ordering matters: the `jobIdToWorkflow` lookup and status clear must happen before `resetExecutionState`, which deletes that mapping. ## Review Focus - Clearing rather than writing `failed` is intentional and matches the interrupt path — an account precondition is a gating state with its own modal, not a workflow failure, so it should leave no badge. - Sibling early-return branches (`handleServiceLevelError`, `handleCloudValidationError`) were left alone. Service-level errors have an existing test asserting the status stays `running`, so changing that is a separate decision. - Unit test added in `src/stores/executionStore.test.ts`: paid-style credits payload after `execution_start`, asserting the status goes from `running` to cleared. Verified it fails on `main` (`expected 'running' to be undefined`) and passes with the fix. Found while reviewing Comfy-Org#15091. Distinct from Comfy-Org#14619, which covers the submit-time refusal where no `prompt_id` is ever issued and the status never passes through `running` at all; this is the accepted-then-refused runtime path. Co-authored-by: Connor Byrne <c.byrne@comfy.org>
…st-run tour (Comfy-Org#15173) ## Summary `handleStartupOutcome` treated "not a tour candidate on this boot" as "already onboarded", permanently writing `Comfy.TutorialCompleted` for users who were only transiently ineligible. ## Changes - **What**: `isFirstRunCandidate()` returns false for five reasons, only one of which is stable. `handleStartupOutcome` marked the tutorial completed for all five. `Comfy.TutorialCompleted` is persisted server-side against the user record and is only ever set to `true`, so a single ineligible boot removed onboarding from that account forever. Replaced the boolean with a three-way decision: `complete` (mark + template browser), `defer` (template browser only, flag untouched), `getting-started`. `isFirstRunCandidate()` is now derived from it, so `handleUrlWorkflow` is unchanged. Classification: | condition | decision | why | | -------------------------- | -------- | --------------------------------------------------------------------------------- | | `!isCloud` | complete | build-time `__DISTRIBUTION__`; cannot change for this deployment | | `isNewUser() === false` | complete | a determined returning user does not become new again | | `!onboardingTourEnabled` | defer | server flag, defaults false before `/features` resolves, and flips during rollout | | `!isDesktopWidth` | defer | viewport | | `!isSubscriptionEnabled()` | defer | reads `window.__CONFIG__`, written by the same `/features` fetch | | `isNewUser() === null` | defer | undetermined is not a determination | Two reachable cases this fixes. Signing up on a phone and returning on a laptop is ordinary behaviour, and today it costs the user onboarding permanently — raised by @MaanilVerma on Comfy-Org#15091. The broader variant, found while verifying that one: every boot taken while `onboarding_tour_enabled` is off marks _every_ new user completed, so the entire cohort onboarded before the rollout can never see the tour once it is turned on. ## Review Focus `isSubscriptionEnabled()` is `isCloud && window.__CONFIG__?.subscription_required` — deployment config, not per-user subscription state, so "permanent" is arguable. It is classified transient because `window.__CONFIG__` is populated by the async `/features` fetch in `refreshRemoteConfig`, which sets it to `{}` on timeout (5s), on 401/403, and on any network error. A wedged features endpoint would otherwise burn the tour for every user who booted during the outage. The cost of being wrong is asymmetric: a wrong `defer` reopens the template browser one extra time, a wrong `complete` is unrecoverable. The `url-intent` branch still marks completed, unchanged. That user got a real first-run experience — their workflow loaded, and `handleUrlWorkflow` offers the tour over it — so it is a genuine completion, not an environmental miss. Candidacy is still read once per startup: `decideFirstRun()` is called a single time in `handleStartupOutcome`, so a later resize, flag refresh, or subscription change cannot unmount the Getting Started screen mid-interaction. Covered by the existing test. Non-candidates still get `Comfy.BrowseTemplates` on both paths. ## Tests Existing disqualifier table split into permanent and transient. Four new transient cases assert the flag is not written, plus an end-to-end case that runs two boots through a `setSetting` mock that actually persists: narrow viewport, then desktop. All five fail on `main` (`expected "vi.fn()" to not be called at all, but actually been called 1 times`, and `expected false to be true` for the two-boot case). Co-authored-by: Connor Byrne <c.byrne@comfy.org>
|
@MaanilVerma both of the things you raised here have since merged, so this is only waiting on your review now. Your mobile finding — #15173, merged. It turned out to be wider than the width check. The mid-run credits case you called a different bug — #15161, merged. You were right that it was separate. Worth flagging that #15161 clears the status rather than writing On the premise itself I have nothing to add beyond the reply above: your FREE-tier table is accurate and that path really is guarded before the request leaves the browser — the way in is a brand-new member of an existing paid team workspace, where the workspace carries the plan so |
…15172) Stacked on #15091 — base is `fix/14619-tour-unaccepted-run`, merge after it. #15091 gave the first-run tour a 15s acceptance deadline, which covers a submission the backend refuses outright. It left one hole: a run that *was* accepted and then loses its job without an outcome. Two live paths do that, and **neither is the mid-run credits path this description originally led with** — thanks @benjcooley for catching that: | path | what it leaves behind | covered before this PR? | | --- | --- | --- | | accepted job dropped with **no status ever written** — the cloud "waiting for a machine" job cancelled or reconciled away | nothing | ❌ no branch can fire | | `handleServiceLevelError` ("Job has stagnated") — drops the job, records a prompt error, never touches `workflowStatus` | a stale `running` | ❌ the stale `running` shadowed the error branch | | ~~mid-run credits (`handleAccountPreconditionError`)~~ | ~~stale `running`~~ | ✅ **already covered** — #15161 clears the status, so it ends via the existing `undefined`-after-`running` branch | In the uncovered cases `runState` sits on `generating` forever and the card keeps promising "Hang tight, your result lands right here the moment it's ready." The controller had two disarms and no re-arm. This makes losing acceptance a signal in its own right: extend the existing `tourRunAccepted` watcher so true -> false fails the run when it is still `generating`. ```ts watch(tourRunAccepted, (accepted) => { if (accepted) stopAcceptDeadline() else if (runState.value === 'generating') runState.value = 'failed' }) ``` No re-armed deadline — this is immediate, not a second timer. The `'generating'` gate is what keeps healthy runs safe: every run leaves the queue when it finishes. `handleExecutionSuccess` and `handleExecutionError` write the terminal status and call `resetExecutionState` in the same synchronous handler, and the status watcher is registered before this one, so a finished run has already left `generating` by the time this fires. Test 3 below covers exactly that tick. Tests, in the existing `'a run behind a dropped socket'` describe: - accepted job removed with no status -> `failed` - accepted job, status `running`, removed (the stagnation case) -> `failed` - accepted job, status `completed` written in the same tick as the removal -> stays `succeeded` - accepted job, status `failed`, then removed -> stays `failed` The first two fail on the base branch (`expected 'generating' to be 'failed'`). Of the last two terminal-status guards, **only the `completed` one discriminates** — ungated, the `failed` case writes `'failed'` over `'failed'` and still passes. It is kept as documentation of intent, not as a guard; the earlier claim that both pinned the gate was wrong. Two tests added in review: - `stays failed when an unrelated workflow churns the status map` — pins the transition gate below. Fails without it (`expected 'generating' to be 'failed'`). - `gives up on a stagnated job that leaves an error and a stale status` — the other half of the stagnation path. Documents it; does not discriminate the gate. **Review fix:** the status watcher's `status === 'running'` branch was unconditional, and its source re-evaluates whenever the `workflowStatus` map is replaced (`mutateStatus` swaps the whole map, so *any* workflow's change re-runs it) or an error flag flips. With a stale `running` sitting there, each re-evaluation put the card back on "your result lands right here" after this watcher had already failed the run. It is now gated on an actual transition into `running`, which also removes the registration-order dependency the old comment overclaimed away. Complementary to #15161 (**merged 2026-08-13**), which fixes the same user-visible symptom from the store side by clearing the stale status. Independent of it: this is the controller refusing to promise regardless of whether the store cleans up. Both are wanted; neither duplicates the other. Requested by @benjcooley in review on #15091 (acceptance-loss watch for the mid-run credits variant) and by CodeRabbit (acceptance-loss coverage, terminal statuses stay terminal). ## Tests - 58 unit tests green in `useFirstRunTourController.test.ts` (54 existing + 4 new), full-file and each new test in isolation. - `pnpm lint`, `pnpm typecheck`, `pnpm format:check` pass. --------- Co-authored-by: Connor Byrne <c.byrne@comfy.org>
70704d9
|
@christian-byrne appologies, for the delay. I didn't got notifications again for this PR and skipped my mind. I am fine with the changes. Approving. |
|
@christian-byrne Successfully backported to #15685 |
|
@christian-byrne Successfully backported to #15686 |
…accepted (#15685) Backport of #15091 to `core/1.49` Automatically created by backport workflow. Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: t <t@t.t> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Connor Byrne <c.byrne@comfy.org>
Closes #14619 — the one finding from release verification I said I'd hold the
release for. It has been sitting fixed-but-unopened on a branch; this brings it
onto current
main.What breaks today
A paid subscriber who is out of credits reaches the tour's Run step, clicks
Run, and the tour advances to the Result step. The backend refuses the
submission. The card then shows "Hang tight — your result lands right here the
moment it's ready" forever: no error, no terminal state, no way forward
except closing the tour.
Why every existing guard misses it
prompt_id, so no workflow status everappears and none of the
running/completed/failedbranches can fire.out of the error stores by
ComfyApp.queuePrompt, so therefusedtermcannot see them either.
canRunWorkflowsisisActiveSubscription && (!isFreeTier || …), which istrue for this user, so the paywall branch never postpones the tour.
Three independent mechanisms, all structurally blind to the same case.
The fix
A deadline on acceptance, not on the run:
Started when the click reports
generating, and cleared by any status at all(
if (status !== undefined) stopAcceptDeadline()). So a job that is merely slowis never cut short — only a submission the queue never acknowledged fails.
Verification
pnpm vitest run src/renderer/extensions/firstRunTour/— 189 passed (10files).
typecheckandformat:checkclean.Mutation-tested rather than asserted-green:
startAcceptDeadline()status !== undefinedclearThe second one matters: without it the deadline would fail accepted runs too,
and four tests — including the offline-grace ones — catch that.
Also fixes the
generatingRuntest helper, which never acknowledged its run andso was silently modelling a refusal; it now reports a status, matching what the
queue actually does, and the unacknowledged case gets its own test.
Scope
This is the engineering half of #14619. Deep ruled that this population
should be skipped — not shown a tour they cannot complete. That product
decision is not implemented here and #14619's product half stays with
@MaanilVerma. What this changes is that the failure is now terminal and legible
instead of an indefinite promise.