Repository navigation
fix: 兼容 DSH 0.1.2-rc.1 Session snapshotEvents() API(issue #58 #59) - #60
Merged
Merged
Conversation
DSH 0.1.2-rc.1 起 Session.events 属性改为 snapshotEvents() 方法, autoSummarize 与 inject 取不到事件而失效。改用兼容垫片 snapshotEvents?.() ?? .events,新旧 DSH 通吃。新增 2 个用例,812 全绿。 Co-Authored-By: Anans-Ivresse <[email protected]>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
- README 中英双表补齐 v0.7.7/v0.7.8 路线图行,测试徽章 810→812 - dsh-mneme/README.md 亮点表 + 路线图 + 前置条件 DSH 兼容说明 - 双 CHANGELOG 新增/更新 v0.7.8 条目(Session.events→snapshotEvents() 垫片) Co-Authored-By: Anans-Ivresse <[email protected]>
Anans-Amarre
added a commit
that referenced
this pull request
Sep 7, 2026
v0.7.12(dd0ed78)重写时误删了 scripts/check-sync.js,而 ci.yml 的 「Sync check (src↔lib)」步骤、release.yml 的 test job 都引用它(node scripts/check-sync.js)。 历史教训 PR #60 → issue #65:只改 src 忘同步 lib,发布包跑旧代码。此脚本是发布前 src/↔lib/ 一致性守门,v0.7.9 引入(f5e6cbe),本 PR 恢复并纳入新 CI 流水线。 Co-Authored-By: Anans-Ivresse <[email protected]>
modusensus
added a commit
that referenced
this pull request
Sep 7, 2026
* ci: 测试矩阵扩展为 windows/linux × node 22/24,发布改为完整流水线 - test.yml → ci.yml:双平台(ubuntu/windows)× 双版本(node 22/24)矩阵, fail-fast 关闭;src↔lib 一致性校验(scripts/check-sync.js)前置到 CI; Codecov 只在 ubuntu+node24 分片上报;新增 npm 依赖缓存 - publish.yml → release.yml:v* tag 触发完整流水线 verify(tag↔package.json↔CHANGELOG 三方一致性)→ test(双平台全量) → publish(沿用 root 版本同步 + skip-if-exists 幂等守卫) → release(GitHub Release,说明自动抽取 dsh-mneme/CHANGELOG.md 对应小节) → notify(Step Summary + webhook 预留位);workflow_dispatch 支持 dry_run - dsh-mneme/package.json:test 脚本 test/*.test.js → test/(目录模式), Windows cmd 不展开 glob,跨平台矩阵需要目录模式 * fix(ci): 还原 test 脚本为 test/*.test.js —— node --test 自带 glob 展开(≥22),目录形式 test/ 反而在 22/24 上被当作模块路径 require 而全平台失败(实测 node 24 win/cmd 612 全过) * fix(ci): release.yml 在 dsh-mneme/ 子目录发布,不碰 root 壳版本 - Publish job 加 working-directory: dsh-mneme(发布根 = dsh-mneme/package.json, 真实版本 + prepack 自动 npm run sync 同步 src→lib,与 v0.7.12/0.7.13 本机发布包结构一致) - 删除「Sync root version from dsh-mneme」步骤:root package.json 是编排壳 (版本停在 0.7.2),不参与 npm 发布,root 与子目录版本无需同步 - 顶部注释更新为子目录发布说明 Co-Authored-By: Anans-Ivresse <[email protected]> * chore(ci): 恢复 check-sync.js(v0.7.12 重写删除,但 CI/发布闸门仍引用) v0.7.12(dd0ed78)重写时误删了 scripts/check-sync.js,而 ci.yml 的 「Sync check (src↔lib)」步骤、release.yml 的 test job 都引用它(node scripts/check-sync.js)。 历史教训 PR #60 → issue #65:只改 src 忘同步 lib,发布包跑旧代码。此脚本是发布前 src/↔lib/ 一致性守门,v0.7.9 引入(f5e6cbe),本 PR 恢复并纳入新 CI 流水线。 Co-Authored-By: Anans-Ivresse <[email protected]> * fix(test): peer-C Windows 清理加 maxRetries —— rmSync 偶发 EPERM Windows 上 8 个 SQLite 子进程退出后 -shm/-wal 句柄延迟释放, finally 里 rmSync 删临时目录偶发 EPERM(Linux 不触发)。测试逻辑本身 全通过(generation==80 断言绿),仅清理环节挂。Node fs.rmSync 的 maxRetries 对 EPERM/EBUSY 自动重试,一行修复,不动并发逻辑。 Co-Authored-By: Anans-Ivresse <[email protected]> --------- Co-authored-by: modusensus <[email protected]> Co-authored-by: Anans-Ivresse <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
DSH 0.1.2-rc.1 把
Session.events属性改成了session.snapshotEvents()方法,导致:llm_audit_logs全空)src/inject.js的 lastUserQuery / extractRounds 同样取不到会话事件修复
兼容垫片(非硬切换,老版本 DSH 的
.events仍可用):src/summarize.jscollectMessages:session.snapshotEvents?.() ?? session.events ?? []src/inject.js两处:ctx?.agent?.session?.snapshotEvents?.() ?? ctx?.agent?.session?.events测试
snapshotEvents()时摘要/注入仍正常)npm test)Closes #58 #59(等社区实测确认后再由维护者关闭,issue 保持 OPEN)