Skip to content

fix(agent): surface host op nacks and projection failures (FEB-6) - #16278

Closed
christian-byrne wants to merge 2 commits into
nathaniel/agent-panel-v1from
fix/feb6-op-outcome-surfacing
Closed

christian-byrne wants to merge 2 commits into
nathaniel/agent-panel-v1from
fix/feb6-op-outcome-surfacing

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor
  • Host op nacks (ok:false) now surface: status field + dev-panel metric + console.error — no more silent drops
  • Projection throws no longer vanish in EventTarget dispatch — reported, counted, canvas-lag made visible
  • Never rolls back: host applies the valid prefix before nacking; this PR only adds observability
Full context for agent readers

Problem (FEB-6 / s1-D)

Two silent failure paths in the CRDT follower:

  1. Host op nack: doc_ops_result with ok:false was recorded into a dev-panel-only tap (lastOpsResult + doc_ops_result dev event) and nothing else. No status change, no error path, no metric. An agent or human whose ops were rejected saw nothing.
  2. Projection throw: projector.project(...) ran bare inside EventTarget listeners; a throw was swallowed by the dispatch path from every caller's perspective — canvas silently lagging the doc.

Fix

New pure module opOutcome.ts:

  • classifyOpsResult(detail): OpNack | null — nack summary (workflowId, code, message, verbatim failed, applied-prefix count, skipped count) on ok:false; null on clean/malformed.
  • runProjection(project, report) — try/catch wrapper; reports and returns 0 on throw. No retry: SemanticProjector advances its snapshot before applying, so a retry would double-apply the successful prefix.

Wired into useAgentCrdtFollower.ts:

  • onOpsResult promotes nacks: opNacks counter, lastOpNack in status, op_nack dev event, console.error.
  • Both projection call sites (onUpdate, pocGlobal.project) go through projectDoc() → projection_error dev event + projectionErrors counter + console.error.
  • AgentCrdtStatus gains opNacks, lastOpNack, projectionErrors (poc status getter + composable computed both updated).

Semantics (deliberate)

ok:false means "a failure exists", not "nothing landed". The host applies the valid prefix, then broadcasts. The applied prefix is NEVER rolled back — this PR is pure observability. Counters are per-mount and monotonic (not cleared on workflow switch/reset) so a nack that raced a switch stays visible. This seam is the ledger input for the future pending-op ledger (op_id = correlation key); a failed projection means the canvas may lag until the next update/resubscribe — recovery is that later work's territory, deliberately out of scope here.

host doc_ops_result (ok:false, applied prefix kept)
        │
        ▼
onOpsResult ──▶ classifyOpsResult ──▶ OpNack
        │                               ├─▶ status.opNacks / lastOpNack
        │                               ├─▶ dev event 'op_nack'
        │                               └─▶ console.error
doc_update ──▶ projectDoc() = runProjection(projector.project)
        │            └─ throw ─▶ status.projectionErrors
        │                        dev event 'projection_error'
        │                        console.error (canvas may lag)
        ▼
   (no rollback, no retry — observability only)

Files

  • src/workbench/extensions/agent/crdt/opOutcome.ts (new) + opOutcome.test.ts (new, 7 tests)
  • src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts — wiring + status fields
  • src/workbench/extensions/agent/crdt/devPanelLog.ts — op_nack, projection_error event kinds
  • src/workbench/extensions/agent/crdt/docFrameClient.ts — export DocOpsResult

Verification

  • pnpm vitest run src/workbench/extensions/agent/crdt/ — 71/71 green (10 files)
  • vue-tsc --noEmit — clean
  • eslint + oxfmt clean on all touched files
  • Pre-existing base issues untouched: processedWidgetRenderModel.ts format-check failure exists on base

Provenance

Branch cut from 583ad3b400 (nathaniel/agent-panel-v1 head). Fix designed from the recut audit of the merged CRDT source only; no external design material consulted. KA-6 respected: no follower writes introduced.

Glossary

  • FEB-6 / s1-D: follower error-budget audit item — op-outcome surfacing slice
  • nack: host rejection of (part of) an op batch, ok:false on doc_ops_result
  • applied prefix: ops the host DID apply before the failing one — kept, never rolled back
  • projection: folding the Yjs doc into litegraph canvas mutations (SemanticProjector)
  • poc global: window.__agentCrdtPoc dev handle mirroring composable status
  • KA-6: invariant — the follower never writes to the doc

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 30, 2026
@coderabbitai

coderabbitai Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 25 minutes.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7b3a0d1e-8cea-40b9-ad1b-8e7922183124

📥 Commits

Reviewing files that changed from the base of the PR and between 583ad3b and 7e5f900.

📒 Files selected for processing (6)
  • src/renderer/extensions/vueNodes/composables/processedWidgetRenderModel.ts
  • src/workbench/extensions/agent/crdt/devPanelLog.ts
  • src/workbench/extensions/agent/crdt/docFrameClient.ts
  • src/workbench/extensions/agent/crdt/opOutcome.test.ts
  • src/workbench/extensions/agent/crdt/opOutcome.ts
  • src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts

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

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ❌ 1908 passed, 53 failed · 1 flaky

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 1897 / ❌ 48 / ⚠️ 1 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 8 / ❌ 5 / ⚠️ 0 / ⏭️ 0)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 08/30/2026, 05:55:42 AM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 94.8 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 85.4 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 97.8 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 99.3 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 115.7 MB heap
large-graph-pan: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 94.3 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 108.1 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 24ms TBT · 109.2 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 104.5 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 87.7 MB heap
subgraph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 95.3 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 99.1 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 136ms TBT · 111.1 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 95.6 MB heap
vue-large-graph-idle: · 56.2 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 191.3 MB heap
vue-large-graph-pan: · 56.3 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 175ms TBT · 194.7 MB heap
workflow-execution: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 92.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 7ms
canvas-idle: layout count 0
canvas-idle: style recalc count 7
canvas-idle: task duration 538ms
canvas-idle: script duration 11ms
canvas-idle: TBT 0ms
canvas-idle: heap used 94.8 MB
canvas-idle: DOM nodes 14
canvas-idle: event listeners 6
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 45ms
canvas-mouse-sweep: layout count 14
canvas-mouse-sweep: style recalc count 83
canvas-mouse-sweep: task duration 1218ms
canvas-mouse-sweep: script duration 163ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 85.4 MB
canvas-mouse-sweep: DOM nodes 65
canvas-mouse-sweep: event listeners 5
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 20ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 433ms
canvas-zoom-sweep: script duration 15ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 97.8 MB
canvas-zoom-sweep: DOM nodes 76
canvas-zoom-sweep: event listeners 21
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 7ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 11
dom-widget-clipping: task duration 722ms
dom-widget-clipping: script duration 149ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 99.3 MB
dom-widget-clipping: DOM nodes 14
dom-widget-clipping: event listeners 3
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 550ms
large-graph-idle: script duration 40ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 115.7 MB
large-graph-idle: DOM nodes 8
large-graph-idle: event listeners 4
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 2547ms
large-graph-pan: script duration 908ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 94.3 MB
large-graph-pan: DOM nodes 5
large-graph-pan: event listeners 8
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 66
large-graph-zoom: task duration 2536ms
large-graph-zoom: script duration 863ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 108.1 MB
large-graph-zoom: DOM nodes 24
large-graph-zoom: event listeners 11
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 41
legacy-node-drag: task duration 3693ms
legacy-node-drag: script duration 1033ms
legacy-node-drag: TBT 24ms
legacy-node-drag: heap used 109.2 MB
legacy-node-drag: DOM nodes 1
legacy-node-drag: event listeners 192
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 588ms
minimap-idle: script duration 41ms
minimap-idle: TBT 0ms
minimap-idle: heap used 104.5 MB
minimap-idle: DOM nodes 6
minimap-idle: event listeners 6
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 46
subgraph-dom-widget-clipping: task duration 541ms
subgraph-dom-widget-clipping: script duration 142ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 87.7 MB
subgraph-dom-widget-clipping: DOM nodes 17
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 10ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 9
subgraph-idle: task duration 501ms
subgraph-idle: script duration 9ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 95.3 MB
subgraph-idle: DOM nodes 18
subgraph-idle: event listeners 6
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 7ms
subgraph-mouse-sweep: style recalc duration 44ms
subgraph-mouse-sweep: layout count 18
subgraph-mouse-sweep: style recalc count 80
subgraph-mouse-sweep: task duration 1152ms
subgraph-mouse-sweep: script duration 124ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 99.1 MB
subgraph-mouse-sweep: DOM nodes 68
subgraph-mouse-sweep: event listeners 5
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 32ms
subgraph-transition-enter: layout count 14
subgraph-transition-enter: style recalc count 18
subgraph-transition-enter: task duration 1024ms
subgraph-transition-enter: script duration 35ms
subgraph-transition-enter: TBT 136ms
subgraph-transition-enter: heap used 111.1 MB
subgraph-transition-enter: DOM nodes 12115
subgraph-transition-enter: event listeners 782
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 39ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 248
viewport-pan-sweep: task duration 9253ms
viewport-pan-sweep: script duration 3132ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 95.6 MB
viewport-pan-sweep: DOM nodes -282
viewport-pan-sweep: event listeners -179
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 17782ms
vue-large-graph-idle: script duration 349ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 191.3 MB
vue-large-graph-idle: DOM nodes -6548
vue-large-graph-idle: event listeners -7460
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 23ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 179
vue-large-graph-pan: task duration 22269ms
vue-large-graph-pan: script duration 961ms
vue-large-graph-pan: TBT 175ms
vue-large-graph-pan: heap used 194.7 MB
vue-large-graph-pan: DOM nodes -6548
vue-large-graph-pan: event listeners -7447
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 2ms
workflow-execution: style recalc duration 26ms
workflow-execution: layout count 4
workflow-execution: style recalc count 15
workflow-execution: task duration 134ms
workflow-execution: script duration 8ms
workflow-execution: TBT 0ms
workflow-execution: heap used 92.8 MB
workflow-execution: DOM nodes 130
workflow-execution: event listeners 74
Raw data
{
  "timestamp": "2026-08-30T06:17:28.481Z",
  "gitSha": "884f4c038e3db3f67b83993da0474efa94e8097d",
  "branch": "fix/feb6-op-outcome-surfacing",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2034.9810000000161,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 8.171000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 558.341,
      "heapDeltaBytes": 3434936,
      "heapUsedBytes": 99648432,
      "domNodes": 14,
      "jsHeapTotalBytes": 6291456,
      "scriptDurationMs": 10.531000000000002,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 2042.6599999999553,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 6.738000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 517.1360000000001,
      "heapDeltaBytes": 2925604,
      "heapUsedBytes": 99108452,
      "domNodes": 14,
      "jsHeapTotalBytes": 6553600,
      "scriptDurationMs": 10.477,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2145.353,
      "styleRecalcs": 83,
      "styleRecalcDurationMs": 45.533,
      "layouts": 14,
      "layoutDurationMs": 5.078,
      "taskDurationMs": 1172.5379999999998,
      "heapDeltaBytes": -7778936,
      "heapUsedBytes": 89108156,
      "domNodes": 66,
      "jsHeapTotalBytes": 7340032,
      "scriptDurationMs": 156.78900000000002,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2221.160999999938,
      "styleRecalcs": 82,
      "styleRecalcDurationMs": 45.283,
      "layouts": 14,
      "layoutDurationMs": 5.021,
      "taskDurationMs": 1262.97,
      "heapDeltaBytes": -7089968,
      "heapUsedBytes": 89938424,
      "domNodes": 63,
      "jsHeapTotalBytes": 7340032,
      "scriptDurationMs": 169.64100000000002,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666696,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1718.0030000000102,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 18.76,
      "layouts": 6,
      "layoutDurationMs": 1.099,
      "taskDurationMs": 431.72599999999994,
      "heapDeltaBytes": 5466908,
      "heapUsedBytes": 102418836,
      "domNodes": 76,
      "jsHeapTotalBytes": 6291456,
      "scriptDurationMs": 15.109000000000002,
      "eventListeners": 21,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1771.7420000000175,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 22.130000000000003,
      "layouts": 6,
      "layoutDurationMs": 1.5230000000000001,
      "taskDurationMs": 435.251,
      "heapDeltaBytes": 5499252,
      "heapUsedBytes": 102752356,
      "domNodes": 76,
      "jsHeapTotalBytes": 6029312,
      "scriptDurationMs": 14.153999999999996,
      "eventListeners": 21,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 940.2220000000057,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 5.851999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 695.775,
      "heapDeltaBytes": 7017404,
      "heapUsedBytes": 104120536,
      "domNodes": 14,
      "jsHeapTotalBytes": 7602176,
      "scriptDurationMs": 145.754,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 1032.4439999999413,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 7.565000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 748.3409999999999,
      "heapDeltaBytes": 7319384,
      "heapUsedBytes": 104131700,
      "domNodes": 14,
      "jsHeapTotalBytes": 6815744,
      "scriptDurationMs": 152.23600000000002,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2005.9170000000108,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 4.253,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 552.685,
      "heapDeltaBytes": 16907840,
      "heapUsedBytes": 121575180,
      "domNodes": 8,
      "jsHeapTotalBytes": 3670016,
      "scriptDurationMs": 37.959999999999994,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2008.7009999999736,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 3.5849999999999977,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 546.966,
      "heapDeltaBytes": 16644356,
      "heapUsedBytes": 121093208,
      "domNodes": 8,
      "jsHeapTotalBytes": 3670016,
      "scriptDurationMs": 41.867999999999995,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-pan",
      "durationMs": 3312.006999999994,
      "styleRecalcs": 64,
      "styleRecalcDurationMs": 9.717,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2510.7800000000007,
      "heapDeltaBytes": -6561072,
      "heapUsedBytes": 98645484,
      "domNodes": 4,
      "jsHeapTotalBytes": 4718592,
      "scriptDurationMs": 899.723,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 3318.0939999999737,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 11.821000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2582.272,
      "heapDeltaBytes": -5748928,
      "heapUsedBytes": 99168988,
      "domNodes": 6,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 915.435,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 4436.6819999999625,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 12.129999999999999,
      "layouts": 60,
      "layoutDurationMs": 13.081,
      "taskDurationMs": 2542.6580000000004,
      "heapDeltaBytes": 3525512,
      "heapUsedBytes": 113505864,
      "domNodes": 24,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 864.2439999999999,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 4345.252000000073,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 12.17,
      "layouts": 60,
      "layoutDurationMs": 13.136,
      "taskDurationMs": 2529.995,
      "heapDeltaBytes": 2690604,
      "heapUsedBytes": 113185536,
      "domNodes": 24,
      "jsHeapTotalBytes": 4718592,
      "scriptDurationMs": 862.234,
      "eventListeners": 12,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 4857.259999999997,
      "styleRecalcs": 41,
      "styleRecalcDurationMs": 5.153999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3700.4159999999997,
      "heapDeltaBytes": 18558204,
      "heapUsedBytes": 130005848,
      "domNodes": 2,
      "jsHeapTotalBytes": 6447104,
      "scriptDurationMs": 1031.077,
      "eventListeners": 192,
      "totalBlockingTimeMs": 16,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 4953.667999999993,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 4.462999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3686.486,
      "heapDeltaBytes": -13185896,
      "heapUsedBytes": 99102292,
      "domNodes": 0,
      "jsHeapTotalBytes": 6815744,
      "scriptDurationMs": 1033.935,
      "eventListeners": 192,
      "totalBlockingTimeMs": 31,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2027.3679999999672,
      "styleRecalcs": 3,
      "styleRecalcDurationMs": 3.6649999999999983,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 644.5840000000001,
      "heapDeltaBytes": -9985784,
      "heapUsedBytes": 96082648,
      "domNodes": 6,
      "jsHeapTotalBytes": 3932160,
      "scriptDurationMs": 41.21999999999999,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 1995.6999999999425,
      "styleRecalcs": 3,
      "styleRecalcDurationMs": 2.8460000000000014,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 531.676,
      "heapDeltaBytes": 16742468,
      "heapUsedBytes": 123098392,
      "domNodes": 6,
      "jsHeapTotalBytes": 3670016,
      "scriptDurationMs": 41.288999999999994,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 760.3760000000079,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 11.725000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 561.659,
      "heapDeltaBytes": -5412312,
      "heapUsedBytes": 92491572,
      "domNodes": 18,
      "jsHeapTotalBytes": 7077888,
      "scriptDurationMs": 143.888,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 731.2650000000076,
      "styleRecalcs": 45,
      "styleRecalcDurationMs": 9.789000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 519.9250000000001,
      "heapDeltaBytes": -6160660,
      "heapUsedBytes": 91507632,
      "domNodes": 16,
      "jsHeapTotalBytes": 7340032,
      "scriptDurationMs": 141.006,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2038.2469999999557,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 9.873,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 521.4300000000001,
      "heapDeltaBytes": 2805240,
      "heapUsedBytes": 100268160,
      "domNodes": 18,
      "jsHeapTotalBytes": 6815744,
      "scriptDurationMs": 9.236999999999998,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2022.2149999999601,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 9.590000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 480.972,
      "heapDeltaBytes": 2822016,
      "heapUsedBytes": 99653528,
      "domNodes": 18,
      "jsHeapTotalBytes": 6291456,
      "scriptDurationMs": 8.924000000000001,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1889.3940000000384,
      "styleRecalcs": 80,
      "styleRecalcDurationMs": 42.523999999999994,
      "layouts": 18,
      "layoutDurationMs": 6.708,
      "taskDurationMs": 1120.448,
      "heapDeltaBytes": 6665940,
      "heapUsedBytes": 103248620,
      "domNodes": 68,
      "jsHeapTotalBytes": 7340032,
      "scriptDurationMs": 119.75699999999999,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1957.7500000000327,
      "styleRecalcs": 80,
      "styleRecalcDurationMs": 44.842000000000006,
      "layouts": 18,
      "layoutDurationMs": 6.422,
      "taskDurationMs": 1184.29,
      "heapDeltaBytes": 7064776,
      "heapUsedBytes": 104570364,
      "domNodes": 68,
      "jsHeapTotalBytes": 6815744,
      "scriptDurationMs": 128.042,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1443.4820000000173,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 31.78199999999999,
      "layouts": 14,
      "layoutDurationMs": 14.263000000000002,
      "taskDurationMs": 1023.9019999999998,
      "heapDeltaBytes": -4680852,
      "heapUsedBytes": 116476044,
      "domNodes": 12115,
      "jsHeapTotalBytes": -3780608,
      "scriptDurationMs": 34.62,
      "eventListeners": 782,
      "totalBlockingTimeMs": 136,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 12568.241999999998,
      "styleRecalcs": 247,
      "styleRecalcDurationMs": 37.577,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 9186.782000000001,
      "heapDeltaBytes": 4172376,
      "heapUsedBytes": 108656260,
      "domNodes": -282,
      "jsHeapTotalBytes": -2801664,
      "scriptDurationMs": 3066.8240000000005,
      "eventListeners": -187,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 12507.970999999998,
      "styleRecalcs": 248,
      "styleRecalcDurationMs": 39.821000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 9319.608,
      "heapDeltaBytes": -11237852,
      "heapUsedBytes": 91807972,
      "domNodes": -281,
      "jsHeapTotalBytes": -634880,
      "scriptDurationMs": 3197.0499999999997,
      "eventListeners": -171,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18510.283000000014,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17811.464999999997,
      "heapDeltaBytes": -21307832,
      "heapUsedBytes": 202984736,
      "domNodes": -6548,
      "jsHeapTotalBytes": 17645568,
      "scriptDurationMs": 347.187,
      "eventListeners": -7459,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.779999999999927,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18449.367000000053,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17753.046000000002,
      "heapDeltaBytes": -26325764,
      "heapUsedBytes": 198107260,
      "domNodes": -6548,
      "jsHeapTotalBytes": 12402688,
      "scriptDurationMs": 350.506,
      "eventListeners": -7461,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.779999999999927,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 22704.13500000001,
      "styleRecalcs": 182,
      "styleRecalcDurationMs": 23.96300000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 22381.873,
      "heapDeltaBytes": -7642736,
      "heapUsedBytes": 213782004,
      "domNodes": -6548,
      "jsHeapTotalBytes": 11329536,
      "scriptDurationMs": 930.081,
      "eventListeners": -7449,
      "totalBlockingTimeMs": 127,
      "frameDurationMs": 17.77666666666652,
      "p95FrameDurationMs": 16.700000000004366
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 22436.148,
      "styleRecalcs": 175,
      "styleRecalcDurationMs": 22.633000000000013,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 22155.871000000003,
      "heapDeltaBytes": -21628812,
      "heapUsedBytes": 194438928,
      "domNodes": -6548,
      "jsHeapTotalBytes": 8589312,
      "scriptDurationMs": 991.3879999999999,
      "eventListeners": -7445,
      "totalBlockingTimeMs": 223,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "workflow-execution",
      "durationMs": 157.40699999992103,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 22.905,
      "layouts": 3,
      "layoutDurationMs": 1.8499999999999999,
      "taskDurationMs": 110.60899999999998,
      "heapDeltaBytes": 3886164,
      "heapUsedBytes": 96602724,
      "domNodes": 112,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 5.469,
      "eventListeners": 51,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 484.17699999993147,
      "styleRecalcs": 19,
      "styleRecalcDurationMs": 28.246999999999996,
      "layouts": 4,
      "layoutDurationMs": 1.8000000000000003,
      "taskDurationMs": 157.42800000000003,
      "heapDeltaBytes": 5836784,
      "heapUsedBytes": 97993824,
      "domNodes": 147,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 11.285,
      "eventListeners": 97,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    }
  ]
}

@comfy-pr-bot
comfy-pr-bot requested a review from a team as a code owner August 30, 2026 05:53
@github-actions github-actions Bot added the risk:R2 PR risk grade (advisory shadow check; grader-owned) label Aug 30, 2026
@codecov

codecov Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.14286% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ench/extensions/agent/crdt/useAgentCrdtFollower.ts 16.66% 15 Missing ⚠️
@@                     Coverage Diff                      @@
##           nathaniel/agent-panel-v1   #16278      +/-   ##
============================================================
+ Coverage                     80.67%   82.99%   +2.32%     
============================================================
  Files                          2339     2010     -329     
  Lines                        120790   115787    -5003     
  Branches                      35560    33912    -1648     
============================================================
- Hits                          97444    96095    -1349     
+ Misses                        22849    19352    -3497     
+ Partials                        497      340     -157     
Flag Coverage Δ
e2e 66.94% <ø> (+0.04%) ⬆️
unit 75.87% <57.14%> (+0.07%) ⬆️
website-unit ?

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

Files with missing lines Coverage Δ
...vueNodes/composables/processedWidgetRenderModel.ts 97.12% <ø> (ø)
src/workbench/extensions/agent/crdt/devPanelLog.ts 28.57% <ø> (ø)
.../workbench/extensions/agent/crdt/docFrameClient.ts 90.00% <ø> (ø)
src/workbench/extensions/agent/crdt/opOutcome.ts 100.00% <100.00%> (ø)
...ench/extensions/agent/crdt/useAgentCrdtFollower.ts 7.49% <16.66%> (+0.71%) ⬆️

... and 351 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.

@christian-byrne christian-byrne added the cursor-review Trigger multi-model Cursor agent review on this PR label Aug 30, 2026

@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 10 finding(s).

Severity Count
🟠 High 2
🟡 Medium 5
🟢 Low 3

Panel: 8/8 reviewers contributed findings.

(failure, error) => {
projectionErrors.value += 1
recordDevEvent('projection_error', failure)
console.error(

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 — The failure handler only counts and logs; it never calls projector.reset() or bridge.resubscribe(), so a projection throw is permanently unrecoverable rather than transient. SemanticProjector.project advances this.snapshot = next before mutator.applyBatch, so once applyBatch throws mid-batch the unapplied mutations are absent from every future diff and the canvas silently diverges from the doc until an unrelated doc_reset/reconnected fires. Consider resetting the projector (or triggering a full re-materialization) on this path. Raised by 4 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case).

(failure, error) => {
projectionErrors.value += 1
recordDevEvent('projection_error', failure)
console.error(

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 — Swallowing the throw makes this failure less visible in telemetry than before the change: an uncaught throw in a DOM EventTarget listener reaches window.onerror and is captured by Sentry, whereas console.error reaches no sink. Per src/AGENTS.md both new error paths (here and the nack at line 299) must go through reportError() from @​/platform/telemetry/reportError with a stable errorType. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, claude-opus-5-thinking-max adversarial).

return project()
} catch (error) {
report(
{ message: error instanceof Error ? error.message : String(error) },

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 — String(error) in the catch block can itself throw — e.g. for Object.create(null) or an object with a throwing toString/Symbol.toPrimitive — so the exception escapes runProjection uncaught and report is never called, defeating the containment this function exists to provide. Wrap the message derivation (and ideally the report call) in its own try/catch or use a safe stringifier. Raised by 5 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case, claude-opus-5-thinking-max edge-case, claude-opus-5-thinking-max adversarial, kimi-k3-max edge-case).

* Recovery is deliberately NOT attempted here: the projector advances its
* snapshot before applying, so a retry would double-apply the batch's
* successful prefix. A failed projection means the canvas may lag the doc
* until the next update or resubscribe re-materializes it; making that

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 documented recovery path is wrong, and the same claim is repeated in the console.error string at useAgentCrdtFollower.ts:183. Neither "the next update" nor bridge.resubscribe() re-materializes the canvas: the next project() diffs against the snapshot already advanced past the failed batch, and resubscribe() reconciles from a non-empty state vector without touching the projector. Only doc_reset/reconnected (which call projector.reset()) actually recover. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max edge-case, kimi-k3-max edge-case, claude-opus-5-thinking-max adversarial).

if (event instanceof CustomEvent && typeof event.detail?.seq === 'number')
lastSeq = Math.max(lastSeq, event.detail.seq)
projector.project(bridge.follower.doc)
projectDoc()

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 — Because projectDoc() now swallows the throw, onUpdate continues past a failed projection: updatesApplied.value is already bumped and knownDocNodeIds = ids still runs at the end of the handler. The dev panel therefore records doc_nodes_changed and node deltas for nodes that never reached the canvas, and since the tracking set has advanced those ids will never be reported again. Consider skipping the bookkeeping when the projection failed. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, claude-opus-5-thinking-max adversarial).

workflowId: typeof d.workflowId === 'string' ? d.workflowId : null,
code: typeof d.code === 'string' ? d.code : null,
message: typeof d.message === 'string' ? d.message : null,
failed: d.failed ?? null,

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 — failed: d.failed ?? null copies an arbitrary host-supplied value verbatim with no shape, depth, or size bound, despite the interface comment promising {op_id, code, message}. It is then retained in long-lived reactive state (lastOpNack) and in the dev ring buffer, where the panel re-JSON.stringifys it on every render, so a large or deeply nested payload causes sustained memory growth and main-thread stalls. Validate the shape (or store only the extracted op_id/code/message strings). Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial).

opNacks.value += 1
lastOpNack.value = nack
recordDevEvent('op_nack', nack)
console.error('[agent-crdt] host rejected op batch', nack)

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 — console.error is handed the whole nack, which embeds the host-supplied message and the verbatim failed object. Datadog RUM collects console errors with a 100% session sample rate and rumBeforeSend performs no redaction, so unvalidated wire content — which may echo node payloads and widget values, i.e. user prompt text and file paths — is exported to third-party telemetry on every nack. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).

export function classifyOpsResult(detail: unknown): OpNack | null {
if (typeof detail !== 'object' || detail === null) return null
const d = detail as Partial<DocOpsResult>
if (d.ok !== false) return null

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 — classifyOpsResult keys the nack purely on ok !== false, but parseServerDocFrame forwards failed independently of ok. A host result carrying a failed payload with ok:true (or ok absent) is classified as clean and dropped silently — the exact vanishing failure this module exists to prevent. Consider also treating a present failed as a nack. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).

const nack = classifyOpsResult(event.detail)
if (nack) {
opNacks.value += 1
lastOpNack.value = nack

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 — The nack is classified without checking detail.workflowId against subscribedWorkflowId. LayoutFollowerBridge.forwardFrame re-dispatches doc_ops_result without the workflowId !== this.sentWorkflowId guard that onDocUpdate/onDocReset apply, so a late result for a previously-followed doc increments this session's counters and overwrites lastOpNack, attributing another document's failure code and message to the currently open one. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).

| 'subscribe_retry'
| 'doc_nodes_changed'
| 'rebind'
| 'op_nack'

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 — op_nack and projection_error were added to DevEventKind but not to the hardcoded EVENT_KINDS array in CrdtDevPanel.vue that populates the filter dropdown, so neither can be filtered to; with filteredEvents slicing to the newest 100 entries amid high-volume ws_out events, a nack can scroll out of view. The three new AgentCrdtStatus fields are likewise never rendered by the panel. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case).

@christian-byrne

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@christian-byrne

Copy link
Copy Markdown
Contributor Author

Salvaged → #16382 (main-based successor, ECS/createOpSender seam). This closed PR is a salvage source only.

Full context for agent readers

FEB-6 nack observability re-expressed against current main by orb reconciliation lane; verified vs integration heads #16373/#16375. Deliverables route to the successor PR, not here.

@christian-byrne
christian-byrne changed the base branch from nathaniel/agent-panel-v1 to main September 1, 2026 06:21
@christian-byrne
christian-byrne changed the base branch from main to nathaniel/agent-panel-v1 September 1, 2026 06:22
@christian-byrne

Copy link
Copy Markdown
Contributor Author

Superseded by #16382 — closing with receipt.

Content-diff analysis (main-based comparison of both PRs' 6-file scopes):

Functional coverage: #16382 inlines the same op-nack classification and projection-error reporting that this PR puts in a separate opOutcome.ts module. The failureView function in #16382's useAgentCrdtFollower.ts is functionally equivalent to classifyOpsResult in opOutcome.ts. devPanelLog.ts event kinds (op_nack, projection_error) are present in both, with #16382 being a superset (also adds human_ops_settled, stale_probe). DocOpsResult export in docFrameClient.ts is in both.

Architecture difference: #16382 uses EcsFollowerAdapter/GraphOperation/opSender instead of this PR's LitegraphMutator/SemanticProjector/followerGate — a rewrite, not a cherry-pick, but the user-facing behavior (op nack surfacing, projection failure visibility) is preserved.

Uncovered file: processedWidgetRenderModel.ts adds a forceDisabled?: boolean parameter to computeProcessedWidgets. This parameter is not used by any caller in this PR's 6-file scope (useProcessedWidgets.ts is NOT in this PR's changed files — the forceDisabled: agentNodeSelectionStore.isActive call site lives in a different branch's history). The parameter defaults to false and is effectively dead code within this PR's scope. If a future PR needs it, it can be re-added trivially (6-line addition).

Verdict: #16382 + existing main cover the functional scope of this PR. The only uncovered piece is dead code. Closing per act-fe-16278-supersede.

@christian-byrne

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #16382 (fix/retgt-16278-main, main-based retarget).

Content-diff receipt: every functional hunk in this PR is covered by #16382 or already on main.

  • opOutcome.ts (classifyOpsResult + runProjection): fix(agent): surface host op nacks and projection failures #16382 inlines the same logic directly into useAgentCrdtFollower.ts, with added telemetry (reportError), ECS adapter integration, and resubscribe-on-projection-failure. The pure-function extraction is a design choice; the behavior is fully covered.
  • opOutcome.test.ts: fix(agent): surface host op nacks and projection failures #16382 covers the same behavior with 4 new tests in useAgentCrdtFollower.test.ts (rejected op batch, projection failure throw, projection rejection return-false, counter monotonicity across resets/workflow-switches).
  • useAgentCrdtFollower.ts: both PRs add opNacks/lastOpNack/projectionErrors to AgentCrdtStatus, classify ok:false into a nack, and surface projection failures. fix(agent): surface host op nacks and projection failures #16382 is the evolved version.
  • devPanelLog.ts: both add op_nack and projection_error to DevEventKind. fix(agent): surface host op nacks and projection failures #16382 also simplifies the stringifyDevEvents replacer.
  • docFrameClient.ts: both export DocOpsResult (same one-line change).
  • processedWidgetRenderModel.ts (trailing-comma removal): already on main — the base branch nathaniel/agent-panel-v1 had the stale comma; main does not.

No missing hunks require porting before closure.

@huang47 huang47 added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026 — with ChatGPT Codex Connector
@huang47 huang47 removed the risk:R2 PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026
@DrJKL DrJKL added agent Comfy Agent product, integration, tests or product documentation agent-crdt Agent document synchronization, graph projection or CRDT operations agent-test-unit Touches Agent-related unit/component tests or their support labels Sep 24, 2026
@DrJKL DrJKL added the agent-ui Agent panel, composer, transcript or other user-interface components label Sep 24, 2026
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-test-unit Touches Agent-related unit/component tests or their support agent-ui Agent panel, composer, transcript or other user-interface components cursor-review Trigger multi-model Cursor agent review on this PR risk:high PR risk grade (advisory shadow check; grader-owned) size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants