@holmes-lab/holmes-kit 0.38.0 → 0.40.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 (308) hide show
  1. package/CHANGELOG.md +370 -6
  2. package/README.md +58 -40
  3. package/dist/.build-id +1 -1
  4. package/dist/holmes/admission/core/admission-policy.d.ts +37 -0
  5. package/dist/holmes/admission/core/admission-policy.js +147 -0
  6. package/dist/holmes/admission/core/bounded-reader.d.ts +56 -0
  7. package/dist/holmes/admission/core/bounded-reader.js +135 -0
  8. package/dist/holmes/admission/core/change-classifier.d.ts +34 -0
  9. package/dist/holmes/admission/core/change-classifier.js +278 -0
  10. package/dist/holmes/admission/core/config-loader.d.ts +30 -0
  11. package/dist/holmes/admission/core/config-loader.js +145 -0
  12. package/dist/holmes/admission/core/event-judgement.d.ts +37 -0
  13. package/dist/holmes/admission/core/event-judgement.js +251 -0
  14. package/dist/holmes/admission/core/path-rules.d.ts +35 -0
  15. package/dist/holmes/admission/core/path-rules.js +88 -0
  16. package/dist/holmes/admission/core/pin.d.ts +7 -0
  17. package/dist/holmes/admission/core/pin.js +29 -0
  18. package/dist/holmes/admission/core/ports.d.ts +48 -0
  19. package/dist/holmes/admission/core/ports.js +11 -0
  20. package/dist/holmes/admission/core/range-resolver.d.ts +32 -0
  21. package/dist/holmes/admission/core/range-resolver.js +51 -0
  22. package/dist/holmes/admission/core/self-containment.d.ts +1 -0
  23. package/dist/holmes/admission/core/self-containment.js +125 -0
  24. package/dist/holmes/admission/core/signature-source.d.ts +9 -0
  25. package/dist/holmes/admission/core/signature-source.js +4 -0
  26. package/dist/holmes/admission/core/transition-planner.d.ts +15 -0
  27. package/dist/holmes/admission/core/transition-planner.js +14 -0
  28. package/dist/holmes/admission/core/verdict.d.ts +38 -0
  29. package/dist/holmes/admission/core/verdict.js +17 -0
  30. package/dist/holmes/admission/core/wiring.d.ts +44 -0
  31. package/dist/holmes/admission/core/wiring.js +618 -0
  32. package/dist/holmes/admission/forge/git-object-port.d.ts +4 -0
  33. package/dist/holmes/admission/forge/git-object-port.js +132 -0
  34. package/dist/holmes/assoc/assoc-arm.d.ts +1 -1
  35. package/dist/holmes/assoc/assoc-arm.js +1 -1
  36. package/dist/holmes/cli/agents.d.ts +8 -0
  37. package/dist/holmes/cli/agents.js +9 -5
  38. package/dist/holmes/cli/approve-cli.d.ts +2 -0
  39. package/dist/holmes/cli/approve-cli.js +392 -0
  40. package/dist/holmes/cli/approve-ref.d.ts +13 -7
  41. package/dist/holmes/cli/approve-ref.js +30 -10
  42. package/dist/holmes/cli/approve-status.d.ts +26 -2
  43. package/dist/holmes/cli/approve-status.js +98 -18
  44. package/dist/holmes/cli/approve-watch.d.ts +5 -0
  45. package/dist/holmes/cli/approve-watch.js +10 -5
  46. package/dist/holmes/cli/approve.d.ts +50 -13
  47. package/dist/holmes/cli/approve.js +260 -67
  48. package/dist/holmes/cli/attest.js +2 -1
  49. package/dist/holmes/cli/autonomy.d.ts +4 -1
  50. package/dist/holmes/cli/autonomy.js +17 -10
  51. package/dist/holmes/cli/codex-oracle.d.ts +11 -0
  52. package/dist/holmes/cli/codex-oracle.js +5 -1
  53. package/dist/holmes/cli/codex-toml.d.ts +10 -0
  54. package/dist/holmes/cli/codex-toml.js +36 -2
  55. package/dist/holmes/cli/doctor-boundary.d.ts +76 -0
  56. package/dist/holmes/cli/doctor-boundary.js +308 -0
  57. package/dist/holmes/cli/doctor-locks.d.ts +15 -0
  58. package/dist/holmes/cli/doctor-locks.js +119 -0
  59. package/dist/holmes/cli/doctor.d.ts +2 -0
  60. package/dist/holmes/cli/doctor.js +45 -5
  61. package/dist/holmes/cli/flags.d.ts +23 -0
  62. package/dist/holmes/cli/flags.js +89 -0
  63. package/dist/holmes/cli/index.d.ts +5 -1
  64. package/dist/holmes/cli/index.js +206 -424
  65. package/dist/holmes/cli/init.js +33 -0
  66. package/dist/holmes/cli/lock-recover.d.ts +5 -0
  67. package/dist/holmes/cli/lock-recover.js +126 -0
  68. package/dist/holmes/cli/mcp-processes.d.ts +32 -0
  69. package/dist/holmes/cli/mcp-processes.js +132 -0
  70. package/dist/holmes/cli/release-docs.js +1 -1
  71. package/dist/holmes/cli/run-exec.d.ts +141 -0
  72. package/dist/holmes/cli/run-exec.js +1435 -0
  73. package/dist/holmes/cli/run-provision.d.ts +8 -0
  74. package/dist/holmes/cli/run-provision.js +325 -0
  75. package/dist/holmes/cli/run-wiring.d.ts +69 -0
  76. package/dist/holmes/cli/run-wiring.js +270 -0
  77. package/dist/holmes/cli/run.d.ts +26 -0
  78. package/dist/holmes/cli/run.js +364 -83
  79. package/dist/holmes/cli/runtime-binding-approval.js +32 -19
  80. package/dist/holmes/cli/screen-safe.d.ts +3 -92
  81. package/dist/holmes/cli/screen-safe.js +18 -756
  82. package/dist/holmes/config/config.d.ts +2 -0
  83. package/dist/holmes/config/config.js +5 -2
  84. package/dist/holmes/cpg/foundation/language-matrix.js +2 -2
  85. package/dist/holmes/cpg/import-resolver.js +1 -1
  86. package/dist/holmes/governance/approval-decisions.d.ts +47 -0
  87. package/dist/holmes/governance/approval-decisions.js +29 -0
  88. package/dist/holmes/governance/approval-grants.d.ts +220 -1
  89. package/dist/holmes/governance/approval-grants.js +612 -33
  90. package/dist/holmes/governance/approval-queue.d.ts +31 -0
  91. package/dist/holmes/governance/approval-queue.js +122 -11
  92. package/dist/holmes/governance/approval-spend.d.ts +95 -0
  93. package/dist/holmes/governance/approval-spend.js +191 -0
  94. package/dist/holmes/governance/autonomous-shell.d.ts +61 -0
  95. package/dist/holmes/governance/autonomous-shell.js +332 -0
  96. package/dist/holmes/governance/autonomy.d.ts +5 -0
  97. package/dist/holmes/governance/autonomy.js +16 -11
  98. package/dist/holmes/governance/constitution.d.ts +5 -0
  99. package/dist/holmes/governance/constitution.js +32 -12
  100. package/dist/holmes/governance/full-autonomy.d.ts +10 -0
  101. package/dist/holmes/governance/full-autonomy.js +103 -7
  102. package/dist/holmes/governance/harness-catalog.d.ts +103 -0
  103. package/dist/holmes/governance/harness-catalog.js +348 -0
  104. package/dist/holmes/governance/human-channel.d.ts +38 -0
  105. package/dist/holmes/governance/human-channel.js +49 -0
  106. package/dist/holmes/governance/install-manifest.d.ts +22 -0
  107. package/dist/holmes/governance/install-manifest.js +160 -0
  108. package/dist/holmes/governance/ledger-rechain.js +2 -0
  109. package/dist/holmes/governance/ledger-store.conformance.d.ts +7 -1
  110. package/dist/holmes/governance/ledger-store.conformance.js +66 -0
  111. package/dist/holmes/governance/ledger-store.d.ts +88 -11
  112. package/dist/holmes/governance/ledger-store.js +186 -8
  113. package/dist/holmes/governance/provenance-chain.d.ts +16 -4
  114. package/dist/holmes/governance/provenance-chain.js +19 -4
  115. package/dist/holmes/governance/provenance-ledger.d.ts +6 -3
  116. package/dist/holmes/governance/provenance-ledger.js +53 -18
  117. package/dist/holmes/governance/push-gate-runner.js +11 -7
  118. package/dist/holmes/governance/recorded-pairs.d.ts +96 -0
  119. package/dist/holmes/governance/recorded-pairs.js +522 -0
  120. package/dist/holmes/governance/replica-id.d.ts +1 -1
  121. package/dist/holmes/governance/replica-id.js +1 -1
  122. package/dist/holmes/governance/spec-seam.d.ts +59 -0
  123. package/dist/holmes/governance/spec-seam.js +587 -0
  124. package/dist/holmes/governance/spend-kinds.d.ts +16 -0
  125. package/dist/holmes/governance/spend-kinds.js +18 -0
  126. package/dist/holmes/governance/tool-actions.js +2 -0
  127. package/dist/holmes/guardrail/decision-ledger.d.ts +2 -1
  128. package/dist/holmes/guardrail/decision-ledger.js +2 -1
  129. package/dist/holmes/guardrail/impact-gate.d.ts +1 -0
  130. package/dist/holmes/guardrail/impact-gate.js +1 -1
  131. package/dist/holmes/guardrail/line-continuation.d.ts +8 -0
  132. package/dist/holmes/guardrail/line-continuation.js +39 -0
  133. package/dist/holmes/guardrail/operator-person.d.ts +28 -4
  134. package/dist/holmes/guardrail/operator-person.js +57 -11
  135. package/dist/holmes/guardrail/refusal-codes.d.ts +8 -3
  136. package/dist/holmes/guardrail/refusal-codes.js +70 -10
  137. package/dist/holmes/guardrail/risk-classifier.d.ts +15 -9
  138. package/dist/holmes/guardrail/risk-classifier.js +245 -15
  139. package/dist/holmes/guardrail/risk-gate.d.ts +2 -8
  140. package/dist/holmes/guardrail/risk-gate.js +7 -34
  141. package/dist/holmes/guardrail/risk-types.d.ts +10 -0
  142. package/dist/holmes/guardrail/run-plan-scope.js +3 -1
  143. package/dist/holmes/guardrail/run-refusals.d.ts +6 -1
  144. package/dist/holmes/guardrail/run-refusals.js +36 -14
  145. package/dist/holmes/guardrail/run-stages.d.ts +10 -0
  146. package/dist/holmes/guardrail/run-stages.js +46 -6
  147. package/dist/holmes/guardrail/scope-judgment.js +1 -1
  148. package/dist/holmes/guardrail/shell-words.js +24 -3
  149. package/dist/holmes/guardrail/unresolved-write.d.ts +40 -0
  150. package/dist/holmes/guardrail/unresolved-write.js +556 -0
  151. package/dist/holmes/guardrail/write-target.d.ts +3 -0
  152. package/dist/holmes/guardrail/write-target.js +26 -5
  153. package/dist/holmes/hooks/pre-tool-use.d.ts +105 -1
  154. package/dist/holmes/hooks/pre-tool-use.js +1167 -168
  155. package/dist/holmes/hooks/rtm-refresh-child.d.ts +1 -1
  156. package/dist/holmes/hooks/rtm-refresh-child.js +1 -1
  157. package/dist/holmes/hooks/session-start.d.ts +5 -0
  158. package/dist/holmes/hooks/session-start.js +29 -1
  159. package/dist/holmes/hooks/stop.d.ts +23 -0
  160. package/dist/holmes/hooks/stop.js +88 -33
  161. package/dist/holmes/mcp/approval-adapters.js +3 -1
  162. package/dist/holmes/mcp/approval-commit.js +3 -2
  163. package/dist/holmes/mcp/approval-policy.d.ts +2 -1
  164. package/dist/holmes/mcp/approval-policy.js +3 -1
  165. package/dist/holmes/mcp/handlers/adoption.d.ts +1 -1
  166. package/dist/holmes/mcp/handlers/approval-ask.d.ts +14 -0
  167. package/dist/holmes/mcp/handlers/approval-ask.js +31 -6
  168. package/dist/holmes/mcp/handlers/entity-integration.d.ts +3 -3
  169. package/dist/holmes/mcp/handlers/entity-integration.js +29 -11
  170. package/dist/holmes/mcp/handlers/entity-renumber.d.ts +4 -4
  171. package/dist/holmes/mcp/handlers/entity-renumber.js +29 -11
  172. package/dist/holmes/mcp/handlers/entity-store.d.ts +2 -2
  173. package/dist/holmes/mcp/handlers/entity-store.js +133 -59
  174. package/dist/holmes/mcp/handlers/operator-inspection.d.ts +9 -5
  175. package/dist/holmes/mcp/handlers/operator-inspection.js +79 -16
  176. package/dist/holmes/mcp/handlers/phase-queries.d.ts +1 -1
  177. package/dist/holmes/mcp/handlers/requirement-triage.d.ts +4 -4
  178. package/dist/holmes/mcp/handlers/review-evidence.d.ts +2 -2
  179. package/dist/holmes/mcp/handlers/review-evidence.js +35 -11
  180. package/dist/holmes/mcp/handlers/review-queries.d.ts +5 -0
  181. package/dist/holmes/mcp/handlers/review-queries.js +8 -1
  182. package/dist/holmes/mcp/handlers/review-verdict.d.ts +3 -0
  183. package/dist/holmes/mcp/handlers/review-verdict.js +10 -3
  184. package/dist/holmes/mcp/handlers/risk-assessment.d.ts +7 -2
  185. package/dist/holmes/mcp/handlers/risk-assessment.js +34 -12
  186. package/dist/holmes/mcp/handlers/runtime-binding-tool.d.ts +2 -2
  187. package/dist/holmes/mcp/handlers/slice-orchestration.d.ts +6 -1
  188. package/dist/holmes/mcp/handlers/slice-orchestration.js +14 -1
  189. package/dist/holmes/mcp/handlers/spec-approval.d.ts +15 -3
  190. package/dist/holmes/mcp/handlers/spec-approval.js +32 -5
  191. package/dist/holmes/mcp/handlers/spec-authoring.d.ts +2 -2
  192. package/dist/holmes/mcp/handlers/spec-authoring.js +19 -2
  193. package/dist/holmes/mcp/handlers/spec-lifecycle.d.ts +11 -38
  194. package/dist/holmes/mcp/handlers/spec-lifecycle.js +441 -94
  195. package/dist/holmes/mcp/handlers/spec-queries.d.ts +2 -2
  196. package/dist/holmes/mcp/handlers/taint-screening.d.ts +1 -1
  197. package/dist/holmes/mcp/handlers/taint-screening.js +2 -2
  198. package/dist/holmes/mcp/handlers/test-execution.d.ts +1 -1
  199. package/dist/holmes/mcp/handlers/workspace-preflight.d.ts +5 -0
  200. package/dist/holmes/mcp/handlers/workspace-preflight.js +10 -2
  201. package/dist/holmes/mcp/handlers/workspace-queries.d.ts +2 -2
  202. package/dist/holmes/mcp/handlers.d.ts +99 -79
  203. package/dist/holmes/mcp/handlers.js +93 -25
  204. package/dist/holmes/mcp/harness-attestation.d.ts +78 -5
  205. package/dist/holmes/mcp/harness-attestation.js +325 -53
  206. package/dist/holmes/mcp/maintenance-analyze.d.ts +1 -1
  207. package/dist/holmes/mcp/maintenance-analyze.js +9 -9
  208. package/dist/holmes/mcp/maintenance-evidence.js +31 -2
  209. package/dist/holmes/mcp/requirement-triage-evidence.js +22 -13
  210. package/dist/holmes/mcp/server-staleness.d.ts +43 -0
  211. package/dist/holmes/mcp/server-staleness.js +158 -0
  212. package/dist/holmes/mcp/server.js +34 -9
  213. package/dist/holmes/mcp/spec-id-guard.js +1 -1
  214. package/dist/holmes/mcp/tool-schemas.d.ts +13 -0
  215. package/dist/holmes/mcp/tool-schemas.js +42 -2
  216. package/dist/holmes/project/act-root.d.ts +19 -0
  217. package/dist/holmes/project/act-root.js +100 -0
  218. package/dist/holmes/project/baseline.js +4 -3
  219. package/dist/holmes/project/bounded-group.d.ts +47 -0
  220. package/dist/holmes/project/bounded-group.js +140 -0
  221. package/dist/holmes/project/bounded-io.d.ts +50 -2
  222. package/dist/holmes/project/bounded-io.js +138 -6
  223. package/dist/holmes/project/change-source.js +2 -2
  224. package/dist/holmes/project/instance-id.d.ts +10 -0
  225. package/dist/holmes/project/instance-id.js +233 -0
  226. package/dist/holmes/project/machine-identity.d.ts +25 -0
  227. package/dist/holmes/project/machine-identity.js +133 -0
  228. package/dist/holmes/project/owned-lock.d.ts +84 -0
  229. package/dist/holmes/project/owned-lock.js +263 -0
  230. package/dist/holmes/project/plain-lock-fs.d.ts +2 -0
  231. package/dist/holmes/project/plain-lock-fs.js +126 -0
  232. package/dist/holmes/project/request-lock.d.ts +85 -0
  233. package/dist/holmes/project/request-lock.js +459 -0
  234. package/dist/holmes/project/root.d.ts +12 -4
  235. package/dist/holmes/project/root.js +26 -7
  236. package/dist/holmes/project/run-records.d.ts +19 -0
  237. package/dist/holmes/project/run-records.js +94 -12
  238. package/dist/holmes/project/screen-text.d.ts +94 -0
  239. package/dist/holmes/project/screen-text.js +763 -0
  240. package/dist/holmes/project/spend-lock.d.ts +82 -0
  241. package/dist/holmes/project/spend-lock.js +413 -0
  242. package/dist/holmes/project/workspace-preflight.d.ts +5 -0
  243. package/dist/holmes/project/workspace-preflight.js +24 -1
  244. package/dist/holmes/refresh/freshness-coordinator.d.ts +1 -1
  245. package/dist/holmes/refresh/freshness-coordinator.js +1 -1
  246. package/dist/holmes/review/condition-hunk-replay.js +4 -2
  247. package/dist/holmes/review/confidence-calibration.d.ts +1 -1
  248. package/dist/holmes/review/confidence-calibration.js +1 -1
  249. package/dist/holmes/review/content-verify.js +1 -1
  250. package/dist/holmes/review/hop-ablation.d.ts +4 -4
  251. package/dist/holmes/review/hop-ablation.js +5 -5
  252. package/dist/holmes/review/point-in-time-replay.js +12 -3
  253. package/dist/holmes/review/rank-diagnosis.d.ts +2 -2
  254. package/dist/holmes/review/rank-diagnosis.js +1 -1
  255. package/dist/holmes/review/replay-corpus.d.ts +10 -4
  256. package/dist/holmes/review/replay-corpus.js +25 -9
  257. package/dist/holmes/review/requirement-triage.js +2 -2
  258. package/dist/holmes/review/semantic-arm.d.ts +3 -3
  259. package/dist/holmes/review/semantic-arm.js +3 -3
  260. package/dist/holmes/review/test-outcomes.js +3 -1
  261. package/dist/holmes/review/test-runner.d.ts +11 -0
  262. package/dist/holmes/review/test-runner.js +31 -10
  263. package/dist/holmes/review/test-selection-breadth.js +2 -2
  264. package/dist/holmes/review/verdicts.d.ts +109 -7
  265. package/dist/holmes/review/verdicts.js +653 -34
  266. package/dist/holmes/rtm/anchor-census.d.ts +9 -0
  267. package/dist/holmes/rtm/anchor-census.js +151 -0
  268. package/dist/holmes/rtm/anchor-ids.d.ts +25 -1
  269. package/dist/holmes/rtm/anchor-ids.js +45 -2
  270. package/dist/holmes/rtm/comment-ranges.d.ts +2 -0
  271. package/dist/holmes/rtm/comment-ranges.js +104 -0
  272. package/dist/holmes/rtm/counted-tests.d.ts +1 -0
  273. package/dist/holmes/rtm/counted-tests.js +63 -0
  274. package/dist/holmes/rtm/impact-advisory.d.ts +1 -1
  275. package/dist/holmes/rtm/known-defects.js +1 -1
  276. package/dist/holmes/rtm/localize.js +1 -1
  277. package/dist/holmes/rtm/taint-benchmark.d.ts +1 -1
  278. package/dist/holmes/rtm/taint-vocabulary.d.ts +1 -1
  279. package/dist/holmes/rtm/test-scope.d.ts +31 -0
  280. package/dist/holmes/rtm/test-scope.js +166 -5
  281. package/dist/holmes/rtm/trace-gaps.js +1 -1
  282. package/dist/holmes/runtime/dispatch.d.ts +10 -0
  283. package/dist/holmes/runtime/dispatch.js +12 -1
  284. package/dist/holmes/semantic/cloud-usage.d.ts +1 -1
  285. package/dist/holmes/semantic/cloud-usage.js +1 -1
  286. package/dist/holmes/semantic/unreadable-paths.d.ts +1 -1
  287. package/dist/holmes/semantic/unreadable-paths.js +1 -1
  288. package/dist/holmes/spec/approval-blockers.js +1 -1
  289. package/dist/holmes/spec/entity-store.d.ts +6 -1
  290. package/dist/holmes/spec/entity-store.js +16 -2
  291. package/dist/holmes/spec/entity-transaction.d.ts +7 -2
  292. package/dist/holmes/spec/entity-transaction.js +87 -170
  293. package/dist/holmes/spec/spec-store.d.ts +12 -6
  294. package/dist/holmes/spec/spec-store.js +4 -2
  295. package/dist/holmes/spec/spec-types.js +1 -1
  296. package/dist/holmes/spec/succession-guard.d.ts +56 -0
  297. package/dist/holmes/spec/succession-guard.js +187 -0
  298. package/dist/holmes/spec/succession.d.ts +70 -0
  299. package/dist/holmes/spec/succession.js +171 -0
  300. package/dist/holmes/spec/transition-policy.d.ts +2 -2
  301. package/docs/install-guide.md +9 -3
  302. package/docs/language-support.md +78 -0
  303. package/package.json +4 -3
  304. package/playbooks/author-slice/PLAYBOOK.md +1 -1
  305. package/playbooks/promote-slice/PLAYBOOK.md +5 -1
  306. package/playbooks/publish/PLAYBOOK.md +45 -33
  307. package/dist/holmes/review/manual-baseline.d.ts +0 -209
  308. package/dist/holmes/review/manual-baseline.js +0 -2847
@@ -37,7 +37,7 @@ export declare function hopContribution(slice: HopSlice): number;
37
37
  /** Case-weighted mean contribution — the single number, with its smallness visible. */
38
38
  export declare function weightedHopContribution(slices: readonly HopSlice[]): number;
39
39
  /**
40
- * Why the jarvis `union recall` floor fell from 0.8813 to 0.8508 when the hop went in.
40
+ * Why the consumer corpus's `union recall` floor fell from 0.8813 to 0.8508 when the hop went in.
41
41
  *
42
42
  * It was recorded as an open question, with a hypothesis: the hop pushes lexically-matched files out
43
43
  * of the top ten, which shrinks the symbols the call closure is seeded from, so `impactedFiles`
@@ -66,7 +66,7 @@ export interface UnionDrop {
66
66
  impactRecallWithHop: number;
67
67
  impactRecallWithoutHop: number;
68
68
  }
69
- /** Measured 2026-08-29 on `casesFor(JARVIS_CORPUS, 30)` — the set the floors are pinned on. */
69
+ /** Measured 2026-08-29 on `casesFor(CONSUMER_CORPUS, 30)` — the set the floors are pinned on. */
70
70
  export declare const UNION_DROP: UnionDrop;
71
71
  /** Net answers the hop put into the union, counted as files rather than averaged over cases. */
72
72
  export declare function unionFileDelta(d: UnionDrop): number;
@@ -74,12 +74,12 @@ export declare function unionFileDelta(d: UnionDrop): number;
74
74
  * What the rank fusion (A-SPEC-405) is worth, measured the same way the hop was.
75
75
  *
76
76
  * A-SPEC-405 was approved under a criterion of its own writing — "no existing figure falls on either
77
- * clean slice" — and then adopted with jarvis Top-10 precision down from 0.145 to 0.135. I recorded
77
+ * clean slice" — and then adopted with consumer-corpus Top-10 precision down from 0.145 to 0.135. I recorded
78
78
  * the violation and left the revert decision open. This is the number that decision needs, taken
79
79
  * through the product path rather than the arm the original used.
80
80
  *
81
81
  * The violation is REAL and is confirmed here, and a second cost the original never measured shows
82
- * up with it: on jarvis the fusion also leaves two fewer answers inside the forty the caller sees.
82
+ * up with it: on the consumer corpus the fusion also leaves two fewer answers inside the forty the caller sees.
83
83
  *
84
84
  * It is kept anyway, and the trade is stated rather than smoothed: +0.172 and +0.069 of Top-5 recall
85
85
  * against −0.012 of precision and two answers. Nobody should read this as the criterion being met.
@@ -14,14 +14,14 @@ exports.HOP_ABLATION = [
14
14
  withoutHop: { top1: 0.300, top5Recall: 0.493, top10Recall: 0.633, top10Precision: 0.127, truthInsideExposed: 45 },
15
15
  },
16
16
  {
17
- slice: 'jarvis 0-29',
17
+ slice: 'consumer 0-29',
18
18
  cases: 30,
19
19
  withHop: { top1: 0.533, top5Recall: 0.528, top10Recall: 0.612, top10Precision: 0.133, truthInsideExposed: 52 },
20
20
  withoutHop: { top1: 0.533, top5Recall: 0.488, top10Recall: 0.612, top10Precision: 0.135, truthInsideExposed: 53 },
21
21
  },
22
22
  {
23
23
  // The slice the adoption never saw. It is the one that disagrees.
24
- slice: 'jarvis 32-63',
24
+ slice: 'consumer 32-63',
25
25
  cases: 32,
26
26
  withHop: { top1: 0.469, top5Recall: 0.463, top10Recall: 0.611, top10Precision: 0.204, truthInsideExposed: 87 },
27
27
  withoutHop: { top1: 0.469, top5Recall: 0.510, top10Recall: 0.627, top10Precision: 0.204, truthInsideExposed: 88 },
@@ -38,9 +38,9 @@ function weightedHopContribution(slices) {
38
38
  return 0;
39
39
  return slices.reduce((a, s) => a + hopContribution(s) * s.cases, 0) / cases;
40
40
  }
41
- /** Measured 2026-08-29 on `casesFor(JARVIS_CORPUS, 30)` — the set the floors are pinned on. */
41
+ /** Measured 2026-08-29 on `casesFor(CONSUMER_CORPUS, 30)` — the set the floors are pinned on. */
42
42
  exports.UNION_DROP = {
43
- slice: 'jarvis newest-30',
43
+ slice: 'consumer newest-30',
44
44
  lostFiles: 2,
45
45
  lostFromRanked: 2,
46
46
  lostFromImpacted: 0,
@@ -64,7 +64,7 @@ exports.FUSION_ABLATION = [
64
64
  withoutFusion: { top1: 0.300, top5Recall: 0.382, top10Recall: 0.604, top10Precision: 0.117, truthInsideExposed: 44 },
65
65
  },
66
66
  {
67
- slice: 'jarvis clean-30',
67
+ slice: 'consumer clean-30',
68
68
  cases: 30,
69
69
  withFusion: { top1: 0.533, top5Recall: 0.528, top10Recall: 0.612, top10Precision: 0.133, truthInsideExposed: 52 },
70
70
  withoutFusion: { top1: 0.533, top5Recall: 0.459, top10Recall: 0.612, top10Precision: 0.145, truthInsideExposed: 54 },
@@ -43,6 +43,7 @@ const path = __importStar(require("node:path"));
43
43
  const crypto = __importStar(require("node:crypto"));
44
44
  const node_child_process_1 = require("node:child_process");
45
45
  const bounded_io_1 = require("../project/bounded-io");
46
+ const root_1 = require("../project/root");
46
47
  /**
47
48
  * A pathspec is ours to control, but a caller mistake here writes outside the destination, so it is
48
49
  * checked rather than trusted: repo-relative, no escape, no absolute root.
@@ -53,8 +54,10 @@ function pathspecIsSafe(pathspec) {
53
54
  const normalized = path.normalize(pathspec);
54
55
  return !normalized.startsWith('..') && !normalized.split(path.sep).includes('..');
55
56
  }
57
+ // @implements A-SPEC-792.42 — the shared inert git environment (its archive ran the repository's smudge filters)
58
+ const replayEnv = () => (0, bounded_io_1.gitEnv)((0, root_1.cleanSubprocessEnv)());
56
59
  function git(repoRoot, args) {
57
- return (0, node_child_process_1.execFileSync)('git', ['-C', repoRoot, ...args], { timeout: bounded_io_1.GIT_LONG_TIMEOUT_MS, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 });
60
+ return (0, node_child_process_1.execFileSync)('git', ['-C', repoRoot, ...args], { timeout: bounded_io_1.GIT_LONG_TIMEOUT_MS, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024, env: replayEnv() });
58
61
  }
59
62
  /** `path mode sha` triples the commit records for the pathspec, keyed by repo-relative path. */
60
63
  function blobsAt(repoRoot, commitish, pathspec) {
@@ -96,6 +99,11 @@ function materializeTreeAt(repoRoot, commitish, pathspec, destDir, opts) {
96
99
  return { ok: false, reason: `destination-not-empty: destination is not empty: ${destDir}` };
97
100
  }
98
101
  fs.mkdirSync(destDir, { recursive: true });
102
+ // @implements A-SPEC-792.44 — the filter and hook names first: neither the listing nor the archive runs without them
103
+ const env = replayEnv();
104
+ const drivers = (0, bounded_io_1.inertDriverArgs)(repoRoot, env);
105
+ if (drivers.error)
106
+ return { ok: false, reason: `archive-or-extract-failed: ${drivers.error}` };
99
107
  let blobs;
100
108
  try {
101
109
  blobs = blobsAt(repoRoot, commitish, pathspec);
@@ -120,7 +128,8 @@ function materializeTreeAt(repoRoot, commitish, pathspec, destDir, opts) {
120
128
  // the fidelity check would see a file the commit never had.
121
129
  const tarPath = path.join(fs.mkdtempSync(path.join(os.tmpdir(), 'pit-tar-')), 'tree.tar');
122
130
  try {
123
- const tar = (0, node_child_process_1.execFileSync)('git', ['-C', repoRoot, 'archive', '--format=tar', commitish, '--', pathspec], { timeout: bounded_io_1.GIT_LONG_TIMEOUT_MS, maxBuffer: 512 * 1024 * 1024 });
131
+ // @implements A-SPEC-792.43 — no archive without the overrides (read above, A-SPEC-792.44)
132
+ const tar = (0, node_child_process_1.execFileSync)('git', ['-C', repoRoot, ...drivers.args, 'archive', '--format=tar', commitish, '--', pathspec], { timeout: bounded_io_1.GIT_LONG_TIMEOUT_MS, maxBuffer: 512 * 1024 * 1024, env });
124
133
  fs.writeFileSync(tarPath, tar);
125
134
  (0, node_child_process_1.execFileSync)('tar', ['-x', '-C', destDir, '-f', tarPath], { maxBuffer: 512 * 1024 * 1024 });
126
135
  // Archive preserves modes/layout, but applies EOL/export substitutions. Read raw objects in
@@ -130,7 +139,7 @@ function materializeTreeAt(repoRoot, commitish, pathspec, destDir, opts) {
130
139
  const refs = fs.openSync(refsPath, 'r');
131
140
  let raw;
132
141
  try {
133
- raw = (0, node_child_process_1.execFileSync)('git', ['-C', repoRoot, 'cat-file', '--batch'], { timeout: bounded_io_1.GIT_LONG_TIMEOUT_MS,
142
+ raw = (0, node_child_process_1.execFileSync)('git', ['-C', repoRoot, 'cat-file', '--batch'], { timeout: bounded_io_1.GIT_LONG_TIMEOUT_MS, env,
134
143
  stdio: [refs, 'pipe', 'pipe'], maxBuffer: 512 * 1024 * 1024,
135
144
  });
136
145
  }
@@ -7,7 +7,7 @@
7
7
  * does nothing). Thirteen rejected retrieval mechanisms were all attempts at the first one. This
8
8
  * module measures which it actually is, so the next attempt is aimed at the measured cause.
9
9
  *
10
- * On the eight blind jarvis cases of A-SPEC-404 the answer is unambiguous, and it is the second:
10
+ * On the eight blind consumer-corpus cases of A-SPEC-404 the answer is unambiguous, and it is the second:
11
11
  * every truth file was already in the pool.
12
12
  */
13
13
  export interface PooledTruth {
@@ -34,7 +34,7 @@ export declare function diagnoseRanking(cases: ReadonlyArray<{
34
34
  truth: readonly PooledTruth[];
35
35
  }>, cut: number): RankDiagnosis;
36
36
  /**
37
- * Measured 2026-08-29 on the eight A-SPEC-404 blind jarvis cases, through the shipped pipeline
37
+ * Measured 2026-08-29 on the eight A-SPEC-404 blind consumer-corpus cases, through the shipped pipeline
38
38
  * (localizeIssue at pool 500, then the recency x commit-text re-rank of A-SPEC-378/388).
39
39
  */
40
40
  export declare const S405_POOLED_TRUTH: ReadonlyArray<{
@@ -33,7 +33,7 @@ function diagnoseRanking(cases, cut) {
33
33
  };
34
34
  }
35
35
  /**
36
- * Measured 2026-08-29 on the eight A-SPEC-404 blind jarvis cases, through the shipped pipeline
36
+ * Measured 2026-08-29 on the eight A-SPEC-404 blind consumer-corpus cases, through the shipped pipeline
37
37
  * (localizeIssue at pool 500, then the recency x commit-text re-rank of A-SPEC-378/388).
38
38
  */
39
39
  exports.S405_POOLED_TRUTH = [
@@ -61,10 +61,16 @@ export declare const HOLMES_CORPUS: ReplayCorpus;
61
61
  * truth files, and its own `.ax/specs`. Tests live in `tests/` rather than beside the source, which
62
62
  * is precisely the assumption that had to stop being hard-coded.
63
63
  *
64
- * Absent on any machine but this one, and callers skip rather than fail — a benchmark that requires
65
- * someone else's checkout is a benchmark nobody else can run.
64
+ * Absent unless HOLMES_CONSUMER_CORPUS names a checkout of it, and callers skip rather than fail — a benchmark that
65
+ * requires someone else's checkout is a benchmark nobody else can run. A-SPEC-794.57: a caller that skips says so
66
+ * (`absentCorpusNotice`), so a green run does not hide that nothing was measured.
66
67
  */
67
- export declare const JARVIS_CORPUS: ReplayCorpus;
68
+ export declare const CONSUMER_CORPUS: ReplayCorpus;
69
+ /**
70
+ * @implements A-SPEC-794.57 — the line a caller prints when it skips because `corpus` is not checked out, or null when it
71
+ * is. The variable that names it is said, so the run says how to measure it.
72
+ */
73
+ export declare function absentCorpusNotice(corpus: ReplayCorpus, label: string, variable: string): string | null;
68
74
  /**
69
75
  * A third party's repository, with no spec store at all.
70
76
  *
@@ -110,7 +116,7 @@ export declare function casesFor(corpus: ReplayCorpus, limit: number, offset?: n
110
116
  * A deterministic sub-sample of a spec store, for holding a repository fixed while varying only how
111
117
  * many specs it has.
112
118
  *
113
- * The advantage over a no-graph baseline is 2.5x on this repository (585 specs) and a wash on jarvis
119
+ * The advantage over a no-graph baseline is 2.5x on this repository (585 specs) and a wash on the consumer corpus
114
120
  * (54). Reading that as a DENSITY effect is, so far, a correlation: the two corpora differ in
115
121
  * language, size, subject and commit style as well. Thinning one corpus is the controlled version of
116
122
  * the same question — everything else stays exactly where it is.
@@ -33,18 +33,21 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.GEMINI_CLI_MEASUREMENT = exports.GEMINI_CLI_CORPUS = exports.JARVIS_CORPUS = exports.HOLMES_CORPUS = void 0;
36
+ exports.GEMINI_CLI_MEASUREMENT = exports.GEMINI_CLI_CORPUS = exports.CONSUMER_CORPUS = exports.HOLMES_CORPUS = void 0;
37
37
  exports.changedParentLines = changedParentLines;
38
+ exports.absentCorpusNotice = absentCorpusNotice;
38
39
  exports.casesFor = casesFor;
39
40
  exports.thinSpecs = thinSpecs;
40
41
  exports.casesAvoidingRecent = casesAvoidingRecent;
41
- // @implements A-SPEC-345, A-SPEC-734
42
+ // @implements A-SPEC-345, A-SPEC-734, A-SPEC-794.56, A-SPEC-794.57, A-SPEC-794.58
42
43
  // @implements A-SPEC-387
44
+ const fs = __importStar(require("node:fs"));
43
45
  const os = __importStar(require("node:os"));
44
46
  const path = __importStar(require("node:path"));
45
47
  const node_child_process_1 = require("node:child_process");
46
48
  const maintenance_analyze_1 = require("../mcp/maintenance-analyze");
47
49
  const bounded_io_1 = require("../project/bounded-io");
50
+ const root_1 = require("../project/root");
48
51
  const TS_FAMILY = (f) => f.endsWith('.ts') && !f.endsWith('.d.ts');
49
52
  // @implements A-SPEC-573.3
50
53
  /**
@@ -60,7 +63,8 @@ const TS_FAMILY = (f) => f.endsWith('.ts') && !f.endsWith('.d.ts');
60
63
  function changedParentLines(root, commit, file) {
61
64
  let raw;
62
65
  try {
63
- raw = (0, node_child_process_1.execFileSync)('git', ['-C', root, 'show', '--unified=0', '--format=', commit, '--', file], { timeout: bounded_io_1.GIT_LONG_TIMEOUT_MS, encoding: 'utf8', maxBuffer: 16 * 1024 * 1024 });
66
+ // @implements A-SPEC-792.39 — the shared inert git environment, no external diff or textconv.
67
+ raw = (0, node_child_process_1.execFileSync)('git', ['-C', root, 'show', '--no-ext-diff', '--no-textconv', '--unified=0', '--format=', commit, '--', file], { timeout: bounded_io_1.GIT_LONG_TIMEOUT_MS, encoding: 'utf8', maxBuffer: 16 * 1024 * 1024, env: (0, bounded_io_1.gitEnv)((0, root_1.cleanSubprocessEnv)()) });
64
68
  }
65
69
  catch {
66
70
  return [];
@@ -94,11 +98,14 @@ exports.HOLMES_CORPUS = {
94
98
  * truth files, and its own `.ax/specs`. Tests live in `tests/` rather than beside the source, which
95
99
  * is precisely the assumption that had to stop being hard-coded.
96
100
  *
97
- * Absent on any machine but this one, and callers skip rather than fail — a benchmark that requires
98
- * someone else's checkout is a benchmark nobody else can run.
101
+ * Absent unless HOLMES_CONSUMER_CORPUS names a checkout of it, and callers skip rather than fail — a benchmark that
102
+ * requires someone else's checkout is a benchmark nobody else can run. A-SPEC-794.57: a caller that skips says so
103
+ * (`absentCorpusNotice`), so a green run does not hide that nothing was measured.
99
104
  */
100
- exports.JARVIS_CORPUS = {
101
- root: path.join(os.homedir(), 'ai_project', 'jarvis'),
105
+ exports.CONSUMER_CORPUS = {
106
+ // A-SPEC-794.56 — the package names no consumer: the checkout is named by HOLMES_CONSUMER_CORPUS, and without it the
107
+ // root is a path that does not exist, so callers skip as they do when the corpus is absent
108
+ root: process.env.HOLMES_CONSUMER_CORPUS || path.join(os.tmpdir(), 'holmes-consumer-corpus-unset'),
102
109
  // @implements A-SPEC-443 — the last commit before 2026-08-30, the day five landed and moved a
103
110
  // six-decimal assertion with no product change.
104
111
  pin: '7b58e40ba3723b9d85390fdadf1d407cdf7bb9ec',
@@ -107,6 +114,14 @@ exports.JARVIS_CORPUS = {
107
114
  isTest: (f) => f.startsWith('tests/') || f.includes('.test.') || f.includes('.spec.'),
108
115
  isSource: (f) => (f.endsWith('.ts') || f.endsWith('.py') || f.endsWith('.js')) && !f.endsWith('.d.ts'),
109
116
  };
117
+ /**
118
+ * @implements A-SPEC-794.57 — the line a caller prints when it skips because `corpus` is not checked out, or null when it
119
+ * is. The variable that names it is said, so the run says how to measure it.
120
+ */
121
+ function absentCorpusNotice(corpus, label, variable) {
122
+ return fs.existsSync(path.join(corpus.root, '.git')) ? null
123
+ : `[${label}-corpus] ${variable} is unset or names no checkout (${corpus.root}): not checked`;
124
+ }
110
125
  // @implements A-SPEC-426
111
126
  /**
112
127
  * A third party's repository, with no spec store at all.
@@ -120,7 +135,8 @@ exports.JARVIS_CORPUS = {
120
135
  * Whatever the remaining layers are worth, they are worth something on their own.
121
136
  */
122
137
  exports.GEMINI_CLI_CORPUS = {
123
- root: path.join(os.homedir(), 'ai_project', 'GeminiAcp', 'reference-gemini-cli'),
138
+ // A-SPEC-794.57 — named by HOLMES_GEMINI_CLI_CORPUS, as the consumer corpus is; without it, a path that does not exist
139
+ root: process.env.HOLMES_GEMINI_CLI_CORPUS || path.join(os.tmpdir(), 'holmes-reference-gemini-cli-unset'),
124
140
  sourcePathspec: ['packages'],
125
141
  specPathspec: '.ax/specs',
126
142
  isTest: (f) => f.includes('.test.') || f.includes('.spec.'),
@@ -196,7 +212,7 @@ function casesFor(corpus, limit, offset = 0) {
196
212
  * A deterministic sub-sample of a spec store, for holding a repository fixed while varying only how
197
213
  * many specs it has.
198
214
  *
199
- * The advantage over a no-graph baseline is 2.5x on this repository (585 specs) and a wash on jarvis
215
+ * The advantage over a no-graph baseline is 2.5x on this repository (585 specs) and a wash on the consumer corpus
200
216
  * (54). Reading that as a DENSITY effect is, so far, a correlation: the two corpora differ in
201
217
  * language, size, subject and commit style as well. Thinning one corpus is the controlled version of
202
218
  * the same question — everything else stays exactly where it is.
@@ -4,7 +4,7 @@ exports.canonicalRequirementDocument = void 0;
4
4
  exports.requestIdentifiers = requestIdentifiers;
5
5
  exports.triageRequirements = triageRequirements;
6
6
  exports.requirementSemanticCoverage = requirementSemanticCoverage;
7
- // @implements A-SPEC-713.1, A-SPEC-713.2, A-SPEC-713.3, A-SPEC-713.4, A-SPEC-742, A-SPEC-713, A-SPEC-757
7
+ // @implements A-SPEC-713.1, A-SPEC-713.2, A-SPEC-713.3, A-SPEC-713.4, A-SPEC-742, A-SPEC-713, A-SPEC-757, A-SPEC-794.56
8
8
  /** Pure, conservative lifecycle triage over governed requirement documents. */
9
9
  const semantic_retrieval_1 = require("./semantic-retrieval");
10
10
  const localize_1 = require("../rtm/localize");
@@ -200,7 +200,7 @@ function triageCore(input) {
200
200
  const contentTerms = promptTerms.filter((term) => textLower.includes(term));
201
201
  const operational = input.evidence?.[row.reqId] ?? {};
202
202
  // @implements A-SPEC-713.4 — judged by the documents, not their count: `length === 4` left 62 of 672 fully
203
- // approved lineages here (8 of 671 in jarvis) unapproved because they carry sub-slices or retired documents,
203
+ // approved lineages here (8 of 671 in the consumer corpus) unapproved because they carry sub-slices or retired documents,
204
204
  // and counted REQ, H-SPEC and two A-SPECs without any T-SPEC as approved.
205
205
  const live = row.docs.filter((d) => d.status !== 'outdated');
206
206
  const kinds = new Set(live.map((d) => d.type));
@@ -130,7 +130,7 @@ export declare function anchorCoverage(scanned: readonly ScannedFile[], specs?:
130
130
  * Measured on one repository with only the spec count varied (A-SPEC-364): 585 specs gave Top-10
131
131
  * recall 0.770, but 146 gave 0.253 and 59 gave 0.264 — BELOW the 0.305 of no spec layer at all. A
132
132
  * partly populated spec store is worse than an empty one, and every project that adopts Holmes
133
- * passes through that valley on its way to the peak. jarvis, at 54 specs, is sitting in it.
133
+ * passes through that valley on its way to the peak. The consumer corpus, at 54 specs, is sitting in it.
134
134
  *
135
135
  * Scaling by coverage makes the layer fade in rather than switch on: at zero coverage the ranking is
136
136
  * exactly the lexical arm (the floor a project starts from), and at full coverage the bonus is
@@ -160,7 +160,7 @@ export declare function rankCitationConditioned(issueText: string, scanned: read
160
160
  *
161
161
  * Conditioning on whether the request cited a spec repaired this repository and cost the second
162
162
  * corpus its lead, because that corpus cites nothing and would always take the strict path. Both
163
- * measurements point at the same underlying quantity: HOW MANY specs the request matched. jarvis
163
+ * measurements point at the same underlying quantity: HOW MANY specs the request matched. The consumer corpus
164
164
  * matches 0.87 per case, this repository 26.6 (A-SPEC-367).
165
165
  *
166
166
  * One matching spec is a claim about where the request belongs. Twenty-six matching specs is a fact
@@ -222,7 +222,7 @@ export declare function ablate(issueText: string, scanned: readonly ScannedFile[
222
222
  * Limit how many files each matched spec may lift.
223
223
  *
224
224
  * The ablation isolated the cost: turning the spec bonus off restores the baseline exactly, so that
225
- * layer buys Top-1 (0.244 → 0.267 here, 0.400 → 0.433 on jarvis) and sells precision (0.156 → 0.104).
225
+ * layer buys Top-1 (0.244 → 0.267 here, 0.400 → 0.433 on the consumer corpus) and sells precision (0.156 → 0.104).
226
226
  *
227
227
  * Three earlier attempts all changed WHICH specs are admitted — breadth damping, coverage scaling,
228
228
  * a cap on matched specs — and all three were rejected. This changes something else: once a spec is
@@ -403,7 +403,7 @@ function anchorCoverage(scanned, specs = []) {
403
403
  * Measured on one repository with only the spec count varied (A-SPEC-364): 585 specs gave Top-10
404
404
  * recall 0.770, but 146 gave 0.253 and 59 gave 0.264 — BELOW the 0.305 of no spec layer at all. A
405
405
  * partly populated spec store is worse than an empty one, and every project that adopts Holmes
406
- * passes through that valley on its way to the peak. jarvis, at 54 specs, is sitting in it.
406
+ * passes through that valley on its way to the peak. The consumer corpus, at 54 specs, is sitting in it.
407
407
  *
408
408
  * Scaling by coverage makes the layer fade in rather than switch on: at zero coverage the ranking is
409
409
  * exactly the lexical arm (the floor a project starts from), and at full coverage the bonus is
@@ -460,7 +460,7 @@ function rankCitationConditioned(issueText, scanned, specs, topN, weight, citedT
460
460
  *
461
461
  * Conditioning on whether the request cited a spec repaired this repository and cost the second
462
462
  * corpus its lead, because that corpus cites nothing and would always take the strict path. Both
463
- * measurements point at the same underlying quantity: HOW MANY specs the request matched. jarvis
463
+ * measurements point at the same underlying quantity: HOW MANY specs the request matched. The consumer corpus
464
464
  * matches 0.87 per case, this repository 26.6 (A-SPEC-367).
465
465
  *
466
466
  * One matching spec is a claim about where the request belongs. Twenty-six matching specs is a fact
@@ -617,7 +617,7 @@ function ablate(issueText, scanned, specs, topN, opts) {
617
617
  * Limit how many files each matched spec may lift.
618
618
  *
619
619
  * The ablation isolated the cost: turning the spec bonus off restores the baseline exactly, so that
620
- * layer buys Top-1 (0.244 → 0.267 here, 0.400 → 0.433 on jarvis) and sells precision (0.156 → 0.104).
620
+ * layer buys Top-1 (0.244 → 0.267 here, 0.400 → 0.433 on the consumer corpus) and sells precision (0.156 → 0.104).
621
621
  *
622
622
  * Three earlier attempts all changed WHICH specs are admitted — breadth damping, coverage scaling,
623
623
  * a cap on matched specs — and all three were rejected. This changes something else: once a spec is
@@ -45,7 +45,7 @@ exports.appendOutcomes = appendOutcomes;
45
45
  exports.readOutcomes = readOutcomes;
46
46
  exports.buildOutcomeRecords = buildOutcomeRecords;
47
47
  exports.groupOutcomesByAspec = groupOutcomesByAspec;
48
- // @implements A-SPEC-724.1, A-SPEC-714, A-SPEC-734, A-SPEC-748
48
+ // @implements A-SPEC-724.1, A-SPEC-714, A-SPEC-734, A-SPEC-748, A-SPEC-794.58
49
49
  // @implements A-SPEC-534.3, A-SPEC-625
50
50
  // @implements A-SPEC-645
51
51
  const node_crypto_1 = require("node:crypto");
@@ -109,6 +109,8 @@ exports.REQUIRED_DOCS_TESTS = [
109
109
  'src/holmes/playbooks/packaging.test.ts',
110
110
  'src/holmes/cpg/foundation/language-matrix.test.ts',
111
111
  'src/holmes/project/dependency-overrides.test.ts',
112
+ // A-SPEC-794.58 — a docs-only change can carry a name into README; the publish path checks the pack too
113
+ 'src/holmes/governance/private-names.test.ts',
112
114
  ];
113
115
  /**
114
116
  * @implements A-SPEC-748 — every path of every change (both sides of a rename or copy) must be `README.md` or under
@@ -1,3 +1,4 @@
1
+ import { type ExecFileSyncOptionsWithStringEncoding } from 'node:child_process';
1
2
  import { RegressionTier, TestScope } from '../rtm/test-scope';
2
3
  /**
3
4
  * @implements A-SPEC-734 (round 13) — every runner child is bounded, and a tool probe is short. One passing jest
@@ -5,6 +6,16 @@ import { RegressionTier, TestScope } from '../rtm/test-scope';
5
6
  * A run stopped at the bound is red and says so — never green.
6
7
  */
7
8
  export declare const RUNNER_TIMEOUT_MS: number;
9
+ /**
10
+ * @implements A-SPEC-734.3 — the child leads a process group of its own (POSIX), and a child stopped at the bound takes
11
+ * that group with it: SIGKILL to the child alone left jest's forked workers running at 100% CPU (two per stopped run,
12
+ * 2026-10-26). The group id is the pid of the child this call spawned, ended as soon as the call returns. Windows has
13
+ * no groups; there the child alone is stopped, as before. Otherwise execFileSync's contract: stdout on exit 0, else a
14
+ * throw carrying stdout, stderr, status and code.
15
+ */
16
+ export declare function runBounded(cmd: string, args: string[], opts: ExecFileSyncOptionsWithStringEncoding, timeoutMs?: number): string;
17
+ /** @implements A-SPEC-734.4 — the last stop note (tests read it). */
18
+ export declare function runnerStopNote(): string | null;
8
19
  /**
9
20
  * Operational wiring for the intelligent test-scope (target-arch §5): turn a TestScope decision into
10
21
  * an actual test run. The PLAN is pure/deterministic (testable); the EXECUTE half shells out to jest.
@@ -34,6 +34,8 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.TAIL_MAX_CHARS = exports.RUNNER_TIMEOUT_MS = void 0;
37
+ exports.runBounded = runBounded;
38
+ exports.runnerStopNote = runnerStopNote;
37
39
  exports.planTestRun = planTestRun;
38
40
  exports.ecosystemOf = ecosystemOf;
39
41
  exports.parseGoTestJson = parseGoTestJson;
@@ -58,6 +60,7 @@ exports.summarizeJestJson = summarizeJestJson;
58
60
  // @implements A-SPEC-647
59
61
  // @implements A-SPEC-734
60
62
  const node_child_process_1 = require("node:child_process");
63
+ const bounded_group_1 = require("../project/bounded-group");
61
64
  const fs = __importStar(require("node:fs"));
62
65
  const os = __importStar(require("node:os"));
63
66
  const path = __importStar(require("node:path"));
@@ -80,16 +83,33 @@ exports.RUNNER_TIMEOUT_MS = 30 * 60_000;
80
83
  const PROBE_TIMEOUT_MS = 10_000;
81
84
  /** Round 14: the stop is recorded here and appended AFTER the runner's tail is taken (`tailOf` cut it — measured). */
82
85
  let STOPPED = null;
83
- function runBounded(cmd, args, opts) {
84
- try {
85
- return (0, node_child_process_1.execFileSync)(cmd, args, { ...opts, timeout: exports.RUNNER_TIMEOUT_MS, killSignal: 'SIGKILL' });
86
- }
87
- catch (e) {
88
- if (e.code === 'ETIMEDOUT')
89
- STOPPED = `[holmes-kit] the test run was stopped after ${exports.RUNNER_TIMEOUT_MS / 60_000} minutes — not judged`;
90
- throw e;
91
- }
86
+ /**
87
+ * @implements A-SPEC-734.3 — the child leads a process group of its own (POSIX), and a child stopped at the bound takes
88
+ * that group with it: SIGKILL to the child alone left jest's forked workers running at 100% CPU (two per stopped run,
89
+ * 2026-10-26). The group id is the pid of the child this call spawned, ended as soon as the call returns. Windows has
90
+ * no groups; there the child alone is stopped, as before. Otherwise execFileSync's contract: stdout on exit 0, else a
91
+ * throw carrying stdout, stderr, status and code.
92
+ */
93
+ function runBounded(cmd, args, opts, timeoutMs = exports.RUNNER_TIMEOUT_MS) {
94
+ // @implements A-SPEC-734.4 — the group's whole lifetime lives in bounded-group: a watch shim ends it when this process
95
+ // goes, and the call ends it on the bound, an overflow or a signal, or when members outlive a normal exit
96
+ const { result: r, stopped, leftovers } = (0, bounded_group_1.boundedGroupSpawnSync)(cmd, args, opts, timeoutMs);
97
+ if (leftovers)
98
+ LEFTOVER = '[holmes-kit] the runner left processes in its group after it exited; they were ended';
99
+ if (!r.error && r.status === 0)
100
+ return r.stdout;
101
+ const e = (r.error ?? new Error(`Command failed: ${[cmd, ...args].join(' ')}\n${r.stderr ?? ''}`));
102
+ // execFileSync's fields, `output` included
103
+ Object.assign(e, { status: r.status, signal: r.signal, stdout: r.stdout, stderr: r.stderr, pid: r.pid, output: r.output });
104
+ if (stopped)
105
+ STOPPED = `[holmes-kit] the test run was stopped after ${boundText(timeoutMs)} — not judged`;
106
+ throw e;
92
107
  }
108
+ /** @implements A-SPEC-734.4 — the bound in minutes, or in seconds below a minute. */
109
+ const boundText = (ms) => (ms >= 60_000 ? `${Math.round(ms / 60_000)} minutes` : `${Math.round(ms / 1000)} seconds`);
110
+ let LEFTOVER = null;
111
+ /** @implements A-SPEC-734.4 — the last stop note (tests read it). */
112
+ function runnerStopNote() { return STOPPED; }
93
113
  function planTestRun(scope) {
94
114
  if (scope.tier === 'full') {
95
115
  return { mode: 'full', testFiles: [], reason: 'full regression — run the entire suite' };
@@ -813,10 +833,11 @@ function runTestScope(scope, cwd) {
813
833
  const outcomeByFile = {}; // @implements A-SPEC-534.5 — jest only
814
834
  for (const eco of [...groups.keys()].sort()) {
815
835
  STOPPED = null;
836
+ LEFTOVER = null;
816
837
  const r = runners[eco](groups.get(eco), plan.mode, cwd);
817
838
  ran.push(eco);
818
839
  passed = passed && r.passed && STOPPED === null;
819
- tails.push(`[${eco}] ${r.tail}${STOPPED !== null ? `\n${STOPPED}` : ''}`);
840
+ tails.push(`[${eco}] ${r.tail}${STOPPED !== null ? `\n${STOPPED}` : ''}${LEFTOVER !== null ? `\n${LEFTOVER}` : ''}`);
820
841
  Object.assign(executedByFile, r.executed);
821
842
  const adapterOutcomes = r.outcomes;
822
843
  if (adapterOutcomes)
@@ -14,7 +14,7 @@ exports.TEST_SELECTION = [
14
14
  naiveAvgSelected: 6.6, naiveHits: 49, truthTotal: 67,
15
15
  },
16
16
  {
17
- corpus: 'jarvis newest-30', cases: 30,
17
+ corpus: 'consumer newest-30', cases: 30,
18
18
  avgSelected: 89.9, avgUniverse: 110.6, avgTruth: 1.2,
19
19
  recall: 0.867, precision: 0.012,
20
20
  naiveAvgSelected: 2.6, naiveHits: 14, truthTotal: 36,
@@ -39,7 +39,7 @@ exports.NARROWING_CURVE = [
39
39
  { k: 10, recall: 0.668 }, { k: 20, recall: 0.789 }, { k: 40, recall: 0.833 }, { k: 80, recall: 0.883 }],
40
40
  },
41
41
  {
42
- corpus: 'jarvis newest-30', avgSelected: 89.9, full: 0.867,
42
+ corpus: 'consumer newest-30', avgSelected: 89.9, full: 0.867,
43
43
  at: [{ k: 1, recall: 0.067 }, { k: 3, recall: 0.150 }, { k: 5, recall: 0.150 },
44
44
  { k: 10, recall: 0.283 }, { k: 20, recall: 0.283 }, { k: 40, recall: 0.333 }, { k: 80, recall: 0.767 }],
45
45
  },