Skip to content

v0.1.6

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Sep 07:35

dsh-diff-stat v0.1.6

Eighth release. The turn summary card's review expansion survives streaming: while the next turn's answer streams in, every file's review diff — most visibly the last, dispatch-joined one — stays open instead of flickering shut, a stale or failed window preparation falls back to raw hunks, and the join feeding the card becomes a pure module whose identity-stable cache contract is pinned by a new CI check.

Install / 安装

# from npm / 从 npm 安装
dsh plugin --profile web add dsh-diff-stat

# or from GitHub / 或从 GitHub 安装
dsh plugin --profile web add github:HaoyueQin/dsh-diff-stat

Uninstall:

dsh plugin --profile web remove dsh-diff-stat

Fixes / 修复

  • Review diffs stay open while the next turn streams: the card's expanded review closed the instant the next turn produced a streaming chunk. The per-turn dispatch join keyed its cache fast path on the chat snapshot object identity — which every chunk rebuilds — so the join re-extracted per chunk, the merge re-cloned every entry, and the review gate's exact-identity check failed again on each chunk. The fingerprint now keys on what actually identifies an unchanged tree: the turn coordinate, the node keys, and the node identities behind them (the stock assembler reuses undirty contexts' nodes), so the joined list — and every hunk identity under it — stays stable across the stream.
  • A stale or failed window falls back to raw hunks: the expanded review rendered nothing while its context-boosting host read was in flight, and a failed read (binary file, a file being rewritten by the live turn) blanked it permanently — the retry guard treated the failure as done. The render now falls back to the raw hunks with window-relative gutter numbers until a fresh window lands (restoring the module's own documented design), and failed reads stay retryable instead of pinned.
  • The review self-heals after real re-settlements: the prepare effect keys on the file list's identity as well, so a genuine re-fold (history pagination, republished turn data) re-prepares stale entries in place instead of waiting for a manual re-toggle.

Infrastructure / 基建

  • The dispatch join becomes a pure module with a pinned cache contract: the join and its fingerprint cache move out of the component into src/client/turn-join.ts (no React, no runtime value imports), and scripts/check-turn-join.mjs (pnpm check:join) pins the contract in six scenarios — repeated joins over an unchanged tree return the same array with the same hunk identities; changed nodes, changed key sets, changed turn coordinates and first extractions miss correctly; non-tool-call nodes and missing keys hold stable placeholder positions. Wired into both CI and the release workflow.

Full Changelog: v0.1.5...v0.1.6


中文说明

第八个版本。主线一处行为修复:轮末汇总卡的审查展开在下一轮流式期间保持打开——此前任意一个流式 chunk 都会把已展开的审查 diff 顶掉(最后一个文件——run_code 派生合并的那个——最明显,点开瞬间即关闭并反复闪烁),并伴随两处配套增强与一条基建固化。

流式期间审查不再闪关:卡片的派生合并(PTC join)缓存快路径错把「聊天快照对象身份」当缓存键,而流式期间每个 chunk 都会重建快照对象——于是每个 chunk 都全量重提取,合并层再整体克隆,审查渲染门的严格身份比对(prepared 条目的输入须为该文件当下 hunk 列表)逐 chunk 失配。指纹现改键于真正刻画「树未变」的事实:轮坐标、节点键、节点身后的节点身份(stock 装配器只重建 dirty 上下文的节点)——合并结果与其下所有 hunk 身份在整个流式期间稳定。

陈旧/失败的展开窗口回退原始 hunks:展开时上下文增强的宿主读取在途期间渲染为空;读取失败(二进制、文件正被进行中的轮改写)则永久空白——重试守卫把失败条目当作已完成。现在渲染回退到原始 hunks(窗口相对编号)直至新窗口落地(恢复该模块自己文档声明的设计),失败的读取保持可重试。

真实重结算后审查自愈:prepare effect 的依赖加入文件列表身份,分页重折叠、轮数据重发布等真实变化会原地重新准备失效条目,无需手动再点一次「审查」。

基建:join 与指纹缓存提取为纯模块 src/client/turn-join.ts(无 React、无运行时值导入),scripts/check-turn-join.mjspnpm check:join)以六个场景钉死缓存契约——未变树上重复 join 返回同一数组与同一 hunk 身份;节点变化、键集变化、轮号变化与首次提取正确 miss;非 tool-call 节点与缺失键按位占位。已接入 CI 与发布工作流。

验证pnpm typecheckpnpm check:alignpnpm check:joinpnpm build 全绿;修复提交的 CI(run 33603662099)全绿;发布 tag 经工作流校验「tag 名 == package.json 版本」「lib 零漂移」并新增 check:join 关卡后自动出包(run 33604312805 全绿)。