Skip to content

fix: redact internal context from share transcripts - #23

Merged
z2z23n0 merged 1 commit into
mainfrom
fix/redact-share-transcript-context
Jul 23, 2026
Merged

fix: redact internal context from share transcripts#23
z2z23n0 merged 1 commit into
mainfrom
fix/redact-share-transcript-context

Conversation

@z2z23n0

@z2z23n0 z2z23n0 commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Mainline Intent

Intent: int_771a4a5b
Status: proposed
Title: 统一脱敏分享页轻量预览与完整对话

What changed

在 Cloudflare Worker 的 transcript 渲染入口统一清理 message、tool input 和 tool output 中的内部上下文,并在 Go 轻量 preview 生成器中补齐 oai-mem-citation 与 turn_aborted 标记。新增回归覆盖 multipart AGENTS/环境上下文、工具记录和 assistant 末尾 memory citation。

Why

点击 Load full conversation 后会绕过已有的 Go preview-only 脱敏,直接解析原始 session;旧 Worker 逻辑只按整条消息前缀过滤,也未清理工具输入输出,导致内部上下文重新出现在分享页。

Decisions

  • 完整对话应在哪一层脱敏: 在所有 transcript 进入 DOM 前的统一渲染入口脱敏 (Codex、Claude、neutral 和轻量 preview 都会经过该入口,可避免各解析器规则继续漂移。)
    • Rejected: 只给 Codex 完整 transcript 解析器补前缀判断
    • Rejected: 修改原始 capsule/session 内容
  • memory citation 的展示方式: 静默删除整个 oai-mem-citation 块,同时保留同一条 assistant 消息的正常回答 (该块是内部来源追踪元数据,展示省略占位也会给公开分享页增加无意义噪声。)
  • 原始会话兼容性: 只修改分享页可见 transcript,不改 lossless capsule 和原生导入语义 (分享展示脱敏与可恢复的原始会话是两条不同边界。)

Subsystems: capsule, deploy, share-preview, browser-transcript

@z2z23n0
z2z23n0 marked this pull request as ready for review July 23, 2026 11:38
@z2z23n0
z2z23n0 merged commit b5fe368 into main Jul 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant