Skip to content

fix(chat): keep handoff acknowledgements readable - #5953

Merged
loopx-agent merged 1 commit into
mainfrom
codex/handoff-readable-default-20261008
Oct 8, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/handoff-readable-default-20261008

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

When a Chat handoff succeeds, its terminal reply currently overwhelms the conversation with recipient-selection history and dense semicolon-separated brief fields. Use the shared acknowledgement renderer to show a short task preview, readable result/boundary bullets and the verified delivery or execution observation. The complete receiver brief, every omitted item and the original return route remain intact.

This changes the default acknowledgement presentation for App, Goal and Lark handoffs. It also corrects the stale README claim that inbox delivery proves execution has not started. Placement stays in the existing presentation adapter; typed grants, admission, storage and return owners are unchanged. The related refactor removes the dense preview loop rather than introducing another presentation or authority layer.

Validation: 94 relevant Python cases passed across manager handoff, execution, Chat delegation and Lark reply/return; Ruff and scoped mypy passed. Premerge passed its 5 direct checks and 18 selected smokes after installing the checkout's required npm dev dependencies. A source-built Chat browser canary exercised real context delivery and full-brief expansion with a scripted model host; the updated screenshot contains synthetic content only. A matching worst-case fixture went from 1,605 to 920 characters. Initial old-output assertions and missing-dependency failures were corrected and rerun.

Real model routing, live Feishu adoption of this new presentation and sustained operational SLOs are not qualified by this fixture. No CI status was queried or awaited.

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.1-sol · OpenAI · runtime_reported · reasoning_effort=xhigh

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

审查精确 head e36ec4c20451784e63989109e9d2048e1176e90d,基线 05af21dd4cbc8256af1da9746a34abc13085cfd3。未发现阻塞项。本记录为作者账号的 COMMENTED 自评结论,不能当作 GitHub 正式 APPROVED 或合并授权。

动机

在 Chat、Goal 对话或 Lark 中把任务交给已有 Agent 的用户,会在交接成功后看到一条很长、难扫读的回复。

例如交办一项文档核对:原回复展开选择依据并用分号堆叠要求;本改动先展示接收方和任务,再列结果与边界,超出的条目仍可在完整交办卡片和接收方简报中读取。

独立验证确认:摘要更易扫读,完整要求未丢失,投递与开始执行、完成仍明确区分;原路返回可在刷新后读取且重试不重复投递。

本 PR 不新增执行权限、接收方生命周期或配置开关,也不证明真实模型选人、live Lark 采纳和长期运行指标。 父契约中的真实模型选人、真实 worker 采纳与执行,以及 App/Lark 长期运行资格仍需独立验证。

改动思路

采用现有共享展示适配器即可完成这项有用改进,不需要第二套收件箱、状态源或配置开关。 当前 PR 边界是默认交接回复的展示与真实状态说明;完整简报、授权、受控执行和返回链仍由原 owner 负责。

独立依据是基线 05af21dd4cbc8256af1da9746a34abc13085cfd3 的 docs/architecture/rfcs/capable-manager-semantic-handoff-v0.md:5.5 要区分投递、独立采纳与执行并保留原路结果;5.6 要保留完整简报与各阶段事实;5.14 要复用对话工作面并控制信息密度。三项均有实际调用与持久回读证据。A21–A24 的完整运行资格属于尚未闭合的父验收,新增 RFC 说明不能替它签收。

具体改动

唯一生产改动是 loopx/capabilities/manager_context/execution.py 的 handoff_message:折叠展示用空白,目的最多 160 字,先展示最多三项验收结果,再展示最多两项边界;单项分别限制到 100/90 字,回传要求限制到 120 字,并明确提示省略数量。选择历史留在完整简报里。handoff_response 仍先真实投递、再由原 dispatch 检查独立执行授权,最后依据 receipt/dispatch 渲染;自由模型文本不决定完成状态。

loopx/capabilities/manager_context/README.md 明确新默认展示,并修正“投递证明尚未启动”的旧说法;上述 RFC 增加有界展示说明;docs/assets/handoff-ack/after.png 为合成数据示例。五个测试模块覆盖整个 PR:tests/test_manager_handoff_message.py 新增层次/省略和极长条目测试;tests/test_manager_context_handoff.py、tests/test_manager_context_execution.py 更新真实入口断言并保留完整简报、授权拒绝与 replay;tests/test_chat_delegation_journey.py 保留修正/迟到结果原路返回;tests/extensions/test_lark_reply_handoff.py 保留消息适配器与返回链覆盖。

独立验证:五模块 head 94 passed,同一不可变 base 的原测试 92 passed。再用相同的 head Chat journey oracle 运行两版真实入口:base 两个对话通道都在旧回复展示上失败,head 2 passed;纯展示 oracle 在 base 七项失败,证明确实抓住旧行为。Ruff 通过;风险型 premerge 5 direct +19 selected 全通过(10 catalog、8 risk、1 public boundary);语义 advisory 无支持的新词汇 carrier,相关全树语义 canary 通过。

已从精确 head 构建 Chat(包含 TS typecheck、Vite、源码 manifest),浏览器走一次普通交办:摘要保留“投递成功、执行尚未核实”,一次可选展开可见全部三项约束/四项验收,原生 inbox 与原 brief 完全相等。合成接收方独立记录 adopt/conclusion 后,原生 drain 首次 1、再次 0;冷读无重复,浏览器刷新显示原会话返回。实际 HTTP、收件箱、会话存储与返回链未 mock;模型推理、广域状态采集及接收方业务结论是隔离脚本/合成数据。

对主干的风险

共享默认回复会同时影响 App、Goal 与 Lark。主要反例是摘要缩短导致约束丢失、误报 worker 状态或结果发到新会话;完整 payload/展开、未知执行观察、迟到结果与持久去重分别覆盖这些风险。原授权、选择、quota、lease、execution binding 和持久协议不变。无新开关或 default-off 声明;无需用安装/可用性推断授权。

首次浏览器脚本缺 response schema,前端据实拒绝;补全与真实模型适配器一致的 schema 后在新的隔离实例重走全过程,没有修改产品校验。源码构建保留 chunk-size warning。未独立运行作者所称 scoped mypy,未测试真实模型选人、独立 live worker、live Lark 账号和长期 SLO;它们不被本展示阶段签收。没有查询或等待 CI。premerge 无失败/manual hold,其通过不授予 self-merge。

我的整体评价

APPROVE 这项有用、可逆的展示增量。未来演进检查已在当前同域做了最小简化:删除稠密 preview 循环,复用原完整交办卡片与事实 owner;没有理由增设第二套状态或配置层。父运行资格仍按原 owner 独立验证。此账号是 PR 作者,发布 COMMENTED 结论后还需原生 closeout 回读;不声称 GitHub 正式批准或已合并。

English verdict: APPROVE - e36ec4c; readable truthful handoff preview preserves the complete brief and original durable return. Independent 94-case head suite, immutable-base comparison, paired native Chat oracle, built frontend journey, Ruff and risk-based premerge passed. Scripted inference/synthetic receiver do not qualify real model or live-worker adoption.

@loopx-agent
loopx-agent merged commit 1eb6159 into main Oct 8, 2026
23 of 28 checks passed
@loopx-agent
loopx-agent deleted the codex/handoff-readable-default-20261008 branch October 8, 2026 10:32
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