Repository navigation
fix(agent): surface host op nacks and projection failures (FEB-6) - #16278
christian-byrne wants to merge 2 commits into
Conversation
…dropping them silently
|
Warning Review limit reachedNext included review available in 25 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Comment |
🎭 Playwright: ❌ 1908 passed, 53 failed · 1 flaky❌ Failed Tests📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Absolute values
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
}
]
} |
Codecov Report❌ Patch coverage is
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 351 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 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( |
There was a problem hiding this comment.
🟠 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( |
There was a problem hiding this comment.
🟠 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) }, |
There was a problem hiding this comment.
🟡 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 |
There was a problem hiding this comment.
🟡 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() |
There was a problem hiding this comment.
🟡 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, |
There was a problem hiding this comment.
🟡 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) |
There was a problem hiding this comment.
🟡 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 |
There was a problem hiding this comment.
🟢 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 |
There was a problem hiding this comment.
🟢 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' |
There was a problem hiding this comment.
🟢 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).
|
@coderabbitai review |
|
|
Salvaged → #16382 (main-based successor, ECS/ |
|
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 Architecture difference: #16382 uses Uncovered file: Verdict: #16382 + existing main cover the functional scope of this PR. The only uncovered piece is dead code. Closing per act-fe-16278-supersede. |
|
Closing as superseded by #16382 ( Content-diff receipt: every functional hunk in this PR is covered by #16382 or already on main.
No missing hunks require porting before closure. |
ok:false) now surface: status field + dev-panel metric + console.error — no more silent dropsFull context for agent readers
Problem (FEB-6 / s1-D)
Two silent failure paths in the CRDT follower:
doc_ops_resultwithok:falsewas recorded into a dev-panel-only tap (lastOpsResult+doc_ops_resultdev event) and nothing else. No status change, no error path, no metric. An agent or human whose ops were rejected saw nothing.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, verbatimfailed, applied-prefix count, skipped count) onok:false; null on clean/malformed.runProjection(project, report)— try/catch wrapper; reports and returns 0 on throw. No retry:SemanticProjectoradvances its snapshot before applying, so a retry would double-apply the successful prefix.Wired into
useAgentCrdtFollower.ts:onOpsResultpromotes nacks:opNackscounter,lastOpNackin status,op_nackdev event,console.error.onUpdate,pocGlobal.project) go throughprojectDoc()→projection_errordev event +projectionErrorscounter +console.error.AgentCrdtStatusgainsopNacks,lastOpNack,projectionErrors(poc status getter + composable computed both updated).Semantics (deliberate)
ok:falsemeans "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.Files
src/workbench/extensions/agent/crdt/opOutcome.ts(new) +opOutcome.test.ts(new, 7 tests)src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts— wiring + status fieldssrc/workbench/extensions/agent/crdt/devPanelLog.ts—op_nack,projection_errorevent kindssrc/workbench/extensions/agent/crdt/docFrameClient.ts— exportDocOpsResultVerification
pnpm vitest run src/workbench/extensions/agent/crdt/— 71/71 green (10 files)vue-tsc --noEmit— cleanprocessedWidgetRenderModel.tsformat-check failure exists on baseProvenance
Branch cut from
583ad3b400(nathaniel/agent-panel-v1head). 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
ok:falseondoc_ops_resultSemanticProjector)window.__agentCrdtPocdev handle mirroring composable status