Skip to content

Keep private steward mentions in their original topics - #9322

Merged
loopx-agent merged 2 commits into
mainfrom
codex/private-steward-distinct-thread-20261123
Nov 23, 2026
Merged

loopx-agent merged 2 commits into
mainfrom
codex/private-steward-distinct-thread-20261123

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

  • A steward mention in an independent Feishu/Lark reply topic could steer an unrelated active Turn or stop at a steering rejection. The owner saw a retained failure notice without a queued request.
  • An independently verified reply topic enters the steward's existing FIFO. A separately authorized replay of a proven pre-dispatch rejection uses its original source, client identity and reply placement.

Author Declaration

  • Written by: model_agent · OpenAI Codex (GPT-6 family)
  • Implemented against: the two observed behaviors and the existing bound-owner admission, steering receipt and verified reply contracts in this repository.
Criterion Disposition Symbol / path Test
Admit an independent topic without steering the active Turn implemented LarkPrivateConversations.admit test_private_steward_distinct_topic_keeps_its_own_request
Recover a selected exact pre-dispatch failure through its original audience once implemented external_mention_recovery.requeue_rejected_mention recovered delivery, crash and negative controls in the same test
Retain the original failure and verify the new reply by provider readback implemented LarkPrivateConversations.reconcile_request preserved terminal receipt and a separately verified original-message reply

Scope And Continuation

The fix uses the original steward Session, existing source verification, queue and reply worker. The private operation targets verified text mentions with distinct known reply topics. It leaves ambiguous steering, edited sources and stale grants held. Live adoption and readback use the original service after merge.

Validation

  • Tested revision: 3ac92c23cf1b689dd187389593dc03554766a8b5
  • Run state: finished
  • Input classes: synthetic, authorized_private_read_only
Check kind Result Public-safe evidence
static passed Ruff, Python compilation and diff hygiene
regression_parity passed Against the previous code, the fresh cross-topic case records a steering command instead of a durable Turn. The fixed routing and replay cases pass with the native runtime and synthetic provider.
integration passed 673 cases across the Lark and native steward suites, including one existing queue-thread teardown warning. Standard premerge passed all 10 canaries and 6 direct checks with a longer timeout after the concurrent runs timed out.
real_backend not_run Live acceptance follows guarded service adoption. Synthetic provider checks establish behavior, including readback receipt handling, before touching the live service.

Frontend / Visual Evidence

The existing private reply composer and terminal reply placement cover this routing fix. It adds no screen or public user control.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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.2-sol · OpenAI · runtime_reported · max

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

动机 / Motivation

用户在飞书私聊的一个话题里向管家发问时,另一个话题的长任务正在运行。

旧版本把第二个话题里的 @ 当成对活跃任务的插话。送不进活跃执行器时,用户只看到拒绝,新请求没有入队。修复后,有确切话题证据的新消息进入同一管家的队列。

原管家处理独立请求后回复原消息。已确认在执行器调用前遭拒的旧消息,可以在原授权下补办一次并保留旧回执。

本次处理能核实双方原话题的私聊文本接续。话题并发、应用升级和其他旧请求的处置仍走各自流程。

安装前的验证使用真实原生队列和测试提供方,原有服务采用与飞书原消息返回仍需在合入后核对。

改动思路 / Approach

话题事实来自飞书原文,队列与去重归 Core,返回仍由原回复工作器完成;拆小两个模块后,三者之间没有第二个执行者。 本次范围是修复可核实的跨话题路由,以及一次只针对确切原消息的人工授权回放。。历史失败记录中的活跃回合属于另一条消息,通用的失败回合续办无法凭它确定本条请求是否执行过。补办因此同时检查原拒绝、执行器调用前的失败回执、来源内容和当前授权,再复用正常入队。原私聊工作器仍负责最终回传和读回。

具体改动 / Changes

本次范围以可复现的私聊故障和 PR 里的明确修复项为依据,没有单独的变更规范。新话题正常入队、历史请求安全补办及旧回执保留分别有真实 Chat 调度入口的回归用例和负例。

关键代码讲解

  • steer_in_topic 核对两个原始话题和同一私聊绑定。首次证实独立话题时先持久化队列路由,随后使用原 Core 入口。测试模拟入队后丢失一次传输投影,原请求仍找到同一回合。路由代码
  • requeue_rejected_mention 要求原回执表明尚未调用执行器,检查用户停止意图、当前授权与来源,并复用同一客户端 ID。崩溃后若队列回合已提交,只补齐相关记录。Core 补办
  • _apply_replay 对照准确的原消息、旧拒绝回复和捕获回合,读回飞书内容与话题。它复用旧回复工作器的独立结果阶段,测试确认新答复的父消息对齐原提问,旧回执仍可读。回传关联

对主干的风险 / Risks

最重要的风险来自误把不确定的旧发送当作失败,或者进程中断后重复入队。测试用实际本地 Chat 存储和发送工作器模拟这两类情况,覆盖旧申请缺失、授权过期、源内容变化、同话题和恢复投影中断。标准预合并检查通过。受影响的两个测试文件共通过 673 项,定向回归通过 10 项。旧代码在同一独立话题样例上返回转向命令,另外两项历史兼容性检查通过。生产服务状态、真实模型完成和飞书回读留给安装后的验收。原系统的激活保护在合入后继续适用。

我的整体评价 / Verdict

稳定客户端标识与预写标记让原请求在两种记录投影中断后仍能继续,测试覆盖同一个模型回合和单次原消息回传。用户使用既有回复入口,独立请求有自己的结果。同话题校正仍由活跃回合处理,补办无需用户重发相同内容。 检查了私聊入口与最终回复,改动只走现有飞书消息和回复位置,未增加或更改渲染布局。 两个已接近大小上限的既有文件把新增逻辑留在各自负责的小模块,常规输入、旧回执读取与权限校验仍由原入口承担。已核对行为和重复回放边界,当前精确头可合入,并应在采用后单独验收原服务和原线程。若发布候选变化,按更新后的头重新确认测试和合并状态。

English verdict: APPROVE. Reviewed 3ac92c2. The exact-head regression, native steward suites and standard premerge gate passed. Live adoption and original Lark readback are post-merge checks.

@loopx-agent
loopx-agent merged commit d33af49 into main Nov 23, 2026
10 of 16 checks passed
@loopx-agent
loopx-agent deleted the codex/private-steward-distinct-thread-20261123 branch November 23, 2026 12:44
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