dsh-vibe-math 2.7.2 → 2.8.0

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.
Files changed (153) hide show
  1. package/LICENSE +21 -21
  2. package/README.en.md +682 -681
  3. package/README.md +683 -682
  4. package/cordis.patch.yml +112 -16
  5. package/docs/AUDIT-CHECKLIST.md +755 -518
  6. package/docs/COMPAT-AUDIT-ROUND2.md +354 -328
  7. package/docs/COMPAT-AUDIT-ROUND3.md +154 -154
  8. package/docs/audit-methodology.md +93 -0
  9. package/docs/final-paper.md +172 -172
  10. package/docs/formal-verification.md +613 -588
  11. package/docs/generate_framework_diagram_v2.py +114 -114
  12. package/docs/generate_framework_diagram_v3.py +127 -127
  13. package/docs/math-computation.md +195 -187
  14. package/docs/parameter-schema.md +37 -0
  15. package/docs/release-notes/README.en.md +2 -0
  16. package/docs/release-notes/README.md +2 -0
  17. package/docs/release-notes/RELEASE-NOTES-2.0.22.md +112 -112
  18. package/docs/release-notes/RELEASE-NOTES-2.1.0.md +143 -143
  19. package/docs/release-notes/RELEASE-NOTES-2.2.0.md +266 -266
  20. package/docs/release-notes/RELEASE-NOTES-2.2.1.md +43 -43
  21. package/docs/release-notes/RELEASE-NOTES-2.2.2.md +88 -88
  22. package/docs/release-notes/RELEASE-NOTES-2.3.0.md +207 -207
  23. package/docs/release-notes/RELEASE-NOTES-2.3.1.md +134 -134
  24. package/docs/release-notes/RELEASE-NOTES-2.3.10.md +105 -105
  25. package/docs/release-notes/RELEASE-NOTES-2.3.11.md +57 -57
  26. package/docs/release-notes/RELEASE-NOTES-2.3.12.md +80 -80
  27. package/docs/release-notes/RELEASE-NOTES-2.3.2.md +145 -145
  28. package/docs/release-notes/RELEASE-NOTES-2.3.3.md +115 -115
  29. package/docs/release-notes/RELEASE-NOTES-2.3.4.md +69 -69
  30. package/docs/release-notes/RELEASE-NOTES-2.3.5.md +63 -63
  31. package/docs/release-notes/RELEASE-NOTES-2.3.6.md +66 -66
  32. package/docs/release-notes/RELEASE-NOTES-2.3.7.md +59 -59
  33. package/docs/release-notes/RELEASE-NOTES-2.3.8.md +45 -45
  34. package/docs/release-notes/RELEASE-NOTES-2.3.9.md +70 -70
  35. package/docs/release-notes/RELEASE-NOTES-2.7.2.en.md +2 -2
  36. package/docs/release-notes/RELEASE-NOTES-2.7.2.md +3 -3
  37. package/docs/release-notes/RELEASE-NOTES-2.7.3.en.md +67 -0
  38. package/docs/release-notes/RELEASE-NOTES-2.7.3.md +67 -0
  39. package/docs/release-notes/RELEASE-NOTES-2.8.0.en.md +65 -0
  40. package/docs/release-notes/RELEASE-NOTES-2.8.0.md +65 -0
  41. package/docs/release-notes/TEMPLATE.md +6 -0
  42. package/docs/release-playbook.md +103 -0
  43. package/docs/slv-playbook.md +117 -0
  44. package/docs/status-report-fields.md +167 -0
  45. package/docs/test-timing.md +158 -154
  46. package/docs//346/236/266/346/236/204/345/233/276.md +77 -77
  47. package/installer.js +793 -783
  48. package/package.json +260 -203
  49. package/prompt-corpus-persona/persona-corpus.json +9 -9
  50. package/prompt-corpus-persona/persona-corpus.md +225 -33
  51. package/prompt-corpus-v2/formal-verify-v2.json +295 -115
  52. package/prompt-corpus-v2/formal-verify-v2.md +2290 -282
  53. package/prompt-corpus-v3/formal-verify-v3.json +112 -112
  54. package/prompt-corpus-v3/formal-verify-v3.md +227 -143
  55. package/prompt-corpus-v4/formal-verify-v4.json +18 -18
  56. package/prompt-corpus-v4/formal-verify-v4.md +49 -44
  57. package/prompt-corpus-v5/prompt-corpus-v5.json +82 -82
  58. package/prompt-corpus-v5/prompt-corpus-v5.md +573 -207
  59. package/scripts/clean-temp.mjs +234 -0
  60. package/scripts/update-doc-counts.mjs +71 -0
  61. package/tests/audit-artifact-docs.mjs +72 -0
  62. package/tests/audit-artifact-docs.mutants.mjs +58 -0
  63. package/tests/audit-engine-faces.mjs +298 -0
  64. package/tests/audit-formal-sensitivity.mjs +345 -342
  65. package/tests/audit-installer-assertions.mutants.mjs +63 -0
  66. package/tests/audit-installer-compat.test.mjs +256 -208
  67. package/tests/audit-installer-policy.test.mjs +41 -8
  68. package/tests/audit-math-computation-contract.mjs +64 -8
  69. package/tests/audit-math-computation-contract.mutants.mjs +106 -0
  70. package/tests/audit-math-computation-parity.mjs +164 -3
  71. package/tests/audit-math-computation-sensitivity.mjs +5 -3
  72. package/tests/audit-package-membership.mjs +57 -0
  73. package/tests/audit-package-membership.mutants.mjs +28 -0
  74. package/tests/audit-participant-set-parity.mjs +160 -0
  75. package/tests/audit-path-discipline.mjs +83 -0
  76. package/tests/audit-path-discipline.mutants.mjs +51 -0
  77. package/tests/audit-persona-sensitivity.mjs +323 -309
  78. package/tests/audit-persona-surface.mutants.mjs +69 -0
  79. package/tests/audit-persona-surface.test.mjs +431 -390
  80. package/tests/audit-prompt-duplication.mjs +143 -0
  81. package/tests/audit-prompt-duplication.mutants.mjs +51 -0
  82. package/tests/audit-prompt-invariants.mjs +589 -508
  83. package/tests/audit-readme-bilingual.test.mjs +152 -0
  84. package/tests/audit-readme-counts.mjs +95 -0
  85. package/tests/audit-readme-counts.mutants.mjs +52 -0
  86. package/tests/audit-registration.mjs +78 -0
  87. package/tests/audit-spec-traceability.mjs +193 -193
  88. package/tests/audit-status-report-fields.mjs +172 -0
  89. package/tests/audit-status-report-fields.mutants.mjs +64 -0
  90. package/tests/audit-v3-registration-parity.mjs +156 -0
  91. package/tests/audit-v5-integrity.mjs +795 -508
  92. package/tests/audit-v5-lean-abstention.mjs +392 -0
  93. package/tests/audit-v5-lean-abstention.mutants.mjs +106 -0
  94. package/tests/audit-v5-prompt-duplication.mjs +88 -0
  95. package/tests/audit-v5-prompt-duplication.mutants.mjs +34 -0
  96. package/tests/audit-v5-sensitivity.mjs +433 -427
  97. package/tests/e2e-identity-a6.mutants.mjs +65 -0
  98. package/tests/e2e-v5-round2.test.mjs +2453 -1981
  99. package/tests/formal-verify-v2.test.mjs +1778 -1724
  100. package/tests/formal-verify-v3.mutants.mjs +117 -0
  101. package/tests/formal-verify-v3.test.mjs +1724 -1671
  102. package/tests/formal-verify-v4.mutants.mjs +152 -0
  103. package/tests/formal-verify-v4.test.mjs +2114 -1574
  104. package/tests/formal-verify-v5.test.mjs +790 -724
  105. package/tests/helpers/doc-counts-format.mjs +41 -0
  106. package/tests/helpers/math-computation-fake-seam.mjs +4 -0
  107. package/tests/math-computation-a1.mutants.mjs +72 -0
  108. package/tests/math-computation-archive-rerun.mutants.mjs +65 -0
  109. package/tests/math-computation-discovery.mutants.mjs +76 -0
  110. package/tests/math-computation-shared.test.mjs +392 -6
  111. package/tests/math-computation-v2.test.mjs +779 -0
  112. package/tests/math-computation-v3.test.mjs +771 -0
  113. package/tests/math-computation-v4.mutants.mjs +133 -0
  114. package/tests/math-computation-v4.test.mjs +739 -0
  115. package/tests/prompt-v5-integrity.test.mjs +1291 -1280
  116. package/tests/run-tests.mjs +393 -202
  117. package/tests/run-tests.mutants.mjs +70 -0
  118. package/tests/selfdrive-v5.mjs +560 -508
  119. package/tests/selfdrive-v5.mutants.mjs +132 -0
  120. package/tests/temp-hygiene.mutants.mjs +80 -0
  121. package/tests/v2-fix-probes.mutants.mjs +104 -0
  122. package/tests/v2-fix-probes.test.mjs +1040 -0
  123. package/tests/v2-list-agents-and-next-step.mutants.mjs +106 -0
  124. package/tests/v2v3-interrupt.mutants.mjs +111 -0
  125. package/tests/v3-fix-probes.mutants.mjs +99 -0
  126. package/tests/v3-fix-probes.test.mjs +892 -0
  127. package/tests/v4-final-paper.mutants.mjs +108 -0
  128. package/tests/v5-institute-fixes.mutants.mjs +218 -0
  129. package/vibe-math-v2/agent.cordis.yml +378 -322
  130. package/vibe-math-v2/math-computation.js +144 -53
  131. package/vibe-math-v2/math-engines.js +12 -12
  132. package/vibe-math-v2/preset.yml +2 -2
  133. package/vibe-math-v2/v2/347/232/204/351/242/235/345/244/226/350/246/201/346/261/202.txt +21 -21
  134. package/vibe-math-v2/vibe-math-v2.js +5097 -4755
  135. package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +491 -487
  136. package/vibe-math-v3/agent.cordis.yml +422 -356
  137. package/vibe-math-v3/math-computation.js +144 -53
  138. package/vibe-math-v3/math-engines.js +12 -12
  139. package/vibe-math-v3/preset.yml +2 -2
  140. package/vibe-math-v3/vibe-math-v3.js +6235 -5873
  141. package/vibe-math-v3//345/256/236/347/216/260/346/226/271/346/241/210.md +649 -649
  142. package/vibe-math-v4/agent.cordis.yml +438 -402
  143. package/vibe-math-v4/math-computation.js +144 -53
  144. package/vibe-math-v4/math-engines.js +12 -12
  145. package/vibe-math-v4/preset.yml +2 -2
  146. package/vibe-math-v4/vibe-math-v4.js +4490 -4269
  147. package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +1015 -1013
  148. package/vibe-math-v5/agent.cordis.yml +46 -12
  149. package/vibe-math-v5/math-computation.js +144 -53
  150. package/vibe-math-v5/math-engines.js +12 -12
  151. package/vibe-math-v5/vibe-math-v5.js +1266 -229
  152. package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +1728 -1660
  153. package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +693 -693
@@ -0,0 +1,65 @@
1
+ # dsh-vibe-math 2.8.0 — Release Notes
2
+
3
+ > Previous release: 2.7.3. This is a **feature release**: all four presets now ship explicit guidance for "no LaTeX engine was detected", and the explicit-engine semantics were corrected (v4/v5 used to silently fall back to a different engine). Parameter names and defaults and the directory layout are **unchanged**, the data format is **additive only**, the DSH support window is unchanged, and **no migration is needed**.
4
+
5
+ ## Overview
6
+
7
+ - An explicit `paperLatexCommand` now means "**use only this**": if it cannot be resolved the run degrades as "not detected" instead of quietly switching engines. All four presets and the documentation now agree.
8
+ - The named warning for a missing engine is **actionable**: it says PATH and the documented common TeX roots were probed, and how to pin an absolute path.
9
+ - The four presets tell the agent the **four steps** (bounded probe → write the absolute path into `paperLatexCommand` and re-detect → ask the user once → otherwise degrade as before) and the **three hard boundaries** (never auto-install, never write outside the workspace, never treat "not detected" as a failure).
10
+ - Paper metadata records `triedPaths`: which paths this detection actually probed (on success and on failure).
11
+ - A "host refused to interrupt" failure now carries an executable next step and is covered by a regression guard.
12
+ - People who run the test suites themselves get a steadier gate: lower default concurrency, stale test scratch directories swept at start-up, the roomier drive preferred for temp files, and a read-only warning when a leftover process is suspected.
13
+ - Repository line endings are unified on LF: from this version on, the npm package is **byte-reproducible** against the tag.
14
+
15
+ ## Added
16
+
17
+ - The paper compile metadata (`paper.meta.json`, `compile` section) gains **`triedPaths`** (array of strings: the union of candidate paths probed during this detection).
18
+ - All four presets gained a "missing engine guidance" block in their prompts (one canonical text, byte-identical across presets). v5 injects it as `paperHintBlock(lang)`.
19
+ - The interrupt tool's failure response gains `next: { kind: 'reason', tool: 'vibe_math_abort', hint }`, matching the other failure diagnostics.
20
+ - A shipped test utility, `scripts/clean-temp.mjs`: lists suspected leftover processes (`--ps`, read-only) and sweeps stale test scratch directories (`--dry-run` / `--age-hours=N`).
21
+
22
+ ## Changed
23
+
24
+ - **Explicit-engine semantics unified**: a non-empty `paperLatexCommand` is used **alone**; if it cannot be resolved then `compile.status = 'not-detected'` and only `paper.tex` and `paper.md` are delivered. v4/v5 used to append that command to the candidate list and **fall back to another engine** when it was unusable; they now match v2/v3 and the existing wording of `docs/final-paper.md`.
25
+ - **Wording of the missing-engine warning**: "未检测到 LaTeX 引擎(…):只产出 tex+md…**已探测 PATH 与文档化的常见 TeX 根;可用 `paperLatexCommand` 指定绝对路径。**"
26
+ - **Test-gate defaults** (affects only people running the suites): default concurrency `min(4, cpus)` → **`min(2, cpus)`**; at start-up, scratch directories older than 6 hours whose name prefix comes from the suites themselves are swept; the temp root prefers `D:\_tmp` (falling back without error when unavailable); a suspected leftover process produces a **read-only** warning and is never terminated automatically. Override with `--concurrency=N`, `--no-temp-hygiene`, `--temp-dry-run`.
27
+ - The repository gained `.gitattributes`: text files are always LF (binaries marked explicitly). Previously the working tree mixed CRLF and LF while `npm pack` reads the working tree, so the package could contain CRLF.
28
+
29
+ ## Fixed
30
+
31
+ - Symptom: setting `paperLatexCommand` to a **non-existent path** still produced a PDF compiled by another engine on the system (users believed the pinned engine was used). It now degrades as "not detected" with an actionable warning. Guards: `tests/v4-final-paper.test.mjs`, `tests/e2e-v5-round2.test.mjs`.
32
+ - Symptom: when no engine was detected, the run only said "not detected" and the user could not tell **where it had looked**. `triedPaths` now records the paths actually probed and the warning states the scope. Guards: `tests/v2-fix-probes.test.mjs`, `tests/v3-fix-probes.test.mjs`, `tests/v4-final-paper.test.mjs`, `tests/e2e-v5-round2.test.mjs`.
33
+ - Symptom: the "missing engine" guidance was absent or inconsistent across the four presets. All four now carry the same canonical text, with a byte-identity check. Guard: `tests/audit-prompt-invariants.mjs` (invariant I15).
34
+ - Regression coverage strengthened (**behaviour unchanged**): the "host refused to interrupt" failure path is now guarded (`VIBE_MATH_INTERRUPT_FAILED` + `next.tool = 'vibe_math_abort'`). Guards: `tests/v2v3-interrupt.mutants.mjs` plus the corresponding assertions in the two math suites.
35
+ - Test-infrastructure fix: a suite killed by a timeout cannot clean up after itself, so scratch directories accumulated for weeks (measured: 240k entries at the temp root). The gate now sweeps stale ones at start-up. Guards: `scripts/clean-temp.mjs --self-test`, `tests/temp-hygiene.mutants.mjs`.
36
+ - Test-timing fix: a few suites ended before the event they assert on when the gate ran jobs in parallel (green standalone, intermittently red in the gate). Those loops now stop on a wall-clock deadline, wait windows have a floor, and per-suite budgets are set from measurements. Guards: `tests/run-tests.mutants.mjs` (5/5) and the suites' own assertions.
37
+
38
+ ## Compatibility & Migration
39
+
40
+ - Breaking changes: **none**. Parameter names and defaults and the directory layout are unchanged; `triedPaths` is additive and older `paper.meta.json` files remain readable.
41
+ - Behaviour to note: if you previously pointed `paperLatexCommand` at a value that does not resolve and relied on the **fallback** to a working engine, this version degrades as "not detected" instead. That is the correction that matches `docs/final-paper.md`. Leave the parameter empty to get automatic detection.
42
+ - Migration: none needed.
43
+ - The DSH support window is unchanged (see `engines.dsh` in `package.json`).
44
+
45
+ ## Known Limitations
46
+
47
+ - **TeX installed in a non-standard location is still not auto-discovered**: the default probe covers PATH and the documented common install roots. If yours lives elsewhere (for example a TeX Live tree at a custom directory under a drive root), set an absolute path in `paperLatexCommand`; on this machine the default probe does not find it.
48
+ - The shipped suites **do not cover host-level behaviour**: "the caller is dropped after an interrupt" can only be observed on a real host and is not asserted in-repo.
49
+ - One known small wart in v4: the finalisation note for "not detected / compile failed" can be empty (the note is assembled before the compile result is known). It does not affect finalisation or the degrade path, and it is recorded for a fix.
50
+ - On machines without Lean / LaTeX, the related suites **skip loudly** rather than passing silently.
51
+ - This version did not re-run a full research workflow on a real host; the engine-probe surface was exercised in both "engine present" and "engine absent" states.
52
+
53
+ ## Verification
54
+
55
+ - `node tests/run-tests.mjs` — all green (**105** items: 44 suites + 61 probes).
56
+ - `node scripts/update-doc-counts.mjs --check` — exits 0 (documented derived counts match the repository).
57
+ - Cross-preset prompt identity: `node tests/audit-prompt-invariants.mjs` (invariant I15) and `node tests/audit-prompt-invariants.mjs --self-probe` (11/11).
58
+ - Explicit-engine semantics: `node tests/v4-final-paper.test.mjs`, `node tests/e2e-v5-round2.test.mjs`, and `node tests/v4-final-paper.mutants.mjs` (2/2 named reds).
59
+ - Interrupt-failure diagnostics: `node tests/v2v3-interrupt.mutants.mjs` (2/2 named reds).
60
+ - Test-environment guards: `node scripts/clean-temp.mjs --self-test`, `node tests/temp-hygiene.mutants.mjs` (4/4 named reds).
61
+ - Packaging consistency: the `npm pack --dry-run` listing matches `package.json#files` (declared but missing = 0), and the packaged text files use LF throughout.
62
+
63
+ ## Dependencies
64
+
65
+ - No new runtime dependencies; the DSH support window is unchanged.
@@ -0,0 +1,65 @@
1
+ # dsh-vibe-math 2.8.0 — 发布说明
2
+
3
+ > 上一版本:2.7.3。本版是**功能版**:四套预设新增「检测不到 LaTeX 引擎时怎么办」的明确指引,并修正显式指定引擎的回退语义(此前 v4/v5 会静默改用另一个引擎)。四套预设的参数名与默认值、目录结构**未变**,数据格式**仅新增一个字段**,DSH 支撑窗口不变,**无需迁移**。
4
+
5
+ ## 概述
6
+
7
+ - 显式 `paperLatexCommand` 现在是「**指定即只用它**」:解析不到就按「未检测到」降级,不再悄悄改用别的引擎;四套预设与文档口径完全一致。
8
+ - 检测不到引擎时的具名警告变得**可行动**:说明已探测 PATH 与文档化的常见 TeX 根,并给出指定绝对路径的方法。
9
+ - 四套预设的提示词明确告诉代理**四步做法**(有界自查 → 把绝对路径写入 `paperLatexCommand` 并重测 → 问用户一次 → 否则照旧降级)与**三条硬边界**(不自动安装、不写工作区之外、不把「未检测到」当失败)。
10
+ - 论文元数据新增 `triedPaths`:记录本次检测**实际探测过哪些路径**(成功与失败都记录)。
11
+ - 「宿主拒绝中断」的错误带上可执行的下一步,并纳入回归防护。
12
+ - 自行运行测试套件的人会看到更稳的门禁:默认并发降低、启动时自动清扫陈旧的测试临时目录、临时根优先使用更宽裕的盘、发现疑似遗留进程时只读告警。
13
+ - 仓库行尾统一为 LF:从本版起 npm 包内容与标签**逐字节可复现**。
14
+
15
+ ## 新增
16
+
17
+ - 论文编译元数据 `paper.meta.json` 的 `compile` 段新增 **`triedPaths`**(字符串数组,本次检测过程中探测过的候选路径并集)。
18
+ - 四套预设的提示词新增「引擎缺失指引」块(同一段规范文本,逐字一致)。v5 以 `paperHintBlock(lang)` 注入成员提示词。
19
+ - 中断工具失败响应新增 `next: { kind: 'reason', tool: 'vibe_math_abort', hint }`,与其它失败诊断同形。
20
+ - 随包测试工具 `scripts/clean-temp.mjs`:列出疑似遗留进程(`--ps`,只读)与清扫陈旧测试临时目录(`--dry-run` / `--age-hours=N`)。
21
+
22
+ ## 变更
23
+
24
+ - **显式引擎语义统一**:`paperLatexCommand` 非空时**只用它**;解析不到 ⇒ `compile.status = 'not-detected'`,只交付 `paper.tex` 与 `paper.md`。v4/v5 此前会把该命令并入候选表,在它不可用时**回落到别的引擎**,现与 v2/v3 以及 `docs/final-paper.md` 的既有口径一致。
25
+ - **未检测到引擎的警告文案**:「未检测到 LaTeX 引擎(…):只产出 tex+md…**已探测 PATH 与文档化的常见 TeX 根;可用 `paperLatexCommand` 指定绝对路径。**」
26
+ - **测试门禁的默认值**(仅影响自行运行套件的人):默认并发 `min(4, cpus)` → **`min(2, cpus)`**;启动时清扫 `mtime` 早于 6 小时、且前缀取自套件自身的陈旧临时目录;临时根优先指向 `D:\_tmp`(不可用时回退,不报错);发现疑似遗留进程时**只读告警**,绝不自动结束进程。可用 `--concurrency=N`、`--no-temp-hygiene`、`--temp-dry-run` 等开关覆盖。
27
+ - 仓库新增 `.gitattributes`:文本文件一律 LF(二进制显式标记)。此前工作区 CRLF/LF 混合,而 `npm pack` 读工作区,包内可能出现 CRLF。
28
+
29
+ ## 修复
30
+
31
+ - 症状:把 `paperLatexCommand` 设成一个**不存在的路径**,v4/v5 仍会用系统里另一个引擎编译出 PDF(用户以为指定的引擎生效了)。现在按「未检测到」降级,并给出可行动警告。守卫:`tests/v4-final-paper.test.mjs`、`tests/e2e-v5-round2.test.mjs`。
32
+ - 症状:检测不到引擎时只报「未检测到」,用户不知道**找过哪里**。现在 `triedPaths` 记录实际探测路径,警告说明探测范围。守卫:`tests/v2-fix-probes.test.mjs`、`tests/v3-fix-probes.test.mjs`、`tests/v4-final-paper.test.mjs`、`tests/e2e-v5-round2.test.mjs`。
33
+ - 症状:四套预设的「引擎缺失」指引缺失或彼此不一致。现在四套都有同一段规范文本,并有逐字一致性检查。守卫:`tests/audit-prompt-invariants.mjs`(不变量 I15)。
34
+ - 回归防护补强(**行为未变**):把「宿主拒绝中断」这条失败路径纳入守卫(`VIBE_MATH_INTERRUPT_FAILED` + `next.tool = 'vibe_math_abort'`)。守卫:`tests/v2v3-interrupt.mutants.mjs` 与两个数学套件的对应断言。
35
+ - 测试基础设施修复:套件被超时终止时无法自清,导致临时目录长期累积(实测顶层曾达 24 万项)。现在每次门禁启动自动清扫陈旧目录。守卫:`scripts/clean-temp.mjs --self-test`、`tests/temp-hygiene.mutants.mjs`。
36
+ - 测试时序修复:个别套件在并行负载下会在「所等事件发生之前」结束(单跑全绿、门禁偶发红)。现在相关循环以墙钟截止、等待窗口设有下限,并有按实测定值的超时预算。守卫:`tests/run-tests.mutants.mjs`(5/5)及上述套件自身的断言。
37
+
38
+ ## 兼容性与迁移
39
+
40
+ - 破坏性变更:**无**。参数名与默认值、目录结构未变;`triedPaths` 是纯新增字段,旧 `paper.meta.json` 仍可读。
41
+ - 需要注意的行为变化:若你此前**故意**把 `paperLatexCommand` 指向不可用的值并依赖「回落到可用引擎」,本版会改为按「未检测到」降级——这是与 `docs/final-paper.md` 一致的修正。想要自动选择引擎,请把该参数留空。
42
+ - 迁移:无需迁移。
43
+ - DSH 支撑窗口不变(见 `package.json` 的 `engines.dsh`)。
44
+
45
+ ## 已知限制
46
+
47
+ - **非标准位置的 TeX 仍不会被自动发现**:默认探测只覆盖 PATH 与文档化的常见安装根。装在其它的目录(例如把 TeX Live 装在盘符根下的自定义目录)请用 `paperLatexCommand` 指定绝对路径;本机实测非标准位置默认探测不到。
48
+ - 随包套件**不覆盖宿主层行为**:「中断后调用方被丢弃」这类行为需要真机才能观察,未纳入随包断言。
49
+ - v4 的收尾备注存在一个已知小问题:最终文稿的「未检测到/编译失败」备注字段可能为空(备注在编译结果确定之前组装)。不影响定稿与降级行为,已记录待修。
50
+ - 缺少 Lean / LaTeX 等引擎的机器上,相关套件会**响亮跳过**,不会静默通过。
51
+ - 本版未在真机重跑完整研究流程;引擎探测面覆盖「有引擎」与「无引擎」两种情形。
52
+
53
+ ## 验证方式
54
+
55
+ - `node tests/run-tests.mjs` —— 全部通过(**105** 项:44 套件 + 61 探针)。
56
+ - `node scripts/update-doc-counts.mjs --check` —— 退出 0(文档派生计数与仓库一致)。
57
+ - 跨预设提示词逐字一致:`node tests/audit-prompt-invariants.mjs`(不变量 I15)与 `node tests/audit-prompt-invariants.mjs --self-probe`(11/11)。
58
+ - 显式引擎语义:`node tests/v4-final-paper.test.mjs`、`node tests/e2e-v5-round2.test.mjs`,以及 `node tests/v4-final-paper.mutants.mjs`(2/2 具名红)。
59
+ - 中断失败诊断:`node tests/v2v3-interrupt.mutants.mjs`(2/2 具名红)。
60
+ - 测试环境卫兵:`node scripts/clean-temp.mjs --self-test`、`node tests/temp-hygiene.mutants.mjs`(4/4 具名红)。
61
+ - 打包一致性:`npm pack --dry-run` 的清单与 `package.json#files` 一致(声明了但缺失 = 0),且包内文本行尾统一为 LF。
62
+
63
+ ## 依赖
64
+
65
+ - 无新增运行时依赖;DSH 支撑窗口不变。
@@ -118,3 +118,9 @@ English (`RELEASE-NOTES-<version>.en.md`):
118
118
  a history whose earlier entries are Chinese-only. 每个版本同时更新 `README.en.md`(英文历史索引)。
119
119
  6. **Historical files are frozen**: older notes are not reformatted retroactively; the template applies from
120
120
  the next release onward. 历史文件不改写;模板自下一版本起生效。
121
+
122
+
123
+ ## 可追溯性要求(写新发布说明时必须遵守)
124
+
125
+ - 每条"修复/变更"条目**必须点名钉住它的守卫**(具体 `tests/*.mjs` 路径或套件名);没有守卫的条目要写明"未加守卫,原因:…"。
126
+ - 这样未来的发布说明不会重演历史缺口:守卫索引是权威的可追溯性来源,发布说明只是入口。
@@ -0,0 +1,103 @@
1
+ # 发布手册:从版本一致性到 npm 与 GitHub Release
2
+
3
+ > 本文件记录**实际执行过**的发布流程(以 2.7.3 为例),供下一次发布照做。
4
+ > 面向读者:维护者。命令都可直接复制;标注"需核对"的地方不要跳。
5
+ > 权威守卫:`tests/audit-market-metadata.test.mjs`(市场元数据与随包清单)。
6
+
7
+ ## 0. 发布前的一次性判断
8
+
9
+ 先确定**版本类型**(补丁 / 功能)与**版本号**,再动任何文件。定了就不再改——版本一致性检查遍布多处,中途改号会到处漏。
10
+
11
+ ## 1. 版本一致性:三处必须同时改
12
+
13
+ | 位置 | 字段 | 检查者 |
14
+ |---|---|---|
15
+ | `package.json` | `version` | 全部守卫的基准 |
16
+ | `package-lock.json` | **顶层 `version`** 与 **`packages[""].version`** | `tests/audit-market-metadata.test.mjs` 断言顶层与 `package.json` 一致(历史上曾漂移) |
17
+ | 发布说明 | `docs/release-notes/RELEASE-NOTES-<版本>.md` 与 `.en.md` | 市场守卫断言"覆盖当前版本(两种语言)" |
18
+
19
+ ```bash
20
+ node -e "const p=require('./package.json'),l=require('./package-lock.json');console.log(p.version,l.version,l.packages[''].version)"
21
+ ```
22
+
23
+ - **两份发布说明都必须写**,且**都要登记**在 `package.json#files`(守卫会检查"当前版本的两份都在清单里")。
24
+ - 发布说明结构由 `docs/release-notes/TEMPLATE.md` 规定:**10 个章节、中英同序**,无内容的章节保留标题写 `无。` / `None.`;每条修复/变更要点名**钉住它的守卫**。
25
+
26
+ ## 2. 清单与市场字段
27
+
28
+ - `package.json#files`:新增的随包文件(**包括**两份发布说明与新文档)都要登记;发布后要用 tarball 复核"声明了但缺失 = 0"。
29
+ - `dsh.compatNote`:**用户可见的清单文本**,必须提到**当前版本号**(历史上曾在改版本后仍描述上一版)。
30
+ - 以下字段**只应保持"已验证范围"**,发布时不要顺手改:
31
+ - `engines.dsh`(顶层,市场读它)与 `dsh.engines.dsh`(生态形状)——两者必须**逐字一致**;
32
+ - 每个 `@deepseek-ai/*` 的 `peerDependencies`:与 `engines.dsh` **同范围**,且 `peerDependenciesMeta` 里标记为 **optional**;
33
+ - `dsh.compatibility` 里标为 `compatible` 的每个版本都必须被 `engines.dsh` 的链**覆盖**;
34
+ - `screenshots.json` 与 README 里的图片引用(市场读取仓库里的 `screenshots.json`,**不从 npm 读**;README 不得指向已不存在的图)。
35
+ - 若某次发布确实要动兼容范围,先改**单一来源**再让两条声明一致,并同步更新市场数据。
36
+
37
+ ## 3. 提交前:门禁与派生计数
38
+
39
+ ```bash
40
+ node tests/run-tests.mjs # 必须全绿:TOTAL <n> PASS <n> FAIL 0
41
+ node scripts/update-doc-counts.mjs # 让文档里的派生计数收敛
42
+ node scripts/update-doc-counts.mjs --check # 退出 0 = 已收敛
43
+ ```
44
+
45
+ - 任何**新增作业**(新套件/新变异族/新 `--self-probe` 变体)都会改变派生计数:先跑 updater,再跑门禁,否则文档计数守卫会按设计变红。
46
+ - **派生工件随源改动一起提交**:改了预设源/规范后,`cordis.patch.yml` 与随包语料等派生文件必须在**同一个提交**里重新生成(生成器脚本以仓库为准),不要拆成两个提交。
47
+ - 改动了文档/计数后**再跑一次** `--check`,确保最后一次改动也收敛。
48
+
49
+ ## 4. 提交、打标签、推送
50
+
51
+ ```bash
52
+ git add <path-exact 文件...> # 逐路径精确暂存,避免带入无关改动
53
+ git commit -m "<版本号>:<一句话要点>"
54
+ git tag -a v<版本> -m "<版本> <要点>" # 注解标签
55
+ git push origin <branch> --follow-tags
56
+ ```
57
+
58
+ - 提交信息写**用户可见的变化**,不要写内部工作词汇。
59
+ - 打标签前确认工作区干净、门禁刚跑过且全绿。
60
+
61
+ ## 5. 发布到 npm
62
+
63
+ ```bash
64
+ npm publish # 按 package.json 的 version 发布
65
+ ```
66
+
67
+ - **`gh release create` 是独立的一步**,不是 `npm publish` 的一部分:
68
+
69
+ ```bash
70
+ gh release create v<版本> --title "v<版本>" --latest --verify-tag \
71
+ --notes-file <双语说明或生成的双语文档>
72
+ ```
73
+
74
+ - `--verify-tag`:标签不存在就拒绝,避免对着错误的提交发版。
75
+ - `--latest`:标记为最新发布。
76
+
77
+ ## 6. 发布后核对(必做)
78
+
79
+ ```bash
80
+ npm view dsh-vibe-math version dist-tags.latest dist.shasum
81
+ npm pack --dry-run # 或 npm pack 后解开,核对清单
82
+ ```
83
+
84
+ 逐项确认:
85
+
86
+ 1. **registry** 上的 `version` 与 `dist-tags.latest` 都是本次版本,`dist.shasum` 与本地 tarball 一致;
87
+ 2. **tarball 内容 vs `package.json#files`**:声明了但缺失的文件数为 **0**;
88
+ 3. 两份发布说明(中/英)**都在 tarball 里**;
89
+ 4. 只应在仓库里存在的守卫/开发文件**不在** tarball 里;
90
+ 5. 全新安装冒烟:在一个空目录里装该 tarball/从 registry 装,确认插件可被宿主加载;
91
+ 6. **npm 传播延迟**:刚发布后 registry 可能短暂读到旧元数据,等一会儿重查,不要据此判定失败。
92
+
93
+ ## 7. 已知陷阱(都真实遇到)
94
+
95
+ - **`gh` 的 JSON 输出没有 `isLatest` 字段**(本机 `gh` 版本):判断"是否为最新发布"要看 **`--latest` 是否被接受**或直接看 Release 页面,别去解析不存在的字段。
96
+ - **`core.autocrlf=true`**:会让某个随包文件在 tarball 里以 **CRLF** 出现(内容等价、字节不同)。若要求 tarball **逐字节可复现**,在下次发布前加 `.gitattributes` 固定行尾(例如 `* text=auto eol=lf` 并对二进制显式 `-text`),并在发布后按第 6 节重新核对 shasum。
97
+ - **发布说明里的历史数字不要改**:冻结的历史发布说明是记录,**不得**为了"看起来一致"去改写(live 文档的计数扫描会**按名豁免**它们)。
98
+ - **别在发布提交里顺手改版本范围**:`engines.dsh` / peer / `screenshots.json` 的变动会改变市场兼容判定,应作为独立、可复核的改动。
99
+
100
+ ## 8. 回滚与补救
101
+
102
+ - 已发布版本**不要**覆盖重发同名版本;发现问题就发**下一个补丁版**,并在发布说明里写清影响与修复。
103
+ - 若标签/Release 打错:删 Release 与标签后重打(`gh release delete` / `git push --delete origin <tag>`),**不要**移动已发布的语义。
@@ -0,0 +1,117 @@
1
+ # 脚本化真机验证(SLV)手册
2
+
3
+ > 目的:在**真实 DSH** 上、用**脚本**(不是 GUI)建一个指定 `agentPreset` 的会话并驱动若干回合,拿到可引用的转录证据。
4
+ > 面向读者:维护者/复核者。命令与字段名均来自实测。
5
+ > **铁律**:**上限或超时都不是通过**——它们是**非结果(NON-RESULT)**,必须如实记录,绝不写成 PASS。
6
+
7
+ ## 1. 隔离:绝不碰用户自己的 profile
8
+
9
+ ```powershell
10
+ # 1) 克隆一份 profile(不要用用户正在用的那份)
11
+ Copy-Item -Recurse -Force "$HOME\.dsh\profiles\web" "$HOME\.dsh\profiles\<clone>"
12
+ # 2) 改克隆里 package.json 的 name,避免与用户 profile 混淆
13
+ # 3) 从【纯 ASCII】的临时 cwd 启动,独立端口 + --no-open
14
+ New-Item -ItemType Directory -Force -Path "$env:TEMP\slv-ws"
15
+ dsh --profile <clone> --port <自有端口> --no-open
16
+ # 等价写法(需要指定 DSH 入口时):node <dsh>/lib/bin.js --profile <clone> --port <自有端口> --no-open
17
+ ```
18
+
19
+ - **`--no-open`**:不弹 GUI;stdout 会打印一行 `dsh web: http://127.0.0.1:<端口>/?token=<TOKEN>` ⇒ **从这里取 `token=`**。
20
+ - **`--port`**:必须是你自己的端口,别占用用户实例的端口。
21
+ - **cwd 必须是纯 ASCII**:非 ASCII 工作区会在宿主侧变成乱码并报 `ENOENT`(编码问题,不是宿主缺陷)。
22
+ - 认证(实测):`GET /?token=<TOKEN>` ⇒ **303 + `Set-Cookie: dsh-auth-…`**;随后带 cookie 调 `/api/*` 返回 200,不带 cookie 返回 **401**。
23
+ - RPC 信封(逐字):`POST /api/<endpoint>`,正文 `{"type":"client-request","rpcId":"<唯一>","method":"<与 endpoint 同名>","payload":{"args":{…}}}`;**`payload` 必须恰好是 `{"args":{…}}`**(传 `{}` 或 `{"args":[]}` 会被拒)。
24
+ - **profile 补丁是顶层序列**:`cordis.patch.yml` 首个非注释行以 `-` 开头,因此追加行**必须从第 0 列开始**;用 2 空格缩进会得到 `YAMLException: bad indentation of a sequence entry`。
25
+
26
+ ## 2. 模拟声明:必须留可检索证据
27
+
28
+ 在**根会话的第一条 user message** 里明示这是一次模拟,例如:
29
+
30
+ > 本次运行是一次**模拟测试**(协议与端到端验证),**不是**真实研究任务。请按规范正常协作:快速尝试各功能逻辑,产出可验证的产物,并在完成后**按正确流程收敛收口**。
31
+
32
+ **断言方式(不许只"声称")**:
33
+
34
+ 1. 在**运行产物** `transcript.jsonl` 里 grep **用户原句 `这是一次模拟`**;
35
+ 2. 该命中必须落在 **`user/message` 事件**里(不是系统提示、不是回显);
36
+ 3. 报告要写**该事件的 `seq` + 文件行号**(实测形态:`{"sink":"user/message","seq":8,…}`)。
37
+
38
+ > 提醒:短语是**用户原句**,比对时按 UTF-8 字节比对最稳(可以先取该句的 hex,再在产物里定位)。
39
+
40
+ **模拟/取反的铁律:必须拒绝新代码能走的每条路径。** 当你用"模拟一个条件不成立"来证明分支行为时(例如把某个环境变量清空、把某个根目录设为不可达、把某个解析器替换为会失败的桩),必须**逐一否认新代码可能达成该条件的每一条路径**——否则"未触发"只是**你的模拟没覆盖到**,不是代码没走那条路。可操作的判定:
41
+ - 先**枚举**新代码为满足该条件可以尝试的**全部**入口(环境变量/已知安装根/PATH/配置项/回退链的每一环),再**逐个**否认;
42
+ - 断言里要出现**"未选到任何候选"**这类**否定性证据**(例如 `exe === null`/`tried.length === N`/`result === 'not-detected'`),而不只是"结果符合预期";
43
+ - 若某条路径**无法否认**(本机就存在),那就把该点写成**实测边界**(§5),不要声称已覆盖。
44
+
45
+ ## 3. 驱动 CLI(23 个开关)
46
+
47
+ ```
48
+ --profile --port --cwd --ws --preset --task --task-file
49
+ --steer --steer-after --cancel --cancel-after --timeout --max-tokens
50
+ --quiet --out --jsonl --follow --follow-stream --follow-members
51
+ --allow-probe-patch --token --session --resume
52
+ ```
53
+
54
+ - 常用组合:`--port <端口> --token <TOKEN> --preset vibe-math-v4 --task-file <任务> --jsonl <产物.jsonl> [--follow-stream] [--follow-members]`。
55
+ - **`--steer-after`** 是中途注入/中继通道:用它在运行中追加指令(例如模拟声明或中途 steer),**不要**为此另开一个会话。
56
+ - `--timeout` 与 `--max-tokens` **每次都要设**(见 §4)。
57
+
58
+ ## 4. 预算与上限
59
+
60
+ > **这些是"一次 SLV 实验"的上限,不是"干活的人"的预算。** 它们约束的是**要被测量的那次真机运行**(一次 run 的 token/墙钟),**绝不能**被当作代理/会话的自我预算,**更不能**成为"停止、缩减或推迟验证"的理由。工作安排只有四类真实阻塞(门禁红未定位/规格歧义/需用户拍板/队友窗口确实装不下,后者由 Lead 接手)。
61
+
62
+ - **总预算 ≤ 2.5 M tokens**;分项上限:最小 `configure`+`status` **≤ 50 k**;v5 启动 + 1 轮 **≤ 250 k**;v4 启动 + 1 轮 **≤ 900 k**;2 名常驻的会议 **≤ 600 k**。
63
+ - **成本量级(实测)**:最小 `configure`+`status` ≈ **8 s**;v4 启动 + 1 轮 ≈ **100 s / 732,888 tokens**;v5 ≈ **21–25 s / ≈150 k**;2 名常驻会议 ≈ **64 s / 473 k** ⇒ 一律用**受管后台作业**跑,不要让前台阻塞。
64
+ - 到达任何上限(tokens/墙钟)⇒ 记为 **NON-RESULT**,不要写成通过;先记录、再**单跑复现**,仍红才按真回归处理。
65
+
66
+ ## 5. 能建立什么、不能建立什么
67
+
68
+ **能**(在本机可达范围内):
69
+
70
+ - 多预设流程的**落位**:工具确实被注册并返回真实结果(例如 `vibe_v4_configure` / `vibe_v4_status` 的真实返回),而不是假设;
71
+ - 研究所/邮箱路径、会议(首位发言可观测;**后位发言需要 ≥2 名常驻**)、论文/归档的启动路径;
72
+ - `math_computation` 的 `probe`/`run`(本机 Python 在 PATH;R 走已知安装目录)。
73
+
74
+ **不能**:
75
+
76
+ - **没有任何引擎**(Octave/Julia/MATLAB/Maple/Wolfram 等)⇒ 这些面只能核对**诚实文本**:`configured`(配置启用)与 `absent[]`(每项带 `why`),这是**部分替代**,不是执行验证;
77
+ - **单客户端** ⇒ 并发要靠两个克隆 + 两个端口模拟,否则如实声明超出范围;
78
+ - **有界运行只能建立"落位与可观测性"**,**不能**建立"收敛/收口"结论——收敛结论必须来自随包套件。
79
+
80
+ ## 6. 中止触发与处置
81
+
82
+ | 触发 | 处置 |
83
+ |---|---|
84
+ | 模拟声明没落地 | 立即中止,记为**证据失败**(不是产品通过) |
85
+ | 触到 token/墙钟上限 | 记为 **NON-RESULT**;需要时缩小规模(更少成员/更短任务)重跑 |
86
+ | 出现产品缺陷迹象 | 先**单跑复现**;复现成功 ⇒ 当真回归处理并附转录行号 |
87
+ | 明显是宿主限制 | 记为**诚实边界**(写清限制与观测点);**不得**写成产品通过 |
88
+
89
+ ## 7. 产物、报告与清理
90
+
91
+ **产物(可引用)**:`transcript.jsonl`、`run.log`、任务文本、提取脚本、**本次运行自己的 sessionId 清单**。
92
+
93
+ **报告**(写进仓库外的工作记录)应包含:逐步证据(命令 + 退出码 + 关键输出行 + 转录行号)、模拟声明的 `seq` 与行号、逐条收敛判据的结论、**非 SLV 项的实测结果**、**诚实边界清单**(未验证/无法验证的项)。
94
+
95
+ **清理(只限自己)**:
96
+
97
+ - 只删**自己**的会话目录:`~/.dsh/sessions/<escaped-cwd>/<sessionId>/`;
98
+ - 只删**文件名包含自己 sessionId** 的投影缓存条目(`…/session_projcache/sessions/<sessionId>.json`);
99
+ - 只删**自己克隆的 profile** 与**自己起的服务/端口**;
100
+ - **绝不**按时间窗(例如"最近 20 分钟 mtime")批量删除——历史上这样做误删了不属于本次运行的投影缓存条目;删除数量要与预期**逐个对齐**并回报。
101
+
102
+ ## 8. 最后:这次运行"证明了什么"
103
+
104
+ 写结论时把"我们看到的"与"它支持的结论"分开:
105
+
106
+ - **观测**:转录里出现了什么(带 seq/行号)、工具返回了什么;
107
+ - **支持**:这些观测支持**落位与可观测性**;
108
+ - **不支持**:不能据此声称收敛、性能、或未安装引擎的行为;
109
+ - **非结果**:被上限/超时终止的运行,逐条列出并说明原因。
110
+
111
+ ## 9. 本阶段教训(都可复核,且都已写进守卫/文档)
112
+
113
+ 1. **关键词计数不是站点清单。** 用 `LaTeX|TeX` 之类的关键词在源码里数命中,得到的往往是**参数描述、注释与检测代码**,而不是"代理真正会读到的提示词"。要改提示词,先列出**构建提示词的函数**(`function .*[Pp]rompt`/`*PromptBlock`),再逐个精读。
114
+ 2. **守卫必须逐分支验证"真的能变红"。** 一个写成"**任一**语言/任一条件满足即可"的检查,会在两种变体都存在时**悄悄失去判别力**(删掉其中一条,另一条仍然满足 ⇒ 变异**空转**)。正确做法:**按实际形态逐项断言**(例如按每个预设真正使用的语言),并让每条单点变异都**按名**变红。
115
+ 3. **"单跑绿"不等于"门禁绿"。** 门禁并行跑几十个作业,**负载**会让依赖固定迭代上限/空闲退出的用例在**断言所等事件发生之前**就结束(实测:`e2e-v4-fixes` 的 T1/T19/T23/T26、`selfdrive-v4` 均单跑全绿、门禁偶发红)。排查顺序:**读失败原文 → 单跑复现 → 再看并行负载**;修复不要靠"把等待时间加长"(那会把"快速错答"换成"慢速超时",代价更大)。
116
+ 4. **stdout 是机器通道。** `tests/run-tests.mjs --counts/--json` 的 stdout 会被 `scripts/update-doc-counts.mjs` 直接 `JSON.parse`;任何日志/提示写到 stdout 都会让计数刷新崩掉(实测 `SyntaxError: Unexpected token 'r'`)⇒ **日志一律走 stderr**。
117
+ 5. **被杀死的作业不会自清。** 被超时 SIGKILL 的套件无法执行 `finally`,其临时目录会永久残留(实测 `%TEMP%` 顶层 24 万项、其中我们 24.5 万项)⇒ 由 `scripts/clean-temp.mjs` 在门禁启动时清扫陈旧目录,并**优先使用更宽裕的盘**(`D:\_tmp`)。
@@ -0,0 +1,167 @@
1
+ # `status()` / `report()` 字段与作用域(v2 · v3)
2
+
3
+ > 本文件是 `vibe_math_status`(下称 **status**)、`vibe_math_report`(下称 **report**)以及 v3 的人读叙述报告
4
+ > (`Logs/报告.md`,由 `writeNarrativeReport()` 编译)的**字段契约**。v5 的同类说明在
5
+ > `vibe-math-v5/实现方案.md §14.9`;本文件补上 v2/v3 一直缺失的字段面文档(审查 F4)。
6
+ > 维护规则:**新增/改名一个字段,就在下表加/改一行**;`tests/v2-fix-probes.test.mjs`、`tests/v3-fix-probes.test.mjs`
7
+ > 的 `[F3] fieldScopes` / `[F1] pendingDecisions` / `[F5] 两面字段集` 断言会检查本表与代码一致。
8
+
9
+ ## 1. 作用域(scope)语义
10
+
11
+ | scope | 含义 | 重启后 |
12
+ |---|---|---|
13
+ | `durable` | 落在**项目树**里(`State/`、`Formal/`、`Progress/`、`Propos/`、`Verified/` 等),本进程只是读取/更新它 | 仍在 |
14
+ | `session` | **本进程内存**(调度器/代理注册表/在飞任务/计数器);进程退出即消失,重启后从零开始 | 归零 |
15
+
16
+ `status().fieldScopes` 就是这张表的机器可读版本(`session`/`durable`/`note` 三个键);`status()` 里的字段名
17
+ 必须能在该载荷里找到,否则 `[F3]` 守卫会红。
18
+
19
+ ## 2. 字段表(v2 / v3)
20
+
21
+ | 字段 | 来源 | scope | status | report | 说明 |
22
+ |---|---|---|---|---|---|
23
+ | `ok` / `initialized` / `running` / `mode` | 内存(`rootAgent`/`scheduler`/`params`) | session | ✓ | 部分 | report 有 `running`/`mode`,无 `initialized` |
24
+ | `at` | `now()` 快照时间 | session | ✓ | ✓ | 两面都有(旧实现只有 report 有,审查 F5) |
25
+ | `project` / `projectExists` / `projects` | `currentProject` + 磁盘目录列举 | durable | ✓ | 部分 | report 只有 `project`/`projectExists` |
26
+ | `stateCommit` | 最近一次状态提交标记(`State/commit.json` 的投影) | durable | ✓ | ✗ | report 不含;要看提交历史读 `State/commit.json` |
27
+ | `stateWriteFailures` | 内存数组 `stateWriteFailures[]` 的 `{count,last}` | session | ✓ | ✓ | **重启归零**;不可当作"历史上没失败过" |
28
+ | `activeCount` / `maxParallelThreshold` | 由 `agentRegistry`/参数推导 | session | ✓ | ✓ | 空闲时 `0`,不是"没有代理定义" |
29
+ | `problems` / `propositions` | 卡片集合现算(v2 `已解决` 布尔;v3 `状态 === '已解决'`) | durable | ✓ | ✓ | 计数与列表同源(见 §3 的 F8 注) |
30
+ | `verifyTasks`(v2)/ `verifyPending`(v3) | 在飞验证任务投影 / 待验证候选数 | session / durable | ✓ | ✗ | 粒度不同:v2 是带票数的视图,v3 是计数 |
31
+ | `methods`(v3) | 方法卡集合大小 + 待沉淀发明台账 | durable + session | ✓ | ✓ | `pendingInventions` 是**当前批次**台账(会清空) |
32
+ | `pendingDecisions` | 待人工决策**计数** | session | ✓ | ✓ | 两面同形(数字);明细在 `pendingDecisionItems`(仅 report;审查 F1) |
33
+ | `pendingDecisionItems` | 待人工决策明细 `{id,node,context}` | session | ✗ | ✓ | 名字与计数分开,避免把数组当数字读 |
34
+ | `registeredAgents` | `agentRegistry` 键数 | session | ✓ | ✓ | 与 `activeCount` 不同:含空闲/已完成未回收的登记项 |
35
+ | `queuedPlanActions` / `plannerEnabled` / `plannerFails`(v3) | 计划队列长度 / 参数 / 连续失败计数 | session | ✓ | 部分 | `plannerFails` 是**会话**计数,重启归零 |
36
+ | `formal` | `Formal/*.json` + 参数(v2 内联、v3 `formalSummary()`) | durable | ✓ | ✓ | v2 的 `formal.paths` 见下行 |
37
+ | `formal.paths`(v2) | 路径表:`base`(项目根,绝对)+ 相对项(`project`/`proofs`)+ 绝对项(`lib`/`proved`) | durable | ✓ | ✓ | 审查 F6:基准不同,故显式给出 `base` 与 `note` |
38
+ | `paper` | `paperStatusView()`:`id/dir/inFlight*`(session)与 `finalizedAt/artifacts/compile`(durable) | 混合 | ✓ | ✓ | 审查 F3/F5:**同一对象两种耐久性**,逐字段见 `fieldScopes` |
39
+ | `params` | 参数快照 | session | ✓ | ✓ | 权威值在 `vibe_math_setting.json`(durable) |
40
+ | `recentActivity` | 活动日志尾部 | session | ✓ | ✓ | **上限**:`ACTIVITY_REPORT_MAX`(v2/v3 现为 30,见常量与参数描述);两面同一上限(审查 F2) |
41
+ | `fieldScopes` | 本表 §1 的机器可读版本 | — | ✓ | ✗ | v5 的 `*Scope` 模型移植(审查 F3) |
42
+
43
+ ## 3. 两面差异与已知口径(有意为之,不是漂移)
44
+
45
+ - **`status` 独有**(守卫 `[F5]` 按本行逐字校验):`initialized`、`projects`、`stateCommit`、`stateWriteFailures`、`plannerEnabled`、`plannerFails`、`fieldScopes`。
46
+ - **`report` 独有**:`pendingDecisionItems`(明细)。`paper`/`at` 已对齐(两面都有)。
47
+ - **F8 口径注(未证明漂移)**:`problems.solved` 在 v2 取**存储布尔** `已解决`(写路径:`vibe-math-v2.js` 内
48
+ `q.已解决 = true` 的几处),在 v3 取 `状态 === '已解决'`。两者各自是唯一的写者,审查中**未构造出**
49
+ "只更新其一"的代码路径,故按"有意差异"记录;若将来发现漂移,应让 v2 也保留 `状态` 字段或统一判据。
50
+ - **v3 人读报告**(`Logs/报告.md`):布尔与方向状态已中文化(`运行中:是/否`、`d1:进行中(active)`),
51
+ 代码 token 放在括号里备查(审查 F7)。
52
+
53
+
54
+ <!-- G-6-FIELD-TABLE-START -->
55
+
56
+ ## 逐预设字段作用域表(G-6:由源码派生,`tests/audit-status-report-fields.mjs` 双向校验)
57
+
58
+ ### v2 的字段与作用域(**源自源码派生**)
59
+
60
+ | 字段 | 作用域 | 视图 | 含义 |
61
+ |---|---|---|---|
62
+ | `project` | 耐久 | status()(report() 同源) | 当前项目 id/slug |
63
+ | `projects` | 耐久 | status()(report() 同源) | 项目列表 |
64
+ | `problems` | 耐久 | status()(report() 同源) | 问题清单与状态 |
65
+ | `propositions` | 耐久 | status()(report() 同源) | 命题/引理索引 |
66
+ | `stateCommit` | 耐久 | status()(report() 同源) | 状态提交(原子提交标记与世代) |
67
+ | `formal` | 耐久 | status()(report() 同源) | Lean 形式化验证面(作业/回执/结论) |
68
+ | `paper.finalizedAt` | 耐久 | status()(report() 同源) | 论文定稿时间戳 |
69
+ | `paper.artifacts` | 耐久 | status()(report() 同源) | 论文产物清单(md/tex/pdf 等) |
70
+ | `paper.compile` | 耐久 | status()(report() 同源) | LaTeX 编译结果/降级原因 |
71
+ | `stateWriteFailures` | 会话 | status()(report() 同源) | 状态写失败计数(耐久写不健康时可见) |
72
+ | `activeCount` | 会话 | status()(report() 同源) | 活跃子代理数(由注册表推导) |
73
+ | `pendingDecisions` | 会话 | status()(report() 同源) | 等待人工决策的节点 |
74
+ | `registeredAgents` | 会话 | status()(report() 同源) | 已注册子代理表 |
75
+ | `verifyTasks` | 会话 | status()(report() 同源) | 验证任务视图 |
76
+ | `recentActivity` | 会话 | status()(report() 同源) | 最近活动日志(环形缓冲) |
77
+ | `paper.inFlight` | 会话 | status()(report() 同源) | 论文撰写是否在途 |
78
+ | `paper.inFlightSince` | 会话 | status()(report() 同源) | 在途开始时间 |
79
+ | `paper.inFlightAgeMs` | 会话 | status()(report() 同源) | 在途已持续时间 |
80
+ | `paper.reapedThisRun` | 会话 | status()(report() 同源) | 本轮回收的论文撰写者数 |
81
+ | `paper.queued` | 会话 | status()(report() 同源) | 排队的论文撰写请求 |
82
+
83
+ ### v3 的字段与作用域(**源自源码派生**)
84
+
85
+ | 字段 | 作用域 | 视图 | 含义 |
86
+ |---|---|---|---|
87
+ | `project` | 耐久 | status()(report() 同源) | 当前项目 id/slug |
88
+ | `projects` | 耐久 | status()(report() 同源) | 项目列表 |
89
+ | `problems` | 耐久 | status()(report() 同源) | 问题清单与状态 |
90
+ | `propositions` | 耐久 | status()(report() 同源) | 命题/引理索引 |
91
+ | `stateCommit` | 耐久 | status()(report() 同源) | 状态提交(原子提交标记与世代) |
92
+ | `formal` | 耐久 | status()(report() 同源) | Lean 形式化验证面(作业/回执/结论) |
93
+ | `methods.project` | 耐久 | status()(report() 同源) | 项目级方法库 |
94
+ | `methods.global` | 耐久 | status()(report() 同源) | 全局方法库 |
95
+ | `paper.finalizedAt` | 耐久 | status()(report() 同源) | 论文定稿时间戳 |
96
+ | `paper.artifacts` | 耐久 | status()(report() 同源) | 论文产物清单(md/tex/pdf 等) |
97
+ | `paper.compile` | 耐久 | status()(report() 同源) | LaTeX 编译结果/降级原因 |
98
+ | `stateWriteFailures` | 会话 | status()(report() 同源) | 状态写失败计数(耐久写不健康时可见) |
99
+ | `activeCount` | 会话 | status()(report() 同源) | 活跃子代理数(由注册表推导) |
100
+ | `pendingDecisions` | 会话 | status()(report() 同源) | 等待人工决策的节点 |
101
+ | `registeredAgents` | 会话 | status()(report() 同源) | 已注册子代理表 |
102
+ | `verifyPending` | 会话 | status()(report() 同源) | 待验证项 |
103
+ | `queuedPlanActions` | 会话 | status()(report() 同源) | 排队的计划动作 |
104
+ | `plannerFails` | 会话 | status()(report() 同源) | 规划器失败计数 |
105
+ | `methods.pendingInventions` | 会话 | status()(report() 同源) | 待发明的理论/方法 |
106
+ | `recentActivity` | 会话 | status()(report() 同源) | 最近活动日志(环形缓冲) |
107
+ | `paper.inFlight` | 会话 | status()(report() 同源) | 论文撰写是否在途 |
108
+ | `paper.inFlightSince` | 会话 | status()(report() 同源) | 在途开始时间 |
109
+ | `paper.inFlightAgeMs` | 会话 | status()(report() 同源) | 在途已持续时间 |
110
+ | `paper.reapedThisRun` | 会话 | status()(report() 同源) | 本轮回收的论文撰写者数 |
111
+ | `paper.queued` | 会话 | status()(report() 同源) | 排队的论文撰写请求 |
112
+
113
+ ### v5 的字段与作用域(**源自 `status()` 字面量;v5 的 `fieldScopes` 只是粗分类**)
114
+
115
+ > v5 的 `fieldScopes` 只给出**类别**(对象里两个键 `session` / `durable`,各自装若干**类别描述**而不是逐字段),因此下表按 `status()` 的顶层键逐条派生;**不在 `fieldScopes` 分类里的键** 作用域写"未分类(语义见实现)"而不猜。派生由 `tests/audit-status-report-fields.mjs` 双向核对,并打印 `frozen / doc-rows / exceptions` 三个计数(`frozen` = 源码里的顶层键数,`doc-rows` = 本表行数,`exceptions` = 显式豁免数,当前为 0)。
116
+
117
+ | 字段 | 作用域 | 视图 | 含义 |
118
+ |---|---|---|---|
119
+ | `ok` | 会话 | status()(report() 同源) | 调用是否成功(机器面总开关) |
120
+ | `institute` | 会话/派生 | status()(report() 同源) | 研究所名与根 |
121
+ | `project` | 会话/派生 | status()(report() 同源) | 当前项目(会话根的项目标识) |
122
+ | `key` | 会话 | status()(report() 同源) | 本研究所的状态键(状态文件与隔离用) |
123
+ | `phase` | 耐久 | status()(report() 同源) | 研究所阶段(从状态文件派生) |
124
+ | `running` | 会话 | status()(report() 同源) | 调度器是否在跑(重建后由会话状态决定) |
125
+ | `autoDone` | 会话 | status()(report() 同源) | 自动模式是否已完成收口(phase 的会话镜像) |
126
+ | `runId` | 耐久 | status()(report() 同源) | 当前 run 的 id |
127
+ | `leanNotices` | 会话 | status()(report() 同源) | Lean 提示(会话内累积) |
128
+ | `leanNoticesScope` | 未分类(语义见实现) | status()(report() 同源) | leanNotices 的作用域声明 |
129
+ | `fieldScopes` | 未分类(语义见实现) | status()(report() 同源) | 本对象自身的字段↔作用域分类(机器可读) |
130
+ | `backend` | 会话/派生 | status()(report() 同源) | 持久化后端种类 |
131
+ | `diagnostics` | 未分类(语义见实现) | status()(report() 同源) | 跳过/畸形事件与状态加载问题 |
132
+ | `debug` | 会话 | status()(report() 同源) | 调度调试计数(passes/reschedule 等) |
133
+ | `quorum` | 未分类(语义见实现) | status()(report() 同源) | 共识/投票视图 |
134
+ | `members` | 未分类(语义见实现) | status()(report() 同源) | 成员名册(含会话态字段) |
135
+ | `tasks` | 未分类(语义见实现) | status()(report() 同源) | 共享任务板 |
136
+ | `failedMembers` | 未分类(语义见实现) | status()(report() 同源) | provisioning 失败的成员 |
137
+ | `failedMembersNote` | 未分类(语义见实现) | status()(report() 同源) | 失败成员的处理说明(重试口径) |
138
+ | `pendingSpawns` | 未分类(语义见实现) | status()(report() 同源) | 被宿主 live-child 上限拒绝、已登记待补建的成员 |
139
+ | `pendingSpawnsNote` | 未分类(语义见实现) | status()(report() 同源) | 待补建的口径说明(何时重试、何时清空) |
140
+ | `chat` | 未分类(语义见实现) | status()(report() 同源) | 邮箱计数(pending 未 ack / delivered 有上限的确认账本) |
141
+ | `chatScope` | 未分类(语义见实现) | status()(report() 同源) | chat 两个计数的作用域声明 |
142
+ | `officeRequests` | 未分类(语义见实现) | status()(report() 同源) | 所办请求(办公室收件) |
143
+ | `officeRequestsShown` | 未分类(语义见实现) | status()(report() 同源) | 本次展示的请求数 |
144
+ | `officeRequestsCap` | 未分类(语义见实现) | status()(report() 同源) | 展示上限 |
145
+ | `officeRequestsDropped` | 未分类(语义见实现) | status()(report() 同源) | 因上限被丢弃的请求数 |
146
+ | `officeRequestsTruncated` | 未分类(语义见实现) | status()(report() 同源) | 是否发生了截断 |
147
+ | `persistence` | 未分类(语义见实现) | status()(report() 同源) | 持久化状态(含 scope) |
148
+ | `meeting` | 未分类(语义见实现) | status()(report() 同源) | 会议视图 |
149
+ | `parkedMeeting` | 未分类(语义见实现) | status()(report() 同源) | 挂起的会议 |
150
+ | `verify` | 未分类(语义见实现) | status()(report() 同源) | 验证面(按对象) |
151
+ | `verifyQueue` | 未分类(语义见实现) | status()(report() 同源) | 验证队列 |
152
+ | `verified` | 未分类(语义见实现) | status()(report() 同源) | 已验证对象集合 |
153
+ | `verifiedTrue` | 未分类(语义见实现) | status()(report() 同源) | 验证为真的对象 |
154
+ | `concludedFalse` | 未分类(语义见实现) | status()(report() 同源) | 结论为假的对象 |
155
+ | `verifiedNote` | 未分类(语义见实现) | status()(report() 同源) | 验证面的说明/口径 |
156
+ | `undecided` | 未分类(语义见实现) | status()(report() 同源) | 未定论对象 |
157
+ | `solveVotes` | 未分类(语义见实现) | status()(report() 同源) | 求解投票 |
158
+ | `formal` | 未分类(语义见实现) | status()(report() 同源) | Lean 形式化验证面(作业/回执/结论) |
159
+ | `paper` | 未分类(语义见实现) | status()(report() 同源) | 论文面(状态/产物/编译) |
160
+ | `lastProgressAt` | 未分类(语义见实现) | status()(report() 同源) | 最近一次进展的时间戳(停滞判定用) |
161
+ | `params` | 未分类(语义见实现) | status()(report() 同源) | 规范化后的运行参数(会话内可写、耐久只存落盘值) |
162
+
163
+ ### v4:**没有** `fieldScopes`
164
+
165
+ v4 的源码里**不存在** `fieldScopes`(0 命中,本表由源码派生而非声明)。v4 的机器面字段以 `tests/formal-verify-v4.test.mjs` 的行为断言为准;本表因此**不为 v4 编造行**。
166
+
167
+ <!-- G-6-FIELD-TABLE-END -->