Repository navigation
Replies: 7 comments 2 replies
|
我不是维护者,但在当前
因此不建议把检查直接删掉、把未知事件默认当作可忽略,或仅做 composition-local 注册。这三种快速修法都可能把可见的拒绝变成静默错误重放。 短期规避方式是:第三方插件不要把自有的必需状态写进第一方 Session log,先放到插件自有的持久化存储;当前 reader 拒绝时,支持定位的 backend 会在 长期我认为这个案例很适合推动一个明确的扩展契约,至少要区分两类事件:
对应回归测试也应覆盖完整的 append → flush → 进程重启 → cold load,而不只是内存中的 |
|
我也遇到了同类问题,非常希望官方增加插件事件类型注册接口的功能。 |
|
补充一个已经命中该问题的真实下游 consumer: 该插件是挂在官方
写入端已经显式请求 marker,例如: (session.append as unknown as VerdictAppend)(
"autoReview/verdict",
payload,
{ ignorable: true },
)源码位置:https://github.com/PerryLink/dsh-auto-review/blob/v0.5.0/src/runtime.ts#L217-L231 但在 rc.6 上实际运行后,提交进 Session 的事件仍然是: {"type":"autoReview/state","seq":0,"time":1786921322293,"data":{"enabled":true}}顶层没有 这不是“卸载插件后才失败”:只要第一次自动审批写入 verdict,JSONL 就已经包含未知且未标记的事件。当前 Host 内会话仍可继续使用,但 Host 重启后的 cold load/resume 会被 截至 2026-08-16,当前
建议最小修复仍是让 append metadata 对非 surface 的 log-only 事件支持 另外建议在 append 时对未知且未标 marker 的事件 fail loud,避免写入成功、直到下一次重启才发现整个 Session 已不可恢复。 |
|
真实事故报告(rc.6 + 第三方插件,2026-08) 补充一个完整踩坑案例和本地缓解的验证结果,供维护者参考。 事故过程:0.1.0-rc.6 的 web profile 里装了两个会写自定义 session 事件的第三方插件—— 共 4 个会话历史无法加载(3 个 distill + 1 个 tokenhub),与 Bruce-anle 描述的 dsh-auto-review 完全同型:写入端没有(也无法)带 本地缓解(临时、有取舍):等不到上游修复又要救回对话,我在本地 rc.6 做了最小改动:
验证:本机 22 个会话全部 cold load 通过(含之前失败的 4 个),健康会话零回归; 我完全同意 LeoLin990405 的判断——这不是白名单少一项的问题,而是类型扩展面与 durable writer 契约没闭合。上面第 1 条本质上就是讨论里明说「不建议」的快修,取舍是本机可用性优先于 fail-loud:第一方 reader 防的「新 harness 日志被旧 reader 静默错建」在我的单机部署里风险很低,而第三方插件把会话永久弄挂是每天都在发生的现实。等 append 支持受校验的 顺带一个同区域的新发现(另一类错误,如需可单独开 issue):rc.6 在「turn 被打断 → 写入 interrupted closers → 恢复续写」时会出现约 2 个 seq 的尾部批次重叠,重启后扫描器报 |
|
Author reply (dsh-auto-review maintainer): the diagnosis in this thread is correct, and I owe @Bruce-anle (and anyone who uninstalled) an apology for shipping it. What changed today: 1. dsh-auto-review 0.5.1 stops writing unmarked events on pre-marker hosts. The runtime now detects a host whose Session.append drops the ignorable options bag (installed-peer version pre-check against the known-unmarked rc.1–rc.6 lines, then a probe of the first appended envelope's return value) BEFORE polluting a log, and degrades to an in-memory audit mirror: marker-free deny/fallback/circuit feedback (the logged tool result is the audit, so model-visible ⟺ logged still holds), in-memory budgets, circuit breaker, /auto-review on|off override and �pprove. Sessions stay loadable everywhere. �llowUnmarkedAudit: true opts back into the old unmarked behavior — deliberately dangerous, default off. On marker-aware hosts (post-rc.6) the full event-based audit is unchanged. 2. Existing polluted logs are repairable. dsh-permission-rules v0.5.1 extended scripts/repair-session-logs.mjs to cover ALL FIVE �utoReview/* event types (state, �erdict, circuit, override, 3. Same class fixed in dsh-background-agents 0.5.2 (its �ackground-agents/fact / eam-room/fact events had the identical defect; a FactAppender now gates them the same way). On the upstream side I fully support the two-part contract you sketched (validated ignorable: true writer surface for log-only events + a cross-composition-stable namespace contract for required events). I'll track the upstream fix and re-enable full audit automatically once Session.append honors the marker on the harness side — the runtime already probes for exactly that. Verification: 202 unit/integration tests on the rc.6 peers cover both modes (audit-on with the opt-in, and the degraded safe path), plus the unversioned-host probe path. |
|
Follow-up (2026-08-18): 0.1.0-rc.7 shipped WITHOUT the ignorable fix too — its Session.append is byte-identical to rc.6 for the options bag (verified against the published tarball), so the plugins now flag every released rc line (rc.1–rc.7) as known-unmarked and keep the degraded safe path there. dsh-auto-review 0.5.1 and dsh-permission-rules 0.5.1 now track rc.7 (peers bumped, full gates green on the rc.7 packages); dsh-background-agents 0.5.2 declares rc.7 in dshVersions. When a release DOES stamp the marker, the append probe flips audit back on automatically. |
Ecosystem-wide status from the 34-plugin family (cross-referencing #802, #862)A concise update from the largest affected plugin family I maintain, plus a Scale evidence: 12+ of our 34 plugins hit this exact boundary. Because there Consolidation: I believe #802, #862 and this thread share one root cause - Formalized request (tiered):
We are happy to contribute the affected-plugin list, reproduction cases, or 中文版: 来自我们 34 插件家族的全生态现状汇报 (与 #802、#862 交叉引用): 规模证据:34 个插件中 12+ 个命中同一边界。因为没有官方注册面,每个 合并建议:#802、#862 与本帖是同一个根因的三面 - 读取端对未注册事件 正式诉求 (分级):
我们愿意提供:受影响插件清单、复现用例,或按官方意向实现一版提案 |
Uh oh!
There was an error while loading. Please reload this page.
我在开发第三方插件(https://github.com/jiruidai/dsh-meta-orchestrator)时碰到的问题,任何按文档写自定义事件的插件都会踩中。
现象
插件用
SessionEventMap声明合并定义自己的事件类型,再用Session.append写入——运行时一切正常,但重启后这个会话就再也打不开了:assertEventsSupported(session-persistence/coordinator.ts)对白名单KNOWN_SESSION_EVENT_TYPES之外、且未标ignorable的事件直接抛SessionFormatUnsupportedError,拒绝加载整个日志;SessionEventMap成员生成,插件事件天然不在其中;Session.append没有任何途径给事件标ignorable。写入当下没有任何报错;等到重启后尝试恢复这个会话时,加载直接抛
SessionFormatUnsupportedError——整段对话历史无法再打开,也没有任何恢复手段。能修复下吗?
比如给插件事件类型加一个注册面,或者让
append支持ignorable(known-event-types.ts注释里也提到注册面 "deferred until such a consumer exists")。All reactions