@dommaker/harness 1.1.1 → 1.2.1

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 (373) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +2 -4
  3. package/bin/harness.js +12 -37
  4. package/dist/cli/commands/check.d.ts +2 -2
  5. package/dist/cli/commands/check.d.ts.map +1 -1
  6. package/dist/cli/commands/check.js +8 -33
  7. package/dist/cli/commands/check.js.map +1 -1
  8. package/dist/cli/commands/constraints-report.js +1 -1
  9. package/dist/cli/commands/constraints-report.js.map +1 -1
  10. package/dist/cli/commands/constraints-retire.d.ts +6 -3
  11. package/dist/cli/commands/constraints-retire.d.ts.map +1 -1
  12. package/dist/cli/commands/constraints-retire.js +34 -25
  13. package/dist/cli/commands/constraints-retire.js.map +1 -1
  14. package/dist/cli/commands/definitions.d.ts +2 -0
  15. package/dist/cli/commands/definitions.d.ts.map +1 -1
  16. package/dist/cli/commands/definitions.js.map +1 -1
  17. package/dist/cli/commands/init.d.ts +21 -1
  18. package/dist/cli/commands/init.d.ts.map +1 -1
  19. package/dist/cli/commands/init.js +118 -40
  20. package/dist/cli/commands/init.js.map +1 -1
  21. package/dist/cli/commands/knowledge.d.ts.map +1 -1
  22. package/dist/cli/commands/knowledge.js +1 -12
  23. package/dist/cli/commands/knowledge.js.map +1 -1
  24. package/dist/cli/commands/report.d.ts.map +1 -1
  25. package/dist/cli/commands/report.js +0 -2
  26. package/dist/cli/commands/report.js.map +1 -1
  27. package/dist/cli/commands/status.js +2 -2
  28. package/dist/cli/commands/status.js.map +1 -1
  29. package/dist/context/index.d.ts +9 -6
  30. package/dist/context/index.d.ts.map +1 -1
  31. package/dist/context/index.js +18 -20
  32. package/dist/context/index.js.map +1 -1
  33. package/dist/core/constraints/capabilities-parser.d.ts +3 -2
  34. package/dist/core/constraints/capabilities-parser.d.ts.map +1 -1
  35. package/dist/core/constraints/capabilities-parser.js +25 -47
  36. package/dist/core/constraints/capabilities-parser.js.map +1 -1
  37. package/dist/core/constraints/checker.d.ts +29 -32
  38. package/dist/core/constraints/checker.d.ts.map +1 -1
  39. package/dist/core/constraints/checker.js +34 -126
  40. package/dist/core/constraints/checker.js.map +1 -1
  41. package/dist/core/constraints/checkers/governance-presence.d.ts +20 -0
  42. package/dist/core/constraints/checkers/governance-presence.d.ts.map +1 -0
  43. package/dist/core/constraints/checkers/governance-presence.js +76 -0
  44. package/dist/core/constraints/checkers/governance-presence.js.map +1 -0
  45. package/dist/core/constraints/checkers/index.d.ts +2 -1
  46. package/dist/core/constraints/checkers/index.d.ts.map +1 -1
  47. package/dist/core/constraints/checkers/index.js +5 -0
  48. package/dist/core/constraints/checkers/index.js.map +1 -1
  49. package/dist/core/constraints/checkers/types.d.ts +25 -0
  50. package/dist/core/constraints/checkers/types.d.ts.map +1 -1
  51. package/dist/core/constraints/checkers/types.js +24 -0
  52. package/dist/core/constraints/checkers/types.js.map +1 -1
  53. package/dist/core/constraints/definitions/guidelines.d.ts.map +1 -1
  54. package/dist/core/constraints/definitions/guidelines.js +21 -2
  55. package/dist/core/constraints/definitions/guidelines.js.map +1 -1
  56. package/dist/core/constraints/definitions/prompts.d.ts.map +1 -1
  57. package/dist/core/constraints/definitions/prompts.js +0 -5
  58. package/dist/core/constraints/definitions/prompts.js.map +1 -1
  59. package/dist/core/constraints/index.d.ts +1 -2
  60. package/dist/core/constraints/index.d.ts.map +1 -1
  61. package/dist/core/constraints/index.js +1 -7
  62. package/dist/core/constraints/index.js.map +1 -1
  63. package/dist/core/constraints/injection-drift.d.ts +29 -4
  64. package/dist/core/constraints/injection-drift.d.ts.map +1 -1
  65. package/dist/core/constraints/injection-drift.js +52 -20
  66. package/dist/core/constraints/injection-drift.js.map +1 -1
  67. package/dist/core/constraints/usage-report.d.ts +1 -2
  68. package/dist/core/constraints/usage-report.d.ts.map +1 -1
  69. package/dist/core/constraints/usage-report.js +2 -5
  70. package/dist/core/constraints/usage-report.js.map +1 -1
  71. package/dist/core/effective-constraints.d.ts +24 -4
  72. package/dist/core/effective-constraints.d.ts.map +1 -1
  73. package/dist/core/effective-constraints.js +28 -7
  74. package/dist/core/effective-constraints.js.map +1 -1
  75. package/dist/core/effective-set.d.ts +30 -0
  76. package/dist/core/effective-set.d.ts.map +1 -0
  77. package/dist/core/effective-set.js +35 -0
  78. package/dist/core/effective-set.js.map +1 -0
  79. package/dist/core/index.d.ts +13 -6
  80. package/dist/core/index.d.ts.map +1 -1
  81. package/dist/core/index.js +44 -21
  82. package/dist/core/index.js.map +1 -1
  83. package/dist/core/project-config-loader.d.ts +3 -6
  84. package/dist/core/project-config-loader.d.ts.map +1 -1
  85. package/dist/core/project-config-loader.js +47 -61
  86. package/dist/core/project-config-loader.js.map +1 -1
  87. package/dist/failure/constraint-handler.d.ts +1 -1
  88. package/dist/failure/constraint-handler.js +1 -1
  89. package/dist/gates/checker-gate.d.ts +1 -4
  90. package/dist/gates/checker-gate.d.ts.map +1 -1
  91. package/dist/gates/checker-gate.js +3 -11
  92. package/dist/gates/checker-gate.js.map +1 -1
  93. package/dist/gates/definitions.d.ts +9 -38
  94. package/dist/gates/definitions.d.ts.map +1 -1
  95. package/dist/gates/definitions.js +24 -13
  96. package/dist/gates/definitions.js.map +1 -1
  97. package/dist/gates/effective-gates.d.ts.map +1 -1
  98. package/dist/gates/effective-gates.js +14 -18
  99. package/dist/gates/effective-gates.js.map +1 -1
  100. package/dist/gates/index.d.ts +1 -1
  101. package/dist/gates/index.d.ts.map +1 -1
  102. package/dist/gates/index.js.map +1 -1
  103. package/dist/hooks/bootstrap.d.ts.map +1 -1
  104. package/dist/hooks/bootstrap.js +0 -3
  105. package/dist/hooks/bootstrap.js.map +1 -1
  106. package/dist/index.d.ts +43 -60
  107. package/dist/index.d.ts.map +1 -1
  108. package/dist/index.js +180 -143
  109. package/dist/index.js.map +1 -1
  110. package/dist/knowledge/query.d.ts +15 -0
  111. package/dist/knowledge/query.d.ts.map +1 -1
  112. package/dist/knowledge/query.js +23 -0
  113. package/dist/knowledge/query.js.map +1 -1
  114. package/dist/monitoring/analyzer-base.d.ts +0 -4
  115. package/dist/monitoring/analyzer-base.d.ts.map +1 -1
  116. package/dist/monitoring/analyzer-base.js +0 -21
  117. package/dist/monitoring/analyzer-base.js.map +1 -1
  118. package/dist/monitoring/index.d.ts +6 -12
  119. package/dist/monitoring/index.d.ts.map +1 -1
  120. package/dist/monitoring/index.js +13 -29
  121. package/dist/monitoring/index.js.map +1 -1
  122. package/dist/monitoring/trace-analyzer.d.ts.map +1 -1
  123. package/dist/monitoring/trace-analyzer.js +2 -68
  124. package/dist/monitoring/trace-analyzer.js.map +1 -1
  125. package/dist/monitoring/traces.d.ts +0 -4
  126. package/dist/monitoring/traces.d.ts.map +1 -1
  127. package/dist/monitoring/traces.js +0 -14
  128. package/dist/monitoring/traces.js.map +1 -1
  129. package/dist/presets/index.d.ts +2 -2
  130. package/dist/presets/index.d.ts.map +1 -1
  131. package/dist/presets/index.js +3 -4
  132. package/dist/presets/index.js.map +1 -1
  133. package/dist/presets/standard.d.ts +10 -22
  134. package/dist/presets/standard.d.ts.map +1 -1
  135. package/dist/presets/standard.js +15 -75
  136. package/dist/presets/standard.js.map +1 -1
  137. package/dist/types/constraint.d.ts +1 -29
  138. package/dist/types/constraint.d.ts.map +1 -1
  139. package/dist/types/constraint.js +1 -1
  140. package/dist/types/constraint.js.map +1 -1
  141. package/dist/types/index.d.ts +0 -3
  142. package/dist/types/index.d.ts.map +1 -1
  143. package/dist/types/index.js +0 -4
  144. package/dist/types/index.js.map +1 -1
  145. package/dist/types/project-config.d.ts +4 -8
  146. package/dist/types/project-config.d.ts.map +1 -1
  147. package/dist/types/trace.d.ts +5 -18
  148. package/dist/types/trace.d.ts.map +1 -1
  149. package/package.json +2 -2
  150. package/src/CONTEXT.md +4 -5
  151. package/src/__tests__/checker-extra.test.ts +33 -139
  152. package/src/__tests__/checker.test.ts +0 -376
  153. package/src/__tests__/governance-presence.test.ts +129 -0
  154. package/src/__tests__/iron-laws.test.ts +7 -7
  155. package/src/__tests__/project-config-loader-extra.test.ts +42 -29
  156. package/src/__tests__/public-exports.test.ts +138 -0
  157. package/src/__tests__/trace-analyzer-extra.test.ts +6 -86
  158. package/src/__tests__/trace-analyzer.test.ts +4 -5
  159. package/src/__tests__/trace-collector.test.ts +0 -11
  160. package/src/__tests__/traces.test.ts +3 -22
  161. package/src/cli/commands/CONTEXT.md +6 -3
  162. package/src/cli/commands/__tests__/check-skip-output.test.ts +10 -7
  163. package/src/cli/commands/__tests__/check.test.ts +29 -69
  164. package/src/cli/commands/__tests__/constraints-report.test.ts +3 -3
  165. package/src/cli/commands/__tests__/constraints-retire.test.ts +45 -4
  166. package/src/cli/commands/__tests__/init-injection.test.ts +202 -0
  167. package/src/cli/commands/__tests__/knowledge.test.ts +90 -1
  168. package/src/cli/commands/__tests__/registry.test.ts +8 -6
  169. package/src/cli/commands/__tests__/status-extra.test.ts +6 -6
  170. package/src/cli/commands/__tests__/status.test.ts +6 -6
  171. package/src/cli/commands/__tests__/sync-docs-agents.test.ts +28 -0
  172. package/src/cli/commands/check.ts +9 -35
  173. package/src/cli/commands/constraints-report.ts +1 -1
  174. package/src/cli/commands/constraints-retire.ts +38 -27
  175. package/src/cli/commands/definitions.ts +2 -0
  176. package/src/cli/commands/init.ts +129 -40
  177. package/src/cli/commands/knowledge.ts +1 -16
  178. package/src/cli/commands/report.ts +0 -2
  179. package/src/cli/commands/status.ts +2 -2
  180. package/src/context/index.ts +29 -6
  181. package/src/core/CONTEXT.md +4 -3
  182. package/src/core/__tests__/effective-set.test.ts +80 -0
  183. package/src/core/constraints/__tests__/injection-drift.test.ts +90 -0
  184. package/src/core/constraints/capabilities-parser.ts +43 -49
  185. package/src/core/constraints/checker.ts +51 -145
  186. package/src/core/constraints/checkers/governance-presence.ts +74 -0
  187. package/src/core/constraints/checkers/index.ts +4 -1
  188. package/src/core/constraints/checkers/types.ts +42 -0
  189. package/src/core/constraints/definitions/guidelines.ts +22 -2
  190. package/src/core/constraints/definitions/prompts.ts +0 -5
  191. package/src/core/constraints/index.ts +2 -17
  192. package/src/core/constraints/injection-drift.ts +60 -21
  193. package/src/core/constraints/usage-report.ts +5 -8
  194. package/src/core/effective-constraints.ts +35 -7
  195. package/src/core/effective-set.ts +56 -0
  196. package/src/core/index.ts +80 -6
  197. package/src/core/project-config-loader.ts +53 -68
  198. package/src/failure/CONTEXT.md +1 -1
  199. package/src/failure/constraint-handler.ts +1 -1
  200. package/src/gates/CONTEXT.md +3 -3
  201. package/src/gates/checker-gate.ts +4 -12
  202. package/src/gates/definitions.ts +27 -50
  203. package/src/gates/effective-gates.ts +14 -21
  204. package/src/gates/index.ts +1 -1
  205. package/src/hooks/bootstrap.ts +0 -3
  206. package/src/index.ts +384 -148
  207. package/src/knowledge/CONTEXT.md +2 -2
  208. package/src/knowledge/__tests__/query.test.ts +64 -0
  209. package/src/knowledge/query.ts +28 -0
  210. package/src/monitoring/CONTEXT.md +7 -13
  211. package/src/monitoring/__tests__/traces.test.ts +0 -10
  212. package/src/monitoring/analyzer-base.ts +0 -22
  213. package/src/monitoring/index.ts +6 -12
  214. package/src/monitoring/trace-analyzer.ts +2 -73
  215. package/src/monitoring/traces.ts +0 -20
  216. package/src/presets/__tests__/standard.test.ts +48 -69
  217. package/src/presets/index.ts +3 -5
  218. package/src/presets/standard.ts +14 -79
  219. package/src/spec/CONTEXT.md +5 -13
  220. package/src/types/constraint.ts +1 -51
  221. package/src/types/index.ts +0 -12
  222. package/src/types/project-config.ts +4 -10
  223. package/src/types/trace.ts +5 -30
  224. package/dist/core/constraints/interceptor.d.ts +0 -39
  225. package/dist/core/constraints/interceptor.d.ts.map +0 -1
  226. package/dist/core/constraints/interceptor.js +0 -166
  227. package/dist/core/constraints/interceptor.js.map +0 -1
  228. package/dist/dashboard/data.d.ts +0 -31
  229. package/dist/dashboard/data.d.ts.map +0 -1
  230. package/dist/dashboard/data.js +0 -81
  231. package/dist/dashboard/data.js.map +0 -1
  232. package/dist/dashboard/index.d.ts +0 -4
  233. package/dist/dashboard/index.d.ts.map +0 -1
  234. package/dist/dashboard/index.js +0 -20
  235. package/dist/dashboard/index.js.map +0 -1
  236. package/dist/dashboard/stats.d.ts +0 -20
  237. package/dist/dashboard/stats.d.ts.map +0 -1
  238. package/dist/dashboard/stats.js +0 -115
  239. package/dist/dashboard/stats.js.map +0 -1
  240. package/dist/dashboard/types.d.ts +0 -110
  241. package/dist/dashboard/types.d.ts.map +0 -1
  242. package/dist/dashboard/types.js +0 -8
  243. package/dist/dashboard/types.js.map +0 -1
  244. package/dist/monitoring/constraint-doctor.d.ts +0 -76
  245. package/dist/monitoring/constraint-doctor.d.ts.map +0 -1
  246. package/dist/monitoring/constraint-doctor.js +0 -189
  247. package/dist/monitoring/constraint-doctor.js.map +0 -1
  248. package/dist/monitoring/diagnosis-rules.d.ts +0 -18
  249. package/dist/monitoring/diagnosis-rules.d.ts.map +0 -1
  250. package/dist/monitoring/diagnosis-rules.js +0 -119
  251. package/dist/monitoring/diagnosis-rules.js.map +0 -1
  252. package/dist/monitoring/knowledge-doctor.d.ts +0 -78
  253. package/dist/monitoring/knowledge-doctor.d.ts.map +0 -1
  254. package/dist/monitoring/knowledge-doctor.js +0 -266
  255. package/dist/monitoring/knowledge-doctor.js.map +0 -1
  256. package/dist/monitoring/knowledge-evolver.d.ts +0 -72
  257. package/dist/monitoring/knowledge-evolver.d.ts.map +0 -1
  258. package/dist/monitoring/knowledge-evolver.js +0 -205
  259. package/dist/monitoring/knowledge-evolver.js.map +0 -1
  260. package/dist/monitoring/performance-analyzer.d.ts +0 -92
  261. package/dist/monitoring/performance-analyzer.d.ts.map +0 -1
  262. package/dist/monitoring/performance-analyzer.js +0 -343
  263. package/dist/monitoring/performance-analyzer.js.map +0 -1
  264. package/dist/monitoring/performance-collector.d.ts +0 -103
  265. package/dist/monitoring/performance-collector.d.ts.map +0 -1
  266. package/dist/monitoring/performance-collector.js +0 -298
  267. package/dist/monitoring/performance-collector.js.map +0 -1
  268. package/dist/safety/index.d.ts +0 -6
  269. package/dist/safety/index.d.ts.map +0 -1
  270. package/dist/safety/index.js +0 -22
  271. package/dist/safety/index.js.map +0 -1
  272. package/dist/safety/input-guardrail.d.ts +0 -36
  273. package/dist/safety/input-guardrail.d.ts.map +0 -1
  274. package/dist/safety/input-guardrail.js +0 -118
  275. package/dist/safety/input-guardrail.js.map +0 -1
  276. package/dist/safety/output-guardrail.d.ts +0 -39
  277. package/dist/safety/output-guardrail.d.ts.map +0 -1
  278. package/dist/safety/output-guardrail.js +0 -147
  279. package/dist/safety/output-guardrail.js.map +0 -1
  280. package/dist/safety/sandbox.d.ts +0 -45
  281. package/dist/safety/sandbox.d.ts.map +0 -1
  282. package/dist/safety/sandbox.js +0 -134
  283. package/dist/safety/sandbox.js.map +0 -1
  284. package/dist/safety/tool-guardrail.d.ts +0 -51
  285. package/dist/safety/tool-guardrail.d.ts.map +0 -1
  286. package/dist/safety/tool-guardrail.js +0 -147
  287. package/dist/safety/tool-guardrail.js.map +0 -1
  288. package/dist/safety/types.d.ts +0 -104
  289. package/dist/safety/types.d.ts.map +0 -1
  290. package/dist/safety/types.js +0 -6
  291. package/dist/safety/types.js.map +0 -1
  292. package/dist/spec/annotation-checker.d.ts +0 -47
  293. package/dist/spec/annotation-checker.d.ts.map +0 -1
  294. package/dist/spec/annotation-checker.js +0 -279
  295. package/dist/spec/annotation-checker.js.map +0 -1
  296. package/dist/types/enforcement.d.ts +0 -42
  297. package/dist/types/enforcement.d.ts.map +0 -1
  298. package/dist/types/enforcement.js +0 -6
  299. package/dist/types/enforcement.js.map +0 -1
  300. package/dist/types/monitoring-types.d.ts +0 -53
  301. package/dist/types/monitoring-types.d.ts.map +0 -1
  302. package/dist/types/monitoring-types.js +0 -10
  303. package/dist/types/monitoring-types.js.map +0 -1
  304. package/dist/types/performance.d.ts +0 -204
  305. package/dist/types/performance.d.ts.map +0 -1
  306. package/dist/types/performance.js +0 -12
  307. package/dist/types/performance.js.map +0 -1
  308. package/dist/verification/index.d.ts +0 -4
  309. package/dist/verification/index.d.ts.map +0 -1
  310. package/dist/verification/index.js +0 -20
  311. package/dist/verification/index.js.map +0 -1
  312. package/dist/verification/loop.d.ts +0 -30
  313. package/dist/verification/loop.d.ts.map +0 -1
  314. package/dist/verification/loop.js +0 -114
  315. package/dist/verification/loop.js.map +0 -1
  316. package/dist/verification/rules-based.d.ts +0 -40
  317. package/dist/verification/rules-based.d.ts.map +0 -1
  318. package/dist/verification/rules-based.js +0 -130
  319. package/dist/verification/rules-based.js.map +0 -1
  320. package/dist/verification/types.d.ts +0 -69
  321. package/dist/verification/types.d.ts.map +0 -1
  322. package/dist/verification/types.js +0 -6
  323. package/dist/verification/types.js.map +0 -1
  324. package/src/__tests__/annotation-checker.test.ts +0 -183
  325. package/src/__tests__/constraint-doctor.test.ts +0 -271
  326. package/src/__tests__/doctor-extra.test.ts +0 -155
  327. package/src/__tests__/extend-exceptions.test.ts +0 -149
  328. package/src/__tests__/interceptor.test.ts +0 -89
  329. package/src/__tests__/performance-analyzer.test.ts +0 -499
  330. package/src/__tests__/performance-collector.test.ts +0 -276
  331. package/src/__tests__/presets.test.ts +0 -65
  332. package/src/core/constraints/__tests__/interceptor.test.ts +0 -267
  333. package/src/core/constraints/interceptor.ts +0 -217
  334. package/src/dashboard/CONTEXT.md +0 -21
  335. package/src/dashboard/__tests__/data.test.ts +0 -111
  336. package/src/dashboard/__tests__/stats.test.ts +0 -159
  337. package/src/dashboard/data.ts +0 -103
  338. package/src/dashboard/index.ts +0 -3
  339. package/src/dashboard/stats.ts +0 -127
  340. package/src/dashboard/types.ts +0 -130
  341. package/src/monitoring/__tests__/knowledge-doctor.test.ts +0 -278
  342. package/src/monitoring/__tests__/knowledge-evolver.test.ts +0 -368
  343. package/src/monitoring/__tests__/performance-analyzer.test.ts +0 -137
  344. package/src/monitoring/__tests__/performance-collector.test.ts +0 -331
  345. package/src/monitoring/constraint-doctor.ts +0 -228
  346. package/src/monitoring/diagnosis-rules.ts +0 -132
  347. package/src/monitoring/knowledge-doctor.ts +0 -322
  348. package/src/monitoring/knowledge-evolver.ts +0 -289
  349. package/src/monitoring/performance-analyzer.ts +0 -400
  350. package/src/monitoring/performance-collector.ts +0 -326
  351. package/src/safety/CONTEXT.md +0 -23
  352. package/src/safety/__tests__/input-guardrail.test.ts +0 -105
  353. package/src/safety/__tests__/output-guardrail.test.ts +0 -108
  354. package/src/safety/__tests__/sandbox.test.ts +0 -158
  355. package/src/safety/__tests__/tool-guardrail.test.ts +0 -127
  356. package/src/safety/index.ts +0 -5
  357. package/src/safety/input-guardrail.ts +0 -133
  358. package/src/safety/output-guardrail.ts +0 -170
  359. package/src/safety/sandbox.ts +0 -148
  360. package/src/safety/tool-guardrail.ts +0 -176
  361. package/src/safety/types.ts +0 -124
  362. package/src/spec/__tests__/annotation-checker.test.ts +0 -294
  363. package/src/spec/annotation-checker.ts +0 -320
  364. package/src/types/enforcement.ts +0 -48
  365. package/src/types/monitoring-types.ts +0 -68
  366. package/src/types/performance.ts +0 -295
  367. package/src/verification/CONTEXT.md +0 -23
  368. package/src/verification/__tests__/loop.test.ts +0 -303
  369. package/src/verification/__tests__/rules-based.test.ts +0 -240
  370. package/src/verification/index.ts +0 -3
  371. package/src/verification/loop.ts +0 -137
  372. package/src/verification/rules-based.ts +0 -152
  373. package/src/verification/types.ts +0 -81
@@ -16,7 +16,8 @@ import type {
16
16
  CapabilitiesConfig,
17
17
  } from '../types/project-config';
18
18
  import { IRON_LAWS, GUIDELINES, PROMPTS } from './constraints/definitions';
19
- import { applyPreset } from '../presets';
19
+ import { PRESETS_BY_NAME, STANDARD_PRESET } from '../presets';
20
+ import { filterEnabledEntries } from './effective-set';
20
21
 
21
22
  /**
22
23
  * 默认配置
@@ -156,47 +157,72 @@ export class ProjectConfigLoader {
156
157
  * 合并内置约束和自定义约束(ADR-0001 生效集完整链路)
157
158
  *
158
159
  * 合并顺序:内置 → preset 裁剪 → config.yml `constraints.<id>.enabled:false`
159
- * 删除(对内置与 custom 同效)→ custom-constraints 追加/extend_exceptions
160
+ * 删除(对内置与 custom 同效)→ custom-constraints 追加
160
161
  * (禁用/已退役的 custom 不追加)→ scenes 过滤
161
162
  * (带 appliesTo 的 prompt 仅当 scenes 交集非空时保留)。
162
163
  *
163
164
  * config.yml 中未知约束 id(如已移除约束的禁用残留)静默忽略,
164
165
  * 记录在结果 unknownIds 中供诊断。
165
166
  *
166
- * @param options.preset 覆盖 config.yml 的 preset(CLI --preset 用)
167
+ * @param options.preset 覆盖 config.yml 的 preset(CLI --preset 用);
168
+ * 未知预设名回落 standard + stderr 警告
167
169
  */
168
170
  mergeConstraints(options?: { preset?: string }): MergedConstraintsConfig {
169
- // 0. preset 裁剪(未知预设名由 applyPreset 回落 standard)
170
- const presetMerged = applyPreset(options?.preset ?? this.config.preset ?? 'standard');
171
+ // 0. preset 裁剪(strict standard 的别名;未知名回落 standard)
172
+ const presetName = options?.preset ?? this.config.preset ?? 'standard';
173
+ let preset = PRESETS_BY_NAME[presetName];
174
+ if (!preset) {
175
+ console.error(`[harness] 未知预设 "${presetName}",已回落 standard`);
176
+ preset = STANDARD_PRESET;
177
+ }
178
+ const pick = (
179
+ source: Record<string, Constraint>,
180
+ ids: string[] | null
181
+ ): Record<string, Constraint> => {
182
+ if (ids === null) return { ...source };
183
+ const filtered: Record<string, Constraint> = {};
184
+ for (const id of ids) {
185
+ if (source[id]) filtered[id] = source[id];
186
+ }
187
+ return filtered;
188
+ };
189
+ const presetDisabled = (
190
+ source: Record<string, Constraint>,
191
+ ids: string[] | null
192
+ ): string[] => (ids === null ? [] : Object.keys(source).filter(id => !ids.includes(id)));
193
+
171
194
  const unknownIds: string[] = [];
172
195
  const result: MergedConstraintsConfig = {
173
- ironLaws: presetMerged.ironLaws,
174
- guidelines: presetMerged.guidelines,
175
- prompts: presetMerged.prompts ?? {},
176
- disabled: [...presetMerged.disabled],
196
+ ironLaws: pick(IRON_LAWS, preset.ironLaws),
197
+ guidelines: pick(GUIDELINES, preset.guidelines),
198
+ prompts: pick(PROMPTS, preset.prompts),
199
+ disabled: [
200
+ ...presetDisabled(IRON_LAWS, preset.ironLaws),
201
+ ...presetDisabled(GUIDELINES, preset.guidelines),
202
+ ...presetDisabled(PROMPTS, preset.prompts),
203
+ ],
177
204
  custom: [],
178
205
  unknownIds,
179
206
  };
180
207
 
181
- // 1. 处理启用/禁用配置
208
+ // 1. 处理启用/禁用配置(未知 id 静默忽略,记录供诊断)
182
209
  if (this.config.constraints) {
183
- for (const [constraintId, config] of Object.entries(this.config.constraints)) {
184
- const isKnown =
185
- !!IRON_LAWS[constraintId] ||
186
- !!GUIDELINES[constraintId] ||
187
- !!PROMPTS[constraintId] ||
188
- !!this.customConstraints[constraintId];
189
- if (!isKnown) {
190
- // 未知 id(如已移除约束的禁用残留):不报错,记录供诊断
191
- unknownIds.push(constraintId);
192
- }
193
- if (config.enabled === false) {
194
- result.disabled.push(constraintId);
195
- // 从对应层级中移除
196
- delete result.ironLaws[constraintId];
197
- delete result.guidelines[constraintId];
198
- delete result.prompts![constraintId];
199
- }
210
+ const knownIds = new Set([
211
+ ...Object.keys(IRON_LAWS),
212
+ ...Object.keys(GUIDELINES),
213
+ ...Object.keys(PROMPTS),
214
+ ...Object.keys(this.customConstraints),
215
+ ]);
216
+ const filtered = filterEnabledEntries(knownIds, this.config.constraints, {
217
+ onUnknownId: 'collect',
218
+ });
219
+ unknownIds.push(...filtered.unknownIds);
220
+ for (const constraintId of filtered.disabledIds) {
221
+ result.disabled.push(constraintId);
222
+ // 从对应层级中移除
223
+ delete result.ironLaws[constraintId];
224
+ delete result.guidelines[constraintId];
225
+ delete result.prompts![constraintId];
200
226
  }
201
227
  }
202
228
 
@@ -207,38 +233,8 @@ export class ProjectConfigLoader {
207
233
  if (result.disabled.includes(id) || customDef.retired) {
208
234
  continue;
209
235
  }
210
- const extendExceptions = customDef.extend_exceptions;
211
- const isExtendOnly =
212
- !!extendExceptions && extendExceptions.length > 0 &&
213
- !customDef.rule &&
214
- !customDef.exceptions;
215
-
216
- if (isExtendOnly) {
217
- const builtIn = this.findBuiltInConstraint(id, result);
218
- if (builtIn) {
219
- const constraint = { ...builtIn };
220
- constraint.exceptions = [
221
- ...(builtIn.exceptions || []),
222
- ...extendExceptions!,
223
- ];
224
- if (result.ironLaws[id]) result.ironLaws[id] = constraint;
225
- if (result.guidelines[id]) result.guidelines[id] = constraint;
226
- if (result.prompts![id]) result.prompts![id] = constraint;
227
- continue;
228
- }
229
- }
230
-
231
236
  const constraint = this.toConstraint(customDef, id);
232
237
 
233
- if (extendExceptions && extendExceptions.length > 0) {
234
- const builtIn = this.findBuiltInConstraint(id, result);
235
- constraint.exceptions = [
236
- ...(builtIn?.exceptions || []),
237
- ...(customDef.exceptions || []),
238
- ...extendExceptions,
239
- ];
240
- }
241
-
242
238
  result.custom.push(id);
243
239
 
244
240
  const level = customDef.level || 'guideline';
@@ -272,16 +268,6 @@ export class ProjectConfigLoader {
272
268
  return result;
273
269
  }
274
270
 
275
- /**
276
- * 在合并结果中查找内置约束
277
- */
278
- private findBuiltInConstraint(
279
- id: string,
280
- merged: MergedConstraintsConfig
281
- ): Constraint | undefined {
282
- return merged.ironLaws[id] || merged.guidelines[id] || merged.prompts?.[id];
283
- }
284
-
285
271
  /**
286
272
  * 将自定义约束定义转换为 Constraint
287
273
  *
@@ -298,7 +284,6 @@ export class ProjectConfigLoader {
298
284
  rule: def.rule || '',
299
285
  message: def.message || '',
300
286
  trigger: (def.trigger || 'manual') as ConstraintTrigger | ConstraintTrigger[],
301
- exceptions: def.exceptions,
302
287
  description: def.description,
303
288
  promptInjection: def.promptInjection,
304
289
  enabled: def.enabled !== false,
@@ -12,7 +12,7 @@
12
12
  ## 依赖关系
13
13
  - 依赖 `src/types/constraint` ConstraintViolationError
14
14
  - 依赖 `src/core/constraints/` 约束检查结果
15
- - 被 `src/core/constraints/interceptor.ts` 消费
15
+ - 被 `src/cli/commands/report.ts` 消费(executeWithCollect),并经包根导出
16
16
 
17
17
  ## 约定
18
18
  - 分类规则可扩展(自定义 ErrorClassifierConfig)
@@ -2,7 +2,7 @@
2
2
  * ConstraintViolationHandler — 约束违规统一处理(S4)
3
3
  *
4
4
  * 问题:ConstraintViolationError 在 4 个调用点有 4 种行为:
5
- * 1. 抛异常阻断(checker.ts / interceptor.ts
5
+ * 1. 抛异常阻断(checker.ts)
6
6
  * 2. 返回 null(report.ts catch 后返回空数据)
7
7
  * 3. 返回 403 HTTP 状态
8
8
  * 4. console.warn 静默吞掉
@@ -6,10 +6,10 @@
6
6
  ## 核心导出
7
7
  - 统一协议:`Gate{id, order, evaluate(ctx)}` → `GateDecision{status: deny|abstain|ask, result: GateResult}`(`types.ts`;`decisionFromResult` 报告→决策映射,浅冻结)
8
8
  - 注册表:`gateRegistry`(`registry.ts`)——定义即注册 + 构建期双向闭环(定义无实现/实现无定义/重复 id → 加载期抛错);`getGate`(未注册抛错)/`listRegisteredGates`/`registeredGateCount`
9
- - 定义表:`GATE_DEFINITIONS`(`definitions.ts`)——id/description/默认 order/CLI 元数据;bin/harness.js 注册表驱动生成 6 门禁命令(纯数据模块,禁 import 实现,保 --help 懒加载;CLI 实现引用为 module+export,per-command 懒加载,H5)
9
+ - 定义表:`GATE_DEFINITIONS`(`definitions.ts`)——id/description/默认 order/CLI 元数据;CLI 元数据形状即 `CommandDefinition`(ADR-0007:门禁与非门禁共用同一命令定义形状,bin 单引擎单循环;门禁特有语义 = `subcommandStrict:false` 未知子命令落回默认 action + `bareRunsAction:true` 裸跑执行 action);bin/harness.js 注册表驱动生成 6 门禁命令(纯数据模块,禁 import 实现,保 --help 懒加载;CLI 实现引用为 module+export,per-command 懒加载,H5)
10
10
  - 执行器:`runGates`(`runner.ts`)——按 order 升序;deny 单调(下游 abstain 不得改回 allow)+ ask 枚举预留 fail-closed = deny;决策浅冻结
11
- - 生效集:`getEffectiveGates(projectRoot)`(`effective-gates.ts`)——对齐 getEffectiveConstraints 裁剪模式:config.yml `gates.order` 重排 + `gates.<id>.enabled:false` 移除;引用未注册 id 抛错
12
- - checker-as-guard 接线点:`createCheckerGate(check)`(`checker-gate.ts`)——ConstraintCheck → Gate(studio #129 随动);false→deny,true/'skip'→abstain
11
+ - 生效集:`getEffectiveGates(projectRoot)`(`effective-gates.ts`)——对齐 getEffectiveConstraints 裁剪模式:config.yml `gates.order` 重排 + `gates.<id>.enabled:false` 移除;enabled 段未注册校验与裁剪走 core/effective-set 共享筛选器(throw 模式),order 重排与重复 id 检测留本侧
12
+ - checker-as-guard 接线点:`createCheckerGate(check)`(`checker-gate.ts`)——ConstraintCheck → Gate(studio #129 随动);false→deny,true/'skip'→abstain;env 经 `buildCheckEnv(..., 'none')` 构造(显式不接证据,语义见 core/constraints/checkers/types.ts 工厂 doc)
13
13
  - 门禁类:`ReviewGate` / `SecurityGate` / `PerformanceGate` / `ContractGate` / `SpecAcceptanceGate` / `CommandGate`(各自执行细节私有,保留 `check()`/`scan()` 报告方法)
14
14
  - `types.ts` — GateResult(报告结构,保留)/ GateContext / GateDecision 等公共类型
15
15
  - 便捷工厂函数:createReviewGate / createSecurityGate / createPerformanceGate / createContractGate / createSpecAcceptanceGate / createCommandGate
@@ -4,13 +4,11 @@
4
4
  * 把已注册的 ConstraintCheck 适配为统一 Gate,供守卫链(如 studio
5
5
  * runCompletionGuards)复用 runGates 的 deny 单调 / ask fail-closed 语义。
6
6
  *
7
- * 证据语义:本接线点构造的 CheckEnv 不带 git staged diff / 源码扫描证据
8
- * (stagedDiff 空、srcScan 空)——证据 flag 未接线的 checker 按契约返回
9
- * 'skip'(不阻断,映射为 abstain);纯上下文判断的 checker 照常判定。
10
- * studio 侧若需 git 证据,在 #129 接线时扩展 CheckEnv 构造。
7
+ * env buildCheckEnv(..., 'none') 构造(显式不接证据),语义见工厂 doc。
11
8
  */
12
9
 
13
- import type { CheckEnv, ConstraintCheck } from '../core/constraints/checkers';
10
+ import type { ConstraintCheck } from '../core/constraints/checkers';
11
+ import { buildCheckEnv } from '../core/constraints/checkers';
14
12
  import type { Gate, GateContext, GateDecision } from './types';
15
13
  import { decisionFromResult } from './decision';
16
14
 
@@ -29,13 +27,7 @@ export function createCheckerGate(check: ConstraintCheck, order = 0): Gate {
29
27
  async evaluate(ctx: GateContext): Promise<GateDecision> {
30
28
  const startTime = Date.now();
31
29
  const projectPath = ctx.projectPath || process.cwd();
32
- const env: CheckEnv = {
33
- context: { operation: 'manual', projectPath },
34
- projectPath,
35
- stagedDiff: async () => '',
36
- stagedDiffNames: async () => '',
37
- srcScan: () => [],
38
- };
30
+ const env = buildCheckEnv({ operation: 'manual', projectPath }, 'none');
39
31
  const outcome = await check.evaluate(env);
40
32
  return decisionFromResult({
41
33
  gate: check.id,
@@ -3,49 +3,18 @@
3
3
  *
4
4
  * - 每个门禁在此声明 id / description / 默认 order / CLI 元数据;
5
5
  * registry.ts 按此表做「定义↔实现」双向闭环校验(复制 checker 闭环模式)。
6
- * - CLI 元数据被 bin/harness.js 消费,注册表驱动生成 6 个门禁命令:
7
- * 命令名/别名/选项/子命令路由与历史手工块完全兼容;实现引用为
8
- * module+export(CommandImplRef),bin 按需 per-command 懒加载(H5/O2)。
6
+ * - CLI 元数据即 CommandDefinition(架构评审候选8,ADR-0007:形状对齐通用
7
+ * 命令定义,bin/harness.js 单引擎单循环生成全部命令):命令名/别名/选项/
8
+ * 子命令路由与历史手工块完全兼容;实现引用为 module+export(CommandImplRef),
9
+ * bin 按需 per-command 懒加载(H5/O2)。门禁特有语义由两个标志表达:
10
+ * subcommandStrict:false(未知位置参数落回默认 action)+
11
+ * bareRunsAction:true(无位置参数时跑默认 action 而非显示帮助)。
9
12
  * - 本模块禁止 import 任何门禁/命令实现(仅 type import,运行时零依赖)——
10
13
  * bin 启动期只加载本纯数据模块(保持 --help/--version 懒加载,
11
14
  * 闭环校验在 registry 加载期执行)。
12
15
  */
13
16
 
14
- import type { CommandImplRef } from '../cli/commands/definitions';
15
-
16
- /**
17
- * 门禁 CLI 选项元数据(直接映射 commander `.option()`)
18
- */
19
- export interface GateCliOption {
20
- /** commander option flags,如 '-p, --project-path <path>' */
21
- flags: string;
22
- /** 选项描述 */
23
- description: string;
24
- /** commander 缺省值;negated option(如 --no-strict)不设,由 commander 默认 true */
25
- defaultValue?: string | boolean;
26
- }
27
-
28
- /**
29
- * 门禁 CLI 命令元数据(bin/harness.js 注册表驱动生成)
30
- */
31
- export interface GateCliDefinition {
32
- /** 命令名(历史命令名兼容保留) */
33
- command: string;
34
- /** 命令别名 */
35
- alias?: string;
36
- /** 位置参数声明,如 '[subcommand]' / '[cmd]' */
37
- argument?: string;
38
- /** 命令描述 */
39
- description: string;
40
- /** 命令选项 */
41
- options: GateCliOption[];
42
- /** 子命令名 → 命令实现引用(module+export);命中后按 [options] 透传 */
43
- subcommands?: Record<string, CommandImplRef>;
44
- /** 默认 action 命令实现引用(module+export) */
45
- action: CommandImplRef;
46
- /** 默认 action 实参构造:arg = 位置参数(无位置参数时为 undefined),options = commander 选项对象 */
47
- mapActionArgs: (arg: string | undefined, options: Record<string, unknown>) => unknown[];
48
- }
17
+ import type { CommandDefinition } from '../cli/commands/definitions';
49
18
 
50
19
  /**
51
20
  * 门禁定义
@@ -57,8 +26,8 @@ export interface GateDefinition {
57
26
  description: string;
58
27
  /** 默认顺序(config.yml `gates.order` 可覆盖),小者先执行 */
59
28
  order: number;
60
- /** CLI 元数据(bin/harness.js 注册表驱动生成) */
61
- cli: GateCliDefinition;
29
+ /** CLI 元数据(形状 = CommandDefinition,bin/harness.js 通用引擎驱动生成) */
30
+ cli: CommandDefinition;
62
31
  }
63
32
 
64
33
  /**
@@ -81,9 +50,11 @@ export const GATE_DEFINITIONS: GateDefinition[] = [
81
50
  { flags: '--check-all', description: '检查所有任务', defaultValue: false },
82
51
  { flags: '--run-e2e', description: '运行 E2E 测试', defaultValue: false },
83
52
  ],
84
- subcommands: { list: { module: 'acceptance', export: 'listAcceptanceCriteria' } },
53
+ subcommands: { list: { impl: { module: 'acceptance', export: 'listAcceptanceCriteria' } } },
54
+ subcommandStrict: false,
55
+ bareRunsAction: true,
85
56
  action: { module: 'acceptance', export: 'acceptance' },
86
- mapActionArgs: (_arg, options) => [options],
57
+ mapActionArgs: (_positionals, options) => [options],
87
58
  },
88
59
  },
89
60
  {
@@ -102,7 +73,7 @@ export const GATE_DEFINITIONS: GateDefinition[] = [
102
73
  { flags: '--strict', description: '严格模式(warn 也阻止)' },
103
74
  ],
104
75
  action: { module: 'command', export: 'executeCommand' },
105
- mapActionArgs: (arg, options) => [arg, options],
76
+ mapActionArgs: (positionals, options) => [positionals[0], options],
106
77
  },
107
78
  },
108
79
  {
@@ -119,9 +90,11 @@ export const GATE_DEFINITIONS: GateDefinition[] = [
119
90
  { flags: '--no-strict', description: '关闭严格模式' },
120
91
  { flags: '--allow-breaking', description: '允许破坏性变更', defaultValue: false },
121
92
  ],
122
- subcommands: { validate: { module: 'contract', export: 'validateSchema' } },
93
+ subcommands: { validate: { impl: { module: 'contract', export: 'validateSchema' } } },
94
+ subcommandStrict: false,
95
+ bareRunsAction: true,
123
96
  action: { module: 'contract', export: 'contract' },
124
- mapActionArgs: (_arg, options) => [options],
97
+ mapActionArgs: (_positionals, options) => [options],
125
98
  },
126
99
  },
127
100
  {
@@ -142,7 +115,7 @@ export const GATE_DEFINITIONS: GateDefinition[] = [
142
115
  { flags: '--benchmark-timeout <n>', description: '基准测试超时(秒)', defaultValue: '60' },
143
116
  ],
144
117
  action: { module: 'performance', export: 'performance' },
145
- mapActionArgs: (_arg, options) => [
118
+ mapActionArgs: (_positionals, options) => [
146
119
  {
147
120
  projectPath: options.projectPath,
148
121
  coverage: options.coverage,
@@ -170,9 +143,11 @@ export const GATE_DEFINITIONS: GateDefinition[] = [
170
143
  { flags: '--no-block-on-changes', description: '不阻止变更请求' },
171
144
  { flags: '--allowed-reviewers <list>', description: '允许的审查者(逗号分隔)' },
172
145
  ],
173
- subcommands: { status: { module: 'review', export: 'reviewStatus' } },
146
+ subcommands: { status: { impl: { module: 'review', export: 'reviewStatus' } } },
147
+ subcommandStrict: false,
148
+ bareRunsAction: true,
174
149
  action: { module: 'review', export: 'review' },
175
- mapActionArgs: (_arg, options) => [
150
+ mapActionArgs: (_positionals, options) => [
176
151
  {
177
152
  projectPath: options.projectPath,
178
153
  minReviewers: parseInt(String(options.minReviewers), 10),
@@ -199,9 +174,11 @@ export const GATE_DEFINITIONS: GateDefinition[] = [
199
174
  { flags: '--ignore-dev-deps', description: '忽略开发依赖', defaultValue: false },
200
175
  { flags: '--scan-command <cmd>', description: '自定义扫描命令' },
201
176
  ],
202
- subcommands: { audit: { module: 'security', export: 'auditDetails' } },
177
+ subcommands: { audit: { impl: { module: 'security', export: 'auditDetails' } } },
178
+ subcommandStrict: false,
179
+ bareRunsAction: true,
203
180
  action: { module: 'security', export: 'security' },
204
- mapActionArgs: (_arg, options) => [options],
181
+ mapActionArgs: (_positionals, options) => [options],
205
182
  },
206
183
  },
207
184
  ];
@@ -12,6 +12,7 @@
12
12
  import type { Gate } from './types';
13
13
  import { listRegisteredGates } from './registry';
14
14
  import { loadRawProjectConfig } from '../core/project-config-loader';
15
+ import { filterEnabledEntries } from '../core/effective-set';
15
16
 
16
17
  /**
17
18
  * config.yml `gates` 段
@@ -40,7 +41,8 @@ export function getEffectiveGates(projectRoot: string = process.cwd()): Gate[] {
40
41
  }
41
42
 
42
43
  // ========================================
43
- // 闭环校验:引用未注册 抛错
44
+ // 闭环校验(order 重排与重复 id 检测留门禁侧;
45
+ // enabled 段的未注册校验走共享筛选器 throw 模式)
44
46
  // ========================================
45
47
  const orderIds = Array.isArray(config.order) ? (config.order as string[]) : undefined;
46
48
  if (orderIds) {
@@ -60,31 +62,22 @@ export function getEffectiveGates(projectRoot: string = process.cwd()): Gate[] {
60
62
  seen.add(id);
61
63
  }
62
64
  }
63
- for (const key of Object.keys(config)) {
64
- if (key === 'order') continue;
65
- if (!known.has(key)) {
66
- throw new Error(
67
- `[harness] config.yml gates.${key} 引用了未注册的门禁。` +
68
- `可用门禁: ${[...known].join(', ')}。`
69
- );
70
- }
71
- }
72
65
 
73
66
  // ========================================
74
67
  // enabled 裁剪(与 getEffectiveConstraints 的 enabled:false 删除同效)
75
68
  // ========================================
76
- const disabled = new Set<string>();
77
- for (const gate of gates) {
78
- const entry = config[gate.id];
79
- if (
80
- entry &&
81
- typeof entry === 'object' &&
82
- !Array.isArray(entry) &&
83
- entry.enabled === false
84
- ) {
85
- disabled.add(gate.id);
86
- }
69
+ const enabledEntries: Record<string, { enabled?: boolean } | undefined> = {};
70
+ for (const [key, value] of Object.entries(config)) {
71
+ if (key === 'order') continue;
72
+ enabledEntries[key] = value as { enabled?: boolean } | undefined;
87
73
  }
74
+ const { disabledIds } = filterEnabledEntries(known, enabledEntries, {
75
+ onUnknownId: 'throw',
76
+ unknownIdError: id =>
77
+ `[harness] config.yml gates.${id} 引用了未注册的门禁。` +
78
+ `可用门禁: ${[...known].join(', ')}。`,
79
+ });
80
+ const disabled = new Set(disabledIds);
88
81
  const effective = gates.filter(g => !disabled.has(g.id));
89
82
 
90
83
  // ========================================
@@ -35,7 +35,7 @@ export { decisionFromResult } from './decision';
35
35
  /**
36
36
  * 门禁定义表(定义即注册的单一定义源;bin/harness.js 注册表驱动生成 CLI)
37
37
  */
38
- export { GATE_DEFINITIONS, type GateDefinition, type GateCliDefinition, type GateCliOption } from './definitions';
38
+ export { GATE_DEFINITIONS, type GateDefinition } from './definitions';
39
39
 
40
40
  /**
41
41
  * 门禁注册表(定义↔实现双向闭环,加载期抛错)+ getGate 引用闭环
@@ -13,7 +13,6 @@
13
13
  */
14
14
 
15
15
  import { ConstraintChecker } from '../core/constraints/checker';
16
- import { getTraceCollector } from '../monitoring/traces';
17
16
  import { SessionManager } from '../context/session-manager';
18
17
  import { ProjectConfigLoader } from '../core/project-config-loader';
19
18
  import { HookRegistry } from './registry';
@@ -74,7 +73,6 @@ export async function bootstrapHarness(
74
73
 
75
74
  // 2. 初始化核心组件
76
75
  const checker = ConstraintChecker.getInstance();
77
- checker.setTraceRecorder(getTraceCollector());
78
76
 
79
77
  const sessions = new SessionManager(resolvedPath);
80
78
  const hooks = new HookRegistry();
@@ -111,7 +109,6 @@ export function bootstrapHarnessSync(
111
109
  const mergedConstraints = loader.mergeConstraints();
112
110
 
113
111
  const checker = ConstraintChecker.getInstance();
114
- checker.setTraceRecorder(getTraceCollector());
115
112
 
116
113
  const sessions = new SessionManager(resolvedPath);
117
114
  const hooks = new HookRegistry();