Comfy-Org / Comfy-Org/ComfyUI_frontend

Redact CRDT debug logs by operation discriminator

Open
#17,355 0 comments 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Summary

Replace the key-name `CONTENT_KEYS` denylist in `src/workbench/extensions/agent/crdt/crdtDebugReport.ts` with CRDT operation-discriminator-based redaction for debug-log clipboard exports.

## Rationale

The current redactor masks known content keys and the sharing warning correctly states that all other fields are copied verbatim. This prevents a false privacy assurance, but new operation shapes or relay fields can still carry user content under keys that are not in the denylist.

The redactor should instead preserve only metadata that is known to be safe for each operation shape.

## Affected area

- `src/workbench/extensions/agent/crdt/crdtDebugReport.ts`
- CRDT operation types supplied by `@comfyorg/comfy-multi-player`
- Related CRDT debug report and clipboard tests

## Required changes

- Dispatch redaction by the CRDT operation discriminator.
- Allow-list known-safe metadata, including `op`, `op_id`, `node_id`, `widget`, and `class_type`, where applicable to the operation.
- Mask or omit operation payload fields that can contain workflow or user content.
- Define behavior for relay results and failed-operation data that can echo rejected operation content.
- Update the sharing warning and tests to match the resulting export contract.

## Acceptance criteria

- Clipboard event-log and per-event-detail exports do not include user workflow content from supported CRDT operation payloads.
- Operation identifiers and other required safe metadata remain available for debugging.
- Tests cover each supported operation discriminator and relay/error payload behavior.
- The warning text accurately describes the fields and values that the redactor exports.

## Backlinks

- Follow-up from PR #16774: https://github.com/Comfy-Org/ComfyUI_frontend/pull/16774
- Review discussion: https://github.com/Comfy-Org/ComfyUI_frontend/pull/16774#discussion_r3939462152

Requested by @christian-byrne.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.