Skip to content

fix(agent): redact sensitive dev panel event details - #16659

Closed
christian-byrne wants to merge 3 commits into
nathaniel/agent-panel-v1from
christian/fec-redact-1
Closed

christian-byrne wants to merge 3 commits into
nathaniel/agent-panel-v1from
christian/fec-redact-1

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Redacts sensitive CRDT dev-panel payload values before buffering.
Preserves event and operation metadata plus binary lengths.
Focused tests and typecheck are green.

Full context for agent readers

Summary

Sanitizes CRDT dev-panel event details at the ingestion boundary so secrets never enter the module-level buffer or serialized output.

Changes

  • What: recursively redacts token, password, authorization, prompt, and text fields; outbound operation values; positional and named widget values.
  • Breaking: none. Event kind, sequence, timestamp, operation type/id, outcome, object shape, and binary lengths remain available.
  • Dependencies: none.

Review Focus

Check that the key-based policy covers diagnostic payloads without removing structural metadata. The 500-event capacity and panel UI are unchanged.

Evidence

  • pnpm test:unit src/workbench/extensions/agent/crdt/devPanelLog.test.ts — 1 file passed, 2 tests passed.
  • pnpm typecheck — vue-tsc --noEmit exited 0.
  • pnpm exec oxfmt --check src/workbench/extensions/agent/crdt/devPanelLog.ts src/workbench/extensions/agent/crdt/devPanelLog.test.ts — both files correctly formatted.
  • pnpm exec oxlint src/workbench/extensions/agent/crdt/devPanelLog.ts src/workbench/extensions/agent/crdt/devPanelLog.test.ts — 0 warnings, 0 errors.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

Approval pending

CodeRabbit has no unresolved comments, but it has not reviewed the latest commit.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review

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

@christian-byrne christian-byrne added the risk:R1 PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ❌ 1904 passed, 52 failed · 4 flaky

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 1893 / ❌ 47 / ⚠️ 4 / ⏭️ 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: 09/02/2026, 02:55:25 PM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 95.2 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 85.6 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 97.6 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 99.1 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 115.3 MB heap
large-graph-pan: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 94.1 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 111.8 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 94.3 MB heap
minimap-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 91.7 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 87.5 MB heap
subgraph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 95.9 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 99.6 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 129ms TBT · 123.0 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 86.1 MB heap
vue-large-graph-idle: · 56.3 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 189.0 MB heap
vue-large-graph-pan: · 58.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 17ms TBT · 190.1 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 93.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 5ms
canvas-idle: layout count 0
canvas-idle: style recalc count 8
canvas-idle: task duration 387ms
canvas-idle: script duration 10ms
canvas-idle: TBT 0ms
canvas-idle: heap used 95.2 MB
canvas-idle: DOM nodes 16
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 33ms
canvas-mouse-sweep: layout count 14
canvas-mouse-sweep: style recalc count 79
canvas-mouse-sweep: task duration 994ms
canvas-mouse-sweep: script duration 117ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 85.6 MB
canvas-mouse-sweep: DOM nodes 63
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 14ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 31
canvas-zoom-sweep: task duration 326ms
canvas-zoom-sweep: script duration 11ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 97.6 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 6ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 13
dom-widget-clipping: task duration 557ms
dom-widget-clipping: script duration 115ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 99.1 MB
dom-widget-clipping: DOM nodes 18
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 6
large-graph-idle: task duration 456ms
large-graph-idle: script duration 33ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 115.3 MB
large-graph-idle: DOM nodes 12
large-graph-idle: event listeners 5
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 12ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 67
large-graph-pan: task duration 1972ms
large-graph-pan: script duration 657ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 94.1 MB
large-graph-pan: DOM nodes 10
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 14ms
large-graph-zoom: style recalc duration 14ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 68
large-graph-zoom: task duration 2057ms
large-graph-zoom: script duration 660ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 111.8 MB
large-graph-zoom: DOM nodes 29
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 7ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 43
legacy-node-drag: task duration 2834ms
legacy-node-drag: script duration 739ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 94.3 MB
legacy-node-drag: DOM nodes 6
legacy-node-drag: event listeners 191
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 4ms
minimap-idle: layout count 0
minimap-idle: style recalc count 6
minimap-idle: task duration 441ms
minimap-idle: script duration 31ms
minimap-idle: TBT 0ms
minimap-idle: heap used 91.7 MB
minimap-idle: DOM nodes 11
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 8ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 421ms
subgraph-dom-widget-clipping: script duration 106ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 87.5 MB
subgraph-dom-widget-clipping: DOM nodes 20
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 7ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 390ms
subgraph-idle: script duration 7ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 95.9 MB
subgraph-idle: DOM nodes 20
subgraph-idle: event listeners 4
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 5ms
subgraph-mouse-sweep: style recalc duration 33ms
subgraph-mouse-sweep: layout count 18
subgraph-mouse-sweep: style recalc count 79
subgraph-mouse-sweep: task duration 879ms
subgraph-mouse-sweep: script duration 81ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 99.6 MB
subgraph-mouse-sweep: DOM nodes 68
subgraph-mouse-sweep: event listeners 4
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 11ms
subgraph-transition-enter: style recalc duration 26ms
subgraph-transition-enter: layout count 16
subgraph-transition-enter: style recalc count 20
subgraph-transition-enter: task duration 788ms
subgraph-transition-enter: script duration 26ms
subgraph-transition-enter: TBT 129ms
subgraph-transition-enter: heap used 123.0 MB
subgraph-transition-enter: DOM nodes 13671
subgraph-transition-enter: event listeners 2381
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 7373ms
viewport-pan-sweep: script duration 2353ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 86.1 MB
viewport-pan-sweep: DOM nodes -281
viewport-pan-sweep: event listeners -168
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 14134ms
vue-large-graph-idle: script duration 262ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 189.0 MB
vue-large-graph-idle: DOM nodes -6548
vue-large-graph-idle: event listeners -7460
vue-large-graph-pan: avg frame time 17ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 19ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 146
vue-large-graph-pan: task duration 18053ms
vue-large-graph-pan: script duration 841ms
vue-large-graph-pan: TBT 17ms
vue-large-graph-pan: heap used 190.1 MB
vue-large-graph-pan: DOM nodes -6548
vue-large-graph-pan: event listeners -7452
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 22ms
workflow-execution: layout count 3
workflow-execution: style recalc count 16
workflow-execution: task duration 109ms
workflow-execution: script duration 6ms
workflow-execution: TBT 0ms
workflow-execution: heap used 93.8 MB
workflow-execution: DOM nodes 130
workflow-execution: event listeners 75
Raw data
{
  "timestamp": "2026-09-02T15:12:20.583Z",
  "gitSha": "eb7ff050a52f66b5b0b19b7d7ca7dc653dcf5834",
  "branch": "christian/fec-redact-1",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2017.5330000000145,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 4.941999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 378.055,
      "heapDeltaBytes": 2638804,
      "heapUsedBytes": 99451548,
      "domNodes": 16,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 7.176999999999996,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 2020.2110000000175,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 5.383000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 395.28,
      "heapDeltaBytes": 3385824,
      "heapUsedBytes": 100249040,
      "domNodes": 16,
      "jsHeapTotalBytes": 6553600,
      "scriptDurationMs": 12.401,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2036.6260000000125,
      "styleRecalcs": 81,
      "styleRecalcDurationMs": 33.141999999999996,
      "layouts": 14,
      "layoutDurationMs": 4.345,
      "taskDurationMs": 1045.006,
      "heapDeltaBytes": -7120332,
      "heapUsedBytes": 89820116,
      "domNodes": 67,
      "jsHeapTotalBytes": 6815744,
      "scriptDurationMs": 120.36699999999999,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1918.7930000000506,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 32.80200000000001,
      "layouts": 14,
      "layoutDurationMs": 4.827,
      "taskDurationMs": 942.2579999999999,
      "heapDeltaBytes": -7163904,
      "heapUsedBytes": 89773656,
      "domNodes": 59,
      "jsHeapTotalBytes": 8126464,
      "scriptDurationMs": 114.081,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1734.7049999999626,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 13.827999999999998,
      "layouts": 6,
      "layoutDurationMs": 1.2180000000000002,
      "taskDurationMs": 324.39099999999996,
      "heapDeltaBytes": 5507668,
      "heapUsedBytes": 102779080,
      "domNodes": 76,
      "jsHeapTotalBytes": 6553600,
      "scriptDurationMs": 10.589,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1707.096999999976,
      "styleRecalcs": 30,
      "styleRecalcDurationMs": 14.555,
      "layouts": 6,
      "layoutDurationMs": 1.0910000000000002,
      "taskDurationMs": 327.942,
      "heapDeltaBytes": 5896620,
      "heapUsedBytes": 101870512,
      "domNodes": 76,
      "jsHeapTotalBytes": 6553600,
      "scriptDurationMs": 10.876,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 783.4479999999644,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 5.820999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 549.55,
      "heapDeltaBytes": 6866896,
      "heapUsedBytes": 103937708,
      "domNodes": 18,
      "jsHeapTotalBytes": 7077888,
      "scriptDurationMs": 114.003,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 834.5010000000457,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 6.051999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 565.0419999999999,
      "heapDeltaBytes": 7510992,
      "heapUsedBytes": 103837228,
      "domNodes": 18,
      "jsHeapTotalBytes": 7340032,
      "scriptDurationMs": 116.223,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2003.4599999999614,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 4.268000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 458.76699999999994,
      "heapDeltaBytes": 16912372,
      "heapUsedBytes": 121546416,
      "domNodes": 12,
      "jsHeapTotalBytes": 3670016,
      "scriptDurationMs": 33.96399999999999,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 1993.0719999999837,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 3.481,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 453.8299999999999,
      "heapDeltaBytes": 16980936,
      "heapUsedBytes": 120287732,
      "domNodes": 12,
      "jsHeapTotalBytes": 3932160,
      "scriptDurationMs": 32.16400000000001,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 3090.944000000036,
      "styleRecalcs": 67,
      "styleRecalcDurationMs": 11.436,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1942.494,
      "heapDeltaBytes": -6187260,
      "heapUsedBytes": 98522876,
      "domNodes": 10,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 657.614,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-pan",
      "durationMs": 3110.43200000006,
      "styleRecalcs": 67,
      "styleRecalcDurationMs": 11.846,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2001.8180000000002,
      "heapDeltaBytes": -6275344,
      "heapUsedBytes": 98752276,
      "domNodes": 10,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 657.1819999999999,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 4001.1140000000296,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 13.867999999999999,
      "layouts": 60,
      "layoutDurationMs": 13.331,
      "taskDurationMs": 2053.683,
      "heapDeltaBytes": 4360468,
      "heapUsedBytes": 113712688,
      "domNodes": 30,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 662.566,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.80000000000109
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 4088.3010000000013,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 14.225999999999999,
      "layouts": 60,
      "layoutDurationMs": 14.105999999999998,
      "taskDurationMs": 2059.806,
      "heapDeltaBytes": 10814172,
      "heapUsedBytes": 120710692,
      "domNodes": 28,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 657.952,
      "eventListeners": 12,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3906.125999999972,
      "styleRecalcs": 43,
      "styleRecalcDurationMs": 6.565000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2767.2929999999997,
      "heapDeltaBytes": -13062276,
      "heapUsedBytes": 98877492,
      "domNodes": 6,
      "jsHeapTotalBytes": 6291456,
      "scriptDurationMs": 733.715,
      "eventListeners": 190,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 4178.947999999991,
      "styleRecalcs": 43,
      "styleRecalcDurationMs": 7.129,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2900.208,
      "heapDeltaBytes": -13062696,
      "heapUsedBytes": 98982516,
      "domNodes": 6,
      "jsHeapTotalBytes": 6815744,
      "scriptDurationMs": 745.146,
      "eventListeners": 192,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 1999.9409999999216,
      "styleRecalcs": 5,
      "styleRecalcDurationMs": 3.4240000000000017,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 439.017,
      "heapDeltaBytes": -9736080,
      "heapUsedBytes": 96284632,
      "domNodes": 10,
      "jsHeapTotalBytes": 3670016,
      "scriptDurationMs": 31.013000000000005,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 1997.6880000000392,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 3.8160000000000016,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 443.901,
      "heapDeltaBytes": -9952152,
      "heapUsedBytes": 96098180,
      "domNodes": 12,
      "jsHeapTotalBytes": 3670016,
      "scriptDurationMs": 31.694,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 595.8609999998998,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 7.427,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 410.58700000000005,
      "heapDeltaBytes": -6177084,
      "heapUsedBytes": 91594512,
      "domNodes": 20,
      "jsHeapTotalBytes": 6553600,
      "scriptDurationMs": 104.33000000000001,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 609.6090000000913,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 8.012000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 431.233,
      "heapDeltaBytes": -5790492,
      "heapUsedBytes": 91923960,
      "domNodes": 20,
      "jsHeapTotalBytes": 6815744,
      "scriptDurationMs": 108.47899999999998,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2007.64300000003,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 7.311,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 392.64200000000005,
      "heapDeltaBytes": 2991772,
      "heapUsedBytes": 100376744,
      "domNodes": 22,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 7.556,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 1999.1660000000593,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 5.811,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 386.683,
      "heapDeltaBytes": 3179508,
      "heapUsedBytes": 100666656,
      "domNodes": 18,
      "jsHeapTotalBytes": 6553600,
      "scriptDurationMs": 7.381,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1744.2510000000198,
      "styleRecalcs": 79,
      "styleRecalcDurationMs": 33.69800000000001,
      "layouts": 18,
      "layoutDurationMs": 5.523,
      "taskDurationMs": 885.341,
      "heapDeltaBytes": 6876756,
      "heapUsedBytes": 104257128,
      "domNodes": 67,
      "jsHeapTotalBytes": 7077888,
      "scriptDurationMs": 81.327,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1751.1469999999463,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 31.592999999999996,
      "layouts": 18,
      "layoutDurationMs": 5.3020000000000005,
      "taskDurationMs": 873.5889999999999,
      "heapDeltaBytes": 6746820,
      "heapUsedBytes": 104664568,
      "domNodes": 69,
      "jsHeapTotalBytes": 7340032,
      "scriptDurationMs": 80.282,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 982.8249999999343,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 25.742000000000008,
      "layouts": 16,
      "layoutDurationMs": 10.582,
      "taskDurationMs": 787.6530000000001,
      "heapDeltaBytes": 20191656,
      "heapUsedBytes": 128928644,
      "domNodes": 13671,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 26.147999999999996,
      "eventListeners": 2381,
      "totalBlockingTimeMs": 129,
      "frameDurationMs": 16.659999999999975,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 12151.775999999927,
      "styleRecalcs": 248,
      "styleRecalcDurationMs": 37.244,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7009.837,
      "heapDeltaBytes": -13214708,
      "heapUsedBytes": 91228308,
      "domNodes": -280,
      "jsHeapTotalBytes": -3518464,
      "scriptDurationMs": 2208.478,
      "eventListeners": -151,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 12253.841999999964,
      "styleRecalcs": 247,
      "styleRecalcDurationMs": 41.42700000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7736.244000000001,
      "heapDeltaBytes": -15517980,
      "heapUsedBytes": 89262936,
      "domNodes": -281,
      "jsHeapTotalBytes": -2732032,
      "scriptDurationMs": 2497.952,
      "eventListeners": -185,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 14538.216000000033,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13924.979000000001,
      "heapDeltaBytes": -40963000,
      "heapUsedBytes": 198258340,
      "domNodes": -6548,
      "jsHeapTotalBytes": 9306112,
      "scriptDurationMs": 255.931,
      "eventListeners": -7461,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 14807.543000000009,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 14343.255,
      "heapDeltaBytes": -32224308,
      "heapUsedBytes": 198129324,
      "domNodes": -6548,
      "jsHeapTotalBytes": 12390400,
      "scriptDurationMs": 268.187,
      "eventListeners": -7459,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 17726.078999999914,
      "styleRecalcs": 144,
      "styleRecalcDurationMs": 17.759999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17389.691,
      "heapDeltaBytes": -24708716,
      "heapUsedBytes": 212303264,
      "domNodes": -6548,
      "jsHeapTotalBytes": 12058624,
      "scriptDurationMs": 801.545,
      "eventListeners": -7453,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.219999999999953,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 19059.23100000007,
      "styleRecalcs": 147,
      "styleRecalcDurationMs": 19.60300000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18716.049000000003,
      "heapDeltaBytes": -40659148,
      "heapUsedBytes": 186374960,
      "domNodes": -6548,
      "jsHeapTotalBytes": 8167424,
      "scriptDurationMs": 880.3129999999999,
      "eventListeners": -7451,
      "totalBlockingTimeMs": 34,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 508.77300000001924,
      "styleRecalcs": 23,
      "styleRecalcDurationMs": 22.555,
      "layouts": 3,
      "layoutDurationMs": 1.46,
      "taskDurationMs": 122.42,
      "heapDeltaBytes": 5860256,
      "heapUsedBytes": 99478584,
      "domNodes": 152,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 7.29,
      "eventListeners": 99,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "workflow-execution",
      "durationMs": 118.3930000000828,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 20.672000000000004,
      "layouts": 3,
      "layoutDurationMs": 1.3259999999999998,
      "taskDurationMs": 95.003,
      "heapDeltaBytes": 3688440,
      "heapUsedBytes": 97244960,
      "domNodes": 108,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 4.744999999999999,
      "eventListeners": 51,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    }
  ]
}

🔬 E2E Coverage

Metric Covered Total Pct
Lines 47973 70144 68.4% 🟡
Functions 0 0 — —
Branches 0 0 — —
Top 10 files by uncovered lines
File Coverage Missed
src/LGraphCanvas.ts 67.2% 1178
src/LGraphNode.ts 69.7% 389
src/extensions/core/cameraInfo/CameraInfoViewport.ts 2.0% 343
src/platform/workspace/stores/billingOperationStore.ts 8.3% 300
src/platform/workspace/stores/workspaceAuthStore.ts 37.3% 267
src/platform/workspace/stores/teamWorkspaceStore.ts 38.0% 258
src/LGraph.ts 79.0% 250
src/scripts/app.ts 71.8% 243
src/scripts/pnginfo.ts 21.4% 221
src/stores/assetsStore.ts 45.0% 203

@comfy-pr-bot
comfy-pr-bot requested a review from a team as a code owner September 2, 2026 14:47

@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.

Redaction works on the real {type, data: {ops}} envelope. Two policy gaps: unanchored key regex over-redacts structural keys; raw-string frame fallback bypasses it. Test fixture does not mirror the wire shape.

Full context for agent readers

Ran the reviewed head in a worktree. pnpm exec vitest run src/workbench/extensions/agent/crdt/devPanelLog.test.ts passes (2/2). Fed a frame shaped exactly like DocFrameClient.sendOps produces ({type: 'doc_ops', data: {v, workflow_id, tab, ops: [...]}}) with a serialized CLIPTextEncode node through recordDevEvent: widgets_values.text, the set_widget value, and named widget values all came out [REDACTED] while op, op_id, node_id, class_type, pos, inputs[].widget.name survived. So the core claim holds on the real envelope, not just the flattened test fixture.

Two gaps in the stated guarantee that secrets never enter the buffer, both small. First, SENSITIVE_KEY = /(token|password|authorization|prompt|text)/i is an unanchored substring match, so properties.context was redacted in my probe and prompt_id (ubiquitous in ComfyUI execution payloads) would be too, which removes exactly the structural metadata the PR body says it preserves. Anchoring to key segments ((^|_)(token|password|authorization|prompt|text)(_|$)) keeps access_token and message_text matching while sparing context and prompt_id. Second, useAgentCrdtFollower.ts L125-127 stores the raw frame string when JSON.parse fails, and sanitizeDetail passes strings through untouched, so an unparsable frame would land in the buffer verbatim. Unreachable from DocFrameClient today (it always sends JSON.stringify output), but it is the one path where the ingestion boundary does not apply.

Nitpick: the fixture puts ops directly under frame while the wire puts it under frame.data; mirroring the real envelope makes the test guard the recursion depth actually exercised.

I will push fixes for the three points to this branch and resolve my own threads.

Match sensitive words only as the last snake_case/camelCase key segment so
structural keys like `context`, `prompt_id`, `class_type`, `token_count`
survive while `access_token`, `accessToken`, `message_text`, `prompt` are
still redacted. Record only the length of an unparsable outbound frame
instead of the raw string, which bypassed the key-based policy. Test
fixture now mirrors the real `{type, data: {ops}}` wire envelope.
@christian-byrne

Copy link
Copy Markdown
Contributor Author

Pushed 1063164: key match anchored to last segment, raw-frame fallback removed, fixture mirrors wire envelope. All three review threads resolved.

Full context for agent readers

Commit 1063164555fb15dd1e445a542c6fa2d81189a11a on christian/fec-redact-1 (fast-forward on top of the automated lint commit 29626cb2df).

  • devPanelLog.ts: SENSITIVE_KEY is now /(^|_)(token|password|authorization|prompt|text)$/ applied to the key after camelCase to snake_case normalization (isSensitiveKey). Redacts access_token, accessToken, message_text, prompt; preserves context, prompt_id, class_type, token_count.
  • useAgentCrdtFollower.ts: on JSON.parse failure the ws_out event records { frame: null, unparsed_chars: frame.length } instead of the raw string, so every outbound frame passes through the key-based policy.
  • devPanelLog.test.ts: fixture now uses the real {type: 'doc_ops', data: {v, workflow_id, tab, ops}} envelope and carries properties.context / properties.prompt_id as preserved metadata; new test pins the last-segment rule. Mutation check: reverting to the original unanchored regex fails 2 of 3 tests.

Gates on the pushed tree: vitest run src/workbench/extensions/agent/crdt/ 10 files, 67 tests passed; oxlint 0/0 on the three files; eslint clean; vue-tsc --noEmit exit 0; oxfmt applied.

Note that my original inline suggestion proposed (^|_)word(_|$), which would still have matched prompt_id; that comment is edited with a strikethrough correction.

@github-actions github-actions Bot added risk:R2 PR risk grade (advisory shadow check; grader-owned) and removed risk:R1 PR risk grade (advisory shadow check; grader-owned) labels Sep 2, 2026
@codecov

codecov Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ench/extensions/agent/crdt/useAgentCrdtFollower.ts 0.00% 3 Missing ⚠️
src/workbench/extensions/agent/crdt/devPanelLog.ts 95.65% 1 Missing ⚠️
@@                     Coverage Diff                      @@
##           nathaniel/agent-panel-v1   #16659      +/-   ##
============================================================
+ Coverage                     80.67%   82.98%   +2.30%     
============================================================
  Files                          2339     2009     -330     
  Lines                        120790   115776    -5014     
  Branches                      35560    33910    -1650     
============================================================
- Hits                          97444    96072    -1372     
+ Misses                        22849    19363    -3486     
+ Partials                        497      341     -156     
Flag Coverage Δ
e2e 66.87% <ø> (-0.03%) ⬇️
unit 75.89% <84.61%> (+0.08%) ⬆️
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 97.22% <95.65%> (+68.65%) ⬆️
...ench/extensions/agent/crdt/useAgentCrdtFollower.ts 6.77% <0.00%> (ø)

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

Copy link
Copy Markdown
Contributor Author

CI note: Playwright cloud and mobile-chrome (plus several chromium shards) fail on 1063164, but the same jobs fail identically on every open PR against nathaniel/agent-panel-v1 right now (#16658, #16660-#16664, #16666; peer #16664 cloud job also 2 failed / 145 passed in agentPanel.spec.ts). Unit test and lint-and-format are green. Nothing in the failing specs touches devPanelLog.ts or useAgentCrdtFollower.ts, so treating this as base-branch breakage rather than a regression from this PR.

Full context for agent readers

Failing specs: cloud job 100299140155: agentPanel.spec.ts:49 (tool-call collapsible aria-expanded stays false) and agentPanel.spec.ts:287 (Edit button click intercepted by div.group.flex.flex-col.items-end). mobile-chrome job 100299140103: 5 @screenshot baselines in mobileBaseline.spec.ts and vueNodes/interactions/canvas/pan.spec.ts. Run 33644950913. Checked via repos/.../commits/<sha>/check-runs on peer heads 47aa175c7d, d9297af6d3, 2175aefab8.

@CodeJuggernaut CodeJuggernaut 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.

Redacting at record time is the right layer, and the fixture now matches the real envelope; no issues.

@huang47 huang47 added risk:high PR risk grade (advisory shadow check; grader-owned) and removed risk:R2 PR risk grade (advisory shadow check; grader-owned) labels Sep 2, 2026
@christian-byrne christian-byrne added the cursor-review Trigger multi-model Cursor agent review on this PR label Sep 2, 2026
@CodeJuggernaut

CodeJuggernaut commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Severity: Minor (latent)

What: sanitizeDetail recomputes the op-value flag per key (devPanelLog.ts:67), so a value nested under a non-ops key inside an op escapes redaction.

Why this is an issue: Unreachable with today's op shapes, but it sits on a redaction boundary.

Proposed Fix: sanitizeDetail(item, redactOpValue || key === 'ops').

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

Severity Count
🟠 High 2
🟡 Medium 3
🟢 Low 3

Panel: 8/8 reviewers contributed findings.

return [key, REDACTED]
}
if (WIDGET_VALUES_KEYS.has(key)) return [key, redactValues(item)]
return [key, sanitizeDetail(item, key === 'ops')]

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 — sanitizeDetail recurses over arbitrary unknown input with no depth cap and no cycle detection, and recordDevEvent calls it without a try/catch — previously detail was stored by reference and never traversed, so this is a newly introduced throw path. A cyclic detail or a deeply nested server-controlled payload (doc_ops_result.failed / awareness.state are forwarded verbatim from the host) raises RangeError out of the logger; add a WeakSet cycle guard plus a depth limit. Raised by 6 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro adversarial, gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case, kimi-k3-max edge-case).

detail = { delivered, frame: null, unparsed_chars: frame.length }
}
recordDevEvent('ws_out', { delivered, frame: parsed })
recordDevEvent('ws_out', detail)

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 — recordDevEvent now does an unguarded recursive walk inside transport.send, whose documented contract is that it MUST NOT throw. Because the throw happens after apiTransport.send(frame) already put the frame on the wire, a RangeError (or a throwing getter surfaced by Object.entries) aborts the immediate subscribe watcher and the onBeforeUnmount cleanup, and makes a delivered subscribe look unsent. Wrap the log call in try/catch. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case).


return Object.fromEntries(
Object.entries(value).map(([key, item]) => {
if (isSensitiveKey(key) || (redactOpValue && key === 'value')) {

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 — Op-value redaction is path-dependent: sanitizeDetail(item, key === 'ops') resets rather than propagates the flag (arrays propagate it, objects don't), so a value nested inside an op (ops[i].payload.value, op.config.value) is logged in plaintext while the same value one level up is redacted. Op payloads echoed outside an ops key — doc_ops_result.failed, forwarded verbatim from the wire — never get value redacted at all. Use redactOpValue || key === 'ops'. Raised by 4 of 8 reviewers (claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case, kimi-k3-max edge-case).

const buffer: DevEvent[] = []

function isSensitiveKey(key: string): boolean {
const snake = key.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toLowerCase()

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 — isSensitiveKey only inserts a separator at lower→Upper transitions, so SENSITIVE_KEY's (^|_) anchor never matches keys separated by anything but _: access-token, X-Auth-Token, x-api-key, auth.token and all-caps ACCESSTOKEN are all stored verbatim. Header-style objects are the realistic trigger; normalize -, ., and : to _ as well. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case).

}

function sanitizeDetail(value: unknown, redactOpValue = false): unknown {
if (value instanceof Uint8Array) return value

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 — instanceof Uint8Array is realm-bound and covers only that one view type: a cross-realm Uint8Array (worker/iframe) or any other typed array falls through to Object.entries and expands an N-byte buffer into an N-key plain object retained in the 500-entry ring buffer, while ArrayBuffer/DataView collapse to {} and lose the byte length that is the only useful thing about them. The matching branch also stores the buffer by reference, so the log pins the caller's binary (for a Yjs update, the full plaintext document) and reflects later mutations. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case).

// Never store the raw string: `sanitizeDetail` redacts by key, so an
// unparsable frame would bypass it. Record only its length.
let detail: Record<string, unknown>
try {

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 "never store the raw string" invariant only holds for unparsable frames: a frame that is a valid JSON primitive (e.g. '"secret"') parses successfully and sanitizeDetail returns primitives untouched, so the raw string lands in the log under the non-sensitive key frame. Reject non-object parse results the same way as a parse failure. Raised by 4 of 8 reviewers (gemini-3.1-pro adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro edge-case, kimi-k3-max edge-case).

@christian-byrne

Copy link
Copy Markdown
Contributor Author

Superseded by FE #16926 against main. Closing this frozen-base carrier.

Full context for agent readers

The redaction fix was re-carried from the original authored commits with git cherry-pick -x, adapted to the current debug-log implementation, and verified with the complete CRDT unit suite. The replacement also addresses the old head's later automated findings by bounding recursive sanitization, handling cycles and binary values safely, broadening credential-key recognition, redacting full operation-content fields, and rejecting raw malformed or primitive frame content.

The obsolete christian/fec-redact-1 head branch is deleted. Human approval on this PR does not transfer to the replacement.

@christian-byrne
christian-byrne deleted the christian/fec-redact-1 branch September 4, 2026 04:08
christian-byrne added a commit that referenced this pull request Sep 21, 2026
Redacts credentials and workflow payload values before CRDT debug events
enter the in-memory buffer. Preserves operation identifiers and
structural metadata while summarizing binary payloads by length.

Supersedes [FE
#16659](#16659), whose
base branch was frozen. Re-carried from its Amp- and Christian-authored
commits with `git cherry-pick -x`; the automated
`processedWidgetRenderModel.ts` formatting-only commit was already empty
on `main` and was dropped as required. This successor resolves the
source [server-message
policy](#16659 (comment))
and [non-plain-object
loss](#16659 (comment))
findings.

Justification: this is the main-based successor to human-approved FE
#16659; Christian authorized carrying that approval through the retarget
under [bbc
#388](christian-byrne/blocked-on-christian#388 (comment)),
conditional on current-main integration, fresh green CI, and an explicit
scope/TDD/invariants check.

<details><summary>Full context for agent readers</summary>

## Changes

- Sanitize every buffered debug-event detail, including
credential-shaped keys and operation payload fields.
- Bound recursive traversal, handle cycles without throwing, and retain
only binary type/length summaries.
- Replace malformed or non-object outbound frame content with its
character count rather than retaining the raw string.
- Preserve event kind, scope, level, sequence, operation IDs, workflow
IDs, server error messages, and other structural metadata.
- Report sanitizer failures through payload-free error telemetry while
failing closed to `[REDACTED]`.
- Preserve bounded non-plain-object diagnostics: Error name/message,
Map/Set type and size, and Date ISO values.

## Current scope and design fit

- Still wanted: the September 1 Agent sync explicitly retained the
temporary feature-flagged CRDT panel so testers can copy diagnostic logs
into bug reports; V1 scope still lists user-visible CRDT failure
reporting and alpha observability as partial work.
- TDD: serves `plans/technical-design.md` §6's migration to the semantic
CRDT path and §7's security/correctness boundary. The debug transcript
observes the current `doc_ops`/host-update path; it does not revive the
stale §5 `draft_patch` mutation model.
- Preserved invariants: CRDT KEEP-ALIVE #1 (semantic ops remain the
replication unit), #2 (`op_id`/structural identity remains visible), and
#6 (raw Yjs updates remain host-to-follower only). Sanitization changes
only the in-memory diagnostic copy and never the wire frame, applier,
document, operation ordering, or persistence path. Credentials and
content-bearing values are removed before buffering or copy-out.

## Evidence

- Branch rebased onto current `main` at
[`1e22cf8fb`](1e22cf8);
resulting head
[`4a0041858`](4a00418).
- `pnpm test:unit src/workbench/extensions/agent/crdt` — 30 files
passed, 406 tests passed, including current-main clipboard integration.
- `pnpm typecheck` — passed after the rebase.
- `pnpm exec oxfmt --check <five PR files>` — passed.
- `pnpm exec oxlint --type-aware <five PR files>` — 0 warnings, 0
errors.
- `pnpm exec eslint --cache --no-warn-ignored <five PR files>` — passed.
- Commit hooks and push hooks, including typecheck and `knip --cache` —
passed.
- All three CodeRabbit findings were fixed, replied to with evidence,
and resolved.
- Both exact #16659 source findings were dispositioned with evidence and
their automated review threads resolved.
- The current-main clipboard truncation test now uses a non-sensitive
description field, preserving both full-copy coverage and the carrier’s
requirement that `value` never enters display or clipboard output.

Original lane attribution: `lane-fec-redact-1`.

</details>

<!-- authored-by:agent lane-prbase-2-0627 -->

---------

Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: GitHub Action <action@github.com>
@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 agent-ui Agent panel, composer, transcript or other user-interface components labels 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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants