Repository navigation
Send Turn-scoped local images in private Lark replies - #8990
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
从飞书私聊接收 Codex 项目助手图文回复的工作区所有者。 Codex 最终答复写入本地图像的 Markdown 链接时,Core 的路径清理保留图题,飞书回执只能确认正文。 后续回复引用本地生成图时,会反复丢失用户需要的图像,并让图文交付看起来已经结束。
同一份原生输出在目标 base 只剩图题。当前 head 保留图题和当前轮次图像的摘要,交给原飞书图片发送器读回。 隔离集成用例逐张读回三张有序原生图片,正文和消息归属可核对。 历史本地图像补发和已安装客户端显示需要各自的验收。 正式采用和真实飞书展示仍待核验。历史本地图像的补发需要原轮次与保存字节对应的证明。
改动思路 / Approach
在 Codex 最终答复做路径清理之前,记下当前轮次获准的图片顺序和字节摘要。飞书发送器沿原会话重新核对授权与字节,复用现有原生图片和回执链路。已完成正文保留原样,图片失败可见。本次范围是飞书私聊中已授权读写工作区的 Codex 项目会话与原始文本请求。群聊、只读、App、管家和 attached 会话沿现有路径处理。 Core 在原轮次保留图像描述,原飞书发送器负责授权、确认图片效果及回读。
具体改动 / Changes
-
以当前 Core Turn 的工作区输出目录约束本地图,使用既有不跟随符号链接的文件读取器和大小上限。目标 base 只保留图题,当前 head 保留同样的图题并得到经过校验的图片描述。原生结果
-
原飞书私聊在发图前再次校验轮次、正文、受众和工作区权限。既有外链的来源校验、上传回执及独立字节读回继续使用。测试捕获了三张原生图节点与逐张对应的原始字节。私聊交付
-
按目标版本 a79e781 的 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md 核对 original-private-binding 和 bounded-native-images。原私聊、原应用与当前授权参与每次资源上传,体积限制和明确的失败回执沿用现有交付规则。
对主干的风险 / Risks
重点是本地路径、授权变化与已确认正文。错误目录、符号链接、字节变化、Stop 和撤回写权限均未产生新图片上传。现有外链重定向和历史远程图片恢复回归通过。119 项聚焦测试、555 项相邻测试及标准 premerge 通过。真实飞书采用以及历史本地图补发仍需独立验收。未知发送效果继续走已记录回执的读回。
我的整体评价 / Verdict
批准当前提交的新增图文路径。它保留路径隐私与既有发送责任,独立核过原会话中的原生图片顺序及字节。旧回复仍由原发送记录和来源证明决定恢复。
English verdict: APPROVE 03e0b9a. The new Turn-scoped local image path preserves original audience, ordered native delivery and resource readback. Production adoption and historical local image backfill remain open.
What changes
Codex can return an answer with Markdown images that point to locally produced files. The existing path redaction keeps their captions, leaving the private Lark sender with no image to deliver.
Bound-owner Codex project replies now get an output directory scoped to the current Turn. Chat captures the ordered image destinations before redaction and pins each permitted local image by its digest. The Lark outbox reads those exact bytes and uses its existing source checks, upload receipts and native image readback. Files outside that directory, symlinks, changed bytes and revoked access cannot produce an upload. When images are unavailable the prose is preserved and the image delivery remains unverified.
Existing public URL authorization and historical remote-image reconciliation use the same delivery path. This change covers new replies. Historical local files still require proof tying their bytes to the original Turn before they can be backfilled.
Validation