Skip to content

Keep scanning private replies when a delivery journal is unreadable - #8567

Merged
huangruiteng merged 1 commit into
mainfrom
codex/isolate-unreadable-private-delivery-20261111
Nov 11, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/isolate-unreadable-private-delivery-20261111

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

An unreadable or missing Lark delivery journal could stop discovery for every private conversation, including ones with an answer ready. Handle the failure at the individual journal and discard its stale discovery hint. The same scan can continue with other conversations. When the original journal is readable again, it returns to the existing receipt verification path.

The regression uses two private conversations with completed Core turns. Truncated JSON, invalid UTF-8, and a journal disappearing during discovery each stop the old scan. The candidate delivers and verifies the other reply in its original chat, preserves the affected record, and delivers its reply once the original record becomes readable. The fixture uses a local Core with a synthetic Lark provider.

Validation passed for 14 reply and scheduling tests, 56 discovery and ingress tests, and the standard premerge checks.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent, GPT-6 family, OpenAI, self_reported

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

Reviewed exact head: 8ad13ff

动机 / Motivation

在原飞书私聊等待 Core 答复的用户。同一回传服务内两个原私聊已有完成的 Core Turn,其中一份交付记录无法读取。一个不可读的原交付记录会中断整个扫描,其他已生成答复的私聊也无法回传。候选逐条处理读取故障,保留受影响记录,另一条正常私聊能沿原会话回传。回执不可读期间暂停该条的投递,保留原记录供恢复。三种故障在隔离环境复现。现场现有记录均可读,候选仍待独立评审与部署。

改动思路 / Approach

Core 持有原 Session 和 Turn,飞书原 transport 通过现有发现器读取待发记录,再由原 worker 复核来源与回执。变化限于飞书私聊回传服务的原交付记录发现。发现器把已有单条记录读取收进独立的错误边界。读失败会清除该条旧提示,继续列出其他就绪答复。该条恢复可读后,下一次扫描交给现有 worker 复核原身份和回执。

具体改动 / Changes

  • C1 让其他原会话继续回传。loopx/extensions/lark/private_delivery_discovery.py:36 在单个文件读取或状态解析失败时继续扫描,保留原文件。
  • C2 恢复原路径并保留去重。loopx/extensions/lark/private_delivery_discovery.py:58 继续用已有变更指纹保护已送达记录的提示,原回传入口仍自行复核。tests/test_lark_private_conversations.py:2473 构造截断 JSON、非 UTF-8 字节和扫描期间丢失文件三例,核对另一条原私聊真实回执,再恢复原记录并核对两条各自的最终回执。原会话契约

对主干的风险 / Risks

需核对合法旧记录的读取兼容性和扫描过程中可能发生的并发替换。候选保持现有指纹和回执结构,坏记录可读后恢复原回传。用例核对原文件字节、回执原会话身份、恢复后没有重复投递和模型调用。14 项私聊和调度测试、56 项发现与入站测试及标准预检通过。飞书响应使用隔离的合成 provider。

我的整体评价 / Verdict

该改动把可复现的故障限制到一条记录。其他原会话的最终答复已经在相同回传入口读回。生产安装仍待独立评审,部署后应核对原服务的自然回传。

English verdict: APPROVE

@huangruiteng
huangruiteng merged commit c49d59b into main Nov 11, 2026
34 of 43 checks passed
@huangruiteng
huangruiteng deleted the codex/isolate-unreadable-private-delivery-20261111 branch November 11, 2026 07:52
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.

2 participants