@magic6/dsh-compaction-policy-engine 0.5.7 → 0.5.8

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
@@ -4,6 +4,15 @@ All notable changes to this project are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
5
5
  [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.5.8] - 2026-11-25
8
+
9
+ ### Documentation
10
+
11
+ - README (both languages) now carries a **tested platforms** table — macOS, Windows
12
+ and Linux, each with the actual pass count — and a **reporting a problem** section.
13
+ - `.github/ISSUE_TEMPLATE/` added: `bug_report.yml` (asks for the effective policy
14
+ and where it came from) and `config_question.yml`.
15
+
7
16
  ## [0.5.7] - 2026-11-25
8
17
 
9
18
  ### Fixed
@@ -14,7 +23,6 @@ All notable changes to this project are documented here. The format follows
14
23
  `/tmp/x.yaml` is drive-relative there, so it resolved to `D:\tmp\x.yaml` and
15
24
  the test died with `ENOENT`. Now uses `os.tmpdir()`. This one reached users:
16
25
  the suite is what a Windows contributor runs before sending a patch.
17
-
18
26
  ## [0.5.6] - 2026-11-25
19
27
 
20
28
  ### Fixed
package/README.en.md CHANGED
@@ -339,6 +339,25 @@ npm test
339
339
  - `client-policy.test.js` / `client.test.js` — panel calculations, unit switching, provider
340
340
  layers, session badge, illegal value blocking, inline bundle consistency.
341
341
 
342
+ ## Tested platforms
343
+
344
+ The suite is run, and passes, on every platform listed here — this is measured, not
345
+ assumed:
346
+
347
+ | Platform | Version | Result | How |
348
+ |:--|:--|:--|:--|
349
+ | macOS | 26.6.2 arm64 | ✅ 198/198 | full `npm test` on the machine |
350
+ | Windows | 11 22631 x64 | ✅ 198/198 | full `npm test` on real hardware |
351
+ | Linux | ubuntu-latest x64 | ✅ 198/198 | GitHub Actions (Node 20 / 22) |
352
+
353
+ The Windows row was added on 2026-11-25, when CI ran `ubuntu-latest` only and most
354
+ users were on Windows. The first real Windows run found two Windows-only failures (POSIX path assertions,
355
+ then a `TMPDIR` fallback), which is exactly why the job is there.
356
+
357
+ > Only platforms the suite has actually run on are listed. Absence here does not
358
+ > mean "unsupported" — it means nobody has verified it yet. If you ran the suite
359
+ > somewhere else, a PR adding the row is welcome.
360
+
342
361
  ## Compatibility and migration
343
362
 
344
363
  - DSH `0.2.1-rc.x` / `0.2.2-rc.x` (`engines.dsh`: `>=0.2.1-0 <0.3.0-0`), Node.js 20+.
@@ -349,6 +368,26 @@ npm test
349
368
  - The engine is still a subclass of the official `BasicCompactionEngine`; no `node_modules`
350
369
  patch is required.
351
370
 
371
+ ## Reporting a problem
372
+
373
+ Open an issue — no need to work out first whether it is your configuration:
374
+
375
+ - 🐞 **[Bug report](https://github.com/T-splines/dsh-compaction-policy-engine/issues/new?template=bug_report.yml)**
376
+ — wrong behaviour, a crash, a chain that should have fallen back and did not, a
377
+ breaker that never recovers.
378
+ - ❓ **[Config question](https://github.com/T-splines/dsh-compaction-policy-engine/issues/new?template=config_question.yml)**
379
+ — it runs, but does not do what you configured.
380
+
381
+ Four details usually decide the case, so include them if you can:
382
+
383
+ 1. plugin version and DSH version;
384
+ 2. operating system (temporary directories and path joining differ per platform);
385
+ 3. the exact `code` and `message` — not a paraphrase;
386
+ 4. the effective values the settings panel shows, and whether they came from
387
+ `settings.yaml` or the profile patch.
388
+
389
+ Security issues: please do not open a public issue — use [SECURITY.md](SECURITY.md).
390
+
352
391
  ## License
353
392
 
354
393
  MIT. See [LICENSE](LICENSE).
package/README.md CHANGED
@@ -294,6 +294,24 @@ npm test
294
294
  - `client-policy.test.js` / `client.test.js` — 面板计算、单位切换、供应商层、会话徽标、
295
295
  非法值拦截、内联 bundle 一致性。
296
296
 
297
+ ## 支持的平台
298
+
299
+ 测试套件在下面这些环境里**实际跑过并通过**,不是「应该能跑」:
300
+
301
+ | 平台 | 版本 | 结果 | 验证方式 |
302
+ |:--|:--|:--|:--|
303
+ | macOS | 26.6.2 arm64 | ✅ 198/198 | 本机全量 `npm test` |
304
+ | Windows | 11 22631 x64 | ✅ 198/198 | 真机全量 `npm test` |
305
+ | Linux | ubuntu-latest x64 | ✅ 198/198 | GitHub Actions(Node 20 / 22) |
306
+
307
+ Windows 一行是 2026-11-25 才加上的:在那之前 CI 只跑 `ubuntu-latest`,
308
+ 而用户主要在 Windows 上用。第一次在真机跑就抓出两个 Windows 独有的测试
309
+ 失败(见 CHANGELOG)。现在 `.github/workflows/ci.yml` 里有一个
310
+ `windows-latest` 任务,这类问题不会再漏过去。
311
+
312
+ > 只列跑过测试的平台。没在这里出现 ≠ 不支持,只是还没人验证过 ——
313
+ > 如果你在别的平台跑通了,欢迎提 PR 把这一行补上。
314
+
297
315
  ## 兼容与迁移
298
316
 
299
317
  - DSH `0.2.1-rc.x` / `0.2.2-rc.x`(`engines.dsh`:`>=0.2.1-0 <0.3.0-0`)、Node.js 20+。
@@ -303,6 +321,24 @@ npm test
303
321
  `@magic6/dsh-compaction-policy-engine`(引擎行加 `/engine`)即可。
304
322
  - 仍然是官方 `BasicCompactionEngine` 的子类,不需要改 `node_modules`。
305
323
 
324
+ ## 报告问题
325
+
326
+ 发现 bug 请直接开 issue —— 不用先确认是不是自己的配置问题,贴上来我们一起看:
327
+
328
+ - 🐞 **[Bug report](https://github.com/T-splines/dsh-compaction-policy-engine/issues/new?template=bug_report.yml)**
329
+ —— 行为不对、崩溃、该 fallback 没 fallback、熔断恢复不了。
330
+ - ❓ **[Config question](https://github.com/T-splines/dsh-compaction-policy-engine/issues/new?template=config_question.yml)**
331
+ —— 能跑,但行为和配置不一致。
332
+
333
+ 提 issue 时如果方便,附上这几样,通常当天就能定位:
334
+
335
+ 1. 插件版本与 DSH 版本;
336
+ 2. 操作系统(各平台的临时目录与路径拼接差异很大,别省);
337
+ 3. 原始的 `code` 和 `message`,不要转述;
338
+ 4. 设置面板显示的生效值,以及它来自 `settings.yaml` 还是 profile patch。
339
+
340
+ 安全相关问题请不要开公开 issue,按 [SECURITY.md](SECURITY.md) 私下报。
341
+
306
342
  ## 许可
307
343
 
308
344
  MIT,见 [LICENSE](LICENSE)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic6/dsh-compaction-policy-engine",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Layered, live-reloading context compaction policy for DeepSeek Harness: provider-level rules, field-by-field inheritance, ratio/token units and a settings panel on top of the official engine.",
5
5
  "type": "module",
6
6
  "main": "lib/companion.js",