Skip to content

[backport cloud/1.54] fix: await in-flight unified-auth mint instead of racing it (#15184) - #19436

Merged
christian-byrne merged 1 commit into
cloud/1.54from
backport-15184-to-cloud-1.54
Sep 29, 2026
Merged

christian-byrne merged 1 commit into
cloud/1.54from
backport-15184-to-cloud-1.54

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Backport of PR #15184 (prevents auth callers from racing an in-flight unified-token mint). The target branch uses an older auth test harness, so the backport carries the production fix and a target-compatible fallback assertion. Local verification: pnpm vitest run src/stores/__tests__/authTokenPriority.test.ts src/stores/authStore.test.ts (133 passed).

@christian-byrne christian-byrne added the backport Backporting a PR onto a release candidate label Sep 29, 2026
@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
billing-web Ignored Ignored Sep 29, 2026 8:53pm UTC
billing-web-test Ignored Ignored Sep 29, 2026 8:53pm UTC

Request Review

@christian-byrne christian-byrne added cursor-review Trigger multi-model Cursor agent review on this PR greenlight labels Sep 29, 2026
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (2)
  • [release]
  • [backport

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

⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: d7221217-c5ea-473b-b1f8-f863ccb13923

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 1962 passed, 0 failed · 1 flaky

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

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/29/2026, 09:17:18 PM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.9 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.5 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 71.7 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 60.5 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 81.6 MB heap
large-graph-pan: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.2 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.2 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 77.1 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 83.9 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 83.8 MB heap
subgraph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 60.1 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 68.1 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 143ms TBT · 81.5 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 81.7 MB heap
vue-large-graph-idle: · 58.1 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 171.7 MB heap
vue-large-graph-pan: · 57.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 13ms TBT · 167.7 MB heap
vue-node-resize-workload: · 56.2 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 301ms TBT · 164.2 MB heap
vue-zoom-out-idle: · 57.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 172.8 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.8 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 8ms
canvas-idle: layout count 0
canvas-idle: style recalc count 8
canvas-idle: task duration 635ms
canvas-idle: script duration 12ms
canvas-idle: TBT 0ms
canvas-idle: heap used 70.9 MB
canvas-idle: DOM nodes -281
canvas-idle: event listeners -165
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 4ms
canvas-mouse-sweep: style recalc duration 33ms
canvas-mouse-sweep: layout count 14
canvas-mouse-sweep: style recalc count 78
canvas-mouse-sweep: task duration 965ms
canvas-mouse-sweep: script duration 153ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 67.5 MB
canvas-mouse-sweep: DOM nodes -281
canvas-mouse-sweep: event listeners -180
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 21ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 31
canvas-zoom-sweep: task duration 423ms
canvas-zoom-sweep: script duration 14ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 71.7 MB
canvas-zoom-sweep: DOM nodes 76
canvas-zoom-sweep: event listeners 19
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 8ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 11
dom-widget-clipping: task duration 470ms
dom-widget-clipping: script duration 157ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 60.5 MB
dom-widget-clipping: DOM nodes 17
dom-widget-clipping: event listeners 2
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 7ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 6
large-graph-idle: task duration 709ms
large-graph-idle: script duration 36ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 81.6 MB
large-graph-idle: DOM nodes -273
large-graph-idle: event listeners -177
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 13ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 67
large-graph-pan: task duration 1795ms
large-graph-pan: script duration 841ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 73.2 MB
large-graph-pan: DOM nodes -261
large-graph-pan: event listeners -177
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 13ms
large-graph-zoom: style recalc duration 12ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 62
large-graph-zoom: task duration 1859ms
large-graph-zoom: script duration 786ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 72.2 MB
large-graph-zoom: DOM nodes -281
large-graph-zoom: event listeners -74
legacy-node-drag: avg frame time 17ms
legacy-node-drag: p95 frame time 17ms
legacy-node-drag: layout duration 0ms
legacy-node-drag: style recalc duration 6ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 41
legacy-node-drag: task duration 2065ms
legacy-node-drag: script duration 997ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 77.1 MB
legacy-node-drag: DOM nodes -142
legacy-node-drag: event listeners 89
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 4ms
minimap-idle: layout count 0
minimap-idle: style recalc count 4
minimap-idle: task duration 677ms
minimap-idle: script duration 35ms
minimap-idle: TBT 0ms
minimap-idle: heap used 83.9 MB
minimap-idle: DOM nodes -275
minimap-idle: event listeners -179
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 12ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 453ms
subgraph-dom-widget-clipping: script duration 149ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 83.8 MB
subgraph-dom-widget-clipping: DOM nodes 19
subgraph-dom-widget-clipping: event listeners 8
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 8ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 8
subgraph-idle: task duration 559ms
subgraph-idle: script duration 10ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 60.1 MB
subgraph-idle: DOM nodes -299
subgraph-idle: event listeners -225
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 6ms
subgraph-mouse-sweep: style recalc duration 31ms
subgraph-mouse-sweep: layout count 18
subgraph-mouse-sweep: style recalc count 79
subgraph-mouse-sweep: task duration 940ms
subgraph-mouse-sweep: script duration 116ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 68.1 MB
subgraph-mouse-sweep: DOM nodes -296
subgraph-mouse-sweep: event listeners -227
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 14ms
subgraph-transition-enter: style recalc duration 34ms
subgraph-transition-enter: layout count 16
subgraph-transition-enter: style recalc count 20
subgraph-transition-enter: task duration 970ms
subgraph-transition-enter: script duration 35ms
subgraph-transition-enter: TBT 143ms
subgraph-transition-enter: heap used 81.5 MB
subgraph-transition-enter: DOM nodes 13831
subgraph-transition-enter: event listeners 2387
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 38ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 248
viewport-pan-sweep: task duration 6351ms
viewport-pan-sweep: script duration 2757ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 81.7 MB
viewport-pan-sweep: DOM nodes -278
viewport-pan-sweep: event listeners -161
vue-large-graph-idle: avg frame time 17ms
vue-large-graph-idle: p95 frame time 17ms
vue-large-graph-idle: layout duration 0ms
vue-large-graph-idle: style recalc duration 0ms
vue-large-graph-idle: layout count 0
vue-large-graph-idle: style recalc count 0
vue-large-graph-idle: task duration 15460ms
vue-large-graph-idle: script duration 269ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 171.7 MB
vue-large-graph-idle: DOM nodes -8068
vue-large-graph-idle: event listeners -14934
vue-large-graph-pan: avg frame time 18ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 19ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 138
vue-large-graph-pan: task duration 18850ms
vue-large-graph-pan: script duration 895ms
vue-large-graph-pan: TBT 13ms
vue-large-graph-pan: heap used 167.7 MB
vue-large-graph-pan: DOM nodes -8068
vue-large-graph-pan: event listeners -14935
vue-node-resize-workload: avg frame time 18ms
vue-node-resize-workload: p95 frame time 17ms
vue-node-resize-workload: layout duration 26ms
vue-node-resize-workload: style recalc duration 77ms
vue-node-resize-workload: layout count 20
vue-node-resize-workload: style recalc count 20
vue-node-resize-workload: task duration 5635ms
vue-node-resize-workload: script duration 119ms
vue-node-resize-workload: TBT 301ms
vue-node-resize-workload: heap used 164.2 MB
vue-node-resize-workload: DOM nodes -8070
vue-node-resize-workload: event listeners -14930
vue-zoom-out-idle: avg frame time 18ms
vue-zoom-out-idle: p95 frame time 17ms
vue-zoom-out-idle: layout duration 0ms
vue-zoom-out-idle: style recalc duration 0ms
vue-zoom-out-idle: layout count 0
vue-zoom-out-idle: style recalc count 0
vue-zoom-out-idle: task duration 7718ms
vue-zoom-out-idle: script duration 130ms
vue-zoom-out-idle: TBT 0ms
vue-zoom-out-idle: heap used 172.8 MB
vue-zoom-out-idle: DOM nodes 0
vue-zoom-out-idle: event listeners -13
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 17ms
workflow-execution: layout count 3
workflow-execution: style recalc count 10
workflow-execution: task duration 94ms
workflow-execution: script duration 7ms
workflow-execution: TBT 0ms
workflow-execution: heap used 69.8 MB
workflow-execution: DOM nodes 114
workflow-execution: event listeners 49
Raw data
{
  "timestamp": "2026-09-29T21:20:06.637Z",
  "gitSha": "0975b828cd3483d98d353b18b64c3b12d35d25b6",
  "branch": "backport-15184-to-cloud-1.54",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2171.0729999999785,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 8.07,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 678.797,
      "heapDeltaBytes": 12027520,
      "heapUsedBytes": 82118508,
      "domNodes": -279,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 12.234999999999996,
      "eventListeners": -166,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-idle",
      "durationMs": 2052.351000000044,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 8.089,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 591.572,
      "heapDeltaBytes": -3815564,
      "heapUsedBytes": 66604172,
      "domNodes": -282,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 11.422999999999998,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1973.8300000000208,
      "styleRecalcs": 80,
      "styleRecalcDurationMs": 35.93399999999999,
      "layouts": 14,
      "layoutDurationMs": 4.9270000000000005,
      "taskDurationMs": 979.943,
      "heapDeltaBytes": 7270264,
      "heapUsedBytes": 78664552,
      "domNodes": -281,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 154.973,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1856.0410000000047,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 30.34,
      "layouts": 14,
      "layoutDurationMs": 3.7479999999999998,
      "taskDurationMs": 949.696,
      "heapDeltaBytes": -7707944,
      "heapUsedBytes": 62791464,
      "domNodes": -281,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 150.88500000000002,
      "eventListeners": -196,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1748.980999999958,
      "styleRecalcs": 30,
      "styleRecalcDurationMs": 24.166999999999998,
      "layouts": 6,
      "layoutDurationMs": 1.431,
      "taskDurationMs": 419.57700000000006,
      "heapDeltaBytes": 4252244,
      "heapUsedBytes": 74848076,
      "domNodes": 76,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 13.469000000000001,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1751.5840000000935,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 17.707,
      "layouts": 6,
      "layoutDurationMs": 1.2839999999999998,
      "taskDurationMs": 426.914,
      "heapDeltaBytes": 4607776,
      "heapUsedBytes": 75582380,
      "domNodes": 75,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 14.172999999999998,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 714.0459999999962,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 6.294000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 463.54699999999997,
      "heapDeltaBytes": -7926208,
      "heapUsedBytes": 63432100,
      "domNodes": 14,
      "jsHeapTotalBytes": 6815744,
      "scriptDurationMs": 156.42600000000002,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 726.222000000007,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 9.777,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 475.86600000000004,
      "heapDeltaBytes": -7582124,
      "heapUsedBytes": 63494712,
      "domNodes": 20,
      "jsHeapTotalBytes": 6291456,
      "scriptDurationMs": 158.562,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2079.359000000011,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 7.672999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 712.204,
      "heapDeltaBytes": 11142124,
      "heapUsedBytes": 86842040,
      "domNodes": -269,
      "jsHeapTotalBytes": -1413120,
      "scriptDurationMs": 36.61599999999999,
      "eventListeners": -162,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2043.8640000000987,
      "styleRecalcs": 5,
      "styleRecalcDurationMs": 5.339,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 705.448,
      "heapDeltaBytes": 7454996,
      "heapUsedBytes": 84337048,
      "domNodes": -277,
      "jsHeapTotalBytes": -1675264,
      "scriptDurationMs": 36.372,
      "eventListeners": -192,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2759.1730000000325,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 12.142,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1798.9100000000003,
      "heapDeltaBytes": -9865348,
      "heapUsedBytes": 67653952,
      "domNodes": -272,
      "jsHeapTotalBytes": -2199552,
      "scriptDurationMs": 842.3629999999999,
      "eventListeners": -162,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2711.3389999999526,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 13.88,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1790.8739999999998,
      "heapDeltaBytes": 8143312,
      "heapUsedBytes": 85848784,
      "domNodes": -250,
      "jsHeapTotalBytes": 385024,
      "scriptDurationMs": 839.05,
      "eventListeners": -192,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3837.416000000019,
      "styleRecalcs": 60,
      "styleRecalcDurationMs": 10.409000000000002,
      "layouts": 60,
      "layoutDurationMs": 12.622000000000002,
      "taskDurationMs": 1820.8639999999998,
      "heapDeltaBytes": 8219776,
      "heapUsedBytes": 76313568,
      "domNodes": -281,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 789.544,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3817.9249999999456,
      "styleRecalcs": 63,
      "styleRecalcDurationMs": 13.561999999999998,
      "layouts": 60,
      "layoutDurationMs": 12.940000000000001,
      "taskDurationMs": 1897.187,
      "heapDeltaBytes": -3223424,
      "heapUsedBytes": 75059716,
      "domNodes": -280,
      "jsHeapTotalBytes": -888832,
      "scriptDurationMs": 781.948,
      "eventListeners": -158,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3190.987000000007,
      "styleRecalcs": 41,
      "styleRecalcDurationMs": 6.518,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2111.228,
      "heapDeltaBytes": 27294044,
      "heapUsedBytes": 92739156,
      "domNodes": -284,
      "jsHeapTotalBytes": 1728512,
      "scriptDurationMs": 1016.5280000000001,
      "eventListeners": -10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666696,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3133.8739999999916,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 5.2010000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2019.3390000000004,
      "heapDeltaBytes": 778528,
      "heapUsedBytes": 69011592,
      "domNodes": 0,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 976.759,
      "eventListeners": 188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2052.489000000037,
      "styleRecalcs": 3,
      "styleRecalcDurationMs": 3.0010000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 670.9090000000001,
      "heapDeltaBytes": 10432416,
      "heapUsedBytes": 87881556,
      "domNodes": -274,
      "jsHeapTotalBytes": -1413120,
      "scriptDurationMs": 34.90399999999999,
      "eventListeners": -194,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "minimap-idle",
      "durationMs": 2034.3010000000277,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 4.078000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 683.599,
      "heapDeltaBytes": 10330128,
      "heapUsedBytes": 88066988,
      "domNodes": -275,
      "jsHeapTotalBytes": -1413120,
      "scriptDurationMs": 34.844,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 709.1110000000072,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 11.907,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 458.18500000000006,
      "heapDeltaBytes": 15138104,
      "heapUsedBytes": 88316056,
      "domNodes": 18,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 151.892,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 699.1709999999784,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 11.379,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 448.349,
      "heapDeltaBytes": 14997020,
      "heapUsedBytes": 87351872,
      "domNodes": 20,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 145.902,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2011.589000000015,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 6.486000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 568.047,
      "heapDeltaBytes": -8197884,
      "heapUsedBytes": 64513852,
      "domNodes": -300,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 10.251999999999997,
      "eventListeners": -240,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2024.3509999999105,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.773000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 549.3269999999999,
      "heapDeltaBytes": -11547104,
      "heapUsedBytes": 61597512,
      "domNodes": -297,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 10.606999999999998,
      "eventListeners": -210,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1786.0499999999888,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 30.694,
      "layouts": 18,
      "layoutDurationMs": 5.752,
      "taskDurationMs": 949.183,
      "heapDeltaBytes": 5638412,
      "heapUsedBytes": 79054268,
      "domNodes": -297,
      "jsHeapTotalBytes": 7069696,
      "scriptDurationMs": 117.79599999999998,
      "eventListeners": -212,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1755.0609999999551,
      "styleRecalcs": 80,
      "styleRecalcDurationMs": 31.415,
      "layouts": 18,
      "layoutDurationMs": 5.651000000000001,
      "taskDurationMs": 931.1890000000001,
      "heapDeltaBytes": -8930832,
      "heapUsedBytes": 63821448,
      "domNodes": -295,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 114.91199999999999,
      "eventListeners": -242,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1400.0179999999887,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 33.556,
      "layouts": 16,
      "layoutDurationMs": 14.345000000000004,
      "taskDurationMs": 969.6079999999998,
      "heapDeltaBytes": -5144384,
      "heapUsedBytes": 85509208,
      "domNodes": 13831,
      "jsHeapTotalBytes": 11010048,
      "scriptDurationMs": 34.939,
      "eventListeners": 2387,
      "totalBlockingTimeMs": 143,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 9075.046999999984,
      "styleRecalcs": 250,
      "styleRecalcDurationMs": 39.533,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6343.687,
      "heapDeltaBytes": 4231500,
      "heapUsedBytes": 81096012,
      "domNodes": -281,
      "jsHeapTotalBytes": 647168,
      "scriptDurationMs": 2731.393,
      "eventListeners": -176,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 9333.956000000057,
      "styleRecalcs": 246,
      "styleRecalcDurationMs": 36.032999999999994,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6359.114,
      "heapDeltaBytes": 13932724,
      "heapUsedBytes": 90326964,
      "domNodes": -275,
      "jsHeapTotalBytes": -958464,
      "scriptDurationMs": 2783.327,
      "eventListeners": -146,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 15753.203999999983,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 15249.109,
      "heapDeltaBytes": -26644732,
      "heapUsedBytes": 191909992,
      "domNodes": -8068,
      "jsHeapTotalBytes": -9973760,
      "scriptDurationMs": 289.648,
      "eventListeners": -14933,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 16241.368999999962,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 15671.819,
      "heapDeltaBytes": -55307032,
      "heapUsedBytes": 168117032,
      "domNodes": -8068,
      "jsHeapTotalBytes": -13115392,
      "scriptDurationMs": 247.461,
      "eventListeners": -14935,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.219999999999953,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 18965.752000000008,
      "styleRecalcs": 140,
      "styleRecalcDurationMs": 18.82900000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18715.871,
      "heapDeltaBytes": -42969332,
      "heapUsedBytes": 170328768,
      "domNodes": -8068,
      "jsHeapTotalBytes": -9494528,
      "scriptDurationMs": 877.294,
      "eventListeners": -14941,
      "totalBlockingTimeMs": 6,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 19222.329999999944,
      "styleRecalcs": 135,
      "styleRecalcDurationMs": 18.320000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18983.154,
      "heapDeltaBytes": -53866124,
      "heapUsedBytes": 181462540,
      "domNodes": -8068,
      "jsHeapTotalBytes": -15536128,
      "scriptDurationMs": 913.0930000000001,
      "eventListeners": -14929,
      "totalBlockingTimeMs": 19,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 5662.204999999972,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 74.52599999999998,
      "layouts": 20,
      "layoutDurationMs": 25.52,
      "taskDurationMs": 5594.048000000001,
      "heapDeltaBytes": -65667664,
      "heapUsedBytes": 174798928,
      "domNodes": -8072,
      "jsHeapTotalBytes": 8843264,
      "scriptDurationMs": 98.88199999999999,
      "eventListeners": -14931,
      "totalBlockingTimeMs": 329,
      "frameDurationMs": 17.779999999999987,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 5753.71599999994,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 79.374,
      "layouts": 20,
      "layoutDurationMs": 27.09700000000001,
      "taskDurationMs": 5675.693,
      "heapDeltaBytes": -49331412,
      "heapUsedBytes": 169505420,
      "domNodes": -8068,
      "jsHeapTotalBytes": 9162752,
      "scriptDurationMs": 139.859,
      "eventListeners": -14929,
      "totalBlockingTimeMs": 272,
      "frameDurationMs": 17.780000000000047,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 7903.434000000005,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7662.9900000000025,
      "heapDeltaBytes": 3636156,
      "heapUsedBytes": 187870956,
      "domNodes": 0,
      "jsHeapTotalBytes": -7864320,
      "scriptDurationMs": 128.73800000000003,
      "eventListeners": -14,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.219999999999953,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 7996.843000000013,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7773.481000000001,
      "heapDeltaBytes": -12517356,
      "heapUsedBytes": 174490164,
      "domNodes": 0,
      "jsHeapTotalBytes": -11010048,
      "scriptDurationMs": 130.923,
      "eventListeners": -12,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.780000000000047,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "workflow-execution",
      "durationMs": 450.1549999999952,
      "styleRecalcs": 14,
      "styleRecalcDurationMs": 20.334999999999997,
      "layouts": 3,
      "layoutDurationMs": 0.7309999999999999,
      "taskDurationMs": 114.57399999999998,
      "heapDeltaBytes": 4778816,
      "heapUsedBytes": 73721848,
      "domNodes": 124,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 7.793999999999999,
      "eventListeners": 65,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "workflow-execution",
      "durationMs": 106.58599999999296,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 12.933000000000002,
      "layouts": 2,
      "layoutDurationMs": 0.5689999999999998,
      "taskDurationMs": 72.991,
      "heapDeltaBytes": 3010944,
      "heapUsedBytes": 72556640,
      "domNodes": 104,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 5.549,
      "eventListeners": 33,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66666666666665,
      "p95FrameDurationMs": 16.700000000000728
    }
  ]
}

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Cursor Review — Consolidated panel

Triggered by @christian-byrne.

Found 9 finding(s).

Severity Count
🟠 High 3
🟡 Medium 5
🟢 Low 1

Panel: 8/8 reviewers contributed findings.

Comment thread src/stores/authStore.ts
if (await awaitUnifiedMint()) return null
const token = useWorkspaceAuthStore().getUnifiedToken()
if (token) return { Authorization: `Bearer ${token}` }
return await getFirebaseAuthHeader()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟠 High — Falling back to the Firebase token whenever the unified token is absent is fail-open, and absence does not only mean "the login mint failed": the unified token is workspace-scoped, so after switchUnifiedWorkspace clears it mid-transition (or a revocation / permanent mint denial tears it down) this hands the server the raw user identity, which resolves to the personal workspace — requests the UI believes are scoped to team workspace X execute against the personal one. The legacy path deliberately fails closed here (ensureWorkspaceToken returns null "so callers fail closed rather than downgrade to the personal identity", and non-unified getAuthHeader has no Firebase fallback while a workspace is active). Consider gating the fallback on the current unified target being the personal workspace. Raised by 4 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case, kimi-k3-max adversarial).

Comment thread src/stores/authStore.ts
*/
const awaitUnifiedMint = async (): Promise<boolean> => {
const uid = currentUser.value?.uid
if (uid) await mintUnifiedToken(uid).catch(() => false)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟠 High — This await has no timeout or cancellation: mintAtLogin bottoms out in a bare fetch(workspaceApiUrl('/auth/token')) with no AbortSignal, and because the promise is memoized every caller for that uid joins the same hung promise. getAuthHeader is awaited by api.fetchApi before its own response-header timeout applies and by the router guard after its initialization wait, so neither existing timeout covers it — one stalled mint (hanging proxy, captive portal) wedges all cloud requests, the WebSocket handshake, and navigation for the whole session, and the intended Firebase fallback is never reached. Pass AbortSignal.timeout(...) to the mint fetch or race this await against a deadline. Raised by 6 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case, gemini-3.1-pro adversarial, kimi-k3-max adversarial, kimi-k3-max edge-case).

Comment thread src/stores/authStore.ts
useWorkspaceAuthStore()
.mintAtLogin()
.then((success) => {
if (!success) mintUnifiedToken.delete(uid)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟠 High — Evicting the memo on every failed mint removes all backoff, and awaitUnifiedMint then does not merely await an in-flight mint — with no cached entry it starts a fresh one and blocks on it. Since api.fetchApi calls getAuthHeader() for every cloud request and the router guard calls it on every navigation, a degraded or denying /auth/token gets one new failing round-trip per request, added to that request's latency; only concurrent callers coalesce via inFlightUnifiedMint, sequential ones do not. The legacy path guards exactly this with recoveryCooldownUntil/startRecoveryCooldown() — add an equivalent cooldown or bounded backoff before re-minting, and don't retry at all on permanent 401/403-class failures. Raised by 6 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro adversarial, gpt-5.6-sol-max adversarial, kimi-k3-max adversarial, kimi-k3-max edge-case).

Comment thread src/stores/authStore.ts
*/
const getUnifiedAuthToken = async (): Promise<string | undefined> => {
if (await awaitUnifiedMint()) return undefined
return useWorkspaceAuthStore().getUnifiedToken()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium — getUnifiedAuthToken returns undefined on mint failure while getUnifiedAuthHeader falls back to the Firebase token for the identical condition. This getter feeds the WebSocket handshake token query param and backend node auth, so a failed mint leaves the realtime socket unauthenticated while HTTP requests still carry a working credential — the same "authenticated user reported as logged out" symptom this PR sets out to fix, left in place on the socket path. Pick one policy (fall back on both, or fail closed on both) and apply it consistently. Raised by 6 of 8 reviewers (gemini-3.1-pro adversarial, gemini-3.1-pro edge-case, claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, kimi-k3-max adversarial, kimi-k3-max edge-case).

Comment thread src/stores/authStore.ts
const mintUnifiedToken = useMemoize((uid: string) =>
useWorkspaceAuthStore()
.mintAtLogin()
.then((success) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium — The eviction lives in .then() with no rejection handler, so a rejected mint promise stays in the memoize cache for the rest of the session: awaitUnifiedMint's .catch(() => false) then resolves every later call instantly without re-minting, permanently pinning the session to the Firebase fallback, and the fire-and-forget void mintUnifiedToken(user.uid) at line 179 surfaces as an unhandled rejection. mintAtLogin swallowing its own errors makes this latent today — but that also makes awaitUnifiedMint's .catch dead code, so one of the two is wrong. Use .catch(() => { mintUnifiedToken.delete(uid); return false }). Raised by 5 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro adversarial, gemini-3.1-pro edge-case, kimi-k3-max edge-case).

Comment thread src/stores/authStore.ts
let customerRecovery: Promise<void> | null = null
let customerRecoveryIdentity: string | null = null
const isFetchingBalance = ref(false)
const mintUnifiedToken = useMemoize((uid: string) =>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium — A successful mint is memoized per-uid and only invalidated by mintUnifiedToken.clear() on sign-out or identity change, but clearWorkspaceContext()/endWorkspaceSession() wipe unifiedToken for a user who is still signed in. In that state the memo still resolves true, so awaitUnifiedMint short-circuits and mintAtLogin's own "no token, re-mint" branch never runs: getAuthToken() returns undefined and getAuthHeader() degrades to the Firebase token permanently, with no path back to a unified token short of signing out. Invalidate the memo wherever the unified token is cleared. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).

Comment thread src/stores/authStore.ts
const awaitUnifiedMint = async (): Promise<boolean> => {
const uid = currentUser.value?.uid
if (uid) await mintUnifiedToken(uid).catch(() => false)
return currentUser.value?.uid !== uid

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium — The staleness fence compares only the Firebase uid, but the credential being awaited is workspace-scoped and this await is a new window during which the workspace can change. A workspace switch — or an A→B→A account switch — leaves the uid equal, so the caller proceeds with the replacement workspace's token (or the Firebase fallback) for a request prepared against the previous one. Fence on the workspace/session generation rather than the uid alone. Raised by 2 of 8 reviewers (gpt-5.6-sol-max adversarial, kimi-k3-max adversarial).

Comment thread src/stores/authStore.ts
const token = useWorkspaceAuthStore().getUnifiedToken()
return token ? { Authorization: `Bearer ${token}` } : null
}
if (flags.unifiedCloudAuthEnabled) return getUnifiedAuthHeader()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Medium — The login-mint race is only closed on getAuthHeader/getAuthToken. getWorkspaceAuthHeader (~line 354) and getWorkspaceAuthToken (~line 406) still read useWorkspaceAuthStore().getUnifiedToken() synchronously under the same flag without calling awaitUnifiedMint(), so a workspace-scoped request issued during the login-mint window still sees undefined and getWorkspaceAuthHeaderOrThrow throws userNotAuthenticated for an authenticated user — the exact failure this PR fixes elsewhere. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).

Comment thread src/stores/authStore.ts

if (user === null || identityChanged) {
useWorkspaceAuthStore().clearWorkspaceContext()
mintUnifiedToken.clear()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Low — clear() drops the cache entry but does not cancel the in-flight promise that entry held, and the eviction callback is not fenced against supersession. On sign-out then sign-in as the same uid within the mint's flight window, a fresh promise is stored under the identical [uid] key; the old promise then resolves false and its mintUnifiedToken.delete(uid) evicts the new session's entry, forcing a redundant mint. Self-healing, but capture the promise (or a generation counter) and only delete when the cached entry is still the one this callback created. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro adversarial).

@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@              Coverage Diff              @@
##             cloud/1.54   #19436   +/-   ##
=============================================
  Coverage              ?   79.11%           
=============================================
  Files                 ?     2029           
  Lines                 ?   113617           
  Branches              ?    32098           
=============================================
  Hits                  ?    89890           
  Misses                ?    23548           
  Partials              ?      179           
Flag Coverage Δ
unit 79.11% <100.00%> (?)

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

Files with missing lines Coverage Δ
src/stores/authStore.ts 93.85% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@christian-byrne
christian-byrne force-pushed the backport-15184-to-cloud-1.54 branch from 65ee3c0 to b28eaaa Compare September 29, 2026 20:53
@christian-byrne
christian-byrne enabled auto-merge (squash) September 29, 2026 20:59
@github-actions github-actions Bot added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Sep 29, 2026
@christian-byrne
christian-byrne merged commit a3fd7e6 into cloud/1.54 Sep 29, 2026
95 checks passed
@christian-byrne
christian-byrne deleted the backport-15184-to-cloud-1.54 branch September 29, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate cursor-review Trigger multi-model Cursor agent review on this PR greenlight risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants