Repository navigation
[backport cloud/1.52] fix(auth): retry unified refresh and rotate session cookie on reactive re-mint - #16080
Conversation
…e re-mint (#16063) ## Summary Fixes intermittent "Image failed to load / Image does not exist" on Cloud (FE-1595, also reported by an enterprise pilot): under `unified_cloud_auth`, one transient token-refresh failure permanently stops session-cookie rotation, so `<img>`-based previews and asset thumbnails break while jobs keep running. ## Why this is needed / Root cause Node previews and Media Assets thumbnails load through plain `<img src="/api/view?...">` tags. An `<img>` request cannot carry an `Authorization` header, so those loads are authenticated solely by the 2-hour Firebase session cookie (`services/ingest/server/implementation/auth.go` in cloud). Before unified auth, the cookie was re-minted on every Firebase `onIdTokenChanged` (~hourly, with the Firebase SDK's built-in retries). Under `unified_cloud_auth` (100% since Jul 31) that driver is intentionally gated off in `authStore.ts`, and rotation is driven only by the proactive unified refresh: ``` mint (JWT TTL 1.5h) ──setTimeout(expiry−5m)──▶ refreshUnified() ──success──▶ notifyTokenRefreshed() ──▶ POST /auth/session (new 2h cookie) │ └─transient failure──▶ console.warn only • no retry scheduled → proactive chain dead • reactive 401 re-mint (remintUnifiedOnce) restores API traffic but deliberately did NOT rotate the cookie → cookie expires at 2h → every <img> load 401s until the NEXT scheduled refresh (up to ~85 min) or a page reload ``` This matches the reported shape exactly: job completes and bills normally (Bearer-authenticated API/WS), only image loads fail; only sessions open longer than 2h are affected (reload mints a fresh cookie); it self-heals when a later refresh lands — hence "worked fine last week" and Rob's "resolved itself after a few minutes". ## How we change it Two seams in `workspaceAuthStore.ts`, both flag-gated inside the existing unified lifecycle (legacy path untouched): - **What**: `refreshUnified()` now re-arms itself after a transient failure via `scheduleUnifiedRefreshRetry()` — bounded exponential backoff (5s/10s/20s, reusing `MAX_SCHEDULED_REFRESH_RETRIES`), reusing `unifiedRefreshTimerId` so `clearUnifiedContext()` still cancels pending retries. Permanent-failure teardown behavior is unchanged. - **What**: `remintUnifiedOnce()` (the reactive 401 re-mint) now calls `notifyTokenRefreshed()` on success, so cookie rotation rides the same recovery path as API traffic instead of waiting for the next scheduled refresh. `useSessionCookie` already serializes/dedupes concurrent creates. - Retry counter resets on every successful mint (`scheduleUnifiedRefresh`) and on context teardown (`clearUnifiedContext`). ## AS IS / TO BE - AS IS: after one missed proactive refresh, API traffic self-heals via reactive re-mint but the session cookie never rotates again until the next scheduled refresh or a reload — image loads 401 for up to ~85 minutes. - TO BE: transient refresh failures retry within seconds; even if retries exhaust, the first reactive re-mint (any 401'd API call) rotates the cookie, so image loads recover together with API traffic. No UI change, so no app screenshots; the failure is a timing window (2h+ session + one failed refresh) reproducible only by forcing token-endpoint failures. The regression is covered by unit tests instead. ## Regression tests - `bumps the rotation trigger on a successful reactive re-mint` - `retries a transiently failed proactive refresh with backoff and rotates on success` (also asserts the normal schedule re-arms) - `bounds refresh retries and keeps the slot for reactive recovery` (no toast, slot preserved, no unbounded retry loop) - Existing suites unchanged and green: `useWorkspaceAuth.test.ts` (93), `remintRetry.test.ts` + `authStore.test.ts` + `useSessionCookie.test.ts` (140) ## Review Focus - `remintUnifiedOnce` can be invoked by concurrent 401 replays; each success bumps the rotation trigger, relying on `useSessionCookie`'s in-flight dedupe — confirm that's acceptable vs. gating the bump. - Retry backoff base (5s) is a judgment call for post-wake/network-blip recovery; the cap (3) mirrors the legacy scheduled-retry bound. Fixes FE-1595 (linear.app/comfyorg/issue/FE-1595)
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1983 passed, 0 failed · 2 flaky📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-08-27T04:22:57.434Z",
"gitSha": "7b2bce9f26ee0fb625bd65c9458144f212e291df",
"branch": "backport-16063-to-cloud-1.52",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2042.8499999999872,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.6899999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 366.28900000000004,
"heapDeltaBytes": 18236628,
"heapUsedBytes": 80715660,
"domNodes": -280,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 4.875000000000001,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-idle",
"durationMs": 1990.3060000000323,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.605999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 352.92699999999996,
"heapDeltaBytes": 13302804,
"heapUsedBytes": 75596920,
"domNodes": -280,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 5.162,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1706.9740000000024,
"styleRecalcs": 72,
"styleRecalcDurationMs": 20.756,
"layouts": 12,
"layoutDurationMs": 2.2510000000000003,
"taskDurationMs": 576.1469999999999,
"heapDeltaBytes": 17852028,
"heapUsedBytes": 80314316,
"domNodes": -280,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 67.388,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1711.8030000000317,
"styleRecalcs": 70,
"styleRecalcDurationMs": 22.394,
"layouts": 12,
"layoutDurationMs": 2.556,
"taskDurationMs": 604.975,
"heapDeltaBytes": 9057048,
"heapUsedBytes": 71304848,
"domNodes": -284,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 69.585,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1709.0929999999958,
"styleRecalcs": 30,
"styleRecalcDurationMs": 11.198999999999998,
"layouts": 6,
"layoutDurationMs": 0.6029999999999999,
"taskDurationMs": 244.383,
"heapDeltaBytes": 3369408,
"heapUsedBytes": 65788756,
"domNodes": 77,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 6.94,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1665.8149999999523,
"styleRecalcs": 29,
"styleRecalcDurationMs": 10.716999999999999,
"layouts": 6,
"layoutDurationMs": 0.5509999999999999,
"taskDurationMs": 244.57000000000002,
"heapDeltaBytes": 2982568,
"heapUsedBytes": 66065576,
"domNodes": 76,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 7.107,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 514.3239999999878,
"styleRecalcs": 11,
"styleRecalcDurationMs": 4.469000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 261.12800000000004,
"heapDeltaBytes": 10831016,
"heapUsedBytes": 73407904,
"domNodes": 18,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 35.787,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 474.46000000002186,
"styleRecalcs": 12,
"styleRecalcDurationMs": 4.813,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 263.544,
"heapDeltaBytes": 10887588,
"heapUsedBytes": 73689960,
"domNodes": 20,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 33.342999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999998,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2008.4410000000048,
"styleRecalcs": 9,
"styleRecalcDurationMs": 4.766999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 436.56000000000006,
"heapDeltaBytes": -8236252,
"heapUsedBytes": 68077080,
"domNodes": -282,
"jsHeapTotalBytes": -1318912,
"scriptDurationMs": 13.108000000000002,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2003.5910000000285,
"styleRecalcs": 11,
"styleRecalcDurationMs": 5.171000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 438.00500000000005,
"heapDeltaBytes": -11363136,
"heapUsedBytes": 65338608,
"domNodes": -277,
"jsHeapTotalBytes": -2367488,
"scriptDurationMs": 11.804999999999996,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2077.947999999992,
"styleRecalcs": 68,
"styleRecalcDurationMs": 9.662,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 778.809,
"heapDeltaBytes": -8909432,
"heapUsedBytes": 69354260,
"domNodes": -272,
"jsHeapTotalBytes": 217088,
"scriptDurationMs": 204.196,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2076.4599999999973,
"styleRecalcs": 69,
"styleRecalcDurationMs": 13.446,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 856.037,
"heapDeltaBytes": 9897496,
"heapUsedBytes": 88300936,
"domNodes": -278,
"jsHeapTotalBytes": 4411392,
"scriptDurationMs": 236.477,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3017.0700000000465,
"styleRecalcs": 65,
"styleRecalcDurationMs": 10.482999999999999,
"layouts": 60,
"layoutDurationMs": 5.567000000000001,
"taskDurationMs": 861.863,
"heapDeltaBytes": -8537012,
"heapUsedBytes": 69985588,
"domNodes": 16,
"jsHeapTotalBytes": 6066176,
"scriptDurationMs": 231.967,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3077.5319999999056,
"styleRecalcs": 66,
"styleRecalcDurationMs": 14.142999999999999,
"layouts": 60,
"layoutDurationMs": 7.763,
"taskDurationMs": 1002.4150000000001,
"heapDeltaBytes": 18601564,
"heapUsedBytes": 97918516,
"domNodes": 16,
"jsHeapTotalBytes": 6590464,
"scriptDurationMs": 275.957,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2073.879999999974,
"styleRecalcs": 48,
"styleRecalcDurationMs": 6.116,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 891.475,
"heapDeltaBytes": 10587908,
"heapUsedBytes": 90756912,
"domNodes": 16,
"jsHeapTotalBytes": 7008256,
"scriptDurationMs": 271.648,
"eventListeners": 184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2101.38900000004,
"styleRecalcs": 47,
"styleRecalcDurationMs": 8.928000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1073.207,
"heapDeltaBytes": 10406476,
"heapUsedBytes": 91006012,
"domNodes": 14,
"jsHeapTotalBytes": 7532544,
"scriptDurationMs": 332.938,
"eventListeners": 184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2018.0560000000014,
"styleRecalcs": 9,
"styleRecalcDurationMs": 4.415000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 430.48600000000005,
"heapDeltaBytes": -11906536,
"heapUsedBytes": 66284512,
"domNodes": -283,
"jsHeapTotalBytes": 3137536,
"scriptDurationMs": 11.015,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2034.8290000000588,
"styleRecalcs": 8,
"styleRecalcDurationMs": 4.4830000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 423.84600000000006,
"heapDeltaBytes": -10029084,
"heapUsedBytes": 75409512,
"domNodes": -272,
"jsHeapTotalBytes": 3137536,
"scriptDurationMs": 10.669000000000002,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 446.38200000002826,
"styleRecalcs": 47,
"styleRecalcDurationMs": 6.870999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 265.442,
"heapDeltaBytes": 11486852,
"heapUsedBytes": 74405212,
"domNodes": 20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 74.75,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 425.5790000000843,
"styleRecalcs": 47,
"styleRecalcDurationMs": 6.799999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 269.044,
"heapDeltaBytes": 11961484,
"heapUsedBytes": 74238372,
"domNodes": 20,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 74.44800000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2008.6440000000039,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.953000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 356.679,
"heapDeltaBytes": 10122836,
"heapUsedBytes": 73192312,
"domNodes": -280,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 4.7989999999999995,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1991.1500000000615,
"styleRecalcs": 10,
"styleRecalcDurationMs": 4.749,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 340.58500000000004,
"heapDeltaBytes": 9412324,
"heapUsedBytes": 72136640,
"domNodes": -281,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 4.435000000000001,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1694.7900000000118,
"styleRecalcs": 75,
"styleRecalcDurationMs": 20.669,
"layouts": 16,
"layoutDurationMs": 2.564,
"taskDurationMs": 533.166,
"heapDeltaBytes": 19470348,
"heapUsedBytes": 82384816,
"domNodes": -280,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 48.696999999999996,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1726.9840000000158,
"styleRecalcs": 76,
"styleRecalcDurationMs": 23.851999999999997,
"layouts": 16,
"layoutDurationMs": 3.072,
"taskDurationMs": 557.7289999999999,
"heapDeltaBytes": 18205132,
"heapUsedBytes": 80776640,
"domNodes": -281,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 52.162,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 915.7260000000633,
"styleRecalcs": 20,
"styleRecalcDurationMs": 23.403,
"layouts": 15,
"layoutDurationMs": 9.177999999999999,
"taskDurationMs": 653.431,
"heapDeltaBytes": -4284108,
"heapUsedBytes": 92143576,
"domNodes": 13673,
"jsHeapTotalBytes": 11272192,
"scriptDurationMs": 11.007000000000003,
"eventListeners": 2373,
"totalBlockingTimeMs": 100,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8103.856000000007,
"styleRecalcs": 249,
"styleRecalcDurationMs": 28.573999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2732.407,
"heapDeltaBytes": -5410088,
"heapUsedBytes": 71326444,
"domNodes": -281,
"jsHeapTotalBytes": 3887104,
"scriptDurationMs": 690.704,
"eventListeners": -163,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8094.673000000057,
"styleRecalcs": 249,
"styleRecalcDurationMs": 27.393999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2722.0280000000002,
"heapDeltaBytes": -6285164,
"heapUsedBytes": 69926240,
"domNodes": -280,
"jsHeapTotalBytes": 4411392,
"scriptDurationMs": 674.584,
"eventListeners": -163,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 11167.201999999976,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10243.317000000001,
"heapDeltaBytes": -57471596,
"heapUsedBytes": 169938320,
"domNodes": -8312,
"jsHeapTotalBytes": -11759616,
"scriptDurationMs": 68.29400000000001,
"eventListeners": -16395,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12491.330999999946,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11598.770999999999,
"heapDeltaBytes": -43019296,
"heapUsedBytes": 183710628,
"domNodes": -8313,
"jsHeapTotalBytes": -12242944,
"scriptDurationMs": 86.856,
"eventListeners": -16397,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 14521.58300000002,
"styleRecalcs": 76,
"styleRecalcDurationMs": 14.385999999999981,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13848.991000000002,
"heapDeltaBytes": -11985588,
"heapUsedBytes": 199534596,
"domNodes": -8312,
"jsHeapTotalBytes": -11091968,
"scriptDurationMs": 373.16099999999994,
"eventListeners": -16389,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 14279.57099999992,
"styleRecalcs": 69,
"styleRecalcDurationMs": 14.045000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13652.215999999999,
"heapDeltaBytes": -31192388,
"heapUsedBytes": 179394396,
"domNodes": -8312,
"jsHeapTotalBytes": -17121280,
"scriptDurationMs": 373.845,
"eventListeners": -16389,
"totalBlockingTimeMs": 1,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 463.3089999999811,
"styleRecalcs": 13,
"styleRecalcDurationMs": 12.956000000000001,
"layouts": 3,
"layoutDurationMs": 0.589,
"taskDurationMs": 87.221,
"heapDeltaBytes": 5014740,
"heapUsedBytes": 67152752,
"domNodes": 126,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.576,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 460.37300000000414,
"styleRecalcs": 18,
"styleRecalcDurationMs": 15.43,
"layouts": 4,
"layoutDurationMs": 1.2039999999999997,
"taskDurationMs": 92.05999999999999,
"heapDeltaBytes": 5145100,
"heapUsedBytes": 67712044,
"domNodes": 147,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 6.865999999999999,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## cloud/1.52 #16080 +/- ##
=============================================
Coverage ? 81.97%
=============================================
Files ? 1910
Lines ? 109679
Branches ? 30556
=============================================
Hits ? 89913
Misses ? 19416
Partials ? 350
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…#16085) `cloud/1.52` does not typecheck. Every PR opened against it is red on a diff it does not own. ``` packages/ingest-types/src/index.ts(237,3): error TS2300: Duplicate identifier 'CurrentWorkspaceResponse'. packages/ingest-types/src/index.ts(240,3): error TS2300: Duplicate identifier 'CurrentWorkspaceResponse'. packages/ingest-types/src/types.gen.ts(3263,13): error TS2300: Duplicate identifier 'CurrentWorkspaceResponse'. packages/ingest-types/src/types.gen.ts(3280,13): error TS2300: Duplicate identifier 'CurrentWorkspaceResponse'. ``` Confirmed blocked: #16080 and #16084 are both red solely on this. ## Root cause A semantic conflict between two backports — clean for git, broken for TypeScript. | commit | PR | merged (UTC) | `CurrentWorkspaceResponse` declarations after | | --- | --- | --- | --- | | `c143e62b5` | #15953 — establish workspace context for API-key sessions | 8/26 04:43 | 1 | | `d9e00f921` | #15939 — ENTERPRISE tier + `ingest-types` regeneration | 8/26 23:36 | **2** | #15953 introduced the type. #15939 regenerated the package from the cloud OpenAPI spec and added it again. Neither touched the same lines, so git reported no conflict and the duplicate landed silently. CI did not catch it because **#15939's checks last ran 8/25 23:33 — roughly 24 hours before it merged, and before #15953 was on the branch.** It was green against a merge ref that no longer described reality. The second block also swallowed the JSDoc belonging to `CreateWorkspaceRequest`, leaving that type undocumented: ```ts /** * Request body for creating a new workspace. */ export type CurrentWorkspaceResponse = { // <- stray ``` In `index.ts` the stray re-export is visible as a break in the otherwise alphabetical list (`CreateWorkspaceResponse, CurrentWorkspaceResponse, CreateWorkspaceResponses`). ## Changes Pure deletion, 15 lines, no additions: - `types.gen.ts` — remove the duplicated `CurrentWorkspaceResponse` block; the `Request body for creating a new workspace.` JSDoc returns to `CreateWorkspaceRequest` - `index.ts` — remove the duplicated re-export Both files are generated, so the target was not a judgement call: **both edited regions are now byte-identical to `main`**, which carries exactly one declaration. This restores the generator's real output rather than hand-authoring it. Re-running `pnpm --filter @comfyorg/ingest-types generate` against the spec is the alternative and should produce the same result — happy to swap to that if the team prefers a regeneration commit, though it would pull in unrelated spec drift on a release branch. ## Verification `tsc` on the package, before and after: ``` ### BASE (cloud/1.52) exit=2 TS2300 x4 <- reproduces the CI failure exactly ### THIS PR exit=0 TS2300 x0 total errors 0 ``` Also verified `CurrentWorkspaceResponse` is the only duplicated identifier in either file, so this is the whole breakage and not the first of several. ## Follow-ups (not in this PR) 1. **The stale-merge-base gap.** A PR merging on day-old checks is how this shipped. Requiring branches be up to date before merge on `cloud/*`, or re-running checks on merge, would close it. 2. **`pr-backport.yaml` discards partial success.** Separately, one failing target aborts the whole step, so succeeding targets never get a PR and their pushed branches are deleted in cleanup. That is why #16032 never reached `cloud/1.52` and why #16084 had to be made by hand. ## Merge order This → #16084 (backport of #16032, *Run silently does nothing on Local at 0 credits*) → #16059 (its E2E regression test).
Backport of #16063 to
cloud/1.52Automatically created by backport workflow.