dsh-vibe-math 2.7.2 → 2.7.3

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 (112) hide show
  1. package/README.en.md +11 -10
  2. package/README.md +13 -12
  3. package/cordis.patch.yml +112 -16
  4. package/docs/AUDIT-CHECKLIST.md +229 -3
  5. package/docs/COMPAT-AUDIT-ROUND2.md +35 -9
  6. package/docs/final-paper.md +2 -2
  7. package/docs/math-computation.md +13 -6
  8. package/docs/parameter-schema.md +37 -0
  9. package/docs/release-notes/README.en.md +1 -0
  10. package/docs/release-notes/README.md +1 -0
  11. package/docs/release-notes/RELEASE-NOTES-2.7.2.en.md +2 -2
  12. package/docs/release-notes/RELEASE-NOTES-2.7.2.md +3 -3
  13. package/docs/release-notes/RELEASE-NOTES-2.7.3.en.md +67 -0
  14. package/docs/release-notes/RELEASE-NOTES-2.7.3.md +67 -0
  15. package/docs/release-notes/TEMPLATE.md +6 -0
  16. package/docs/status-report-fields.md +167 -0
  17. package/docs/test-timing.md +8 -5
  18. package/installer.js +27 -17
  19. package/package.json +250 -203
  20. package/prompt-corpus-persona/persona-corpus.json +9 -9
  21. package/prompt-corpus-persona/persona-corpus.md +225 -33
  22. package/prompt-corpus-v2/formal-verify-v2.json +295 -115
  23. package/prompt-corpus-v2/formal-verify-v2.md +2287 -283
  24. package/prompt-corpus-v3/formal-verify-v3.json +105 -105
  25. package/prompt-corpus-v3/formal-verify-v3.md +213 -143
  26. package/prompt-corpus-v4/formal-verify-v4.json +18 -18
  27. package/prompt-corpus-v4/formal-verify-v4.md +49 -44
  28. package/prompt-corpus-v5/prompt-corpus-v5.json +82 -82
  29. package/prompt-corpus-v5/prompt-corpus-v5.md +451 -207
  30. package/scripts/update-doc-counts.mjs +71 -0
  31. package/tests/audit-artifact-docs.mjs +72 -0
  32. package/tests/audit-artifact-docs.mutants.mjs +58 -0
  33. package/tests/audit-installer-assertions.mutants.mjs +63 -0
  34. package/tests/audit-installer-compat.test.mjs +52 -4
  35. package/tests/audit-installer-policy.test.mjs +41 -8
  36. package/tests/audit-math-computation-contract.mjs +64 -8
  37. package/tests/audit-math-computation-contract.mutants.mjs +106 -0
  38. package/tests/audit-math-computation-parity.mjs +164 -3
  39. package/tests/audit-math-computation-sensitivity.mjs +4 -2
  40. package/tests/audit-package-membership.mjs +57 -0
  41. package/tests/audit-package-membership.mutants.mjs +28 -0
  42. package/tests/audit-participant-set-parity.mjs +160 -0
  43. package/tests/audit-path-discipline.mjs +83 -0
  44. package/tests/audit-path-discipline.mutants.mjs +51 -0
  45. package/tests/audit-persona-sensitivity.mjs +14 -0
  46. package/tests/audit-persona-surface.mutants.mjs +69 -0
  47. package/tests/audit-persona-surface.test.mjs +63 -22
  48. package/tests/audit-prompt-duplication.mjs +143 -0
  49. package/tests/audit-prompt-duplication.mutants.mjs +50 -0
  50. package/tests/audit-prompt-invariants.mjs +43 -5
  51. package/tests/audit-readme-bilingual.test.mjs +152 -0
  52. package/tests/audit-readme-counts.mjs +95 -0
  53. package/tests/audit-readme-counts.mutants.mjs +52 -0
  54. package/tests/audit-registration.mjs +78 -0
  55. package/tests/audit-status-report-fields.mjs +172 -0
  56. package/tests/audit-status-report-fields.mutants.mjs +64 -0
  57. package/tests/audit-v3-registration-parity.mjs +156 -0
  58. package/tests/audit-v5-integrity.mjs +300 -13
  59. package/tests/audit-v5-lean-abstention.mjs +392 -0
  60. package/tests/audit-v5-lean-abstention.mutants.mjs +106 -0
  61. package/tests/audit-v5-prompt-duplication.mjs +88 -0
  62. package/tests/audit-v5-prompt-duplication.mutants.mjs +34 -0
  63. package/tests/audit-v5-sensitivity.mjs +12 -7
  64. package/tests/e2e-identity-a6.mutants.mjs +65 -0
  65. package/tests/e2e-v5-round2.test.mjs +458 -13
  66. package/tests/formal-verify-v2.test.mjs +91 -43
  67. package/tests/formal-verify-v3.mutants.mjs +117 -0
  68. package/tests/formal-verify-v3.test.mjs +85 -39
  69. package/tests/formal-verify-v4.mutants.mjs +152 -0
  70. package/tests/formal-verify-v4.test.mjs +541 -9
  71. package/tests/formal-verify-v5.test.mjs +68 -9
  72. package/tests/helpers/doc-counts-format.mjs +41 -0
  73. package/tests/helpers/math-computation-fake-seam.mjs +4 -0
  74. package/tests/math-computation-a1.mutants.mjs +72 -0
  75. package/tests/math-computation-archive-rerun.mutants.mjs +65 -0
  76. package/tests/math-computation-discovery.mutants.mjs +76 -0
  77. package/tests/math-computation-shared.test.mjs +274 -5
  78. package/tests/math-computation-v2.test.mjs +767 -0
  79. package/tests/math-computation-v3.test.mjs +759 -0
  80. package/tests/math-computation-v4.mutants.mjs +133 -0
  81. package/tests/math-computation-v4.test.mjs +739 -0
  82. package/tests/prompt-v5-integrity.test.mjs +13 -2
  83. package/tests/run-tests.mjs +139 -9
  84. package/tests/run-tests.mutants.mjs +70 -0
  85. package/tests/selfdrive-v5.mjs +53 -1
  86. package/tests/selfdrive-v5.mutants.mjs +132 -0
  87. package/tests/v2-fix-probes.mutants.mjs +100 -0
  88. package/tests/v2-fix-probes.test.mjs +1039 -0
  89. package/tests/v2-list-agents-and-next-step.mutants.mjs +106 -0
  90. package/tests/v3-fix-probes.mutants.mjs +95 -0
  91. package/tests/v3-fix-probes.test.mjs +891 -0
  92. package/tests/v5-institute-fixes.mutants.mjs +190 -0
  93. package/vibe-math-v2/agent.cordis.yml +62 -6
  94. package/vibe-math-v2/math-computation.js +130 -41
  95. package/vibe-math-v2/math-engines.js +12 -12
  96. package/vibe-math-v2/vibe-math-v2.js +388 -113
  97. package/vibe-math-v2//345/256/236/347/216/260/346/226/271/346/241/210.md +5 -1
  98. package/vibe-math-v3/agent.cordis.yml +72 -6
  99. package/vibe-math-v3/math-computation.js +130 -41
  100. package/vibe-math-v3/math-engines.js +12 -12
  101. package/vibe-math-v3/vibe-math-v3.js +422 -126
  102. package/vibe-math-v4/agent.cordis.yml +44 -8
  103. package/vibe-math-v4/math-computation.js +130 -41
  104. package/vibe-math-v4/math-engines.js +12 -12
  105. package/vibe-math-v4/vibe-math-v4.js +196 -43
  106. package/vibe-math-v4//345/256/236/347/216/260/346/226/271/346/241/210.md +2 -0
  107. package/vibe-math-v5/agent.cordis.yml +46 -12
  108. package/vibe-math-v5/math-computation.js +130 -41
  109. package/vibe-math-v5/math-engines.js +12 -12
  110. package/vibe-math-v5/vibe-math-v5.js +1173 -218
  111. package/vibe-math-v5//345/256/236/347/216/260/346/226/271/346/241/210.md +80 -12
  112. package/vibe-math-v5//346/236/266/346/236/204/345/233/276.md +2 -2
@@ -1,10 +1,10 @@
1
1
  # dsh-vibe-math 2.7.2 — 发布说明
2
2
 
3
- > 上一版本:2.7.1。本版是**补丁版:只包含修复与附加(新增)响应字段**,不改变任何既有行为契约——把真实引擎环境下的**发现、证据与诊断**补齐:装了但不在 PATH 的引擎能被发现、安装建议不再给出本机跑不了的命令、失败证据(超时/缺包/未校验约束)不再缺失或静默、归档身份与名册口径可直接核对。四套预设的**参数默认值、数据格式与目录结构未变**,DSH 支撑窗口不变,**无需迁移**。
3
+ > 上一版本:2.7.1。本版是**补丁版:只包含修复与附加(新增)响应字段**——把真实引擎环境下的**发现、证据与诊断**补齐:装了但不在 PATH 的引擎能被发现、安装建议不再给出本机跑不了的命令、失败证据(超时/缺包/未校验约束)不再缺失或静默、归档身份与名册口径可直接核对。**既有契约的冻结面未变**:失败码集合(11 个)、参数名与默认值、数据格式与目录结构均未改(由 `tests/audit-math-computation-contract.mjs` 与 `tests/audit-math-computation-parity.mjs` 断言);新增字段都是**附加**的,旧读者不受影响。DSH 支撑窗口不变,**无需迁移**。
4
4
 
5
5
  ## 概述
6
6
 
7
- - **真实引擎发现更可靠**:引擎发现顺序为 PATH → 宿主自带运行时 → **各操作系统的已知安装目录**,因此在默认目录安装、但没有加进 PATH 的引擎(例如 R)也能被发现。
7
+ - **真实引擎发现更可靠**:引擎发现顺序为 PATH → 宿主自带运行时 → **各操作系统的已知安装目录**,因此在默认目录安装、但没有加进 PATH 的引擎(例如 R)也能被发现。当前纳入已知目录的引擎为 **R / Octave / Julia / MATLAB**(以及 Windows 上的 Python);Maple / Wolfram 的安装目录布局不固定,未纳入。宿主也可以用可选的 `installRoots` 接口自行提供候选根,发现逻辑不再依赖插件进程的环境变量。
8
8
  - **不再给出跑不了的安装命令**:`MATH_ENGINE_NOT_FOUND` 只在本机的包管理器**确实存在**时才给出可执行命令,否则给出建议命令与官方地址,并说明原因。
9
9
  - **`probe` 不再"报喜不报忧"**:除了可用引擎,还会列出**已配置但本机未发现**的引擎及原因。
10
10
  - **失败证据完整**:`MATH_TIMEOUT` 与 `MATH_NONZERO_EXIT` 携带同样的证据字段,超时的部分输出在**响应与回执**里都能拿到。
@@ -20,7 +20,7 @@
20
20
  - 新增约束口径字段:成功响应与"缺包"失败都带 **`versionPolicy`** 与 **`constraintsNotEnforced`**(本次**未校验**的约束逐条列出;没有约束时为空数组)。
21
21
  - `MATH_TIMEOUT` 响应新增 **`stdout`**/**`stderr`**(按上限截断);回执 JSON 新增 **`partialStdout`**/**`partialStderr`**。
22
22
  - `MATH_ENGINE_NOT_FOUND` 的 `next` 新增 **`suggestedCommand`**、**`packageManager`**、**`packageManagerAvailable`**、**`note`**(`vendorUrl` 视引擎而定)。
23
- - `run` 响应新增 **`fileIsArchivedScript`**,并在 `mode:'file'` 指向归档脚本时给出 **`ARCHIVED_SCRIPT_RERUN`** 警告。
23
+ - `run` 响应新增 **`fileIsArchivedScript`**:当 `mode:'file'` 指向的是**归档副本**时,同时给出 **`ARCHIVED_SCRIPT_RERUN`** 警告,明确说明按设计那是一次**新归档**(新 id、attempt 1、没有历史回执)——要拿到"同一归档的新 attempt + 变更检测",请编辑**原来的源文件**并用 `mode:'file'` 指向**同一源路径**重跑。
24
24
  - v4:`status()` 新增 **`rosterVersion`** 与 **`frozenParticipants`**;`consensus` / `meeting` / `verify` 视图带各自的 `rosterVersion`。
25
25
  - v4:`paper` 视图新增 **`dirProjected`** / **`dirSource`** / **`readSideEffect`**,明确该路径是投影还是真实状态。
26
26
  - v2/v3:决策与子代理中断诊断新增 **`code`** 与 **`next`**(例如 `VIBE_MATH_DECISION_NOT_FOUND`,并说明队列现状);v4 的成员级调用新增 **`V4_NO_SUCH_RESIDENT`**(带当前编制与下一步建议)。
@@ -0,0 +1,67 @@
1
+ # dsh-vibe-math 2.7.3 — Release Notes (English)
2
+
3
+ > Previous release: 2.7.2. This is a **PATCH release containing fixes, wording corrections and verification depth only** — v5 institute **round numbering and mailbox delivery** no longer go wrong, paper finalisation and task compare-and-set failures now carry named consequences, v4 no longer fails silently when the Lean library index or the project marker cannot be written, installer output uses one language with exactly one line per action, and the **stale mailbox ordering** that survived in the documentation was corrected everywhere with an automated prose↔code pairing check. Parameter defaults, data formats and the directory layout are **unchanged** (asserted by `tests/audit-math-computation-contract.mjs` and `tests/audit-math-computation-parity.mjs`); every addition is **additive** or **test-surface only**, so existing readers are unaffected. There are **no breaking changes**, the DSH support window is unchanged, and **no migration is needed**.
4
+
5
+ ## Overview
6
+
7
+ - **The mailbox no longer loses messages**: acknowledgement happens **only after a successful send**; an unacknowledged message stays pending and is re-delivered on the next successful wake. Duplicate suppression uses the **injection marks** (`inboxInjected` / `inboxSuppressed`), and a round never prepends the same message twice.
8
+ - **Predictable round numbers**: a founding prompt carries the round the member **actually starts** (from `轮次 1`, never `轮次 0`); a **failed** start consumes no round and no longer **erases or resets** an existing member's count (after the host loses a child session, a rebuilt prompt continues the numbering, e.g. `轮次 2`).
9
+ - **Paper finalisation failures are traceable**: a failed write of a **required** artifact (`paper.md` / `paper.tex` / `paper.meta.json` / `paper.log.md`) produces a **named warning exactly once**, naming the artifact and the recovery path; the artifact list contains **only what actually landed**; re-running finalisation refills missing artifacts **idempotently** without multiplying warnings.
10
+ - **A refused task compare-and-set leaves no half-state**: when `expected_revision` is stale the task is **unchanged** (verified by reading back `revision` / `ownerId` / `status`).
11
+ - **A member path-contract mismatch is named**: when the documented member-library root differs from the root the framework actually reads and writes, the mismatch is surfaced by name — and that note now **reaches `report()` diagnostics** (it used to be queued and never shown).
12
+ - **v4 index write failures have a named consequence**: a failed Lean library index write is named **exactly once**, with `lib=` / `proved=` and the consequence that the index is **stale until the next successful rebuild**; that single site covers every caller and **does not change the return value** (the tool still answers with its scanned counts).
13
+ - **v4 project-marker write failures have a named consequence**: a failed write of the current-project marker `.current` is named once, with the consequence that the next session may load the previous project.
14
+ - **The documentation no longer describes the message-losing order**: the stale mailbox ordering (acknowledge first, build later) in the plan, the architecture diagram, the pseudocode block and the guard checklist was corrected to "**build first; acknowledge only after a successful send; no duplicate prepend within a round**", backed by an automated **prose↔code pairing check** (the old wording fails it, and it requires the implementation anchor `if (ok && prompt.pending.length) await ackPending(`).
15
+
16
+ ## Added
17
+
18
+ - A **per-preset machine-face field table** in the shipped `docs/status-report-fields.md` (columns: name / scope / which-views / meaning): v2 **20** rows, v3 **25** rows, v5 **43** rows (derived from each `status()`), while v4 states explicitly that it exposes **no** `fieldScopes`; the table is checked **in both directions** (every source field has a doc row; every doc row names a real source field).
19
+ - **Deeper verification in the gate**: it now runs **101 jobs = 44 suites + 57 probes/variants** (65 jobs = 44 + 21 at 2.7.2, recomputed from that tag's job-list rule), including shipped **mutant families** (`tests/*.mutants.mjs`) and `--self-probe` modes that run a **mutated copy** and require a **named** failure rather than only an exit code.
20
+ - **Audit seams that can target a copy**: several audits accept an environment variable pointing at a mutated copy (for example `MATH_COMPUTATION_MODULE`, `V5_PLUGIN`, `PERSONA_ROOT`, `INSTALLER_JS`), so evidence can be reproduced without editing repository files.
21
+ - **Documentation counts are derived and swept**: every `TOTAL <n>` in a live document must equal the value derived by `node tests/run-tests.mjs --counts`; timings must quote each family's **own** `TOTAL WALL TIME` line; **frozen historical release notes are exempt by name** (and that exemption list is itself asserted to be non-empty).
22
+
23
+ ## Changed
24
+
25
+ - **Mailbox ordering wording**: the v5 plan, the architecture diagram and the guard checklist now state "**build first, acknowledge later**", and the plan spells out the searchable code order (take pending → compose the block → build the round prompt → send → acknowledge only on success).
26
+ - **Installer output uses one language and one line per action**: a user-facing log **label** must not be ASCII-only (an English domain word inside a Chinese label is still fine); restore and cleanup are each reported **exactly once**; and "a pre-existing backup is not a failure" is now judged at the **report level** instead of by matching log text.
27
+ - **More conservative validation wording**: constraints that are only checked for existence are still described exactly that way — no "simplification" that would change the verdict.
28
+
29
+ ## Fixed
30
+
31
+ - **v5 mailbox: a failed wake could lose messages** → acknowledgement happens only after a successful send, unacknowledged messages stay queued for the next successful wake, and a round never prepends the same message twice. Guard: `tests/e2e-v5-round2.test.mjs` (a failed wake leaves the message pending) and the shipped family `tests/v5-institute-fixes.mutants.mjs`.
32
+ - **v5 round numbering** → the founding prompt carries the real round; a failed start neither consumes a round nor resets an existing count; a rebuild continues the numbering. Guard: `tests/e2e-v5-round2.test.mjs` (the rebuilt prompt reads `轮次 2`) and `tests/v5-institute-fixes.mutants.mjs` (two `spawnMember` families).
33
+ - **v5 paper finalisation** → a failed required-artifact write is named once (naming the artifact and the recovery path); the artifact list contains only what landed; re-running is idempotent and does not repeat the warning. Guard: the shipped suite `tests/e2e-v5-round2.test.mjs`.
34
+ - **v5 task compare-and-set** → after a stale `expected_revision` is refused the task is unchanged (verified by reading back `revision` / `ownerId` / `status`). Guard: `tests/v5-institute-fixes.mutants.mjs` (the CAS family).
35
+ - **v5 member path contract** → a mismatch between the documented root and the root actually used is named, and the note now **reaches `report()` diagnostics** (it used to be queued and never surfaced). Guard: `tests/e2e-v5-round2.test.mjs` and `tests/audit-v5-integrity.mjs`.
36
+ - **v4 Lean library index write failures were silent** → one named site, once, with `lib=` / `proved=` and the "stale until the next successful rebuild" consequence, covering every caller and leaving the return value untouched. Guard: the Lean-library-index section of `tests/formal-verify-v4.test.mjs` and the shipped family `tests/formal-verify-v4.mutants.mjs` (its 8th family reddens by name).
37
+ - **v4 `.current` marker write failures were silent** → named once, with the consequence that the next session may load the previous project. Guard: the current-project-marker section of `tests/formal-verify-v4.test.mjs` and `tests/formal-verify-v4.mutants.mjs`.
38
+ - **Rosters and verification surface** → the published **voter set** is asserted to agree with its `voterCount` and to have distinct ids; the **staff persona** is asserted to actually reach each member's persona and prompts. Guard: `tests/audit-participant-set-parity.mjs`, `tests/audit-persona-surface.test.mjs`.
39
+ - **Installer (see "Changed")** → restore and cleanup are each reported exactly once, and "a pre-existing backup is not a failure" is judged at report level. Guard: `tests/audit-installer-policy.test.mjs`, `tests/audit-installer-compat.test.mjs` and the shipped family `tests/audit-installer-assertions.mutants.mjs`.
40
+ - **Documentation drift** → all 8 places that still described the old mailbox order were corrected, plus a prose↔code pairing check. Guard: `tests/audit-v5-integrity.mjs`.
41
+
42
+ ## Compatibility & Migration
43
+
44
+ - **Breaking changes: none.** Parameter defaults, data formats and the directory layout are unchanged across all four presets.
45
+ - **Additive only**: the new documentation and verification surface (the field table, the mutant families and self-probes, the copy-targeting audit seams) do not change any runtime contract; any new response field is **additive**.
46
+ - **Migration: none needed.**
47
+ - The DSH support window is the same as 2.7.2 (see `engines.dsh` in `package.json`).
48
+
49
+ ## Known Limitations
50
+
51
+ - **This machine has no Lean / LaTeX engine, and none of Octave / Julia / MATLAB / Maple / Wolfram**: those faces were **not exercised locally**; the plugins report them honestly — `configured` lists the engines enabled by configuration, and `absent[]` (each entry carrying `why`) says why this machine does not have them.
52
+ - **The two scripted end-to-end live runs (v4 and v5) were bounded by resource limits (token cap / wall clock) and are recorded as non-results rather than passes**: behavioural coverage for **capacity refusal, interrupt, project-switch failure, the installer self-check and `/compact`** therefore rests on the **shipped suites**, while those runs served as placement and observability evidence.
53
+ - **Engine versions were not observed**: no supported engine is installed on this machine, so this release cannot report engine version readings.
54
+ - **Commercial engine templates** still need confirmation on a licensed machine and remain marked as requiring human confirmation.
55
+ - **Release notes before 2.7.0 are Chinese only** (see `README.en.md` for the English history index).
56
+
57
+ ## Verification
58
+
59
+ - `node tests/run-tests.mjs` — expected `TOTAL 101 PASS 101 FAIL 0` (44 suites + 57 probes/variants).
60
+ - Targeted guard entry points: `node tests/audit-v5-integrity.mjs --self-probe` (8/8), `node tests/audit-participant-set-parity.mjs --self-probe` (6/6), `node tests/audit-math-computation-parity.mjs --self-probe` (8/8), `node tests/audit-persona-surface.test.mjs` (276/0).
61
+ - The shipped **mutant families** (`tests/*.mutants.mjs`) each require a **named** failure for a single-site mutation; the `--self-probe` modes run a mutated copy and require the named assertion to redden.
62
+ - Host: DSH **0.2.0-rc.2**.
63
+ - Real engines: **not installed, not executed** (see "Known Limitations"); engine existence is always proven by listing directories or probing, never assumed.
64
+
65
+ ## Dependencies
66
+
67
+ - **No new runtime dependencies**; the DSH support window is unchanged.
@@ -0,0 +1,67 @@
1
+ # dsh-vibe-math 2.7.3 — 发布说明
2
+
3
+ > 上一版本:2.7.2。本版是**补丁版:只包含修复、口径纠正与验证深度**——v5 研究所的**轮次计数与邮箱投递**不再出错、论文定稿与任务 CAS 的失败有具名后果、v4 的 Lean 库索引与项目标记写失败不再静默、安装器对外输出统一为中文标签并做到"一个动作一行"、文档中残留的**旧邮箱顺序**全部纠正并有自动配对检查防止回潮。四套预设的**参数默认值、数据格式与目录结构未变**(由 `tests/audit-math-computation-contract.mjs` 与 `tests/audit-math-computation-parity.mjs` 断言);新增内容都是**附加**或**仅测试面**的,旧读者不受影响。**无破坏性变更**,DSH 支撑窗口不变,**无需迁移**。
4
+
5
+ ## 概述
6
+
7
+ - **邮箱不再丢消息**:确认(ack)改为**只在发送成功之后**发生;未被确认的消息保持 pending,会在下一次成功唤醒时重新投递。重复抑制由**注入标记**(`inboxInjected` / `inboxSuppressed`)负责,一轮之内不会把同一条消息 prepend 两遍。
8
+ - **轮次编号可预期**:新成员的创立提示词带上它**实际开始的轮次**(从 `轮次 1` 起,不再出现 `轮次 0`);**失败**的启动不再消耗轮次,也不会**抹掉或重置**既有成员的轮次计数(宿主丢失子会话后重建,提示词仍继续编号,例如 `轮次 2`)。
9
+ - **论文定稿失败可追溯**:必需产物(`paper.md` / `paper.tex` / `paper.meta.json` / `paper.log.md`)写入失败时给出**具名告警恰好一次**,点名产物与恢复途径;产物清单**只列真正落盘的**文件;重跑定稿**幂等**补齐缺失产物,且不会重复告警。
10
+ - **任务 CAS 拒绝不留半成品**:`expected_revision` 过期被拒时,任务**保持不变**(`revision` / `ownerId` / `status` 回读一致)。
11
+ - **成员路径契约不一致会被点名**:文档写的成员库根与框架实际读写的根不一致时按名给出提示,并且该提示**现在会进入 `report()` 的诊断**(此前只是入队、从不显现)。
12
+ - **v4 索引写失败有具名后果**:Lean 库索引写失败**恰好具名一次**,带 `lib=` / `proved=`,并说明"索引在下次成功重建前**是陈旧的**";该单点覆盖全部调用方,且**不影响返回值**(工具照旧返回扫描计数)。
13
+ - **v4 项目标记写失败有具名后果**:当前项目标记 `.current` 写失败**具名一次**,并说明后果——下一个会话可能加载到上一个项目。
14
+ - **文档不再描述会丢消息的顺序**:计划书、架构图、伪代码块与守卫清单中残留的旧邮箱顺序(先确认再构造)已全部改为"**先构造;仅在发送成功后确认;同一轮不重复 prepend**",并有自动的**文案↔代码配对检查**(旧措辞回来即失败,并要求实现锚点 `if (ok && prompt.pending.length) await ackPending(`)。
15
+
16
+ ## 新增
17
+
18
+ - 随包文档 `docs/status-report-fields.md` 新增**逐预设机器面字段表**(name / scope / which-views / meaning 四列):v2 **20** 行、v3 **25** 行、v5 **43** 行(按 `status()` 的顶层键派生),v4 则**明确声明它不暴露 `fieldScopes`**;该表由守卫**双向**核对(每个源码字段都有文档行;每条文档行都指向真实源码字段)。
19
+ - 门禁的**验证深度**:现在运行 **101 项作业 = 44 个套件 + 57 个探针/变体**(上一版 2.7.2 为 **65 项 = 44 + 21**,按该标签树的作业清单规则复算),其中包含随包发布的**变异族**(`tests/*.mutants.mjs`)与 `--self-probe` 模式:它们对**变异后的副本**运行并要求出现**具名失败**,而不是只看退出码。
20
+ - **可指向副本的审计缝**:多个审计可通过环境变量指向变异副本(例如 `MATH_COMPUTATION_MODULE`、`V5_PLUGIN`、`PERSONA_ROOT`、`INSTALLER_JS`),无需修改仓库文件即可复现证据。
21
+ - **文档计数改为派生并全量扫描**:live 文档里出现的每个 `TOTAL <n>` 必须等于 `node tests/run-tests.mjs --counts` 的派生值;时间必须引用**各族自己打印**的 `TOTAL WALL TIME` 行;**冻结的历史发布说明按名豁免**(豁免清单本身也断言非空)。
22
+
23
+ ## 变更
24
+
25
+ - **邮箱顺序口径**:v5 计划书、架构图与守卫清单统一为"**先构造、后确认**",并在计划书中以可检索的代码顺序给出(取待投递 → 组成框头块 → 构造本轮提示词 → 发送 → 仅成功时确认)。
26
+ - **安装器对外输出统一为中文标签**:面向用户的日志**标签**不得是纯 ASCII(英文领域词夹在中文标签里仍合规);**恢复与清理各自恰好报告一次**;"同一版本的既有备份不算失败"改为在**报告层**判定,而不是匹配日志文字。
27
+ - **校验口径更保守**:确认为"检查存在性"而非"求解版本"的约束保持原样,不引入会改变判定结果的"简化"。
28
+
29
+ ## 修复
30
+
31
+ - **v5 邮箱:失败的唤醒会丢消息** → 确认只在发送成功后发生,未确认的消息留在队列里等下一次成功唤醒重投;同一轮不重复 prepend。守卫:`tests/e2e-v5-round2.test.mjs`(失败的唤醒后消息仍为 pending)与随包族 `tests/v5-institute-fixes.mutants.mjs`。
32
+ - **v5 轮次编号** → 创立提示词带真实轮次;失败启动不消耗轮次、不重置既有计数;重建继续编号。守卫:`tests/e2e-v5-round2.test.mjs`(重建后的提示词读作 `轮次 2`)与 `tests/v5-institute-fixes.mutants.mjs`(两条 `spawnMember` 族)。
33
+ - **v5 论文定稿** → 必需产物写失败具名一次(点名产物与恢复途径);产物清单只含真正落盘项;重跑幂等、不重复告警。守卫:随包套件 `tests/e2e-v5-round2.test.mjs`。
34
+ - **v5 任务 CAS** → 过期 `expected_revision` 被拒后任务保持原状(回读 `revision` / `ownerId` / `status` 验证)。守卫:`tests/v5-institute-fixes.mutants.mjs`(CAS 相关族)。
35
+ - **v5 成员路径契约** → 文档根与实际读写根不一致时按名提示,并**进入 `report()` 诊断**(此前入队后从不显现)。守卫:`tests/e2e-v5-round2.test.mjs` 与 `tests/audit-v5-integrity.mjs`。
36
+ - **v4 Lean 库索引写失败静默** → 单点具名一次,带 `lib=` / `proved=` 与"陈旧至下次成功重建"的后果,覆盖全部调用方,且不改变返回值。守卫:`tests/formal-verify-v4.test.mjs`(Lean 库索引那一段)与随包族 `tests/formal-verify-v4.mutants.mjs`(第 8 条族按名变红)。
37
+ - **v4 当前项目标记 `.current` 写失败静默** → 具名一次并说明后果(下一个会话可能加载上一个项目)。守卫:`tests/formal-verify-v4.test.mjs`(当前项目标记那一段)与 `tests/formal-verify-v4.mutants.mjs`。
38
+ - **名册与验证面** → 公布的**投票者集合**被断言与其 `voterCount` 一致且 id 互异;**职员人设**被断言确实进入每位成员的人设与提示词。守卫:`tests/audit-participant-set-parity.mjs`、`tests/audit-persona-surface.test.mjs`。
39
+ - **安装器(见"变更")** → 恢复/清理各恰好一次、"既有备份不算失败"在报告层判定。守卫:`tests/audit-installer-policy.test.mjs`、`tests/audit-installer-compat.test.mjs` 与随包族 `tests/audit-installer-assertions.mutants.mjs`。
40
+ - **文档口径漂移** → 8 处仍描述旧邮箱顺序的位置全部纠正,并加上文案↔代码配对检查。守卫:`tests/audit-v5-integrity.mjs`。
41
+
42
+ ## 兼容性与迁移
43
+
44
+ - **破坏性变更:无。** 四套预设的参数默认值、数据格式、目录结构均未改变。
45
+ - **纯新增**:本版新增的文档与验证面(字段表、变异族与自探针、可指向副本的审计缝)都不改变运行时契约;新增响应字段若有也是**附加**的。
46
+ - **迁移:无需迁移。**
47
+ - DSH 支撑窗口与 2.7.2 相同(见 `package.json` 的 `engines.dsh`)。
48
+
49
+ ## 已知限制
50
+
51
+ - **本机没有 Lean / LaTeX 引擎,也没有 Octave / Julia / MATLAB / Maple / Wolfram**:这些面**未在本机执行**;插件会如实报告——用 `configured` 列出配置启用的引擎,用 `absent[]`(每项带 `why`)说明本机为何没有。
52
+ - **两次脚本化的端到端真机运行(v4 与 v5)因资源上限(token 上限 / 墙钟)中止,按"非结果"记录,而不是通过**:因此**容量拒绝、打断、项目切换失败、安装器自检与 `/compact`** 的行为覆盖依靠**随包套件**;那两次运行提供的是**落位与可观测性**证据。
53
+ - **引擎版本号未观测**:因为本机没有安装任何受支持的引擎,本版无法给出引擎版本读数。
54
+ - **商业引擎模板**仍需在持证机器上确认,默认标记为需人工确认。
55
+ - **2.7.0 之前的发布说明仅提供中文**(英文历史索引见 `README.en.md`)。
56
+
57
+ ## 验证方式
58
+
59
+ - `node tests/run-tests.mjs` —— 期望 `TOTAL 101 PASS 101 FAIL 0`(44 个套件 + 57 个探针/变体)。
60
+ - 针对性守卫入口:`node tests/audit-v5-integrity.mjs --self-probe`(8/8)、`node tests/audit-participant-set-parity.mjs --self-probe`(6/6)、`node tests/audit-math-computation-parity.mjs --self-probe`(8/8)、`node tests/audit-persona-surface.test.mjs`(276/0)。
61
+ - 随包**变异族**(`tests/*.mutants.mjs`)各自对单点变异要求**具名失败**;`--self-probe` 模式对变异副本运行并要求具名断言变红。
62
+ - 宿主机:DSH **0.2.0-rc.2**。
63
+ - 真机引擎:**未安装、未执行**(见"已知限制");引擎存在性一律以列目录/探测证明,绝不假设路径存在。
64
+
65
+ ## 依赖
66
+
67
+ - **无新增运行时依赖**;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,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 -->
@@ -38,7 +38,7 @@ node tests/run-tests.mjs --json # 机器可读汇总(含 skippedN
38
38
  `audit-installer-policy`、`audit-persona-surface`、`audit-preset-rows`、`e2e-v5-round2`、
39
39
  `formal-verify-v2`、`formal-verify-v3`、`formal-verify-v4`、`formal-verify-v5`、`prompt-v5-integrity`、
40
40
  `math-computation-shared`。
41
- - **仅仓库(不发)**:其余 33 个套件(v2/v3/v4 的 e2e、`selfdrive-v3`/`v4`、v2/v3 修复探针、
41
+ - **仅仓库(不发)**:其余 **27** 个套件(v2/v3/v4 的 e2e、`selfdrive-v3`/`v4`、v2/v3 修复探针、
42
42
  `math-computation-v2|v3|v4|v5`、`audit-fuzz-helpers` 之外的若干 `audit-*`……)与 7 个脚本(`audit-fuzz-helpers`、
43
43
  `audit-registration`、`audit-roundtrip-idempotence`、`audit-tool-exec`、
44
44
  `audit-v3-registration-parity`、`selfdrive-v3`、`selfdrive-v4`)。
@@ -47,9 +47,11 @@ node tests/run-tests.mjs --json # 机器可读汇总(含 skippedN
47
47
 
48
48
  ## 2. 基线(本机:4 核 / Windows,实测)
49
49
 
50
+ > **最后一次复核:`167b52d`**。表中"串行/并行"是**该次复核**的实测值:套件行在**重测前**视为"上次复核值",引用前请重测或写明复核点;**变异族行**一律引用族自己打印的 `TOTAL WALL TIME` 行(不估算、不跨运行拼接)。这与 §1.1/runner 计数由 `--counts` 派生的口径一致。
51
+
50
52
  | 脚本 | 串行(sum) | 并行(wall) | 实测输出 |
51
53
  |---|---|---|---|
52
- | `tests/run-tests.mjs`(**65 项** = 44 套件 + 21 探针/变体) | ≈ 424 s | **≈ 121 s**(并发 4,speed-up x3.51) | `TOTAL 65 PASS 65 FAIL 0 (suites 44 · probes 21)`;实测 `wall 120.7s · sum 424.2s`,关键路径 = `e2e-v4-fixes`(≈ 98 s) |
54
+ | `tests/run-tests.mjs`(**101 项作业**(job count)= 44 套件 + 57 探针/变体;**由 `--counts` 派生**) | ≈ 424 s(历史基线) | **≈ 121 s**(历史基线;当前实测墙钟 ≈ 200 s,并发 4) | `TOTAL 101 PASS 101 FAIL 0 (suites 44 · probes 57)`;实测 `wall 120.7s · sum 424.2s`,关键路径 = `e2e-v4-fixes`(≈ 98 s) |
53
55
  | `tests/audit-formal-sensitivity.mjs`(49 探针,自带并发 4;v2 12 / v3 12 / v4 12 / v5 13) | ≈ 1035 s | **260.7 s**(实测,x3.97) | 关键路径 = v2/v3 的 `require` 探针(各 ≈75 s);全 49 条按预期变红、0 问题 |
54
56
  | `tests/audit-v5-sensitivity.mjs`(39 探针,串行) | ≈ 101 s | — | 每条 = 一次被测套件重跑 |
55
57
  | `tests/audit-persona-sensitivity.mjs`(16 探针) | ≈ 4.4 s | — | 本身很快,不需要并行 |
@@ -60,7 +62,8 @@ node tests/run-tests.mjs --json # 机器可读汇总(含 skippedN
60
62
  | `tests/audit-registration.mjs`(4 个预设各一次) | ≈ 1.0 s | — | 裸跑只查 v3,所以 runner 跑四个变体 |
61
63
  | `tests/audit-v3-registration-parity.mjs`(+ `--self-probe`) | ≈ 0.3 s | — | 自探针**成功 = exit 1**(变异后守卫必须变红) |
62
64
  | `tests/prompt-v5-integrity.test.mjs` | ≈ 2.2 s | — | 虚拟时钟下生成 v5 语料(语料字节稳定;**stdout 里的会议成员顺序仍是运行间随机的**,只有落盘语料是逐字节确定的) |
63
- | `tests/e2e-v5-round2.test.mjs` | ≈ 3.2 s | — | v5 e2e(含本轮新增的"预置快照不被覆盖""命名研究所被读取""失败轮次"三节) |
65
+ | `tests/e2e-v5-round2.test.mjs` | **≈ 16.3 s**(`167b52d` 实测,ALL GREEN;**断言条数不写在这里** —— 它随轮次变化,跑一次即知) | — | v5 e2e:邮箱/唤醒、轮次计数(§[47] 失败唤醒仍 pending、§[51] 重建后仍 `轮次 2`)、预置快照不被覆盖、命名研究所、失败轮次等;**早先此处记 ≈3.2 s 是旧口径**,正文小节也已随轮次更新 |
66
+ | `tests/v5-institute-fixes.mutants.mjs`(**变异族**) | — | **族自报 `TOTAL WALL TIME` ≈300 s**(本轮 298959 ms;复核方 299649 / 295216 ms —— ~1.5% 机器差异,**不要合成单点数字**) | 11/11 族具名变红、`hangs=[]`、`skipped=[]`、`ALL MUTANTS RED AS REQUIRED`;900 s 覆盖(见 `docs/AUDIT-CHECKLIST.md` 的跑测超时行) |
64
67
  | `tests/host-failure-paths.test.mjs` | ≈ 6.3 s | — | 真实宿主的失败路径(`kind:'error'`、`/v4 set` 键校验、失败轮次不算进展) |
65
68
  | `tests/v4-mailbox-stall.test.mjs` | ≈ 7.1 s | — | `sendMessage` 拒绝后必须重投并唤醒(control + treatment 各一个 host) |
66
69
  | `tests/v2-fix-probes.test.mjs` | ≈ 8.6 s | — | v2 的 flat 等权均值 / ≥2 名验证者 / runShell 失败分支(26 条) |
@@ -75,10 +78,10 @@ node tests/run-tests.mjs --json # 机器可读汇总(含 skippedN
75
78
  | `tests/audit-math-computation-contract.mjs` | ≈ 0.2 s | — | 跨预设接线(含 set-schema **属性级**检查与 defaults 漂移检查) |
76
79
  | `tests/audit-math-computation-sensitivity.mjs` | ≈ 25 s | — | 21 个模块级变异,每条都要求具名断言变红(控制组必须绿) |
77
80
 
78
- > 上表 `run-tests` 的 `≈424 s / ≈121 s` 两列是 **65 项(44 套件 + 21 探针)** 时的实测(2026 年 math_computation
81
+ > 上表 `run-tests` 的 `≈424 s / ≈121 s` 两列是 **当时的门禁规模**(44 个套件、21 个探针/变体) 时的实测(2026 年 math_computation
79
82
  > P1/P2a + 审计修复轮之后)。`audit-formal-sensitivity`(49 探针,实测 wall 260.7 s)与 `e2e-v4-fixes`(≈ 98 s)
80
83
  > 是两条最长的独立路径;两者都不在 `run-tests` 的默认集合里时,整轮 wall 由 `e2e-v4-fixes` 决定。
81
- > 数字**形状**(`TOTAL 65 … suites 44 · probes 21`)以 runner 每次运行的输出为准。
84
+ > 数字**形状**(`TOTAL <n> … suites <s> · probes <p>`;具体值以 runner 每次运行的输出为准,本文件**不复述**)——本文件里出现的每个 `TOTAL <n>` 都由 `tests/audit-readme-counts.mjs` 与 `--counts` 对账(历史数字只出现在冻结的 `docs/release-notes/**` 里,按名排除)。
82
85
 
83
86
  单套件耗时(并行时的关键路径按此排序):
84
87
 
package/installer.js CHANGED
@@ -219,8 +219,14 @@ function withTimeout(promise, ms) {
219
219
  })
220
220
  }
221
221
 
222
- async function detectDshVersion(ctx) {
223
- try { const v = process.env.DSH_VERSION; if (v && String(v).trim()) return { version: String(v).trim(), source: 'DSH_VERSION' } } catch (e) {}
222
+ export async function detectDshVersion(ctx) {
223
+ // Installer review (finding): several sources can report this host's version, and "first available
224
+ // wins" hid a CONFLICTING host state (the same lesson the `engines.dsh`-vs-`dshReleases` rule already
225
+ // records below). Probe them ALL, keep the first available authoritative (priority unchanged), and
226
+ // record the rest so a disagreement is visible instead of silent.
227
+ const probes = []
228
+ const add = (source, version) => { const v = (version === undefined || version === null) ? '' : String(version).trim(); if (v) probes.push({ source: source, version: v }) }
229
+ try { add('DSH_VERSION', process.env.DSH_VERSION) } catch (e) {}
224
230
  try {
225
231
  const pm = (ctx && ctx.get) ? ctx.get('pluginManager') : undefined
226
232
  if (pm && typeof pm.listBundles === 'function') {
@@ -228,21 +234,24 @@ async function detectDshVersion(ctx) {
228
234
  // stalling this row's activation (non-fatal either way — see the constant's comment).
229
235
  const bundles = await withTimeout(pm.listBundles(), LIST_BUNDLES_TIMEOUT_MS)
230
236
  const host = (bundles || []).find((b) => b && (b.name === '@deepseek-ai/dsh-base' || b.name === '@deepseek-ai/dsh'))
231
- if (host && host.version) return { version: String(host.version), source: 'pluginManager:' + host.name }
237
+ if (host && host.version) add('pluginManager:' + host.name, host.version)
232
238
  }
233
239
  } catch (e) { /* no such service, or it cannot list yet */ }
234
240
  try {
235
241
  const boot = await import('@deepseek-ai/dsh-app-boot')
236
- if (boot && typeof boot.getDshRuntimeVersion === 'function') {
237
- return { version: String(boot.getDshRuntimeVersion()), source: 'dsh-app-boot' }
238
- }
242
+ if (boot && typeof boot.getDshRuntimeVersion === 'function') add('dsh-app-boot', boot.getDshRuntimeVersion())
239
243
  } catch (e) { /* host packages are not reachable from this plugin's module scope */ }
240
244
  try {
241
245
  const p = __require.resolve('@deepseek-ai/dsh/package.json')
242
- const v = (JSON.parse(readFileSync(p, 'utf8')).version || '').trim()
243
- if (v) return { version: v, source: '@deepseek-ai/dsh/package.json' }
246
+ add('@deepseek-ai/dsh/package.json', JSON.parse(readFileSync(p, 'utf8')).version || '')
244
247
  } catch (e) { /* not a global install layout — rely on the capability check */ }
245
- return undefined
248
+ if (!probes.length) return undefined
249
+ const first = probes[0]
250
+ const conflicts = probes.slice(1).filter((x) => x.version !== first.version)
251
+ const out = { version: first.version, source: first.source, probes: probes.slice() }
252
+ // Assemble the disagreement slot ONLY when there is one (no empty slot for agreeing hosts).
253
+ if (conflicts.length) out.disagreement = { primary: first.source, conflicts: conflicts.slice() }
254
+ return out
246
255
  }
247
256
 
248
257
  /**
@@ -524,7 +533,7 @@ async function checkHostCapabilities(ctx, logger) {
524
533
  if (problems.length > 0) {
525
534
  logger?.warn?.('[dsh-vibe-math] 宿主自检:' + problems.length + ' 项不满足(' + problems.join(';') + ')。v2/v3/v4/v5 预设依赖这些宿主服务/API,旧版或未经声明兼容的 DSH 可能无法挂载' + (dshVersion ? '(当前检测到 DSH v' + dshVersion + ',来源 ' + versionSource + ',本包适配 ' + (supported.length ? supported.join(' / ') : '(未声明)') + ')' : '') + '。')
526
535
  } else {
527
- logger?.info?.('[dsh-vibe-math] 宿主自检通过:subagents / agents / tools / commands / fs 服务及关键 API 均可用' + (degradations.length === 0 ? ',可选服务 subprocess / sandboxPolicy / compaction 亦齐备' : '(可选服务有缺失,见上方警告)') + (dshVersion ? '(当前 DSH v' + dshVersion + ',来源 ' + versionSource + ';本包已声明兼容 ' + supported.join(' / ') + ')' : '') + '。')
536
+ logger?.info?.('[dsh-vibe-math] 宿主自检通过(“自检通过” ≠ “兼容”:这里只证明服务/API 的**形状**,不证明**行为**语义):subagents / agents / tools / commands / fs 服务及关键 API 均可用' + (degradations.length === 0 ? ',可选服务 subprocess / sandboxPolicy / compaction 亦齐备' : '(可选服务有缺失,见上方警告)') + (dshVersion ? '(当前 DSH v' + dshVersion + ',来源 ' + versionSource + ';本包已声明兼容 ' + supported.join(' / ') + ')' : '') + '。')
528
537
  }
529
538
  return { dshVersion, versionSource, mechanism }
530
539
  }
@@ -729,7 +738,8 @@ export async function apply(ctx) {
729
738
  if (unreadableStale.length > 0) cleanupNotes.push(unreadableStale.length + ' 个文件**无法读取**(既不能证明是本安装器写入的,也无法备份),已跳过删除并保留原文件:' + unreadableStale.join(', '))
730
739
  if (keptUserFiles > 0) cleanupNotes.push(keptUserFiles + ' 个记为用户所有的文件被保留(' + [...keptUserDirs].join(', ') + '),要清理请手动删除')
731
740
  if (removedFiles > 0 || removedDirs.length > 0 || cleanupNotes.length > 0) {
732
- logger?.info?.('[dsh-vibe-math] preset cleanup: removed ' + removedFiles + ' file(s) from ' + removedDirs.length + ' stale preset dir(s) (' + removedDirs.map(d => d.split(/[\\/]/).pop()).join(', ') + ') that are no longer shipped' +
741
+ // 约定:安装器面向用户的日志统一中文(英文片段混进中文句子会让用户读到半句话)。
742
+ logger?.info?.('[dsh-vibe-math] 预设清理:从 ' + removedDirs.length + ' 个已不再随包发布的过期预设目录(' + removedDirs.map(d => d.split(/[\\/]/).pop()).join(', ') + ') 中删除 ' + removedFiles + ' 个文件' +
733
743
  (cleanupNotes.length > 0 ? ';' + cleanupNotes.join(';') : '') + '。')
734
744
  }
735
745
 
@@ -751,12 +761,12 @@ export async function apply(ctx) {
751
761
  : ''
752
762
 
753
763
  if (isUpgrade) {
754
- logger?.info?.('[dsh-vibe-math] preset auto-update: version ' + fromVersion + ' → ' + pkgVersion +
764
+ logger?.info?.('[dsh-vibe-math] 预设自动更新:版本 ' + fromVersion + ' → ' + pkgVersion +
755
765
  ' — 新增 ' + installed + ' 个文件,更新 ' + updated + ' 个文件。' +
756
766
  editClause + unknownClause +
757
767
  '新版本 preset 将在新会话生效。')
758
768
  } else if (isBaseline) {
759
- logger?.info?.('[dsh-vibe-math] preset baseline: refreshed ' + (installed + updated) + ' file(s) to v' + pkgVersion +
769
+ logger?.info?.('[dsh-vibe-math] 预设基线:已刷新 ' + (installed + updated) + ' file(s) to v' + pkgVersion +
760
770
  (replacedEdits.length > 0
761
771
  ? ',其中 ' + replacedEdits.length + ' 个原有文件与随包版本不同' +
762
772
  (backupFailures.length === 0 ? ',原文已备份在 ' + backupsDir
@@ -768,16 +778,16 @@ export async function apply(ctx) {
768
778
  // SAME VERSION, and BOTH facts are reported: a missing file being restored must not hide the
769
779
  // drift notice (the audit's repro: the log said "restored 1" and never mentioned the drift).
770
780
  const parts = []
771
- if (installed > 0) parts.push('restored ' + installed + ' missing preset file(s)')
781
+ if (installed > 0) parts.push('还原了 ' + installed + ' 个缺失的预设文件')
772
782
  if (kept > 0) {
773
- parts.push(kept + ' file(s) differ from the shipped copy and were left untouched (v' + pkgVersion + ' 未变)' +
783
+ parts.push(kept + ' 个文件与随包副本不同,已保持原样(v' + pkgVersion + ' 未变)' +
774
784
  (userEditedKept > 0 ? ',其中 ' + userEditedKept + ' 个是安装之后的改动(记为用户所有:弃用 preset 的清理不会删除它们)' : '') +
775
785
  ';下一次版本变更会先备份原文再替换')
776
786
  }
777
- logger?.info?.('[dsh-vibe-math] preset files: ' + parts.join(';') + '。')
787
+ logger?.info?.('[dsh-vibe-math] 预设文件:' + parts.join(';') + '。')
778
788
  }
779
789
  /* the host self-check ran at the top of apply() — it also decides the preset mechanism */
780
790
  } catch (err) {
781
- logger?.warn?.('[dsh-vibe-math] preset install/update failed: %s', String((err && err.message) || err))
791
+ logger?.warn?.('[dsh-vibe-math] 预设安装/更新失败:' + String((err && err.message) || err))
782
792
  }
783
793
  }