@warpgogol/forge 9.1.1 → 9.2.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 (377) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/bin/cli.ts +3 -2
  3. package/dist/bin/cli.js +3 -2
  4. package/dist/bin/cli.js.map +1 -1
  5. package/dist/os/core/core.module.d.ts.map +1 -1
  6. package/dist/os/core/core.module.js +6 -4
  7. package/dist/os/core/core.module.js.map +1 -1
  8. package/dist/os/flow/branch-name.d.ts +56 -0
  9. package/dist/os/flow/branch-name.d.ts.map +1 -0
  10. package/dist/os/flow/branch-name.js +108 -0
  11. package/dist/os/flow/branch-name.js.map +1 -0
  12. package/dist/os/flow/digest.d.ts +73 -0
  13. package/dist/os/flow/digest.d.ts.map +1 -0
  14. package/dist/os/flow/digest.js +634 -0
  15. package/dist/os/flow/digest.js.map +1 -0
  16. package/dist/os/flow/flow.module.d.ts +3 -0
  17. package/dist/os/flow/flow.module.d.ts.map +1 -0
  18. package/dist/os/flow/flow.module.js +716 -0
  19. package/dist/os/flow/flow.module.js.map +1 -0
  20. package/dist/os/flow/git.d.ts +68 -0
  21. package/dist/os/flow/git.d.ts.map +1 -0
  22. package/dist/os/flow/git.js +257 -0
  23. package/dist/os/flow/git.js.map +1 -0
  24. package/dist/os/flow/guard-files.d.ts +50 -0
  25. package/dist/os/flow/guard-files.d.ts.map +1 -0
  26. package/dist/os/flow/guard-files.js +147 -0
  27. package/dist/os/flow/guard-files.js.map +1 -0
  28. package/dist/os/flow/handlers/flow-backmerge.d.ts +27 -0
  29. package/dist/os/flow/handlers/flow-backmerge.d.ts.map +1 -0
  30. package/dist/os/flow/handlers/flow-backmerge.js +332 -0
  31. package/dist/os/flow/handlers/flow-backmerge.js.map +1 -0
  32. package/dist/os/flow/handlers/flow-check.d.ts +42 -0
  33. package/dist/os/flow/handlers/flow-check.d.ts.map +1 -0
  34. package/dist/os/flow/handlers/flow-check.js +347 -0
  35. package/dist/os/flow/handlers/flow-check.js.map +1 -0
  36. package/dist/os/flow/handlers/flow-cut.d.ts +63 -0
  37. package/dist/os/flow/handlers/flow-cut.d.ts.map +1 -0
  38. package/dist/os/flow/handlers/flow-cut.js +636 -0
  39. package/dist/os/flow/handlers/flow-cut.js.map +1 -0
  40. package/dist/os/flow/handlers/flow-digest.d.ts +5 -0
  41. package/dist/os/flow/handlers/flow-digest.d.ts.map +1 -0
  42. package/dist/os/flow/handlers/flow-digest.js +110 -0
  43. package/dist/os/flow/handlers/flow-digest.js.map +1 -0
  44. package/dist/os/flow/handlers/flow-discard.d.ts +22 -0
  45. package/dist/os/flow/handlers/flow-discard.d.ts.map +1 -0
  46. package/dist/os/flow/handlers/flow-discard.js +200 -0
  47. package/dist/os/flow/handlers/flow-discard.js.map +1 -0
  48. package/dist/os/flow/handlers/flow-fix.d.ts +47 -0
  49. package/dist/os/flow/handlers/flow-fix.d.ts.map +1 -0
  50. package/dist/os/flow/handlers/flow-fix.js +443 -0
  51. package/dist/os/flow/handlers/flow-fix.js.map +1 -0
  52. package/dist/os/flow/handlers/flow-hold.d.ts +32 -0
  53. package/dist/os/flow/handlers/flow-hold.d.ts.map +1 -0
  54. package/dist/os/flow/handlers/flow-hold.js +359 -0
  55. package/dist/os/flow/handlers/flow-hold.js.map +1 -0
  56. package/dist/os/flow/handlers/flow-install.d.ts +92 -0
  57. package/dist/os/flow/handlers/flow-install.d.ts.map +1 -0
  58. package/dist/os/flow/handlers/flow-install.js +883 -0
  59. package/dist/os/flow/handlers/flow-install.js.map +1 -0
  60. package/dist/os/flow/handlers/flow-integrate.d.ts +35 -0
  61. package/dist/os/flow/handlers/flow-integrate.d.ts.map +1 -0
  62. package/dist/os/flow/handlers/flow-integrate.js +419 -0
  63. package/dist/os/flow/handlers/flow-integrate.js.map +1 -0
  64. package/dist/os/flow/handlers/flow-open.d.ts +63 -0
  65. package/dist/os/flow/handlers/flow-open.d.ts.map +1 -0
  66. package/dist/os/flow/handlers/flow-open.js +294 -0
  67. package/dist/os/flow/handlers/flow-open.js.map +1 -0
  68. package/dist/os/flow/handlers/flow-push.d.ts +22 -0
  69. package/dist/os/flow/handlers/flow-push.d.ts.map +1 -0
  70. package/dist/os/flow/handlers/flow-push.js +306 -0
  71. package/dist/os/flow/handlers/flow-push.js.map +1 -0
  72. package/dist/os/flow/handlers/flow-status.d.ts +65 -0
  73. package/dist/os/flow/handlers/flow-status.d.ts.map +1 -0
  74. package/dist/os/flow/handlers/flow-status.js +193 -0
  75. package/dist/os/flow/handlers/flow-status.js.map +1 -0
  76. package/dist/os/flow/handlers/flow-unhold.d.ts +20 -0
  77. package/dist/os/flow/handlers/flow-unhold.d.ts.map +1 -0
  78. package/dist/os/flow/handlers/flow-unhold.js +158 -0
  79. package/dist/os/flow/handlers/flow-unhold.js.map +1 -0
  80. package/dist/os/flow/handlers/flow-version.d.ts +39 -0
  81. package/dist/os/flow/handlers/flow-version.d.ts.map +1 -0
  82. package/dist/os/flow/handlers/flow-version.js +122 -0
  83. package/dist/os/flow/handlers/flow-version.js.map +1 -0
  84. package/dist/os/flow/index.d.ts +30 -0
  85. package/dist/os/flow/index.d.ts.map +1 -0
  86. package/dist/os/flow/index.js +83 -0
  87. package/dist/os/flow/index.js.map +1 -0
  88. package/dist/os/flow/line-version.d.ts +23 -0
  89. package/dist/os/flow/line-version.d.ts.map +1 -0
  90. package/dist/os/flow/line-version.js +83 -0
  91. package/dist/os/flow/line-version.js.map +1 -0
  92. package/dist/os/flow/locks.d.ts +34 -0
  93. package/dist/os/flow/locks.d.ts.map +1 -0
  94. package/dist/os/flow/locks.js +147 -0
  95. package/dist/os/flow/locks.js.map +1 -0
  96. package/dist/os/flow/markers.d.ts +49 -0
  97. package/dist/os/flow/markers.d.ts.map +1 -0
  98. package/dist/os/flow/markers.js +112 -0
  99. package/dist/os/flow/markers.js.map +1 -0
  100. package/dist/os/flow/publish.d.ts +28 -0
  101. package/dist/os/flow/publish.d.ts.map +1 -0
  102. package/dist/os/flow/publish.js +153 -0
  103. package/dist/os/flow/publish.js.map +1 -0
  104. package/dist/os/flow/registry.d.ts +142 -0
  105. package/dist/os/flow/registry.d.ts.map +1 -0
  106. package/dist/os/flow/registry.js +198 -0
  107. package/dist/os/flow/registry.js.map +1 -0
  108. package/dist/os/flow/release-level.d.ts +23 -0
  109. package/dist/os/flow/release-level.d.ts.map +1 -0
  110. package/dist/os/flow/release-level.js +102 -0
  111. package/dist/os/flow/release-level.js.map +1 -0
  112. package/dist/os/flow/release-lines.d.ts +25 -0
  113. package/dist/os/flow/release-lines.d.ts.map +1 -0
  114. package/dist/os/flow/release-lines.js +172 -0
  115. package/dist/os/flow/release-lines.js.map +1 -0
  116. package/dist/os/flow/release-tags.d.ts +72 -0
  117. package/dist/os/flow/release-tags.d.ts.map +1 -0
  118. package/dist/os/flow/release-tags.js +166 -0
  119. package/dist/os/flow/release-tags.js.map +1 -0
  120. package/dist/os/flow/repo-kind.d.ts +41 -0
  121. package/dist/os/flow/repo-kind.d.ts.map +1 -0
  122. package/dist/os/flow/repo-kind.js +92 -0
  123. package/dist/os/flow/repo-kind.js.map +1 -0
  124. package/dist/os/flow/scripts.d.ts +20 -0
  125. package/dist/os/flow/scripts.d.ts.map +1 -0
  126. package/dist/os/flow/scripts.js +49 -0
  127. package/dist/os/flow/scripts.js.map +1 -0
  128. package/dist/os/flow/semver.d.ts +21 -0
  129. package/dist/os/flow/semver.d.ts.map +1 -0
  130. package/dist/os/flow/semver.js +73 -0
  131. package/dist/os/flow/semver.js.map +1 -0
  132. package/dist/os/flow/tests/helpers.d.ts +52 -0
  133. package/dist/os/flow/tests/helpers.d.ts.map +1 -0
  134. package/dist/os/flow/tests/helpers.js +189 -0
  135. package/dist/os/flow/tests/helpers.js.map +1 -0
  136. package/dist/os/flow/version-files.d.ts +21 -0
  137. package/dist/os/flow/version-files.d.ts.map +1 -0
  138. package/dist/os/flow/version-files.js +94 -0
  139. package/dist/os/flow/version-files.js.map +1 -0
  140. package/dist/os/flow/worktree-path.d.ts +31 -0
  141. package/dist/os/flow/worktree-path.d.ts.map +1 -0
  142. package/dist/os/flow/worktree-path.js +80 -0
  143. package/dist/os/flow/worktree-path.js.map +1 -0
  144. package/dist/os/mission/handlers/archive.d.ts.map +1 -1
  145. package/dist/os/mission/handlers/archive.js +43 -6
  146. package/dist/os/mission/handlers/archive.js.map +1 -1
  147. package/dist/os/program/handlers/seal.d.ts.map +1 -1
  148. package/dist/os/program/handlers/seal.js +1 -1
  149. package/dist/os/program/handlers/seal.js.map +1 -1
  150. package/dist/os/program/handlers/validate.d.ts.map +1 -1
  151. package/dist/os/program/handlers/validate.js +1 -1
  152. package/dist/os/program/handlers/validate.js.map +1 -1
  153. package/dist/os/program/program.module.d.ts.map +1 -1
  154. package/dist/os/program/program.module.js +2 -1
  155. package/dist/os/program/program.module.js.map +1 -1
  156. package/dist/os/program/schemas.d.ts +4 -6
  157. package/dist/os/program/schemas.d.ts.map +1 -1
  158. package/dist/os/program/schemas.js +16 -6
  159. package/dist/os/program/schemas.js.map +1 -1
  160. package/dist/os/program/state.d.ts +0 -1
  161. package/dist/os/program/state.d.ts.map +1 -1
  162. package/dist/os/program/state.js +1 -7
  163. package/dist/os/program/state.js.map +1 -1
  164. package/dist/os/rfc/acceptance.d.ts +21 -0
  165. package/dist/os/rfc/acceptance.d.ts.map +1 -1
  166. package/dist/os/rfc/acceptance.js +62 -13
  167. package/dist/os/rfc/acceptance.js.map +1 -1
  168. package/dist/os/rfc/frontmatter-io.d.ts +19 -0
  169. package/dist/os/rfc/frontmatter-io.d.ts.map +1 -1
  170. package/dist/os/rfc/frontmatter-io.js +65 -12
  171. package/dist/os/rfc/frontmatter-io.js.map +1 -1
  172. package/dist/os/rfc/handlers/validate-rules.d.ts +2 -5
  173. package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
  174. package/dist/os/rfc/handlers/validate-rules.js +10 -8
  175. package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
  176. package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
  177. package/dist/os/rfc/handlers/validate.js +15 -5
  178. package/dist/os/rfc/handlers/validate.js.map +1 -1
  179. package/dist/os/rfc/index.d.ts +2 -2
  180. package/dist/os/rfc/index.d.ts.map +1 -1
  181. package/dist/os/rfc/index.js +5 -2
  182. package/dist/os/rfc/index.js.map +1 -1
  183. package/dist/os/rfc/probe-batch.d.ts +71 -0
  184. package/dist/os/rfc/probe-batch.d.ts.map +1 -0
  185. package/dist/os/rfc/probe-batch.js +251 -0
  186. package/dist/os/rfc/probe-batch.js.map +1 -0
  187. package/dist/os/rfc/rfc.module.d.ts.map +1 -1
  188. package/dist/os/rfc/rfc.module.js +16 -2
  189. package/dist/os/rfc/rfc.module.js.map +1 -1
  190. package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
  191. package/dist/os/rfc/verification-evidence.js +21 -10
  192. package/dist/os/rfc/verification-evidence.js.map +1 -1
  193. package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
  194. package/dist/os/rfc/verification-refresh.js +20 -13
  195. package/dist/os/rfc/verification-refresh.js.map +1 -1
  196. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +1 -1
  197. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +21 -7
  198. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -1
  199. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +1 -1
  200. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +1 -1
  201. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +1 -1
  202. package/dist/os/werkstatt/werkstatt.module.d.ts.map +1 -1
  203. package/dist/os/werkstatt/werkstatt.module.js +2 -82
  204. package/dist/os/werkstatt/werkstatt.module.js.map +1 -1
  205. package/dist/src/config/forge-config.d.ts +0 -3
  206. package/dist/src/config/forge-config.d.ts.map +1 -1
  207. package/dist/src/config/forge-config.js +2 -4
  208. package/dist/src/config/forge-config.js.map +1 -1
  209. package/dist/src/index.d.ts +3 -0
  210. package/dist/src/index.d.ts.map +1 -1
  211. package/dist/src/index.js +2 -0
  212. package/dist/src/index.js.map +1 -1
  213. package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
  214. package/dist/src/onboarding/agents-generate.js +49 -4
  215. package/dist/src/onboarding/agents-generate.js.map +1 -1
  216. package/dist/src/onboarding/create.d.ts +13 -0
  217. package/dist/src/onboarding/create.d.ts.map +1 -1
  218. package/dist/src/onboarding/create.js +95 -9
  219. package/dist/src/onboarding/create.js.map +1 -1
  220. package/dist/src/onboarding/doctor.d.ts.map +1 -1
  221. package/dist/src/onboarding/doctor.js +2 -47
  222. package/dist/src/onboarding/doctor.js.map +1 -1
  223. package/dist/src/onboarding/upgrade.d.ts +5 -0
  224. package/dist/src/onboarding/upgrade.d.ts.map +1 -1
  225. package/dist/src/onboarding/upgrade.js +70 -1
  226. package/dist/src/onboarding/upgrade.js.map +1 -1
  227. package/dist/src/types.d.ts +9 -0
  228. package/dist/src/types.d.ts.map +1 -1
  229. package/dist/src/types.js +2 -2
  230. package/docs/branch-model.md +98 -0
  231. package/docs/maintainers/publishing.md +10 -8
  232. package/docs/reference/cli.md +0 -3
  233. package/os/core/core.module.ts +7 -4
  234. package/os/flow/assets/flow-guard.sh +176 -0
  235. package/os/flow/branch-name.ts +139 -0
  236. package/os/flow/digest.ts +761 -0
  237. package/os/flow/flow.module.ts +740 -0
  238. package/os/flow/git.ts +342 -0
  239. package/os/flow/guard-files.ts +172 -0
  240. package/os/flow/handlers/flow-backmerge.ts +488 -0
  241. package/os/flow/handlers/flow-check.ts +450 -0
  242. package/os/flow/handlers/flow-cut.ts +912 -0
  243. package/os/flow/handlers/flow-digest.ts +124 -0
  244. package/os/flow/handlers/flow-discard.ts +301 -0
  245. package/os/flow/handlers/flow-fix.ts +597 -0
  246. package/os/flow/handlers/flow-hold.ts +500 -0
  247. package/os/flow/handlers/flow-install.ts +1185 -0
  248. package/os/flow/handlers/flow-integrate.ts +607 -0
  249. package/os/flow/handlers/flow-open.ts +447 -0
  250. package/os/flow/handlers/flow-push.ts +373 -0
  251. package/os/flow/handlers/flow-status.ts +283 -0
  252. package/os/flow/handlers/flow-unhold.ts +220 -0
  253. package/os/flow/handlers/flow-version.ts +196 -0
  254. package/os/flow/index.ts +102 -0
  255. package/os/flow/line-version.ts +113 -0
  256. package/os/flow/locks.ts +177 -0
  257. package/os/flow/markers.ts +135 -0
  258. package/os/flow/publish.ts +201 -0
  259. package/os/flow/registry.ts +266 -0
  260. package/os/flow/release-level.ts +139 -0
  261. package/os/flow/release-lines.ts +208 -0
  262. package/os/flow/release-tags.ts +231 -0
  263. package/os/flow/repo-kind.ts +117 -0
  264. package/os/flow/scripts.ts +73 -0
  265. package/os/flow/semver.ts +82 -0
  266. package/os/flow/tests/branch-name.test.ts +136 -0
  267. package/os/flow/tests/fixtures/branch-names.yaml +56 -0
  268. package/os/flow/tests/flow-backmerge.test.ts +267 -0
  269. package/os/flow/tests/flow-check-version.test.ts +138 -0
  270. package/os/flow/tests/flow-check.test.ts +213 -0
  271. package/os/flow/tests/flow-cut.rerun.test.ts +95 -0
  272. package/os/flow/tests/flow-cut.test.ts +319 -0
  273. package/os/flow/tests/flow-digest.test.ts +313 -0
  274. package/os/flow/tests/flow-discard.test.ts +220 -0
  275. package/os/flow/tests/flow-fix.test.ts +359 -0
  276. package/os/flow/tests/flow-guard-merge.test.ts +100 -0
  277. package/os/flow/tests/flow-guard-parity.test.ts +115 -0
  278. package/os/flow/tests/flow-guard-push.test.ts +100 -0
  279. package/os/flow/tests/flow-guard.test.ts +135 -0
  280. package/os/flow/tests/flow-hold.test.ts +465 -0
  281. package/os/flow/tests/flow-install-baseline.rerun.test.ts +73 -0
  282. package/os/flow/tests/flow-install-baseline.test.ts +164 -0
  283. package/os/flow/tests/flow-install-markers.test.ts +161 -0
  284. package/os/flow/tests/flow-install.rerun.test.ts +212 -0
  285. package/os/flow/tests/flow-install.test.ts +330 -0
  286. package/os/flow/tests/flow-integrate.rerun.test.ts +92 -0
  287. package/os/flow/tests/flow-integrate.test.ts +229 -0
  288. package/os/flow/tests/flow-open.test.ts +200 -0
  289. package/os/flow/tests/flow-push-publish.test.ts +282 -0
  290. package/os/flow/tests/flow-push.test.ts +160 -0
  291. package/os/flow/tests/flow-stale.test.ts +136 -0
  292. package/os/flow/tests/flow-status.test.ts +93 -0
  293. package/os/flow/tests/flow-version-level.test.ts +116 -0
  294. package/os/flow/tests/flow-version.test.ts +169 -0
  295. package/os/flow/tests/helpers.ts +235 -0
  296. package/os/flow/tests/is-flow-adopted.test.ts +71 -0
  297. package/os/flow/tests/registry.test.ts +150 -0
  298. package/os/flow/tests/repository-line-version.test.ts +100 -0
  299. package/os/flow/tests/scripts.test.ts +97 -0
  300. package/os/flow/tests/state-roots.test.ts +127 -0
  301. package/os/flow/tests/version-files.test.ts +145 -0
  302. package/os/flow/version-files.ts +115 -0
  303. package/os/flow/worktree-path.ts +107 -0
  304. package/os/mission/handlers/archive.test.ts +27 -0
  305. package/os/mission/handlers/archive.ts +46 -6
  306. package/os/program/handlers/seal.ts +1 -1
  307. package/os/program/handlers/validate.ts +1 -1
  308. package/os/program/program.module.ts +2 -1
  309. package/os/program/schemas.ts +51 -34
  310. package/os/program/state.ts +1 -9
  311. package/os/rfc/acceptance.ts +84 -19
  312. package/os/rfc/frontmatter-io.ts +78 -12
  313. package/os/rfc/handlers/implement-stamp-stale.test.ts +22 -0
  314. package/os/rfc/handlers/validate-rules.test.ts +9 -6
  315. package/os/rfc/handlers/validate-rules.ts +12 -10
  316. package/os/rfc/handlers/validate.ts +17 -5
  317. package/os/rfc/index.ts +13 -1
  318. package/os/rfc/probe-batch.ts +329 -0
  319. package/os/rfc/rfc.module.ts +19 -2
  320. package/os/rfc/verification-emit-check.test.ts +22 -0
  321. package/os/rfc/verification-emit-freshness.test.ts +22 -0
  322. package/os/rfc/verification-emit.test.ts +22 -0
  323. package/os/rfc/verification-evidence.ts +21 -16
  324. package/os/rfc/verification-refresh.test.ts +22 -0
  325. package/os/rfc/verification-refresh.ts +20 -18
  326. package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +9 -0
  327. package/os/werkstatt/handlers/werkstatt-lock-recover.ts +22 -5
  328. package/os/werkstatt/handlers/werkstatt-operation-validate.ts +1 -1
  329. package/os/werkstatt/werkstatt.module.ts +2 -85
  330. package/package.json +17 -1
  331. package/profiles/forge-shell.yaml +22 -10
  332. package/profiles/godot-game.yaml +24 -13
  333. package/profiles/knowledge.yaml +19 -0
  334. package/profiles/phaser-game.yaml +25 -13
  335. package/profiles/site-workshop.yaml +27 -10
  336. package/profiles/typescript.yaml +26 -9
  337. package/skills/fo/fo-session-retro/SKILL.md +18 -7
  338. package/skills/fo/fo-step-commit/SKILL.md +2 -1
  339. package/src/config/forge-config.ts +2 -6
  340. package/src/index.ts +8 -0
  341. package/src/onboarding/agents-generate.ts +49 -5
  342. package/src/onboarding/create.ts +101 -9
  343. package/src/onboarding/doctor.ts +2 -51
  344. package/src/onboarding/upgrade.ts +86 -1
  345. package/src/tests/agents-generate-flow.test.ts +132 -0
  346. package/src/tests/create-flow.test.ts +114 -0
  347. package/src/tests/create.test.ts +22 -21
  348. package/src/tests/doctor-autonomy.test.ts +2 -1
  349. package/src/tests/implement-stamp.test.ts +26 -3
  350. package/src/tests/profile-flow-hooks.test.ts +77 -0
  351. package/src/tests/program-schemas.test.ts +66 -6
  352. package/src/tests/program-spec-node.test.ts +1 -5
  353. package/src/tests/rfc-evidence-sync.test.ts +22 -0
  354. package/src/tests/rfc-implement-stamp-governance.test.ts +25 -1
  355. package/src/tests/rfc-verification-verdict-ingest.test.ts +22 -0
  356. package/src/tests/upgrade-flow.test.ts +174 -0
  357. package/src/types.ts +11 -2
  358. package/dist/os/werkstatt/handlers/session-close.d.ts +0 -13
  359. package/dist/os/werkstatt/handlers/session-close.d.ts.map +0 -1
  360. package/dist/os/werkstatt/handlers/session-close.js +0 -56
  361. package/dist/os/werkstatt/handlers/session-close.js.map +0 -1
  362. package/dist/os/werkstatt/handlers/session-engine.d.ts +0 -3
  363. package/dist/os/werkstatt/handlers/session-engine.d.ts.map +0 -1
  364. package/dist/os/werkstatt/handlers/session-engine.js +0 -28
  365. package/dist/os/werkstatt/handlers/session-engine.js.map +0 -1
  366. package/dist/os/werkstatt/handlers/session-open.d.ts +0 -10
  367. package/dist/os/werkstatt/handlers/session-open.d.ts.map +0 -1
  368. package/dist/os/werkstatt/handlers/session-open.js +0 -46
  369. package/dist/os/werkstatt/handlers/session-open.js.map +0 -1
  370. package/dist/os/werkstatt/handlers/session-status.d.ts +0 -9
  371. package/dist/os/werkstatt/handlers/session-status.d.ts.map +0 -1
  372. package/dist/os/werkstatt/handlers/session-status.js +0 -34
  373. package/dist/os/werkstatt/handlers/session-status.js.map +0 -1
  374. package/os/werkstatt/handlers/session-close.ts +0 -82
  375. package/os/werkstatt/handlers/session-engine.ts +0 -34
  376. package/os/werkstatt/handlers/session-open.ts +0 -68
  377. package/os/werkstatt/handlers/session-status.ts +0 -55
@@ -6,7 +6,6 @@
6
6
  </non-goals>
7
7
  </MODULE_CONTRACT>
8
8
  <CHANGE_SUMMARY>
9
- <item>RFC-0303: extracted validate handler from handlers.ts into handlers/validate.ts.</item>
10
9
  <item>RFC-1097: step 6 — compass.migrate codemod run
11
10
 
12
11
  Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.</item>
@@ -15,6 +14,10 @@ Mechanical v1 to v2 header migration across the workspace: 942 files rewritten
15
14
  Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
16
15
  <item>KERNEL-FLAG-02: Guard --id against non-string values (boolean/array from unvalidated flag input) — throws a clear flag error instead of TypeError in rfcFileMatchesId.</item>
17
16
  <item>RFC-1467: block rfc.create on terminal-kind near-duplicates until --revisit acknowledges + V-52 validate mirror</item>
17
+ <item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
18
+
19
+ runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
20
+ <history>RFC-0303</history>
18
21
  </CHANGE_SUMMARY>
19
22
  */
20
23
 
@@ -23,8 +26,10 @@ import path from "node:path";
23
26
  import {
24
27
  listRfcFiles,
25
28
  readAndParseRfc,
29
+ readRfcFrontmatter,
26
30
  rfcFileMatchesId,
27
31
  type ParsedRfc,
32
+ type RfcCorpusEntry,
28
33
  } from "../frontmatter-io.ts";
29
34
  import type {
30
35
  ForgeCommandInput,
@@ -73,7 +78,9 @@ export async function runRfcValidate(
73
78
  };
74
79
  }
75
80
 
76
- const allParsed: Map<string, { fileName: string; parsed: ParsedRfc }> = new Map();
81
+ // RFC-1489: the corpus map carries frontmatter only — referential rules never
82
+ // read non-target bodies. Full `parsed` (with body) exists only for targets.
83
+ const allParsed: Map<string, RfcCorpusEntry> = new Map();
77
84
  const allParsedByFile: Map<string, { fileName: string; parsed: ParsedRfc }> = new Map();
78
85
 
79
86
  const violations: RfcValidationViolation[] = [];
@@ -90,16 +97,21 @@ export async function runRfcValidate(
90
97
  violations.push({ rfcId, file, rule, message, severity });
91
98
  }
92
99
 
100
+ const targetSet = new Set(filesToValidate);
93
101
  for (const f of allFiles) {
94
- const result = await readAndParseRfc(rfcDirPath, f);
102
+ const result = targetSet.has(f)
103
+ ? await readAndParseRfc(rfcDirPath, f)
104
+ : await readRfcFrontmatter(rfcDirPath, f);
95
105
  if (result) {
96
106
  if ("error" in result) {
97
107
  checkFrontmatterYamlParse(f, result, addViolation);
98
108
  continue;
99
109
  }
100
110
  const id = String(result.parsed.frontmatter["id"] ?? "");
101
- allParsed.set(id, { fileName: f, parsed: result.parsed });
102
- allParsedByFile.set(f, { fileName: f, parsed: result.parsed });
111
+ allParsed.set(id, { fileName: f, frontmatter: result.parsed.frontmatter });
112
+ if (targetSet.has(f)) {
113
+ allParsedByFile.set(f, { fileName: f, parsed: result.parsed });
114
+ }
103
115
  }
104
116
  }
105
117
 
package/os/rfc/index.ts CHANGED
@@ -12,6 +12,9 @@ Mechanical v1 to v2 header migration across the workspace: 942 files rewritten
12
12
  <item>RFC-1097: sweep — werkstatt-engine clean
13
13
 
14
14
  Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
15
+ <item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
16
+
17
+ runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
15
18
  </CHANGE_SUMMARY>
16
19
  */
17
20
 
@@ -20,11 +23,13 @@ export {
20
23
  listRfcFiles,
21
24
  parseRfcFile,
22
25
  readAndParseRfc,
26
+ readRfcFrontmatter,
23
27
  rfcFileMatchesId,
24
28
  getRfcStatusById,
25
29
  loadRfcStatusMap,
26
30
  type ParsedRfc,
27
31
  type ReadAndParseRfcResult,
32
+ type RfcCorpusEntry,
28
33
  } from "./frontmatter-io.ts";
29
34
  export {
30
35
  runRfcList,
@@ -34,7 +39,14 @@ export {
34
39
  runRfcCheck,
35
40
  } from "./handlers.ts";
36
41
  export { runRfcImplementStamp } from "./handlers/implement-stamp.ts";
37
- export { runRfcAcceptanceRun, runProbe, validateAcceptanceShape } from "./acceptance.ts";
42
+ export {
43
+ runRfcAcceptanceRun,
44
+ runProbe,
45
+ runProbeSet,
46
+ validateAcceptanceShape,
47
+ type ProbeSetOptions,
48
+ type ProbeSetResult,
49
+ } from "./acceptance.ts";
38
50
  export { runRfcVerificationEmit, buildEvidenceEnvelope } from "./verification-evidence.ts";
39
51
  export { runRfcDnaTraceValidate, runRfcDnaTraceGenerate, buildDnaTrace } from "./dna-trace.ts";
40
52
  export type { DnaTraceEntry, DnaTraceResult } from "./dna-trace.ts";
@@ -0,0 +1,329 @@
1
+ /*
2
+ <MODULE_CONTRACT>
3
+ <purpose>RFC-1489: planner + executor for batched `test` acceptance probes — groups same-bound test probes between run/page/proof barriers into one instrumented Vitest run and attributes per declared (file, testName).</purpose>
4
+ <non-goals>
5
+ <item>Does not execute non-test probes — callers route those through runProbe individually.</item>
6
+ <item>Does not write artifacts — the JSON report lands in an OS temp dir, consumed and deleted.</item>
7
+ </non-goals>
8
+ </MODULE_CONTRACT>
9
+ <CHANGE_SUMMARY>
10
+ <item>RFC-1489: probe-execution planning layer — bound-grouped Vitest batching with per-entry attribution and unverified-on-missing-slice.</item>
11
+ </CHANGE_SUMMARY>
12
+ */
13
+
14
+ import { spawn } from "../../src/utils/sync-fs.ts";
15
+ import { mkdtempSync, rmSync } from "node:fs";
16
+ import { tmpdir } from "node:os";
17
+ import path from "node:path";
18
+
19
+ import { ambientIo as io } from "../../src/utils/io.ts";
20
+ import type { AcceptanceProbe, ProbeResult } from "./types.ts";
21
+
22
+ /**
23
+ * A group of `test` probes sharing one effective timeout bound between
24
+ * `run`/`page`/`proof` barriers executes in ONE instrumented Vitest process
25
+ * (`--reporter=json --outputFile`), with each declared probe attributed only
26
+ * to its own (file, testName) slice of the JSON report. Non-barrier probes
27
+ * of other kinds keep their declared positions inside a segment's span.
28
+ * A missing file or an unavailable report yields `unverified`, never a pass.
29
+ */
30
+
31
+ export interface TestProbeLike {
32
+ probe: "test";
33
+ file: string;
34
+ testName?: string;
35
+ timeoutMs?: number;
36
+ expect: { exitCode: number };
37
+ }
38
+
39
+ const isBatchableTest = (p: AcceptanceProbe): p is AcceptanceProbe & TestProbeLike =>
40
+ p.probe === "test";
41
+
42
+ /** Only `run`/`page`/`proof` are barriers — every other kind keeps its own
43
+ * declared position inside a segment's span without splitting the group. */
44
+ const isBarrierProbe = (p: AcceptanceProbe): boolean =>
45
+ p.probe === "run" || p.probe === "page" || p.probe === "proof";
46
+
47
+ export interface ProbeSegment {
48
+ /** Index of the segment's earliest member — its execution position. */
49
+ start: number;
50
+ /** Declared indices of the segment's test-probe members, ascending. */
51
+ members: number[];
52
+ /** Shared effective timeout bound for the segment. */
53
+ boundMs: number;
54
+ }
55
+
56
+ /**
57
+ * Groups declared probes into segments of `test` probes sharing one
58
+ * effective bound, broken only by `run`/`page`/`proof` barriers. A segment
59
+ * may span non-barrier probes of other kinds — those keep their own
60
+ * declared position while the group executes at its earliest member.
61
+ */
62
+ export function planProbeSegments(
63
+ probes: AcceptanceProbe[],
64
+ defaultBoundMs: number,
65
+ ): ProbeSegment[] {
66
+ const segments: ProbeSegment[] = [];
67
+ let open: ProbeSegment | undefined;
68
+ for (let i = 0; i < probes.length; i++) {
69
+ const p = probes[i]!;
70
+ if (isBarrierProbe(p)) {
71
+ open = undefined;
72
+ continue;
73
+ }
74
+ if (!isBatchableTest(p)) continue; // non-barrier non-test — span, no split
75
+ const bound = p.timeoutMs ?? defaultBoundMs;
76
+ if (open && open.boundMs === bound) {
77
+ open.members.push(i);
78
+ } else {
79
+ open = { start: i, members: [i], boundMs: bound };
80
+ segments.push(open);
81
+ }
82
+ }
83
+ return segments;
84
+ }
85
+
86
+ interface VitestAssertionResult {
87
+ title?: string;
88
+ fullName?: string;
89
+ ancestorTitles?: string[];
90
+ status?: string;
91
+ }
92
+
93
+ interface VitestFileResult {
94
+ name?: string;
95
+ status?: string;
96
+ assertionResults?: VitestAssertionResult[];
97
+ }
98
+
99
+ interface VitestJsonReport {
100
+ testResults?: VitestFileResult[];
101
+ }
102
+
103
+ export interface BatchSpawnOutcome {
104
+ exitCode: number | null;
105
+ timedOut: boolean;
106
+ report?: VitestJsonReport;
107
+ reportError?: string;
108
+ }
109
+
110
+ /** Spawns one instrumented Vitest process for a barrier-free segment. */
111
+ export async function spawnBatchedVitest(
112
+ workspaceRoot: string,
113
+ files: string[],
114
+ boundMs: number,
115
+ outputFile: string,
116
+ ): Promise<BatchSpawnOutcome> {
117
+ const args = [
118
+ "exec",
119
+ "vitest",
120
+ "run",
121
+ ...files,
122
+ "--reporter=json",
123
+ `--outputFile=${outputFile}`,
124
+ // Serial file execution inside the batch spawn — per-file resource
125
+ // footprints stack, and parallel files inside one run re-create the
126
+ // memory pressure batching exists to remove (F-0029 evidence).
127
+ "--fileParallelism=false",
128
+ ];
129
+
130
+ let stderrTail = "";
131
+ const exit = await new Promise<{ exitCode: number | null; timedOut: boolean }>((resolve) => {
132
+ const child = spawn("pnpm", args, {
133
+ cwd: workspaceRoot,
134
+ stdio: ["ignore", "ignore", "pipe"],
135
+ });
136
+ child.stderr?.on("data", (chunk: Buffer) => {
137
+ stderrTail = (stderrTail + chunk.toString()).slice(-2000);
138
+ });
139
+ let settled = false;
140
+ const timer = setTimeout(() => {
141
+ if (settled) return;
142
+ settled = true;
143
+ child.kill();
144
+ resolve({ exitCode: null, timedOut: true });
145
+ }, boundMs);
146
+ timer.unref?.();
147
+ child.on("close", (code) => {
148
+ if (settled) return;
149
+ settled = true;
150
+ clearTimeout(timer);
151
+ resolve({ exitCode: code, timedOut: false });
152
+ });
153
+ child.on("error", () => {
154
+ if (settled) return;
155
+ settled = true;
156
+ clearTimeout(timer);
157
+ resolve({ exitCode: null, timedOut: false });
158
+ });
159
+ });
160
+
161
+ if (exit.timedOut) return { ...exit, reportError: stderrTail || undefined };
162
+
163
+ let raw: string;
164
+ try {
165
+ raw = await io.readFile(outputFile);
166
+ } catch {
167
+ return {
168
+ ...exit,
169
+ reportError: `Vitest JSON report not produced at ${outputFile}${stderrTail ? ` — stderr: ${stderrTail.trim().slice(-400)}` : ""}`,
170
+ };
171
+ }
172
+ try {
173
+ return { ...exit, report: JSON.parse(raw) as VitestJsonReport };
174
+ } catch (e) {
175
+ return {
176
+ ...exit,
177
+ reportError: `Vitest JSON report unparseable: ${e instanceof Error ? e.message : String(e)}`,
178
+ };
179
+ }
180
+ }
181
+
182
+ const normalizeReportPath = (p: string): string => path.resolve(p).split(path.sep).join("/");
183
+
184
+ /**
185
+ * Attributes one declared test probe to its own (file, testName) slice of
186
+ * the Vitest JSON report. Never derives a pass from another probe's slice;
187
+ * absent slices yield `unverified` (RFC-1489 AC-3).
188
+ */
189
+ export function attributeProbeResult(
190
+ probe: TestProbeLike,
191
+ workspaceRoot: string,
192
+ report: VitestJsonReport,
193
+ ): ProbeResult {
194
+ const wantedFile = normalizeReportPath(path.join(workspaceRoot, probe.file));
195
+ const entry = (report.testResults ?? []).find(
196
+ (t) => typeof t.name === "string" && normalizeReportPath(t.name) === wantedFile,
197
+ );
198
+ const unverified = (detail: string): ProbeResult => ({
199
+ probe: probe as AcceptanceProbe,
200
+ ok: false,
201
+ verdict: "unverified",
202
+ detail,
203
+ });
204
+ if (!entry) {
205
+ return unverified(`file ${probe.file} absent from Vitest JSON report`);
206
+ }
207
+
208
+ const assertions = entry.assertionResults ?? [];
209
+ let matched: VitestAssertionResult[];
210
+ let slicePassed: boolean;
211
+ if (probe.testName !== undefined) {
212
+ matched = assertions.filter((a) => (a.fullName ?? "").includes(probe.testName!));
213
+ if (matched.length === 0) {
214
+ // Spec §4: zero matches is a base `fail` — invertible by expect, and
215
+ // parity with `vitest -t` exiting nonzero on a no-match run.
216
+ return {
217
+ probe: probe as AcceptanceProbe,
218
+ ok: false,
219
+ verdict: "fail",
220
+ detail: `no testName match in report for "${probe.testName}" in ${probe.file}`,
221
+ };
222
+ }
223
+ slicePassed = matched.every((a) => a.status === "passed");
224
+ } else {
225
+ matched = assertions;
226
+ // File-level: base ok iff the file's report entry exists and status is
227
+ // `passed` — a skipped/pending file cannot prove its tests executed.
228
+ slicePassed = entry.status === "passed";
229
+ if (matched.length === 0 && !slicePassed && entry.status !== "failed") {
230
+ return unverified(`file ${probe.file} produced no assertions in Vitest report`);
231
+ }
232
+ }
233
+
234
+ const derivedExitCode = slicePassed ? 0 : 1;
235
+ const ok = derivedExitCode === probe.expect.exitCode;
236
+ return {
237
+ probe: probe as AcceptanceProbe,
238
+ ok,
239
+ verdict: ok ? "pass" : "fail",
240
+ detail: `batched: ${matched.length} assertion(s) in ${probe.file}${
241
+ probe.testName ? ` matching "${probe.testName}"` : ""
242
+ }, derived exitCode=${derivedExitCode} (expected ${probe.expect.exitCode})`,
243
+ };
244
+ }
245
+
246
+ /**
247
+ * Executes one segment of `test` probes in a single Vitest process and
248
+ * returns per-index results keyed into the declared probe list. Identical
249
+ * probes collapse on a canonical key and fan the computed verdict out per
250
+ * declared position (spec §5). Spawn/report failures mark every segment
251
+ * probe `unverified`; a spawn timeout mirrors the legacy `timedOut` fail.
252
+ */
253
+ export async function runBatchedTestSegment(
254
+ probes: AcceptanceProbe[],
255
+ segment: ProbeSegment,
256
+ workspaceRoot: string,
257
+ spawnFn: typeof spawnBatchedVitest = spawnBatchedVitest,
258
+ ): Promise<Map<number, ProbeResult>> {
259
+ const results = new Map<number, ProbeResult>();
260
+ const runnable: Array<{ index: number; probe: TestProbeLike; file: string }> = [];
261
+
262
+ for (const i of segment.members) {
263
+ const probe = probes[i] as TestProbeLike;
264
+ const absFile = path.join(workspaceRoot, probe.file);
265
+ try {
266
+ const st = await io.stat(absFile);
267
+ if (!st.isFile) throw new Error("not a file");
268
+ runnable.push({ index: i, probe, file: probe.file });
269
+ } catch {
270
+ results.set(i, {
271
+ probe: probe as AcceptanceProbe,
272
+ ok: false,
273
+ verdict: "unverified",
274
+ detail: `test file ${probe.file} does not exist`,
275
+ });
276
+ }
277
+ }
278
+ if (runnable.length === 0) return results;
279
+
280
+ // Spec §5: a canonical key collapses identical probes — attribute once and
281
+ // fan the verdict out per declared position.
282
+ const canonicalKey = (p: TestProbeLike): string =>
283
+ JSON.stringify([p.file, p.testName ?? null, p.timeoutMs ?? null, p.expect.exitCode]);
284
+ const byKey = new Map<string, { index: number; probe: TestProbeLike }>();
285
+ for (const r of runnable) {
286
+ const key = canonicalKey(r.probe);
287
+ if (!byKey.has(key)) byKey.set(key, r);
288
+ }
289
+
290
+ const tmpDir = mkdtempSync(path.join(tmpdir(), "forge-probe-batch-"));
291
+ const outputFile = path.join(tmpDir, "vitest-report.json");
292
+ try {
293
+ const files = [...new Set(runnable.map((r) => r.file))];
294
+ const outcome = await spawnFn(workspaceRoot, files, segment.boundMs, outputFile);
295
+
296
+ if (outcome.timedOut) {
297
+ for (const r of runnable) {
298
+ results.set(r.index, {
299
+ probe: r.probe as AcceptanceProbe,
300
+ ok: false,
301
+ detail: `timed out after ${segment.boundMs}ms`,
302
+ });
303
+ }
304
+ return results;
305
+ }
306
+ if (!outcome.report) {
307
+ for (const r of runnable) {
308
+ results.set(r.index, {
309
+ probe: r.probe as AcceptanceProbe,
310
+ ok: false,
311
+ verdict: "unverified",
312
+ detail: `batched report unavailable — ${outcome.reportError ?? `vitest exited ${outcome.exitCode}`}`,
313
+ });
314
+ }
315
+ return results;
316
+ }
317
+ const computed = new Map<string, ProbeResult>();
318
+ for (const [key, r] of byKey) {
319
+ computed.set(key, attributeProbeResult(r.probe, workspaceRoot, outcome.report));
320
+ }
321
+ for (const r of runnable) {
322
+ const base = computed.get(canonicalKey(r.probe))!;
323
+ results.set(r.index, { ...base, probe: r.probe as AcceptanceProbe });
324
+ }
325
+ return results;
326
+ } finally {
327
+ rmSync(tmpDir, { recursive: true, force: true });
328
+ }
329
+ }
@@ -7,14 +7,16 @@
7
7
  </non-goals>
8
8
  </MODULE_CONTRACT>
9
9
  <CHANGE_SUMMARY>
10
- <item>RFC-1467: block rfc.create on terminal-kind near-duplicates until --revisit acknowledges + V-52 validate mirror</item>
11
10
  <item>RFC-1474: per-rule check-execution counters
12
11
 
13
12
  Append-only counters.jsonl journaled per evaluated rule ({runId, ruleId, contract, outcome, at}; runId = commandInvocationId; outcomes pass|diagnostic|skipped|ensured; dry-run suppressed; append failures warn never fail). checks.counters.validate audits the journal against the validator inventory (COUNT-01/02); checks.counters.export projects deterministic per-rule totals (COUNT-03, generatedAt = max journal at; producer-tail tolerated). checks.contribution.report joins counters as the canonical firing source (CONTRIB-03 on absent/empty journal; coverage none|partial|complete; live effectiveCoverage positive). Validator inventory now includes every rules[]-declaring command — fail-closed gate surfaced 9 contract-declaration defects, fixed with domain contracts.</item>
14
13
  <item>RFC-1474: check-execution counters — apply re-review findings (structural skip flag, violations extraction, Date.parse ordering, DEV-5/6)</item>
15
14
  <item>RFC-1482: emit validation-compliant RFC skeletons and surface contract breaches at authoring time</item>
16
15
  <item>RFC-1483: self-sufficient implement stamp — default repair pass, ordered remediation checklist, --no-repair</item>
17
- <history>RFC-0260, RFC-0795, RFC-1097, RFC-1173, RFC-1231, RFC-1237, RFC-1249, RFC-1271, RFC-1306, RFC-1322, RFC-1333, RFC-1351, RFC-1354, RFC-1364, RFC-1453, RFC-1458, RFC-1461, RFC-1463</history>
16
+ <item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
17
+
18
+ runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
19
+ <history>RFC-0260, RFC-0795, RFC-1097, RFC-1173, RFC-1231, RFC-1237, RFC-1249, RFC-1271, RFC-1306, RFC-1322, RFC-1333, RFC-1351, RFC-1354, RFC-1364, RFC-1453, RFC-1458, RFC-1461, RFC-1463, RFC-1467</history>
18
20
  </CHANGE_SUMMARY>
19
21
  */
20
22
 
@@ -259,6 +261,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
259
261
  kind: "string",
260
262
  description: "Target every RFC with this status (e.g. accepted).",
261
263
  },
264
+ "no-batch": {
265
+ kind: "boolean",
266
+ description:
267
+ "RFC-1489: disable test-probe batching — run each probe in its own Vitest process (diagnostic escape).",
268
+ },
262
269
  },
263
270
  reads: ["docs/rfcs/**/*.md"],
264
271
  cacheable: false,
@@ -339,6 +346,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
339
346
  description:
340
347
  "RFC-1453: record an operator outcome-gate waiver ({reason, by}) in emitted envelopes — set by rfc.implement.stamp, not for direct use.",
341
348
  },
349
+ "no-batch": {
350
+ kind: "boolean",
351
+ description:
352
+ "RFC-1489: disable test-probe batching — run each probe in its own Vitest process (diagnostic escape).",
353
+ },
342
354
  },
343
355
  execute: runRfcVerificationEmit,
344
356
  },
@@ -380,6 +392,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
380
392
  description:
381
393
  "Bounded parallelism across RFCs for sweep runs (default 1, capped at 16 — invalid values warn and fall back). Probe workers spawn subprocesses.",
382
394
  },
395
+ "no-batch": {
396
+ kind: "boolean",
397
+ description:
398
+ "RFC-1489: disable test-probe batching — run each probe in its own Vitest process (diagnostic escape).",
399
+ },
383
400
  },
384
401
  execute: runRfcVerificationRefresh,
385
402
  },
@@ -9,6 +9,9 @@ Unit tests for verification emit check covering rfc.verification.emit --check (R
9
9
  </MODULE_CONTRACT>
10
10
  <CHANGE_SUMMARY>
11
11
  <item>RFC-1311: Compass header sweep — declares the verification suite's contract for test-file scaffold coverage.</item>
12
+ <item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
13
+
14
+ runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
12
15
  </CHANGE_SUMMARY>
13
16
  */
14
17
 
@@ -28,6 +31,25 @@ const { mockRunProbe } = vi.hoisted(() => ({
28
31
 
29
32
  vi.mock("./acceptance.ts", () => ({
30
33
  runProbe: mockRunProbe,
34
+ // RFC-1489: emit drives runProbeSet — the shim preserves the per-probe
35
+ // mock contract so these tests observe the same probe calls as before.
36
+ runProbeSet: async (probes: unknown[], opts: Record<string, unknown>) => {
37
+ const results = [];
38
+ const durationsMs = [];
39
+ for (const p of probes) {
40
+ results.push(
41
+ await mockRunProbe(
42
+ p,
43
+ opts.workspaceRoot,
44
+ opts.commandRegistry,
45
+ opts.forgeRoot,
46
+ opts.outcomeSession,
47
+ ),
48
+ );
49
+ durationsMs.push(0);
50
+ }
51
+ return { results, durationsMs };
52
+ },
31
53
  }));
32
54
 
33
55
  const PROBE = { probe: "file-exists", path: "src/index.ts", criterion: "AC-1" };
@@ -10,6 +10,9 @@ RFC-1320 unit tests for the pre-probe generated-artifact freshness gate inside r
10
10
  <CHANGE_SUMMARY>
11
11
  <item>RFC-1320: initial suite — sync-remedy, non-sync owner remedy, absent invoke, render-unavailable, fresh pass-through, no-artifact probes, emit-owned exclusion, unowned paths, unknown kind.</item>
12
12
  <item>RFC-1320</item>
13
+ <item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
14
+
15
+ runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
13
16
  </CHANGE_SUMMARY>
14
17
  */
15
18
 
@@ -28,6 +31,25 @@ const { mockRunProbe } = vi.hoisted(() => ({
28
31
 
29
32
  vi.mock("./acceptance.ts", () => ({
30
33
  runProbe: mockRunProbe,
34
+ // RFC-1489: emit drives runProbeSet — the shim preserves the per-probe
35
+ // mock contract so these tests observe the same probe calls as before.
36
+ runProbeSet: async (probes: unknown[], opts: Record<string, unknown>) => {
37
+ const results = [];
38
+ const durationsMs = [];
39
+ for (const p of probes) {
40
+ results.push(
41
+ await mockRunProbe(
42
+ p,
43
+ opts.workspaceRoot,
44
+ opts.commandRegistry,
45
+ opts.forgeRoot,
46
+ opts.outcomeSession,
47
+ ),
48
+ );
49
+ durationsMs.push(0);
50
+ }
51
+ return { results, durationsMs };
52
+ },
31
53
  }));
32
54
 
33
55
  const MANIFEST = "docs/command-manifest.generated.yaml";
@@ -9,6 +9,9 @@ Unit tests for verification emit covering rfc.verification.emit — baseline emi
9
9
  </MODULE_CONTRACT>
10
10
  <CHANGE_SUMMARY>
11
11
  <item>RFC-1311: Compass header sweep — declares the verification suite's contract for test-file scaffold coverage.</item>
12
+ <item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
13
+
14
+ runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
12
15
  </CHANGE_SUMMARY>
13
16
  */
14
17
 
@@ -32,6 +35,25 @@ const { mockRunProbe } = vi.hoisted(() => ({
32
35
 
33
36
  vi.mock("./acceptance.ts", () => ({
34
37
  runProbe: mockRunProbe,
38
+ // RFC-1489: emit drives runProbeSet — the shim preserves the per-probe
39
+ // mock contract so these tests observe the same probe calls as before.
40
+ runProbeSet: async (probes: unknown[], opts: Record<string, unknown>) => {
41
+ const results = [];
42
+ const durationsMs = [];
43
+ for (const p of probes) {
44
+ results.push(
45
+ await mockRunProbe(
46
+ p,
47
+ opts.workspaceRoot,
48
+ opts.commandRegistry,
49
+ opts.forgeRoot,
50
+ opts.outcomeSession,
51
+ ),
52
+ );
53
+ durationsMs.push(0);
54
+ }
55
+ return { results, durationsMs };
56
+ },
35
57
  }));
36
58
 
37
59
  const RFC_FRONTMATTER = (id: string, status: string, probes: Record<string, unknown>[] = []) => {