Skip to content

v0.1.8

Choose a tag to compare

@notload notload released this 25 Aug 16:27
· 2 commits to main since this release

dsh-session-toc v0.1.8

修复 issue#8 唯一残留红灯:memory-leak-probe

根因(已本机 100% 复现)

不是 createBoundedCache 泄漏,而是探针判据依赖 --expose-gc 的强制 GC:不带 flag 裸跑时 gc() 空转,V8 自然 GC 锯齿被线性回归判成泄漏。

跑法 heapSlope/轮 first1/4 last1/4 rel 判定
本机不带 flag(=用户跑法) 140041 9.34MB 17.2MB 0.8412 红灯
用户机器 v0.1.7 报告 135991 9.1MB 17.0MB 0.866 红灯
本机带 --expose-gc 64~174 ~5.9MB 持平 0.001 绿

修复

  • 测试文件自带兜底:不带 --expose-gc 直接跑会自动以强制 GC 重跑自身,任何跑法判据都有效,不再误报
  • 新增 FinalizationRegistry 正面证明用例:LRU 淘汰对象必须可被 GC 回收(无引用残留的直接证明)
  • host-memory.test.js 同样加固;package.json test 脚本补 --test-isolation=none(Node 24 spawn EPERM)
  • README:注明「目录读取不受 DSH 上下文压缩影响」+ 判据原理与正确跑法

测试 44/44(npm test / 裸跑 / 带 flag 三种跑法全绿)。

已发布 npm dsh-session-toc@0.1.8