Repository navigation
fix(chat): open original conversations independently of connection settings - #7342
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 | OpenAI | self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
无阻塞发现。已绑定飞书原私聊的桌面或网页用户在打开原对话时受影响。原对话和权限仍健康,但连接设置清单失败时,旧入口把历史显示为不可用;新入口可读取同一原会话,真正的来源撤销仍禁止发送。打包实测中,设置接口返回 503 时,候选读取全部 14 条合成原消息及长答复,并且没有请求设置清单。本次不宣称完整历史与媒体同步、草稿恢复或真实 provider 往返已验收。既有未发送草稿在执行器从未解析状态恢复时暂不可见;完整同源旅程仍未完成。
改动思路
复用已有的来源资格决策和存储读取,在同一个 binding 锁内投影显示信息;设置健康不再成为打开原对话的隐含前置,也没有建立第二份权限或会话权威。本 PR 只交付可独立验收和回滚的来源读取修复;完整历史、媒体、原结论回传及草稿连续性继续由既有同源旅程验收承担。资格决策继续在既有 TypeScript Core,Python 只负责读取与显示投影,前端继续用准确的 binding 和 Session 冻结目标。把等待时间改长只能延迟失败,缓存资格会破坏新鲜权限;新增独立入口也会复制来源所有权。因此复用同一次已核验读取是更小的实际修复。
下表是本次 dd838ba 源码和执行观察的说明,不另作执行证据:
| 条件 | 基线 | 本次 |
|---|---|---|
| 原来源健康,设置503 | 来源不可用、历史空白 | 同一来源可读,零设置请求 |
| 原来源或权限失效 | 拒绝 | 仍拒绝,无替代会话 |
| 原来源恢复 | 原目标重试 | 同一原目标恢复;既有草稿问题保留 |
具体改动
评审依据是改动前已接受的 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md,spec_revision 65450d6。本 PR 的 RFC 新段落只披露读取修复,不能反过来降低既有验收。original-private-target 已实现:准确回显 binding、固定原 Session,不回退普通历史或新建。fresh-source-and-grant 已实现:provider 身份、当前工作区、binding 和 Core 资格仍新核验,群受众不纳入。single-service-desktop-continuity 延后:这是文档明确保持开放的安装态连续性要求,草稿、全历史、媒体和实际原消息回传仍由原有同源旅程验收负责。
关键代码讲解
ConversationBindings.local_session_snapshot保留原 provider 观察、Session 枚举和 binding 锁,先调用不变的listLocalBoundSessions决策,再投影有限来源。local_sessions是真实旧调用者的薄包装,既有管家入口和 managed-mode 不承担第二套资格规则。resolveBoundConversation复用 exact Session 索引,并由现有 schema 挑选有限来源字段;缺失、错绑、群受众、工作区不可用、执行器不符都拒绝。HTTP 只有绑定分支增加来源,普通 Session 列表和全量设置读取不变。useBoundConversation删除全设置清单的并行依赖,继续保留原五秒 abort、旧完成丢弃及重试。工作区类型只缩到实际消费的有限来源,没有新增布局、状态存储或迁移。
其余变化是现有真实 HTTP/Core smoke 的设置503控制、错包负例、三类权限失效用例、双语说明与四张公开合成内容截图。整个差异14文件 +130/-16,生产变化集中在五条既有路径;没有新 provider、队列、消费者、持久化权威或额外用户配置。
对主干的风险
最危险的回归是把显示来源误当权限证明,或者原来源失败时误读另一个 Session。现有 Core 私聊、当前授权、准确上下文及重复身份检查保持原位;binding 在观察期间变化仍拒绝,前端缺少新描述时明确要求更新并重试,绝不降级到普通列表。代价是新前端需要配套服务,已通过同包构建和拒绝旧/错包用例限定。
20个聚焦 Python 用例通过,bound-conversation 与 app-steward 两项真实 HTTP/Core smoke 通过,精确提交 Chat TypeScript 构建通过。预合入执行的6项直接检查和16项选中检查均通过,无执行失败;总门禁仍有4项人工评审 hold,本评审不能代替随后准确 head 的 approval closeout 与 merge readiness。当前 Goal 为 wait_for_ci=false,没有查询、轮询或等待远端 CI。
语义与 CI 对齐
此次复用既有 binding/Session 词汇,来源描述是衍生显示数据,不增加行动授权、义务或生命周期。语义探针0个受支持新载体只是有界辅助;实际判断依据是现有调用者、Core 规则和基线/候选同输入比较。设置503反例在基线失败、候选读取14消息;来源撤销时非空草稿仍不能发送。相同草稿恢复旅程在不可变基线和候选均丢失可见草稿,其执行器分键代码未改,作为既有缺口保留,未删除断言或提高限额来制造通过。真实 provider/model 尚未由这些合成用例证明。
我的整体评价
在 dd838ba 上,problem_context 是 justified_increment,long_horizon 和 user_experience 均 improved:重复打开原对话少了一项无关服务依赖,不再要求重新配置或额外确认;真正来源失效仍由原权限所有者恢复并重试。已检查打包页面的长答复、错误恢复和完整阅读页;桌面来源恢复后目标与执行者清楚,390px 正文和完整答复仍可读,未引入布局或样式迁移。未在本次打包合成场景中证明安装态 provider 往返或完整媒体同步;既有恢复草稿丢失在基线与候选均复现并保留。
这个切口有可用的实际调用者,架构归属明确,兼容包装有真实消费者;已选择的实现比添加缓存、服务或延长等待更小。本 PR 只交付可独立验收和回滚的来源读取修复;完整历史、媒体、原结论回传及草稿连续性继续由既有同源旅程验收承担。因此批准这一有限来源读取修复,完整同源体验保持未闭。回滚不涉及数据格式变化。自有 PR 以 COMMENTED 记录本批准结论,正式自批准受 GitHub 限制;合并仍以独立授权和准确 head readiness 为准。
English verdict: APPROVE dd838ba. The original-source entry now remains readable when unrelated settings fail, while fresh Core admission and exact-target refusal are preserved. Focused runtime checks, both real HTTP/Core smokes, exact-head build and 6+16 local checks passed; four manual holds still require separate closeout/readiness. Existing base/head draft loss and wider history/media/provider acceptance remain open.
A healthy original conversation could become unavailable because its entry also waited for the full connection-settings inventory. The Session read now returns a limited display source under the same Core verification and binding fence; the conversation entry reads that descriptor directly. Settings keep their full inventory, and input retains fresh Core admission and the existing five-second read deadline.
The descriptor carries the exact binding, private-owner audience, workspace availability, title and executor. The frontend refuses missing or mismatched descriptors, group audiences and executor changes. Ordinary Session lists retain their previous shape. The compatibility
local_sessionscaller and both RFC mirrors are retained.Validation:
Existing limitation: an unsent draft entered while the executor is unresolved becomes hidden when source recovery resolves the executor. The same counterexample reproduces on baseline
adbcb08f2; its executor-keyed draft code is unchanged. This source-read fix does not qualify draft continuity, complete historical/media synchronization or an installed provider roundtrip.Visual evidence uses disposable synthetic content. Before is
adbcb08f2; after uses the identical functional source diff committed indd838ba955193ee6cb4a9b8709ce21ebe8532fd9, then rebuilt at that exact head. The rebase adds only unrelated browser-fixture changes from current main.Before — connection settings unavailable:
After — same injected settings failure, original conversation readable:
390px conversation and complete-answer reader: