dsh-gokifu-compact 1.11.4 → 1.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # 更新记录
2
2
 
3
+ ## 1.11.5 — 2026-10-31
4
+
5
+ ### S10d · 测试运行器终于能区分「跳过」与「通过」,「空壳用例」不再是绿的
6
+
7
+ **问题**:旧 `run.mjs` 里,平台/权限不对时用 `return` 早退,**会计入 passed** —— 单看
8
+ 「N passed」根本排除不了跳过;而且一个**一条断言都没有**的用例也会静默算通过。
9
+
10
+ **改法**
11
+
12
+ | 能力 | 说明 |
13
+ |---|---|
14
+ | `t.skip(reason)` | 计入 `skipped`,不计 pass/failed;**exit code 只由 failed 决定** |
15
+ | 汇总行 | `== N passed, M skipped, K failed ==`(新增中间那段,跳过不再藏在 passed 里) |
16
+ | **零断言检测** | `assertions === 0` **且**源码里没有 `throw` / `assert` 证明 ⇒ 计入 `zeroAssertions` 并**按失败处理**。本仓 300+ 用例是 throw 风格(算有证明),空壳用例从此不再静默算 pass |
17
+ | `--dir=` | 仅供 `run-skip` 夹具指向临时目录 |
18
+
19
+ - **`install-link` 6 处平台/权限早退改为 `t.skip(...)`**,原有断言一字未改。
20
+ - 新增 `test/run-skip.test.mjs` **3 条**:四态(pass/fail/skip/零断言)可区分、skip 不导致失败、零断言严格红。
21
+
22
+ **变异自检**:删掉 skip 分支 ⇒ `run-skip` 红;删掉零断言检测 ⇒ `run-skip` 红。
23
+
24
+ ### 验证
25
+
26
+ - 全量:**476 passed / 0 failed / 0 skipped**(36 个测试文件;473 + 3)
27
+ - `install-link` **29/0** · `run-skip` **3/0** · `rooms` 15/0 · `verify-install` **16/16**
28
+ - `bench 2000`:**351 tokens**(与基线一致)
29
+ - `npm pack --dry-run --json`:**71 文件**(数量不变,只改 `test/`)
30
+
31
+ **未验证**
32
+
33
+ - 零断言检测只认 `assertions` 计数与 `throw`/`assert` 的**文本证据**:如果一个用例用别的方式实打实地检查了东西(例如把结果写进外部文件再断言),仍可能被误判 —— 目前本仓没有这种写法。
34
+ - `skipped` 总数现在是 0(本机 Windows)。**跨平台**(Linux/macOS 上那 6 条会真的 skip)没有实跑过。
35
+
3
36
  ## 1.11.4 — 2026-10-31
4
37
 
5
38
  ### 发布脚本加固:坏 remote 在预演阶段就红,git 步骤事务化
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # dsh-GOkifu-compact
2
2
 
3
- > 当前版本:**`1.11.4`** · npm [`dsh-gokifu-compact`](https://www.npmjs.com/package/dsh-gokifu-compact) · [GitHub Releases](https://github.com/MYCF711/dsh-GOkifu-compact/releases) · 更新记录见 [CHANGELOG.md](CHANGELOG.md)
3
+ > 当前版本:**`1.11.5`** · npm [`dsh-gokifu-compact`](https://www.npmjs.com/package/dsh-gokifu-compact) · [GitHub Releases](https://github.com/MYCF711/dsh-GOkifu-compact/releases) · 更新记录见 [CHANGELOG.md](CHANGELOG.md)
4
4
 
5
5
  **DSH 的棋谱式上下文压缩后端 —— 把「历史 → 一段摘要」换成「历史 → 可复盘的棋谱 DAG + 每步只有 351 tokens 的热清单」。**
6
6
 
@@ -8,7 +8,7 @@
8
8
  热清单 351 tokens (2000 边合成夹具 · L5 降级档 · 2026-10-30/10-31 两次实测同值;旧版全量 28,800)
9
9
  失败保留 8 / 8 (历史口径 †;官方 8 段模板 4.67 / 8)
10
10
  清单开销 未复现/待测 (原载 0.2% = 历史单会话 v1.3.1 后实测;无复跑命令、无对照组;源 evidence/真实计费核对.md)
11
- 验证 473 项单测 · 真实包 8/8 † · 真实进程 fold 3~6/6 †
11
+ 验证 476 项单测(0 skipped) · 真实包 8/8 † · 真实进程 fold 3~6/6 †
12
12
  ```
13
13
 
14
14
  GO = 围棋,kifu = 棋谱,compact = 压缩。一局棋下完,棋谱上不只有落子顺序,还有每一手的评语。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-gokifu-compact",
3
- "version": "1.11.4",
3
+ "version": "1.11.5",
4
4
  "description": "DSH context-compression backend with a go game record (kifu) DAG: node = position, edge = attempted move + result. Incremental fold (each span summarized once), failure memory that survives compaction, transposition detection (chess-engine style), and a tiny hot ledger rebuilt every step.",
5
5
  "repository": {
6
6
  "type": "git",