Repository navigation
Replies: 14 comments 2 replies
|
English summary: source-verified at rc.7 (99f6f02) — the root-cause analysis is exactly right, with one half-good missing fact: the READ side already honors 源码验证(rc.7
但缺了半个关键事实(好消息)——读侧已经支持 ignorable 标记: envelope 契约在 非 surface 类型的 opts 是空元组——任何插件都无法在 append 时带上 家族谱系:这是第 5 位独立插件作者撞上同一缺口:
known-event-types.ts 里 "deferred until such a consumer exists" 的前提已被 5 个消费者证伪——这个接口缺口现在有确凿的社区需求。 三个方案逐一评估:
两个补充建议(与家族修复蓝图一致):
修复形态(一 PR):strict-typed |
|
已按方案 2(ignorable envelope 写侧暴露)完成实现,源码级验证 + 测试全绿 ✅ 实现内容(与讨论中 argszero 给出的修复形态一致)代码位置(基于 rc.7 = 99f6f02):
验证结果
变更分支
|
作为 dsh-click 的作者补充一线情况:我们的插件生态也大量使用自定义 session 事件,且正在适配 rc.6/rc.7: 现状
目前的应对与痛点(实测):当前我们用独立的 detached SessionStore 来 append( 期待方向:支持(1)注册表(2)带标记的 envelope——尤其 envelope 的标记位,生态侧最需要「不破坏恢复」这一条;如果官方还能给出查询面(如 |
|
感谢 @zoahdev 的独立核验与 rebase 帮助——基底标注确实是我的疏漏(本地 clone 时 origin/master 还在 47f9438,fetch 到 99f6f02 后未同步到分支描述),已修正。 已完成的跟进:
再次感谢验证与 rebase!当前状态与 argszero 的"修复形态(一 PR)"完全对齐,随时可 cherry-pick。
|
|
@PerryLink 感谢回复!不过有个问题需要先确认:你的这条回复在我这边显示为乱码(中文字符全部变成 方便的话请用英文重新发一遍要点(或确认是否已修正编码后重发),我好准确回应。 从乱码中能辨认出的框架(如有误请纠正):
先直接回应第 2 点(如果我没理解错):本次实现正是让 rc.7+ 的写侧暴露 期待你的完整回复,我可以据此把三个新消费者(dsh-draw/checkpoint-rewind/background-agents)补进提案的家族谱,并确认实现是否覆盖你们的场景。
|
|
感谢 @denial123789 的实践指南——"插件存在/缺失/升级三种冷恢复"和"重建关键记录 vs 纯信息记录"的边界划分非常清晰,与 types.ts:412-422 的 envelope 契约语义完全一致。 回应你的核心关切(ignorable 只能用于"删除该类型所有记录也不会改变重建状态"的事件):这正是本次实现的设计约束—— 已按你的指南补充回归测试(
当前分支
如果你愿意,可以把这份指南链接进 harness 仓库的文档(比如
|
|
English summary — a status narrowing rather than a tenth report. The design has since settled: the generated catalog now names the persisted 这是一条状态收窄,不是第 N 次报告。 我本来也准备照前几位的形态再报一遍,查下来发现不必——方向已经定了,而且定下来的方式和本线程最初的提案不一样。 1. 机制已经落定:
|
评论内容(直接粘贴)
补充一个同类消费者:卡在迁移层的 我是 source: { kind: "mcp-catalog", digest }桌面端 2.0.5 → 2.0.9(内核 触发点——v2→v3 迁移的 payload 校验: function assertSource(message) {
const source = record(message["source"], "message source");
if (typeof source["kind"] !== "string" || !SOURCE_KINDS.has(source["kind"]))
throw new SessionFormatUnsupportedMigrationError("cannot safely transform unclassified message source");
关键差异:只在迁移层拒绝。 同一台机器、同一内核,升级后新建的 v3 会话里同样有一条 另外通读迁移代码注意到:迁移层对未知事件类型是硬拒绝,且发生在 规模(本机实测):v0 会话 574 个,其中 552 个含 诉求
|
|
Three current-main branches, all rebased onto Migration layer — this answers @alone-tree's question ("should the migration layer consult Write side — the missing producer @lucifer1004 narrowed the thread to. Update: that cold-load assertion is now carried over — re-homed onto the handle-based API in Plugin-declared kinds inside messages (@alone-tree's Scope note: the (中文摘要:迁移层那条分支把"迁移先看 ignorable"落实为——v0→v1 恒等边原样准入,v1→v2 / v2→v3 重写边省略该事件并保持序号稠密,被保留事件引用到被省略序号时拒绝;写侧那条是 Mchsd 已验证补丁在最新 master 上的 rebase(作者保留),并修掉了 rebase 过程中暴露的 |
|
Apologies for the garbled text in my earlier comment - that was a publishing-side encoding fault on my end. The original comment has since been restored to a readable version (see the note at its top), and below is the English restatement Mchsd asked for, plus where things stand now. What the original comment said
The three doubts I raised at the time (rc.6/rc.7 era)
Where things stand now, as I understand it
We still hope the official |
|
English summary: I took this thread's proposal 2 (expose the write-side 顺着这条线程的方案 2 做完了实现,并补上「写进去之后怎么显示」的那半:
与 @Mchsd 的实现在解决同一个问题,三处形态差异(命名与位置 / 我多加的已知类型闸 / 我没有做 warn-at-append)都在 #7605 里写明,并说明愿意改成社区已经收敛的那一版。 细节、已跑的检查,以及两个问题 —— 这块目前是否有计划、外部补丁希望以什么方式登记 —— 都在 #7605: |
Uh oh!
There was an error while loading. Please reload this page.
问题 Problem
第三方插件写入的自定义会话事件(session events)会导致会话恢复崩溃(resume refused)。
dsh-click(桌面控制插件,
dsh-click/observed/dsh-click/action审计事件)实测在 rc.6 / rc.7 上触发:后果:QQ/IM 客户端恢复会话失败 → 强制
create新会话 → 历史上下文全部丢失。对插件重度部署这是确定性事故(每次用过 dsh-click 工具的会话都不可恢复)。根因 Root cause
@deepseek-ai/dsh-session的KNOWN_SESSION_EVENT_TYPES是静态编译白名单。known-event-types.js注释明确承认:dsh-click 就是第一个撞上这个缺口的消费者。且 rc.6 / rc.7 的
Session.append(type, data)没有 append-envelope(ignorable)选项——插件无法把自己的事件标记为 ignorable,恢复端只能整段拒绝。影响 Impact
任何向会话追加自定义事件类型的第三方插件都会中招:
建议方案 Proposal(任一)
pluginInventory/api-remotes同层)Session.append支持{ ignorable: true };恢复端对未知类型默认跳过 + 警告(写死"拒绝整段"过于脆弱——silently skipping a required event 的风险远小于不可恢复的会话)临时 workaround(当前可用)
KNOWN_SESSION_EVENT_TYPES追加dsh-click/observed、dsh-click/action(两个文件,升级后需重打)auditSessionEvents开关(默认 true,可关)→ PR PerryLink/dsh-click#2期待官方对这个接口缺口的回应/规划。
All reactions