Skip to content

feat(agent): emit reconnect-success telemetry - #16629

Open
christian-byrne wants to merge 9 commits into
Comfy-Org:christian-byrne/tel11-reconnect-failedfrom
christian-byrne:lane-TEL-10/emit-app-agent-reconnect-succeeded
Open

christian-byrne wants to merge 9 commits into
Comfy-Org:christian-byrne/tel11-reconnect-failedfrom
christian-byrne:lane-TEL-10/emit-app-agent-reconnect-succeeded

Conversation

@christian-byrne

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

Copy link
Copy Markdown
Contributor

Summary

Implements the app:agent_reconnect_succeeded row from the v1 telemetry checklist (reports/telemetry/v1-checklist.md, mtg-29.2 emitted-vs-required diff, follow-up TEL-10). Stacked on #16397 (app:agent_reconnect_failed, TEL-11), which is itself stacked on #16375.

Emits exactly once when a reconnect (socket drop or a server doc_subscribed{ok:false} refusal loop) resolves with a confirmed subscribe, without replacing the follower document. Reuses the disconnect-signal wiring #16397 added for trackAgentReconnectFailed: onReconnected and scheduleSubscribeRetry both arm reconnect-in-flight bookkeeping.

The bookkeeping is one discriminated union (idle / inFlight / pending) with a pure transition in src/workbench/extensions/agent/crdt/reconnectReport.ts, per docs/guidance/state-and-effects.md; the telemetry call is the only effect. The report is deferred past the ok ack, because the relay sends the ack first and the catch-up doc_update (same seq) after it, so emitting at the ack would always report replayed_bytes: 0.

Two guarantees the metric depends on, both enforced by a composable-owned baseline that is null until a subscribe for the current binding has been confirmed once:

  • Only a binding that was connected can report a reconnect. FE-1901's cold start (subscribe, refused, retry, ok) is not a recovery, and neither is a socket reconnect that fires before any binding exists.
  • from_version is that baseline, not bridge.lastSequence. The bridge clears its seq bookkeeping inside reconcile() as soon as a subscribe frame leaves, so it reads 0 by the time a refusal comes back.

Lineage breaks (doc_reset, schema_error) and workflow switches drop the bookkeeping rather than reporting against a seq space that no longer exists.

Properties match the checklist row exactly: attempt, reconnect_duration_ms, replayed_bytes, from_version, to_version. attempt is the sum of TEL-9's socket-reconnect counter and the refusal-retry counter, snapshotted at the ack and floored at 1, so a recovery that used both legs reports both.

Evidence

$ pnpm vitest run src/workbench/extensions/agent
 Test Files  76 passed (76)
      Tests  1009 passed (1009)

$ pnpm typecheck
(clean)

$ pnpm lint
0 errors (189 pre-existing warnings, none in the changed files)

$ pnpm knip
(clean)

$ pnpm format:check
All matched files use the correct format.

Every test added or changed here was verified red-then-green by mutation: reverting each fix in turn fails exactly the test that names it, and restoring from_version = bridge.lastSequence fails 8 tests (it failed 0 before the fake bridge was made to mirror the real reconcile() behaviour).

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 7e0d1ea2-3338-470c-a280-53ed7912c1c7

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.

@christian-byrne christian-byrne changed the title feat(agent): emit app:agent_reconnect_succeeded telemetry (TEL-10) feat(agent): emit reconnect-success telemetry Sep 2, 2026
@christian-byrne
christian-byrne marked this pull request as ready for review September 2, 2026 09:36

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wiring matches the TEL-11 pattern and the v1 checklist field set. Three takeaways:

  1. replayed_bytes is always 0 in production: the counter is cleared at the ok ack, but the relay sends the catch-up doc_update after the ack.
  2. attempt is always 1 on the socket-drop path; the TEL-9 counter on the base branch is the natural source after rebase.
  3. Tests cover only the refusal path; the onReconnected path, workflow switch mid-reconnect, and post-ack catch-up are untested.
Full context for agent readers

Reviewed at head 812f755 against merge-base 93aa811 (stacked on #16397). Ran useAgentCrdtFollower.test.ts locally: 24/24 pass. Verified cloud/services/ingest/server/services/websocket/doc_relay.go L579-595 sends doc_subscribed{ok:true, seq} first and then doc_update{seq, update_b64: MissingB64} only when MissingB64 != "". Verified layoutFollowerBridge.ts on this branch drops update.seq <= lastSeq before dispatch (L180), so the catch-up frame never reaches the follower here; merged #16364 on main (44179c5062, catchUpPending/ackSeq) fixes that, so after rebase the catch-up frame will arrive at onUpdate after the ok ack. Negative control: on this branch, ack seq 7 followed by update seq 7 leaves updatesApplied at 0.

Checklist reference: reports/telemetry/v1-checklist.md defines app:agent_reconnect_succeeded as emitted when "FE applies the catch-up delta and restores the subscribed state", with fields attempt, reconnect_duration_ms, replayed_bytes, from_version, to_version. The PR's field set matches exactly; the emission point does not.

Inline comments: one issue: (replayed_bytes/emission point), two suggestion: (attempt source; test coverage), one question: (first-bind refusal counted as reconnect), one nitpick: (to_version fallback).

Since this is my own PR queue, I will push the fix for the emission point and the test coverage to this branch as a follow-up commit and resolve those threads; the attempt source and the first-bind question stay open for the rebase.

@christian-byrne

christian-byrne commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

The PR had drifted back to CONFLICTING after its base branch advanced; it is rebased and MERGEABLE again at 9416ac8e57ca4b7d68e9219db71dc33e606a009c. Hosted CI is still settling at that head. Do not merge yet: the two owner threads from the previous round are still open and this remains a stacked PR behind #16397.

Full context for agent readers

Replayed the three commits from merge base bc37fb3fcee25bd3c663002aae78b278fe1afe18 onto the current base-branch head dc7934daa18805d7c9d8ea6217463bdb4809976f. The conflict was real, not a phantom CONFLICTING: git merge-tree --write-tree returned rc 1 with stage 1/2/3 blobs for src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts, and that one file was the only conflicted path.

Both hunks were the same seam in onUpdate, and both were context drift rather than a semantic clash. The base branch had grown the early-return guard from a braceless if (...) return into a block body that also increments outcomes.skipped, so the guard's closing brace landed inside the conflict region alongside this branch's reconnect accounting. Resolution keeps the base's } and then this branch's accounting line, which preserves the original ordering exactly: the accounting still runs only for frames that survive the skip guard, never for skipped ones. Commit 2 then replaces that inline accounting with the trackReconnectUpdate(update) helper it introduces, so its resolution keeps the helper call and drops the inline lines it was written to supersede. git range-diff bc37fb3..6de7576 dc7934d..9416ac8 shows the added lines are unchanged in both commits and only surrounding context moved; commit 3 replays byte identical.

Gate evidence at the pushed head, run locally on Node 25:

  • vue-tsc --noEmit -p tsconfig.json exit 0.
  • eslint over all five touched files exit 0.
  • oxfmt --check over the same five files reports all matched files correctly formatted.
  • vitest run src/workbench/extensions/agent/crdt/ src/platform/telemetry/ with NODE_OPTIONS=--no-experimental-webstorage: 57 files, 781 tests passed. The GTM-TEST123 DOMException lines in that output are pre-existing provider noise from GtmTelemetryProvider, not failures.

Grepped for orphans after the resolution: reconnectReplayedBytes survives only inside trackReconnectUpdate and the report snapshot, with no duplicate inline accumulation left at the call site.

Nothing else changed. Review state is unchanged from the previous round: the attempt-counter thread and the first-bind refusal question are still open and both are owner decisions rather than lifecycle work. reviewDecision is empty, so there is no human approval at this head and no merge was performed. Next stage is owner resolution of those threads plus the merge-order decision for #16375 then #16397 then this PR.

@christian-byrne
christian-byrne force-pushed the lane-TEL-10/emit-app-agent-reconnect-succeeded branch from 39ae9c5 to 6de7576 Compare September 2, 2026 11:26
@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/10/2026, 10:04:49 AM UTC

Links

🎭 Playwright: ✅ 1908 passed, 0 failed · 4 flaky

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

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 58.1 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.4 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.0 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 59.9 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 83.3 MB heap
large-graph-pan: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.4 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.5 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.1 MB heap
minimap-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.0 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 83.7 MB heap
subgraph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 65.9 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.1 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 146ms TBT · 100.8 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 90.5 MB heap
vue-large-graph-idle: · 56.3 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 168.4 MB heap
vue-large-graph-pan: · 56.3 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 92ms TBT · 168.9 MB heap
vue-node-resize-workload: · 56.2 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 410ms TBT · 167.2 MB heap
vue-zoom-out-idle: · 55.4 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 169.2 MB heap
workflow-execution: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.7 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 10ms
canvas-idle: layout count 0
canvas-idle: style recalc count 9
canvas-idle: task duration 544ms
canvas-idle: script duration 10ms
canvas-idle: TBT 0ms
canvas-idle: heap used 58.1 MB
canvas-idle: DOM nodes -279
canvas-idle: event listeners -150
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 5ms
canvas-mouse-sweep: style recalc duration 43ms
canvas-mouse-sweep: layout count 14
canvas-mouse-sweep: style recalc count 79
canvas-mouse-sweep: task duration 1006ms
canvas-mouse-sweep: script duration 183ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 70.4 MB
canvas-mouse-sweep: DOM nodes -281
canvas-mouse-sweep: event listeners -182
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 19ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 396ms
canvas-zoom-sweep: script duration 13ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 72.0 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 10
dom-widget-clipping: task duration 462ms
dom-widget-clipping: script duration 165ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 59.9 MB
dom-widget-clipping: DOM nodes 16
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 4ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 4
large-graph-idle: task duration 653ms
large-graph-idle: script duration 39ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 83.3 MB
large-graph-idle: DOM nodes -272
large-graph-idle: event listeners -163
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 11ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 65
large-graph-pan: task duration 1715ms
large-graph-pan: script duration 841ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 84.4 MB
large-graph-pan: DOM nodes -275
large-graph-pan: event listeners 6
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 12ms
large-graph-zoom: style recalc duration 10ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 60
large-graph-zoom: task duration 1763ms
large-graph-zoom: script duration 790ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 72.5 MB
large-graph-zoom: DOM nodes 0
large-graph-zoom: event listeners 10
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 5ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 40
legacy-node-drag: task duration 1999ms
legacy-node-drag: script duration 1001ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 73.1 MB
legacy-node-drag: DOM nodes -140
legacy-node-drag: event listeners 188
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 3ms
minimap-idle: layout count 0
minimap-idle: style recalc count 3
minimap-idle: task duration 570ms
minimap-idle: script duration 33ms
minimap-idle: TBT 0ms
minimap-idle: heap used 84.0 MB
minimap-idle: DOM nodes -275
minimap-idle: event listeners -163
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 11ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 433ms
subgraph-dom-widget-clipping: script duration 148ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 83.7 MB
subgraph-dom-widget-clipping: DOM nodes 19
subgraph-dom-widget-clipping: event listeners 7
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 9ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 541ms
subgraph-idle: script duration 10ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 65.9 MB
subgraph-idle: DOM nodes -295
subgraph-idle: event listeners -211
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 42ms
subgraph-mouse-sweep: layout count 18
subgraph-mouse-sweep: style recalc count 78
subgraph-mouse-sweep: task duration 903ms
subgraph-mouse-sweep: script duration 121ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 63.1 MB
subgraph-mouse-sweep: DOM nodes -297
subgraph-mouse-sweep: event listeners -212
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 16ms
subgraph-transition-enter: style recalc duration 33ms
subgraph-transition-enter: layout count 16
subgraph-transition-enter: style recalc count 20
subgraph-transition-enter: task duration 994ms
subgraph-transition-enter: script duration 33ms
subgraph-transition-enter: TBT 146ms
subgraph-transition-enter: heap used 100.8 MB
subgraph-transition-enter: DOM nodes 13751
subgraph-transition-enter: event listeners 2385
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 38ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 247
viewport-pan-sweep: task duration 6379ms
viewport-pan-sweep: script duration 2934ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 90.5 MB
viewport-pan-sweep: DOM nodes -270
viewport-pan-sweep: event listeners -130
vue-large-graph-idle: avg frame time 18ms
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 18865ms
vue-large-graph-idle: script duration 364ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 168.4 MB
vue-large-graph-idle: DOM nodes -6548
vue-large-graph-idle: event listeners -7473
vue-large-graph-pan: avg frame time 18ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 24ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 176
vue-large-graph-pan: task duration 22160ms
vue-large-graph-pan: script duration 1030ms
vue-large-graph-pan: TBT 92ms
vue-large-graph-pan: heap used 168.9 MB
vue-large-graph-pan: DOM nodes -6550
vue-large-graph-pan: event listeners -7469
vue-node-resize-workload: avg frame time 18ms
vue-node-resize-workload: p95 frame time 17ms
vue-node-resize-workload: layout duration 32ms
vue-node-resize-workload: style recalc duration 88ms
vue-node-resize-workload: layout count 20
vue-node-resize-workload: style recalc count 20
vue-node-resize-workload: task duration 6390ms
vue-node-resize-workload: script duration 121ms
vue-node-resize-workload: TBT 410ms
vue-node-resize-workload: heap used 167.2 MB
vue-node-resize-workload: DOM nodes -6548
vue-node-resize-workload: event listeners -7471
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 8635ms
vue-zoom-out-idle: script duration 162ms
vue-zoom-out-idle: TBT 0ms
vue-zoom-out-idle: heap used 169.2 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 2ms
workflow-execution: style recalc duration 24ms
workflow-execution: layout count 4
workflow-execution: style recalc count 15
workflow-execution: task duration 119ms
workflow-execution: script duration 10ms
workflow-execution: TBT 0ms
workflow-execution: heap used 69.7 MB
workflow-execution: DOM nodes 131
workflow-execution: event listeners 66
Raw data
{
  "timestamp": "2026-09-10T10:14:05.789Z",
  "gitSha": "876e2b880a60446ac436772f62430e53ccb1d934",
  "branch": "lane-TEL-10/emit-app-agent-reconnect-succeeded",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2037.8539999999816,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 9.207000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 520.426,
      "heapDeltaBytes": -9113592,
      "heapUsedBytes": 61572600,
      "domNodes": -279,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 8.963000000000003,
      "eventListeners": -150,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-idle",
      "durationMs": 2048.5439999999926,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 10.334000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 566.8389999999999,
      "heapDeltaBytes": -10584396,
      "heapUsedBytes": 60253784,
      "domNodes": -279,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 11.014000000000003,
      "eventListeners": -150,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2066.225999999972,
      "styleRecalcs": 80,
      "styleRecalcDurationMs": 44.645,
      "layouts": 14,
      "layoutDurationMs": 5.276,
      "taskDurationMs": 1052.474,
      "heapDeltaBytes": 5329988,
      "heapUsedBytes": 75304864,
      "domNodes": -282,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 193.622,
      "eventListeners": -184,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1916.3590000000568,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 41.949,
      "layouts": 14,
      "layoutDurationMs": 5.001,
      "taskDurationMs": 958.841,
      "heapDeltaBytes": 2165452,
      "heapUsedBytes": 72262256,
      "domNodes": -280,
      "jsHeapTotalBytes": 6545408,
      "scriptDurationMs": 171.464,
      "eventListeners": -180,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1716.951999999992,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 16.495,
      "layouts": 6,
      "layoutDurationMs": 1.031,
      "taskDurationMs": 364.305,
      "heapDeltaBytes": 4934088,
      "heapUsedBytes": 75061328,
      "domNodes": 76,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 11.164,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1740.9169999999676,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 20.756999999999998,
      "layouts": 6,
      "layoutDurationMs": 1.3339999999999999,
      "taskDurationMs": 428.462,
      "heapDeltaBytes": 5085428,
      "heapUsedBytes": 75880252,
      "domNodes": 76,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 14.639999999999997,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 717.8789999999822,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 9.373000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 465.34,
      "heapDeltaBytes": -7822076,
      "heapUsedBytes": 62667548,
      "domNodes": 18,
      "jsHeapTotalBytes": 6553600,
      "scriptDurationMs": 165.273,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 698.0009999999766,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 6.292999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 458.909,
      "heapDeltaBytes": -7554660,
      "heapUsedBytes": 62896332,
      "domNodes": 14,
      "jsHeapTotalBytes": 7077888,
      "scriptDurationMs": 163.885,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2032.1860000000243,
      "styleRecalcs": 3,
      "styleRecalcDurationMs": 3.413999999999997,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 619.235,
      "heapDeltaBytes": 22646500,
      "heapUsedBytes": 87945060,
      "domNodes": -270,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 39.51299999999999,
      "eventListeners": -148,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2042.5800000000436,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 4.512000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 685.8770000000001,
      "heapDeltaBytes": 10978920,
      "heapUsedBytes": 86746740,
      "domNodes": -274,
      "jsHeapTotalBytes": -2199552,
      "scriptDurationMs": 38.35899999999999,
      "eventListeners": -178,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2415.519999999958,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 11.055999999999996,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1680.828,
      "heapDeltaBytes": 21954420,
      "heapUsedBytes": 88092028,
      "domNodes": -274,
      "jsHeapTotalBytes": 225280,
      "scriptDurationMs": 827.7610000000001,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2580.812000000037,
      "styleRecalcs": 64,
      "styleRecalcDurationMs": 10.100000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1748.9519999999998,
      "heapDeltaBytes": 23059936,
      "heapUsedBytes": 88923144,
      "domNodes": -275,
      "jsHeapTotalBytes": 225280,
      "scriptDurationMs": 854.3029999999999,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3599.3910000000255,
      "styleRecalcs": 60,
      "styleRecalcDurationMs": 10.075000000000005,
      "layouts": 60,
      "layoutDurationMs": 12.206999999999999,
      "taskDurationMs": 1742.026,
      "heapDeltaBytes": 8493916,
      "heapUsedBytes": 75772184,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 784.391,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3680.425000000014,
      "styleRecalcs": 60,
      "styleRecalcDurationMs": 10.449000000000003,
      "layouts": 60,
      "layoutDurationMs": 12.698,
      "taskDurationMs": 1783.2219999999998,
      "heapDeltaBytes": 8196544,
      "heapUsedBytes": 76170576,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 795.253,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3153.642999999988,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 4.788999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1946.3300000000002,
      "heapDeltaBytes": 656136,
      "heapUsedBytes": 67905828,
      "domNodes": 0,
      "jsHeapTotalBytes": 786432,
      "scriptDurationMs": 991.753,
      "eventListeners": 188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3186.663000000067,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 5.2079999999999975,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2050.981,
      "heapDeltaBytes": 18197736,
      "heapUsedBytes": 85317320,
      "domNodes": -279,
      "jsHeapTotalBytes": 1204224,
      "scriptDurationMs": 1010.6339999999998,
      "eventListeners": 188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2028.1780000000253,
      "styleRecalcs": 3,
      "styleRecalcDurationMs": 2.553,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 573.548,
      "heapDeltaBytes": 10864580,
      "heapUsedBytes": 87772464,
      "domNodes": -275,
      "jsHeapTotalBytes": -2461696,
      "scriptDurationMs": 33.895999999999994,
      "eventListeners": -178,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2006.4519999999675,
      "styleRecalcs": 3,
      "styleRecalcDurationMs": 3.271999999999997,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 565.7769999999999,
      "heapDeltaBytes": 22339172,
      "heapUsedBytes": 88355696,
      "domNodes": -274,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 32.388,
      "eventListeners": -148,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 627.3930000000405,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 11.685999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 419.382,
      "heapDeltaBytes": 14855804,
      "heapUsedBytes": 87362340,
      "domNodes": 20,
      "jsHeapTotalBytes": 4718592,
      "scriptDurationMs": 147.75700000000003,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 624.7570000000451,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 11.232,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 446.79799999999994,
      "heapDeltaBytes": 15190020,
      "heapUsedBytes": 88210324,
      "domNodes": 18,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 149.177,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2036.6719999999532,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 8.604,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 507.97700000000003,
      "heapDeltaBytes": -9156512,
      "heapUsedBytes": 63621532,
      "domNodes": -293,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 8.456000000000001,
      "eventListeners": -196,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2057.327999999984,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 9.901,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 574.66,
      "heapDeltaBytes": 1558628,
      "heapUsedBytes": 74501116,
      "domNodes": -297,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 11.567,
      "eventListeners": -226,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1790.6489999999735,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 43.18,
      "layouts": 18,
      "layoutDurationMs": 6.8870000000000005,
      "taskDurationMs": 900.489,
      "heapDeltaBytes": -16070468,
      "heapUsedBytes": 56847900,
      "domNodes": -298,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 120.715,
      "eventListeners": -196,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1748.0280000000903,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 40.32,
      "layouts": 18,
      "layoutDurationMs": 5.135000000000001,
      "taskDurationMs": 905.417,
      "heapDeltaBytes": 2773836,
      "heapUsedBytes": 75429776,
      "domNodes": -295,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 121.915,
      "eventListeners": -228,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1417.9490000000214,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 32.638,
      "layouts": 16,
      "layoutDurationMs": 16.108999999999998,
      "taskDurationMs": 993.6509999999998,
      "heapDeltaBytes": 21854756,
      "heapUsedBytes": 105726824,
      "domNodes": 13751,
      "jsHeapTotalBytes": 11010048,
      "scriptDurationMs": 32.925000000000004,
      "eventListeners": 2385,
      "totalBlockingTimeMs": 146,
      "frameDurationMs": 16.669999999999952,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 9309.341000000019,
      "styleRecalcs": 247,
      "styleRecalcDurationMs": 37.189,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6331.162,
      "heapDeltaBytes": -6840660,
      "heapUsedBytes": 95284652,
      "domNodes": -268,
      "jsHeapTotalBytes": -659456,
      "scriptDurationMs": 2928.0719999999997,
      "eventListeners": -130,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 9566.667000000052,
      "styleRecalcs": 246,
      "styleRecalcDurationMs": 38.236,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6426.495,
      "heapDeltaBytes": -7482428,
      "heapUsedBytes": 94540096,
      "domNodes": -272,
      "jsHeapTotalBytes": -1445888,
      "scriptDurationMs": 2939.1010000000006,
      "eventListeners": -130,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 20797.753,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 20244.581000000002,
      "heapDeltaBytes": -33335916,
      "heapUsedBytes": 177150152,
      "domNodes": -6548,
      "jsHeapTotalBytes": -3624960,
      "scriptDurationMs": 408.063,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.773333333333238,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18067.85500000001,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17484.793,
      "heapDeltaBytes": -34565528,
      "heapUsedBytes": 175986916,
      "domNodes": -6547,
      "jsHeapTotalBytes": -4907008,
      "scriptDurationMs": 318.98400000000004,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.780000000000047,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 22219.709000000024,
      "styleRecalcs": 178,
      "styleRecalcDurationMs": 23.114999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 21910.184999999998,
      "heapDeltaBytes": -22212752,
      "heapUsedBytes": 187473192,
      "domNodes": -6548,
      "jsHeapTotalBytes": -3682304,
      "scriptDurationMs": 1029.5690000000002,
      "eventListeners": -7469,
      "totalBlockingTimeMs": 58,
      "frameDurationMs": 17.77666666666652,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 22748.857000000044,
      "styleRecalcs": 174,
      "styleRecalcDurationMs": 25.46900000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 22410.764,
      "heapDeltaBytes": -37782668,
      "heapUsedBytes": 166679700,
      "domNodes": -6552,
      "jsHeapTotalBytes": -1355776,
      "scriptDurationMs": 1031.025,
      "eventListeners": -7469,
      "totalBlockingTimeMs": 125,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 6399.201000000005,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 82.24799999999999,
      "layouts": 20,
      "layoutDurationMs": 25.523000000000003,
      "taskDurationMs": 6285.344999999999,
      "heapDeltaBytes": -24892956,
      "heapUsedBytes": 177080224,
      "domNodes": -6548,
      "jsHeapTotalBytes": 14696448,
      "scriptDurationMs": 113.154,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 402,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 6592.5150000000485,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 94.53999999999996,
      "layouts": 20,
      "layoutDurationMs": 39.188,
      "taskDurationMs": 6495.387000000001,
      "heapDeltaBytes": -33831380,
      "heapUsedBytes": 173532808,
      "domNodes": -6547,
      "jsHeapTotalBytes": -1351680,
      "scriptDurationMs": 128.356,
      "eventListeners": -7469,
      "totalBlockingTimeMs": 418,
      "frameDurationMs": 17.780000000000047,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 8948.263999999996,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 8631.183000000003,
      "heapDeltaBytes": 11182408,
      "heapUsedBytes": 180017752,
      "domNodes": 0,
      "jsHeapTotalBytes": -6553600,
      "scriptDurationMs": 150.17499999999995,
      "eventListeners": -12,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 8933.137999999984,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 8638.481000000002,
      "heapDeltaBytes": -229868,
      "heapUsedBytes": 174755256,
      "domNodes": 0,
      "jsHeapTotalBytes": -9699328,
      "scriptDurationMs": 173.43399999999997,
      "eventListeners": -14,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 18.333333333333332,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 485.0289999999404,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 23.8,
      "layouts": 4,
      "layoutDurationMs": 2.1079999999999997,
      "taskDurationMs": 123.914,
      "heapDeltaBytes": 5013412,
      "heapUsedBytes": 73912700,
      "domNodes": 145,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 11.550999999999998,
      "eventListeners": 65,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 483.09100000005856,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 23.745,
      "layouts": 3,
      "layoutDurationMs": 1.155,
      "taskDurationMs": 114.58700000000002,
      "heapDeltaBytes": 4790780,
      "heapUsedBytes": 72237444,
      "domNodes": 117,
      "jsHeapTotalBytes": 786432,
      "scriptDurationMs": 7.9449999999999985,
      "eventListeners": 67,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    }
  ]
}

🔬 E2E Coverage

Metric Covered Total Pct
Lines 49609 74361 66.7% 🟡
Functions 0 0 — —
Branches 0 0 — —
Top 10 files by uncovered lines
File Coverage Missed
src/LGraphCanvas.ts 67.2% 1185
src/LGraphNode.ts 69.4% 396
src/extensions/core/cameraInfo/CameraInfoViewport.ts 2.0% 343
src/renderer/extensions/layerEditor/composables/useLayerEditorSession.ts 40.1% 332
src/platform/workspace/stores/billingOperationStore.ts 8.3% 300
src/platform/workspace/stores/workspaceAuthStore.ts 36.0% 288
src/platform/workspace/stores/teamWorkspaceStore.ts 37.7% 261
src/LGraph.ts 78.6% 260
src/scripts/app.ts 71.8% 251
src/scripts/pnginfo.ts 21.4% 221

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

@christian-byrne The full review will assess the rebased changes in 6de7576, including the reconciled attempt counters and the new regression path.

⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 1 minute.

@codecov

codecov Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.86047% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/platform/telemetry/TelemetryRegistry.ts 0.00% 3 Missing ⚠️
...emetry/providers/cloud/PostHogTelemetryProvider.ts 0.00% 2 Missing ⚠️
...workbench/extensions/agent/crdt/reconnectReport.ts 95.34% 2 Missing ⚠️
@@                           Coverage Diff                           @@
##           christian-byrne/tel11-reconnect-failed   #16629   +/-   ##
=======================================================================
  Coverage                                   82.77%   82.77%           
=======================================================================
  Files                                        2049     2050    +1     
  Lines                                      119522   119608   +86     
  Branches                                    32694    32626   -68     
=======================================================================
+ Hits                                        98931    99008   +77     
- Misses                                      20410    20419    +9     
  Partials                                      181      181           
Flag Coverage Δ
e2e 66.70% <ø> (-0.01%) ⬇️
unit 77.26% <91.86%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
src/platform/telemetry/types.ts 97.05% <ø> (ø)
...ench/extensions/agent/crdt/useAgentCrdtFollower.ts 97.27% <100.00%> (+0.28%) ⬆️
...emetry/providers/cloud/PostHogTelemetryProvider.ts 66.44% <0.00%> (-0.44%) ⬇️
...workbench/extensions/agent/crdt/reconnectReport.ts 95.34% <95.34%> (ø)
src/platform/telemetry/TelemetryRegistry.ts 34.37% <0.00%> (-0.66%) ⬇️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Emits app:agent_reconnect_succeeded exactly once when a reconnect
(socket drop or a server doc_subscribed{ok:false} refusal loop)
resolves with a confirmed subscribe, without replacing the follower
document. Shares the disconnect-signal wiring TEL-11 added for
app:agent_reconnect_failed: onReconnected and scheduleSubscribeRetry
both arm the same reconnect-in-flight bookkeeping (start time,
from_version baseline, replayed-bytes accumulator), cleared by the
same confirmed-subscribe branch that clears the retry timer, so a
first-ever bind (no prior disconnect signal) never reports a
reconnect.

Properties: attempt, reconnect_duration_ms, replayed_bytes,
from_version, to_version -- matches the v1 checklist row exactly
(reports/telemetry/v1-checklist.md).

New tests: reconnect success reports once with normalized metadata,
a second independent reconnect cycle reports again (no stale
bookkeeping), and a first-ever bind does not report success.
The relay sends doc_subscribed{ok:true} first and the catch-up doc_update
(same seq) after it, so emitting at the ack always reported
replayed_bytes: 0. The ok ack now turns the bookkeeping into a pending
report that is flushed by the catch-up frame, by the first live frame
above the ack seq (no catch-up was needed), by the stale probe re-ack,
or by a workflow switch / unmount. attempt, duration and to_version are
snapshotted at the ack so the wait does not stretch the duration.

Tests: rewrite the refusal-path test for the deferred model and add the
socket-drop path, zero-byte live flush, stale-probe flush, and workflow
switch (armed-only vs pending) cases.
Rebasing onto TEL-9 (`app:agent_reconnect_started`, bc37fb3) put two
different meanings on one `reconnectAttempt` variable: TEL-9's live
socket-reconnect counter and TEL-10's attempt snapshot for the deferred
success report. They are now separate (`reconnectReportAttempt` holds the
snapshot), and the success report counts BOTH recovery legs — the socket
drop's immediate resubscribe plus every refusal-driven retry — instead of
only the refusal retries.

This test pins that resolution: a socket drop, a server refusal, then a
confirmed subscribe reports `attempt: 2`, and the next socket drop still
reports `attempt: 1` because the snapshot no longer consumes TEL-9's
counter.

Tests: pnpm exec vitest run src/workbench/extensions/agent/crdt
@christian-byrne
christian-byrne force-pushed the lane-TEL-10/emit-app-agent-reconnect-succeeded branch from 6de7576 to 9416ac8 Compare September 5, 2026 09:27

@benjcooley benjcooley left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review: feat(agent): emit reconnect-success telemetry

Reviewed against the head commit with LayoutFollowerBridge / DocFrameClient read in full, since the composable's correctness here depends entirely on their seq bookkeeping.

Severity Count
BLOCKER 2
SHOULD FIX 6
TRIVIAL 1

The two blockers

1. A first-ever bind that is refused once reports a reconnect success. scheduleSubscribeRetry arms reconnect tracking on any doc_subscribed{ok:false}, and FE-1901's documented reason for that refusal loop is a cold-start race — the subscribe beating the doc-host's mint. So open panel → refused → retry → ok emits app:agent_reconnect_succeeded. The PR description asserts this cannot happen; the first-ever bind test only exercises the un-refused bind, so it proves a guard that isn't in the code.

2. from_version is always 0 on that same refusal path. bridge.lastSequence is lastSeq ?? ackSeq ?? 0, and reconcile() nulls both when the subscribe frame leaves. A refusal is the answer to that subscribe, so armReconnectTracking() reads 0. Only the socket-drop path (which arms before bridge.resubscribe()) captures a real baseline. to_version - from_version is the reason both fields are on the row, and on this path it is always the whole seq.

Both are invisible to the suite because FakeBridge.lastSequence is a static field that resubscribe() never resets — the mock removes the exact bridge behaviour the feature depends on.

Also worth addressing

  • An ok ack with no seq (the field is optional on the wire) emits to_version: 0 against a non-zero from_version — a version that moved backwards.
  • Pre-ack frames are counted as replayed_bytes wholesale, though the bridge explicitly documents that a live frame N+1 can overtake the ack. The post-ack branch guards against exactly this; the pre-ack branch doesn't.
  • onDocReset / onSchemaError leave a pending report armed with an ack seq from a dead lineage, and both clear the stale probe that would otherwise flush it.
  • The reconnect bookkeeping is a three-state machine spread across seven mutable lets and five mutating helpers, against docs/guidance/state-and-effects.md. The lineage-break gap above is a direct consequence of the invariants living in convention rather than in the type.

What's good

The deferred-report design is the right call — emitting at the ack really would have pinned replayed_bytes to 0 — and snapshotting attempt/duration/to_version at the ack so the wait for the catch-up doesn't stretch the duration is a genuinely subtle thing to get right. The flush-on-every-exit-path discipline (retarget watch, unmount, re-arm) is thorough, and the telemetry plumbing across types.ts / registry / PostHog provider matches the existing rows exactly.

Note on the stack

The PR body flags that this branch was deliberately not rebased onto bc37fb3 (TEL-9's reconnectAttempt counter) on the base branch. The attempt computation here already reads that counter, so the merge order isn't cosmetic — whoever lands second needs to re-verify Math.max(1, reconnectAttempt + subscribeRetryAttempt) against whatever TEL-9's counter means at that point.

Seven mutable `let`s and five mutating helpers held one three-phase
workflow (idle -> in-flight -> pending-report), with the invariants tying
them together enforced only by convention across the helpers. Replace
them with a discriminated union and a pure transition in its own module,
per docs/guidance/state-and-effects.md, leaving the telemetry emit as the
only effect at the edge.

Behaviour-preserving: the existing suite passes unchanged.

Addresses review feedback:
Comfy-Org#16629 (comment)
Arming on any `doc_subscribed{ok:false}` made FE-1901's ordinary cold
start - subscribe, refused, retry, ok - report an
`app:agent_reconnect_succeeded` for a connection that never existed, and
`onReconnected` armed even with no subscribe intent at all. The baseline
was also read off `bridge.lastSequence` at arm time, which `reconcile()`
has already zeroed by then, so every refusal-armed row carried
`from_version: 0`.

Hold the baseline in the composable instead - set by a confirmed ack,
advanced by each applied frame, `null` until the binding is confirmed
once - and arm only when it exists. `null` is both "where were we" and
"was this ever bound", so the two defects share one guard.

The `from_version` assertions could not see this because the fake
bridge's `lastSequence` was a static field no subscribe ever touched;
it now mirrors the real bridge and the assertions fail without the fix.

Addresses review feedback:
Comfy-Org#16629 (comment)
Comfy-Org#16629 (comment)
Comfy-Org#16629 (comment)
Comfy-Org#16629 (comment)
Comfy-Org#16629 (comment)
`DocSubscribed.seq` is optional and the client only sets it for a numeric
wire value, so the branch is reachable and emitted e.g.
`from_version: 41, to_version: 0` - a version that moved backwards, which
reads as corruption rather than as "unknown".

Addresses review feedback:
Comfy-Org#16629 (comment)
The relay joins the fanout before it acks - the reason
`LayoutFollowerBridge.catchUpPending` exists - so a live frame can reach
the follower ahead of `doc_subscribed(seq=N)`. Those frames were added to
`replayed_bytes` wholesale, the same mistake the post-ack branch avoided.
Buffer them until the ack can classify them, then fold in only the ones
the ack covers; a buffered frame at the ack seq is the catch-up itself,
so the report needs nothing further.

Addresses review feedback:
Comfy-Org#16629 (comment)
`onDocReset` and `onSchemaError` both clear the stale probe - the only
thing that would otherwise flush a pending report - but left the
reconnect state alone. After a `doc_reset` the seq space restarts, so the
pending ack seq referred to a doc that no longer existed and new-lineage
frames were folded into the old lineage's `replayed_bytes`. Neither event
is a reconnect success, so both now drop the bookkeeping unreported, and
`doc_reset` also drops the baseline with the lineage.

Addresses review feedback:
Comfy-Org#16629 (comment)
TEL-9's counter only reset on a confirmed subscribe, so a recovery armed
and then abandoned by a workflow switch left it elevated and the next
workflow's first recovery reported `attempt: 2`. This PR is the second
consumer of that counter, so reset it alongside the rest of the binding's
bookkeeping.

Addresses review feedback:
Comfy-Org#16629 (comment)

@benjcooley benjcooley left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Scoped follow-up review of the five commits after 9416ac8. The original nine threads are addressed and resolved, including both prior blockers. One new telemetry-correctness blocker remains in the replacement baseline logic.

Severity Count
BLOCKER 1
SHOULD FIX 0
TRIVIAL 0

CI is green at 3216abf; the missing regression is the socket dropping after an ok ack but before its catch-up frame is applied.

// panel's first-ever bind it merely establishes the baseline below.
const seq = event.detail?.seq
onReconnectConfirmed(typeof seq === 'number' ? seq : null)
confirmedVersion =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

BLOCKER — confirmedVersion advances at the ack even though the bridge explicitly documents that ackSeq is not an applied baseline: the catch-up at that seq may still be in flight. If the socket drops after doc_subscribed(seq: 43) but before doc_update(seq: 43), the next recovery arms from 43 while the follower is still at 41; isReplay then excludes the required seq-43 catch-up and reports from_version: 43, to_version: 43, replayed_bytes: 0. Keep “this binding was confirmed” separate from the last applied version, and advance the latter only in onUpdate. Add the ack → socket-drop → catch-up regression case.

@DrJKL DrJKL added agent Comfy Agent product, integration, tests or product documentation agent-crdt Agent document synchronization, graph projection or CRDT operations agent-telemetry Agent analytics, diagnostics, error reporting or observability agent-test-unit Touches Agent-related unit/component tests or their support labels Sep 24, 2026
@mrseek-reviews

Copy link
Copy Markdown
Contributor

Not closing, but flagging before more of this lands.

This PR adds telemetry that measures a disagreement between two implementations of the same behaviour rather than removing the second implementation. The survey found twelve open PRs in this shape. Each metric exists because the agent path and the user path can diverge, and each will read zero by construction once they share a channel: widget writes through BaseWidget.setValue (FE-3395), restore through configure (FE-3396), one per-node load unit (FE-3397), subgraph definitions in one batch (FE-3401).

What this PR measures: app:agent_reconnect_succeeded, stacked on #16397's reconnect bookkeeping.

The retirement plan is FE-3586: list every drift event, and for each either the PR that deleted it or the reason it still carries information after that work. Genuine failure reporting goes through reportError (FE-3400) and the consolidated diagnostics channel (FE-3407, #20895).

Recommendation: same as #16397; also note the base branch is another PR, so this cannot merge independently.

Context: FE-3387 (Agent/CRDT alignment programme) and the open-PR survey of 2026-10-22 (thread). Posted for DrJKL.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Comfy Agent product, integration, tests or product documentation agent-crdt Agent document synchronization, graph projection or CRDT operations agent-telemetry Agent analytics, diagnostics, error reporting or observability agent-test-unit Touches Agent-related unit/component tests or their support cursor-review Trigger multi-model Cursor agent review on this PR flag-exempt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants