@intentius/chant 0.124.26 → 0.124.28

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 (459) hide show
  1. package/README.md +1 -1
  2. package/dist/__golden__/wave-loop/fan-out-gated.json +8 -0
  3. package/dist/__golden__/wave-loop/fan-out-no-members.json +4 -0
  4. package/dist/__golden__/wave-loop/fan-out-only.json +6 -0
  5. package/dist/__golden__/wave-loop/op-by-apply-hold.json +2 -0
  6. package/dist/__golden__/wave-loop/op-cost-member.json +3 -0
  7. package/dist/__golden__/wave-loop/op-held-on-before-apply.json +1 -0
  8. package/dist/__golden__/wave-loop/op-held-on.json +2 -0
  9. package/dist/__golden__/wave-loop/op-hooks-held.json +2 -0
  10. package/dist/__golden__/wave-loop/op-hooks-hold-before-apply.json +2 -0
  11. package/dist/__golden__/wave-loop/op-hooks-refused-at-base.json +3 -0
  12. package/dist/__golden__/wave-loop/op-hooks-share.json +3 -0
  13. package/dist/__golden__/wave-loop/op-per-run.json +7 -0
  14. package/dist/__golden__/wave-loop/op-pr-review.json +7 -0
  15. package/dist/__golden__/wave-loop/op-sealed.json +3 -0
  16. package/dist/__golden__/wave-loop/op-spend.json +3 -0
  17. package/dist/__golden__/wave-loop/op-wave-commands.json +7 -0
  18. package/dist/__golden__/wave-loop/op-wide-waiting.json +4 -0
  19. package/dist/change-set-graph.d.ts +56 -0
  20. package/dist/change-set-graph.d.ts.map +1 -0
  21. package/dist/change-set-graph.js +128 -0
  22. package/dist/change-set.d.ts +52 -3
  23. package/dist/change-set.d.ts.map +1 -1
  24. package/dist/change-set.js +35 -4
  25. package/dist/chant-version.d.ts +9 -0
  26. package/dist/chant-version.d.ts.map +1 -0
  27. package/dist/chant-version.js +16 -0
  28. package/dist/cli/commands/build.d.ts +8 -0
  29. package/dist/cli/commands/build.d.ts.map +1 -1
  30. package/dist/cli/commands/build.js +9 -8
  31. package/dist/cli/commands/check-lexicon-docs.d.ts.map +1 -1
  32. package/dist/cli/commands/check-lexicon-docs.js +30 -2
  33. package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
  34. package/dist/cli/commands/check-lexicon.js +13 -2
  35. package/dist/cli/commands/init-lexicon/templates/docs.d.ts +4 -1
  36. package/dist/cli/commands/init-lexicon/templates/docs.d.ts.map +1 -1
  37. package/dist/cli/commands/init-lexicon/templates/docs.js +6 -6
  38. package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
  39. package/dist/cli/commands/init-lexicon.js +17 -8
  40. package/dist/cli/handlers/approve.d.ts.map +1 -1
  41. package/dist/cli/handlers/approve.js +19 -4
  42. package/dist/cli/handlers/build.d.ts.map +1 -1
  43. package/dist/cli/handlers/build.js +28 -0
  44. package/dist/cli/handlers/change-set.d.ts +10 -0
  45. package/dist/cli/handlers/change-set.d.ts.map +1 -1
  46. package/dist/cli/handlers/change-set.js +51 -1
  47. package/dist/cli/handlers/fan-out.d.ts +1 -1
  48. package/dist/cli/handlers/fan-out.d.ts.map +1 -1
  49. package/dist/cli/handlers/fan-out.js +14 -3
  50. package/dist/cli/handlers/pr.d.ts +8 -2
  51. package/dist/cli/handlers/pr.d.ts.map +1 -1
  52. package/dist/cli/handlers/pr.js +148 -24
  53. package/dist/cli/handlers/promote.d.ts.map +1 -1
  54. package/dist/cli/handlers/promote.js +256 -21
  55. package/dist/cli/handlers/release.d.ts +34 -0
  56. package/dist/cli/handlers/release.d.ts.map +1 -0
  57. package/dist/cli/handlers/release.js +203 -0
  58. package/dist/cli/handlers/run.d.ts +28 -2
  59. package/dist/cli/handlers/run.d.ts.map +1 -1
  60. package/dist/cli/handlers/run.js +170 -13
  61. package/dist/cli/main.d.ts.map +1 -1
  62. package/dist/cli/main.js +88 -13
  63. package/dist/cli/mcp/workspace-tools.js +1 -1
  64. package/dist/cli/parse-args.d.ts.map +1 -1
  65. package/dist/cli/parse-args.js +49 -3
  66. package/dist/cli/registry.d.ts +29 -3
  67. package/dist/cli/registry.d.ts.map +1 -1
  68. package/dist/cli/run-events.d.ts +29 -0
  69. package/dist/cli/run-events.d.ts.map +1 -0
  70. package/dist/cli/run-events.js +47 -0
  71. package/dist/cli/version.d.ts +3 -5
  72. package/dist/cli/version.d.ts.map +1 -1
  73. package/dist/cli/version.js +3 -13
  74. package/dist/codegen/docs-in-site.d.ts +71 -0
  75. package/dist/codegen/docs-in-site.d.ts.map +1 -0
  76. package/dist/codegen/docs-in-site.js +177 -0
  77. package/dist/codegen/docs-types.d.ts +14 -1
  78. package/dist/codegen/docs-types.d.ts.map +1 -1
  79. package/dist/codegen/docs.d.ts +18 -1
  80. package/dist/codegen/docs.d.ts.map +1 -1
  81. package/dist/codegen/docs.js +40 -7
  82. package/dist/codegen/rehype-base-url.mjs +15 -9
  83. package/dist/components/auto-release.d.ts +4 -1
  84. package/dist/components/auto-release.d.ts.map +1 -1
  85. package/dist/components/auto-release.js +2 -0
  86. package/dist/components/cli-support.d.ts +6 -0
  87. package/dist/components/cli-support.d.ts.map +1 -1
  88. package/dist/components/cli-support.js +10 -9
  89. package/dist/components/driver.d.ts +42 -9
  90. package/dist/components/driver.d.ts.map +1 -1
  91. package/dist/components/driver.js +81 -54
  92. package/dist/components/fan-out-run.d.ts +7 -0
  93. package/dist/components/fan-out-run.d.ts.map +1 -1
  94. package/dist/components/fan-out-run.js +35 -26
  95. package/dist/components/pr-run.d.ts +11 -0
  96. package/dist/components/pr-run.d.ts.map +1 -1
  97. package/dist/components/pr-run.js +20 -1
  98. package/dist/components/promote-order.d.ts +38 -0
  99. package/dist/components/promote-order.d.ts.map +1 -0
  100. package/dist/components/promote-order.js +62 -0
  101. package/dist/components/promote.d.ts +15 -2
  102. package/dist/components/promote.d.ts.map +1 -1
  103. package/dist/components/promote.js +17 -0
  104. package/dist/components/release-compile.d.ts +133 -0
  105. package/dist/components/release-compile.d.ts.map +1 -0
  106. package/dist/components/release-compile.js +376 -0
  107. package/dist/components/release-gate.d.ts +125 -0
  108. package/dist/components/release-gate.d.ts.map +1 -0
  109. package/dist/components/release-gate.js +282 -0
  110. package/dist/components/release-promote.d.ts +96 -0
  111. package/dist/components/release-promote.d.ts.map +1 -0
  112. package/dist/components/release-promote.js +204 -0
  113. package/dist/components/run-progress.d.ts +7 -0
  114. package/dist/components/run-progress.d.ts.map +1 -1
  115. package/dist/components/wave-plan.d.ts +3 -1
  116. package/dist/components/wave-plan.d.ts.map +1 -1
  117. package/dist/components/wave-plan.js +1 -1
  118. package/dist/config.d.ts +7 -0
  119. package/dist/config.d.ts.map +1 -1
  120. package/dist/config.js +1 -0
  121. package/dist/index.d.ts +1 -0
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +2 -0
  124. package/dist/lifecycle/change-set-store.d.ts +67 -0
  125. package/dist/lifecycle/change-set-store.d.ts.map +1 -0
  126. package/dist/lifecycle/change-set-store.js +96 -0
  127. package/dist/lifecycle/commit-sha.d.ts +13 -0
  128. package/dist/lifecycle/commit-sha.d.ts.map +1 -0
  129. package/dist/lifecycle/commit-sha.js +21 -0
  130. package/dist/lifecycle/gate-change-set.d.ts +69 -0
  131. package/dist/lifecycle/gate-change-set.d.ts.map +1 -0
  132. package/dist/lifecycle/gate-change-set.js +106 -0
  133. package/dist/lifecycle/gate-ledger.d.ts +49 -1
  134. package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
  135. package/dist/lifecycle/gate-ledger.js +18 -0
  136. package/dist/lifecycle/release-cut.d.ts +107 -0
  137. package/dist/lifecycle/release-cut.d.ts.map +1 -0
  138. package/dist/lifecycle/release-cut.js +273 -0
  139. package/dist/lifecycle/release-ledger.d.ts +54 -0
  140. package/dist/lifecycle/release-ledger.d.ts.map +1 -1
  141. package/dist/lifecycle/release-ledger.js +53 -20
  142. package/dist/lifecycle/release-store.d.ts +190 -0
  143. package/dist/lifecycle/release-store.d.ts.map +1 -0
  144. package/dist/lifecycle/release-store.js +318 -0
  145. package/dist/lifecycle/run-ledger.d.ts +4 -0
  146. package/dist/lifecycle/run-ledger.d.ts.map +1 -1
  147. package/dist/lifecycle/run-ledger.js +2 -0
  148. package/dist/op/activities/change-coverage.d.ts.map +1 -1
  149. package/dist/op/activities/change-coverage.js +4 -2
  150. package/dist/op/activities/source-release.d.ts.map +1 -1
  151. package/dist/op/activities/source-release.js +7 -3
  152. package/dist/op/activities/source-rollback.d.ts.map +1 -1
  153. package/dist/op/activities/source-rollback.js +7 -3
  154. package/dist/op/activity-registry.d.ts +6 -3
  155. package/dist/op/activity-registry.d.ts.map +1 -1
  156. package/dist/op/activity-registry.js +7 -5
  157. package/dist/op/discover.d.ts.map +1 -1
  158. package/dist/op/discover.js +14 -7
  159. package/dist/op/gate-name.d.ts +11 -2
  160. package/dist/op/gate-name.d.ts.map +1 -1
  161. package/dist/op/gate-name.js +12 -3
  162. package/dist/op/gate-run-locator.d.ts +22 -0
  163. package/dist/op/gate-run-locator.d.ts.map +1 -1
  164. package/dist/op/gate-run-locator.js +31 -0
  165. package/dist/op/gate.d.ts +27 -3
  166. package/dist/op/gate.d.ts.map +1 -1
  167. package/dist/op/gate.js +57 -3
  168. package/dist/op/local-executor.d.ts +36 -1
  169. package/dist/op/local-executor.d.ts.map +1 -1
  170. package/dist/op/local-executor.js +158 -52
  171. package/dist/op/op-waves-run.d.ts.map +1 -1
  172. package/dist/op/op-waves-run.js +4 -0
  173. package/dist/op/run-live.d.ts +2 -0
  174. package/dist/op/run-live.d.ts.map +1 -1
  175. package/dist/op/run-live.js +1 -1
  176. package/dist/op/runtime.d.ts +46 -0
  177. package/dist/op/runtime.d.ts.map +1 -1
  178. package/dist/op/runtimes/local.d.ts.map +1 -1
  179. package/dist/op/runtimes/local.js +12 -2
  180. package/dist/point-decision.d.ts +2 -0
  181. package/dist/point-decision.d.ts.map +1 -1
  182. package/dist/point-decision.js +9 -2
  183. package/dist/run-event-store.d.ts +77 -0
  184. package/dist/run-event-store.d.ts.map +1 -0
  185. package/dist/run-event-store.js +204 -0
  186. package/dist/run-event-stream.d.ts +132 -0
  187. package/dist/run-event-stream.d.ts.map +1 -0
  188. package/dist/run-event-stream.js +238 -0
  189. package/dist/run-event.d.ts +267 -0
  190. package/dist/run-event.d.ts.map +1 -0
  191. package/dist/run-event.js +207 -0
  192. package/dist/wave-runtime.mjs +225 -242
  193. package/dist/workspace/__fixtures__/run-event-check.d.ts +19 -0
  194. package/dist/workspace/__fixtures__/run-event-check.d.ts.map +1 -0
  195. package/dist/workspace/__fixtures__/run-event-check.js +59 -0
  196. package/dist/workspace/change-set-show.d.ts +56 -0
  197. package/dist/workspace/change-set-show.d.ts.map +1 -0
  198. package/dist/workspace/change-set-show.js +54 -0
  199. package/dist/workspace/change-set-show.schema.json +102 -0
  200. package/dist/workspace/change-set.schema.json +28 -1
  201. package/dist/workspace/changes-cli.d.ts.map +1 -1
  202. package/dist/workspace/changes-cli.js +10 -1
  203. package/dist/workspace/changes.d.ts +37 -0
  204. package/dist/workspace/changes.d.ts.map +1 -1
  205. package/dist/workspace/changes.js +49 -2
  206. package/dist/workspace/changes.schema.json +135 -0
  207. package/dist/workspace/ci-green-cli.d.ts +19 -4
  208. package/dist/workspace/ci-green-cli.d.ts.map +1 -1
  209. package/dist/workspace/ci-green-cli.js +75 -12
  210. package/dist/workspace/ci-green-forge.d.ts +20 -3
  211. package/dist/workspace/ci-green-forge.d.ts.map +1 -1
  212. package/dist/workspace/ci-green-forge.js +6 -4
  213. package/dist/workspace/ci-green-workflow.d.ts +11 -0
  214. package/dist/workspace/ci-green-workflow.d.ts.map +1 -1
  215. package/dist/workspace/ci-green-workflow.js +6 -0
  216. package/dist/workspace/ci-green.d.ts +273 -13
  217. package/dist/workspace/ci-green.d.ts.map +1 -1
  218. package/dist/workspace/ci-green.js +449 -38
  219. package/dist/workspace/ci-last-green.schema.json +32 -2
  220. package/dist/workspace/ci-list.schema.json +525 -0
  221. package/dist/workspace/commit-links.d.ts +85 -0
  222. package/dist/workspace/commit-links.d.ts.map +1 -0
  223. package/dist/workspace/commit-links.js +163 -0
  224. package/dist/workspace/declaration.d.ts +19 -0
  225. package/dist/workspace/declaration.d.ts.map +1 -1
  226. package/dist/workspace/declaration.js +1 -1
  227. package/dist/workspace/declaration.schema.json +12 -0
  228. package/dist/workspace/identity-gate-rule.d.ts +37 -0
  229. package/dist/workspace/identity-gate-rule.d.ts.map +1 -1
  230. package/dist/workspace/identity-gate-rule.js +72 -7
  231. package/dist/workspace/identity.d.ts +12 -0
  232. package/dist/workspace/identity.d.ts.map +1 -1
  233. package/dist/workspace/identity.js +13 -1
  234. package/dist/workspace/intent.d.ts +6 -1
  235. package/dist/workspace/intent.d.ts.map +1 -1
  236. package/dist/workspace/intent.js +51 -1
  237. package/dist/workspace/ls.d.ts +4 -0
  238. package/dist/workspace/ls.d.ts.map +1 -1
  239. package/dist/workspace/ls.js +2 -0
  240. package/dist/workspace/ls.schema.json +3 -1
  241. package/dist/workspace/member-pipeline.d.ts +6 -0
  242. package/dist/workspace/member-pipeline.d.ts.map +1 -1
  243. package/dist/workspace/member-pipeline.js +6 -0
  244. package/dist/workspace/promotion-order.d.ts +41 -0
  245. package/dist/workspace/promotion-order.d.ts.map +1 -0
  246. package/dist/workspace/promotion-order.js +95 -0
  247. package/dist/workspace/reason-codes.d.ts +2 -0
  248. package/dist/workspace/reason-codes.d.ts.map +1 -1
  249. package/dist/workspace/reason-codes.js +4 -1
  250. package/dist/workspace/releases.d.ts +72 -0
  251. package/dist/workspace/releases.d.ts.map +1 -0
  252. package/dist/workspace/releases.js +94 -0
  253. package/dist/workspace/releases.schema.json +391 -0
  254. package/dist/workspace/run-event.schema.json +288 -0
  255. package/dist/workspace/status-gates.d.ts +26 -1
  256. package/dist/workspace/status-gates.d.ts.map +1 -1
  257. package/dist/workspace/status-gates.js +31 -2
  258. package/dist/workspace/status-stewards.d.ts +4 -0
  259. package/dist/workspace/status-stewards.d.ts.map +1 -1
  260. package/dist/workspace/status-stewards.js +2 -0
  261. package/dist/workspace/status.d.ts +39 -0
  262. package/dist/workspace/status.d.ts.map +1 -1
  263. package/dist/workspace/status.js +48 -1
  264. package/dist/workspace/status.schema.json +70 -1
  265. package/dist/workspace/trust/ci-tag-statement.d.ts +102 -0
  266. package/dist/workspace/trust/ci-tag-statement.d.ts.map +1 -0
  267. package/dist/workspace/trust/ci-tag-statement.js +123 -0
  268. package/dist/workspace/trust/op-run-statement.d.ts +91 -0
  269. package/dist/workspace/trust/op-run-statement.d.ts.map +1 -0
  270. package/dist/workspace/trust/op-run-statement.js +143 -0
  271. package/dist/workspace/trust/rotation.d.ts +18 -2
  272. package/dist/workspace/trust/rotation.d.ts.map +1 -1
  273. package/dist/workspace/trust/rotation.js +65 -16
  274. package/dist/workspace/trust/seal.d.ts +11 -0
  275. package/dist/workspace/trust/seal.d.ts.map +1 -1
  276. package/dist/workspace/trust/seal.js +9 -0
  277. package/dist/workspace/trust/ssh-commit.d.ts.map +1 -1
  278. package/dist/workspace/trust/ssh-commit.js +10 -10
  279. package/package.json +1 -1
  280. package/src/__golden__/wave-loop/fan-out-gated.json +8 -0
  281. package/src/__golden__/wave-loop/fan-out-no-members.json +4 -0
  282. package/src/__golden__/wave-loop/fan-out-only.json +6 -0
  283. package/src/__golden__/wave-loop/op-by-apply-hold.json +2 -0
  284. package/src/__golden__/wave-loop/op-cost-member.json +3 -0
  285. package/src/__golden__/wave-loop/op-held-on-before-apply.json +1 -0
  286. package/src/__golden__/wave-loop/op-held-on.json +2 -0
  287. package/src/__golden__/wave-loop/op-hooks-held.json +2 -0
  288. package/src/__golden__/wave-loop/op-hooks-hold-before-apply.json +2 -0
  289. package/src/__golden__/wave-loop/op-hooks-refused-at-base.json +3 -0
  290. package/src/__golden__/wave-loop/op-hooks-share.json +3 -0
  291. package/src/__golden__/wave-loop/op-per-run.json +7 -0
  292. package/src/__golden__/wave-loop/op-pr-review.json +7 -0
  293. package/src/__golden__/wave-loop/op-sealed.json +3 -0
  294. package/src/__golden__/wave-loop/op-spend.json +3 -0
  295. package/src/__golden__/wave-loop/op-wave-commands.json +7 -0
  296. package/src/__golden__/wave-loop/op-wide-waiting.json +4 -0
  297. package/src/change-set-graph.test.ts +72 -0
  298. package/src/change-set-graph.ts +133 -0
  299. package/src/change-set.ts +76 -6
  300. package/src/chant-version.ts +16 -0
  301. package/src/cli/commands/build.ts +19 -8
  302. package/src/cli/commands/check-lexicon-docs.test.ts +51 -0
  303. package/src/cli/commands/check-lexicon-docs.ts +39 -2
  304. package/src/cli/commands/check-lexicon.ts +14 -2
  305. package/src/cli/commands/init-lexicon/templates/docs.ts +7 -6
  306. package/src/cli/commands/init-lexicon.test.ts +25 -0
  307. package/src/cli/commands/init-lexicon.ts +18 -8
  308. package/src/cli/compiled-cli.e2e.test.ts +31 -6
  309. package/src/cli/handlers/approve-release.test.ts +80 -0
  310. package/src/cli/handlers/approve.ts +18 -2
  311. package/src/cli/handlers/build.test.ts +52 -0
  312. package/src/cli/handlers/build.ts +29 -0
  313. package/src/cli/handlers/change-set.ts +49 -1
  314. package/src/cli/handlers/fan-out.test.ts +48 -0
  315. package/src/cli/handlers/fan-out.ts +15 -3
  316. package/src/cli/handlers/operator.test.ts +37 -0
  317. package/src/cli/handlers/pr.test.ts +194 -0
  318. package/src/cli/handlers/pr.ts +168 -34
  319. package/src/cli/handlers/promote.test.ts +389 -5
  320. package/src/cli/handlers/promote.ts +279 -20
  321. package/src/cli/handlers/release-implicit.e2e.test.ts +153 -0
  322. package/src/cli/handlers/release.e2e.test.ts +85 -0
  323. package/src/cli/handlers/release.ts +206 -0
  324. package/src/cli/handlers/run-auto-release.test.ts +71 -0
  325. package/src/cli/handlers/run-events-cmd.test.ts +92 -0
  326. package/src/cli/handlers/run.test.ts +30 -0
  327. package/src/cli/handlers/run.ts +176 -15
  328. package/src/cli/main.test.ts +7 -0
  329. package/src/cli/main.ts +88 -13
  330. package/src/cli/mcp/never-over-mcp.test.ts +2 -0
  331. package/src/cli/mcp/workspace-tools.ts +1 -1
  332. package/src/cli/parse-args.ts +37 -3
  333. package/src/cli/registry.ts +29 -3
  334. package/src/cli/run-events.ts +54 -0
  335. package/src/cli/version.ts +3 -13
  336. package/src/codegen/docs-in-site.test.ts +166 -0
  337. package/src/codegen/docs-in-site.ts +182 -0
  338. package/src/codegen/docs-site/AgentPrompt.astro +26 -1
  339. package/src/codegen/docs-types.ts +14 -1
  340. package/src/codegen/docs.ts +60 -7
  341. package/src/codegen/rehype-base-url.d.mts +3 -1
  342. package/src/codegen/rehype-base-url.mjs +15 -9
  343. package/src/codegen/rehype-base-url.test.ts +34 -0
  344. package/src/components/auto-release.test.ts +21 -0
  345. package/src/components/auto-release.ts +6 -1
  346. package/src/components/cli-support.test.ts +82 -0
  347. package/src/components/cli-support.ts +16 -9
  348. package/src/components/driver.ts +129 -56
  349. package/src/components/fan-out-run.ts +56 -35
  350. package/src/components/pr-run.ts +30 -1
  351. package/src/components/promote-order.test.ts +90 -0
  352. package/src/components/promote-order.ts +75 -0
  353. package/src/components/promote.test.ts +10 -1
  354. package/src/components/promote.ts +26 -1
  355. package/src/components/release-compile.test.ts +147 -0
  356. package/src/components/release-compile.ts +445 -0
  357. package/src/components/release-gate.test.ts +215 -0
  358. package/src/components/release-gate.ts +341 -0
  359. package/src/components/release-promote.test.ts +159 -0
  360. package/src/components/release-promote.ts +232 -0
  361. package/src/components/run-progress.ts +7 -0
  362. package/src/components/wave-plan.ts +1 -1
  363. package/src/config.ts +7 -1
  364. package/src/index.ts +2 -0
  365. package/src/lifecycle/change-set-store.test.ts +217 -0
  366. package/src/lifecycle/change-set-store.ts +112 -0
  367. package/src/lifecycle/commit-sha.ts +23 -0
  368. package/src/lifecycle/gate-change-set.e2e.test.ts +122 -0
  369. package/src/lifecycle/gate-change-set.ts +133 -0
  370. package/src/lifecycle/gate-ledger.test.ts +33 -0
  371. package/src/lifecycle/gate-ledger.ts +66 -1
  372. package/src/lifecycle/release-cut-signed.test.ts +180 -0
  373. package/src/lifecycle/release-cut.test.ts +411 -0
  374. package/src/lifecycle/release-cut.ts +367 -0
  375. package/src/lifecycle/release-ledger.test.ts +14 -0
  376. package/src/lifecycle/release-ledger.ts +85 -17
  377. package/src/lifecycle/release-store.ts +423 -0
  378. package/src/lifecycle/run-ledger.test.ts +10 -0
  379. package/src/lifecycle/run-ledger.ts +6 -0
  380. package/src/op/activities/change-coverage.ts +4 -1
  381. package/src/op/activities/source-release.ts +8 -3
  382. package/src/op/activities/source-rollback.ts +8 -4
  383. package/src/op/activity-registry.ts +7 -5
  384. package/src/op/commit-run-gate-deploy-join.test.ts +117 -0
  385. package/src/op/discover-root.test.ts +39 -0
  386. package/src/op/discover.ts +15 -8
  387. package/src/op/gate-name.ts +13 -3
  388. package/src/op/gate-release.test.ts +126 -0
  389. package/src/op/gate-run-locator.test.ts +110 -0
  390. package/src/op/gate-run-locator.ts +35 -0
  391. package/src/op/gate.ts +88 -6
  392. package/src/op/local-executor.ts +207 -52
  393. package/src/op/op-waves-run.ts +4 -0
  394. package/src/op/run-events.test.ts +166 -0
  395. package/src/op/run-live.ts +1 -1
  396. package/src/op/runtime.ts +39 -0
  397. package/src/op/runtimes/local.test.ts +16 -0
  398. package/src/op/runtimes/local.ts +13 -2
  399. package/src/point-decision.ts +12 -2
  400. package/src/run-event-store.test.ts +144 -0
  401. package/src/run-event-store.ts +213 -0
  402. package/src/run-event-stream.test.ts +175 -0
  403. package/src/run-event-stream.ts +306 -0
  404. package/src/run-event.test.ts +277 -0
  405. package/src/run-event.ts +451 -0
  406. package/src/wave-loop-golden.test.ts +9 -0
  407. package/src/workspace/__fixtures__/run-event-check.ts +58 -0
  408. package/src/workspace/ancestry-index.test.ts +93 -0
  409. package/src/workspace/change-set-show.schema.json +102 -0
  410. package/src/workspace/change-set-show.ts +72 -0
  411. package/src/workspace/change-set.schema.json +28 -1
  412. package/src/workspace/changes-cli.ts +10 -1
  413. package/src/workspace/changes.schema.json +135 -0
  414. package/src/workspace/changes.test.ts +1 -1
  415. package/src/workspace/changes.ts +84 -2
  416. package/src/workspace/ci-green-cli.ts +75 -13
  417. package/src/workspace/ci-green-forge.ts +24 -4
  418. package/src/workspace/ci-green-runs.test.ts +242 -0
  419. package/src/workspace/ci-green-signed.test.ts +302 -0
  420. package/src/workspace/ci-green-workflow.test.ts +16 -0
  421. package/src/workspace/ci-green-workflow.ts +12 -0
  422. package/src/workspace/ci-green.test.ts +131 -2
  423. package/src/workspace/ci-green.ts +624 -42
  424. package/src/workspace/ci-last-green.schema.json +32 -2
  425. package/src/workspace/ci-list.schema.json +525 -0
  426. package/src/workspace/commit-links.test.ts +279 -0
  427. package/src/workspace/commit-links.ts +183 -0
  428. package/src/workspace/declaration.schema.json +12 -0
  429. package/src/workspace/declaration.ts +22 -2
  430. package/src/workspace/identity-gate-rule.ts +91 -7
  431. package/src/workspace/identity.ts +14 -1
  432. package/src/workspace/intent.ts +48 -1
  433. package/src/workspace/ls.schema.json +3 -1
  434. package/src/workspace/ls.ts +6 -0
  435. package/src/workspace/member-pipeline.test.ts +17 -0
  436. package/src/workspace/member-pipeline.ts +9 -0
  437. package/src/workspace/promotion-order.ts +97 -0
  438. package/src/workspace/read-contract.e2e.test.ts +4 -1
  439. package/src/workspace/reason-codes.test.ts +2 -1
  440. package/src/workspace/reason-codes.ts +4 -1
  441. package/src/workspace/releases.schema.json +391 -0
  442. package/src/workspace/releases.test.ts +108 -0
  443. package/src/workspace/releases.ts +122 -0
  444. package/src/workspace/run-event.schema.json +288 -0
  445. package/src/workspace/status-contract.test.ts +52 -1
  446. package/src/workspace/status-gates.ts +56 -1
  447. package/src/workspace/status-stewards.ts +6 -0
  448. package/src/workspace/status.schema.json +70 -1
  449. package/src/workspace/status.ts +80 -1
  450. package/src/workspace/trust/ci-tag-statement.ts +151 -0
  451. package/src/workspace/trust/op-run-statement.ts +148 -0
  452. package/src/workspace/trust/rotation.ts +61 -14
  453. package/src/workspace/trust/seal.ts +10 -0
  454. package/src/workspace/trust/ssh-commit.ts +10 -9
  455. package/src/cli/commands/__fixtures__/init-lexicon-output/docs/astro.config.mjs +0 -14
  456. package/src/cli/commands/__fixtures__/init-lexicon-output/docs/package.json +0 -16
  457. package/src/cli/commands/__fixtures__/init-lexicon-output/docs/src/content/docs/index.mdx +0 -8
  458. package/src/cli/commands/__fixtures__/init-lexicon-output/docs/src/content.config.ts +0 -15
  459. package/src/cli/commands/__fixtures__/init-lexicon-output/docs/tsconfig.json +0 -10
package/dist/config.d.ts CHANGED
@@ -17,10 +17,16 @@ import { type DecideConfig } from "./op/decide-config.js";
17
17
  * silently querying real AWS. See {@link environmentName}, {@link
18
18
  * environmentNames}, {@link environmentEndpoint} below, and
19
19
  * `./live-endpoint.ts`'s `applyLiveEndpoint`, the CLI-side consumer.
20
+ *
21
+ * The array's order is the member's promotion order (#4030, see
22
+ * `./workspace/promotion-order.ts`), and `canary: true` marks a step as the
23
+ * canary step of that order. The canary is declared and surfaced; chant does
24
+ * not yet act on it.
20
25
  */
21
26
  export type EnvironmentDeclaration = string | {
22
27
  name: string;
23
28
  endpoint?: string;
29
+ canary?: boolean;
24
30
  };
25
31
  /**
26
32
  * `ownership.env`: a literal environment identity, or a reference to a
@@ -85,6 +91,7 @@ export declare const ChantConfigSchema: z.ZodObject<{
85
91
  environments: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
86
92
  name: z.ZodString;
87
93
  endpoint: z.ZodOptional<z.ZodString>;
94
+ canary: z.ZodOptional<z.ZodBoolean>;
88
95
  }, z.core.$strip>]>>>;
89
96
  sourceDir: z.ZodOptional<z.ZodString>;
90
97
  lint: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,mCAAmC,CAAC;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ACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,uBAAuB,CAanF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAiB1E;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAEpF;AAED;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IACnB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM;IAAlD,YAAY,OAAO,EAAE,MAAM,EAAW,GAAG,CAAC,EAAE,MAAM,YAAA,EAEjD;CACF"}
package/dist/config.js CHANGED
@@ -94,6 +94,7 @@ const EnvironmentEntrySchema = z.union([
94
94
  z.object({
95
95
  name: z.string().min(1),
96
96
  endpoint: z.string().min(1).optional(),
97
+ canary: z.boolean().optional(),
97
98
  }),
98
99
  ]);
99
100
  const LexiconEntrySchema = z.union([
package/dist/index.d.ts CHANGED
@@ -94,6 +94,7 @@ export type { SymbolDeclaration, SymbolResolver } from "./workspace/symbols.js";
94
94
  export * from "./lsp/lexicon-providers.js";
95
95
  export * from "./mcp/types.js";
96
96
  export * from "./lifecycle/index.js";
97
+ export * from "./run-event.js";
97
98
  export { Op, phase, activity, gate, kubectlApply, helmInstall, waitForStack, gitlabPipeline, lifecycleSnapshot, shell, teardown, OpResource } from "./op/index.js";
98
99
  export type { OpConfig, PhaseDefinition, StepDefinition, ActivityStep, GateStep } from "./op/index.js";
99
100
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA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AAkB,EAClB,sBAAsB,EACtB,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,GACtB,MAAM,0BAA0B,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7E,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAElC,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAClE,cAAc,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC5F,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -114,5 +114,7 @@ export * from "./lsp/types.js";
114
114
  export * from "./lsp/lexicon-providers.js";
115
115
  export * from "./mcp/types.js";
116
116
  export * from "./lifecycle/index.js";
117
+ // The run-event contract (#4019): the types and the one writer of a run's stream.
118
+ export * from "./run-event.js";
117
119
  // Op builders — use explicit exports to avoid collision with the core `build` function
118
120
  export { Op, phase, activity, gate, kubectlApply, helmInstall, waitForStack, gitlabPipeline, lifecycleSnapshot, shell, teardown, OpResource } from "./op/index.js";
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Stored change sets (#4022): each change-set document a gate binds, kept on
3
+ * `chant/lifecycle` under its digest so the plan an approval bound can be read
4
+ * once the run that planned it is gone.
5
+ *
6
+ * A pull-request gate, a release gate and an `empty` resolution (ws-104
7
+ * question 2 and 6) bind the change-set document's `digest`
8
+ * (`../change-set.ts`) in `planDigest`. Only that value reaches the gate
9
+ * ledger, so this store keeps the document beside it:
10
+ *
11
+ * _change-sets/<digest>.json the document, written once and never rewritten
12
+ *
13
+ * `:` is written as `_` in the file name, as `_plans/`, `_builds/` and
14
+ * `_releases/` do. A workspace member's copy sits under
15
+ * `_members/<member>/_change-sets/` through the same `ledgerDir` prefix the
16
+ * gate ledger uses, so a gate and its change set are read from one member.
17
+ *
18
+ * The stored document is the one the gate bound, with each entry's graph
19
+ * `node` (`../change-set-graph.ts`) and the `graph` it came from. Neither is
20
+ * hashed, so the stored document still verifies against its digest. A
21
+ * component gate in a plain `run --components` binds a lifecycle-plan digest
22
+ * and stores nothing here.
23
+ *
24
+ * How long a stored change set is kept is #4036's retention policy.
25
+ */
26
+ import { type ChangeSetDocument } from "../change-set.js";
27
+ import { type LedgerLocation } from "./git.js";
28
+ /** The directory on `chant/lifecycle` that holds stored change sets. */
29
+ export declare const CHANGE_SETS_DIR = "_change-sets";
30
+ /** The file a change set with `digest` is stored in, inside {@link CHANGE_SETS_DIR}. */
31
+ export declare function changeSetFile(digest: string): string;
32
+ /** Thrown when a document can't be stored: it is not a change-set document, or its content does not hash to its digest. */
33
+ export declare class ChangeSetStoreError extends Error {
34
+ constructor(message: string);
35
+ }
36
+ /**
37
+ * Store a change-set document under its digest. A document already stored
38
+ * under the digest is never rewritten. Refuses a document whose content does
39
+ * not hash to its own `digest`. Does not push: call `pushLifecycleReport`
40
+ * (./git.ts) after, or let the gate's own pending fact push it.
41
+ */
42
+ export declare function persistChangeSet(doc: ChangeSetDocument, opts?: {
43
+ cwd?: string;
44
+ }): Promise<{
45
+ commit: string | null;
46
+ written: boolean;
47
+ }>;
48
+ /** What reading one stored change set found. */
49
+ export type StoredChangeSetRead = {
50
+ status: "found";
51
+ document: ChangeSetDocument;
52
+ } | {
53
+ status: "missing";
54
+ }
55
+ /** A file is stored under the digest, and it is not a change-set document whose content hashes to that digest. */
56
+ | {
57
+ status: "malformed";
58
+ message: string;
59
+ };
60
+ /** Parse a stored file, checking it is the document `digest` names. */
61
+ export declare function parseStoredChangeSet(text: string, digest: string): StoredChangeSetRead;
62
+ /**
63
+ * Read the change set stored under `digest`. Reads the local `chant/lifecycle`
64
+ * branch and never fetches. Throws only when git itself fails.
65
+ */
66
+ export declare function readStoredChangeSet(digest: string, opts?: LedgerLocation): Promise<StoredChangeSetRead>;
67
+ //# sourceMappingURL=change-set-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-set-store.d.ts","sourceRoot":"","sources":["../../src/lifecycle/change-set-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAoE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACzH,OAAO,EAAmF,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAE7H,wEAAwE;AACxE,eAAO,MAAM,eAAe,iBAAiB,CAAC;AAE9C,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,2HAA2H;AAC3H,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,iBAAiB,EACtB,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACtB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAsBtD;AAED,gDAAgD;AAChD,MAAM,MAAM,mBAAmB,GAC3B;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,iBAAiB,CAAA;CAAE,GAChD;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE;AACvB,kHAAkH;GAChH;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7C,uEAAuE;AACvE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,mBAAmB,CActF;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAI7G"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Stored change sets (#4022): each change-set document a gate binds, kept on
3
+ * `chant/lifecycle` under its digest so the plan an approval bound can be read
4
+ * once the run that planned it is gone.
5
+ *
6
+ * A pull-request gate, a release gate and an `empty` resolution (ws-104
7
+ * question 2 and 6) bind the change-set document's `digest`
8
+ * (`../change-set.ts`) in `planDigest`. Only that value reaches the gate
9
+ * ledger, so this store keeps the document beside it:
10
+ *
11
+ * _change-sets/<digest>.json the document, written once and never rewritten
12
+ *
13
+ * `:` is written as `_` in the file name, as `_plans/`, `_builds/` and
14
+ * `_releases/` do. A workspace member's copy sits under
15
+ * `_members/<member>/_change-sets/` through the same `ledgerDir` prefix the
16
+ * gate ledger uses, so a gate and its change set are read from one member.
17
+ *
18
+ * The stored document is the one the gate bound, with each entry's graph
19
+ * `node` (`../change-set-graph.ts`) and the `graph` it came from. Neither is
20
+ * hashed, so the stored document still verifies against its digest. A
21
+ * component gate in a plain `run --components` binds a lifecycle-plan digest
22
+ * and stores nothing here.
23
+ *
24
+ * How long a stored change set is kept is #4036's retention policy.
25
+ */
26
+ import { sortedJsonReplacer } from "../utils.js";
27
+ import { CHANGE_SET_CONTRACT, CHANGE_SET_SCHEMA_ID, verifyChangeSetDigest } from "../change-set.js";
28
+ import { ledgerDir, readBlobFromPath, readPathSha, RefCASConflictError, writeLedgerFiles } from "./git.js";
29
+ /** The directory on `chant/lifecycle` that holds stored change sets. */
30
+ export const CHANGE_SETS_DIR = "_change-sets";
31
+ /** The file a change set with `digest` is stored in, inside {@link CHANGE_SETS_DIR}. */
32
+ export function changeSetFile(digest) {
33
+ return `${digest.replace(/:/g, "_")}.json`;
34
+ }
35
+ /** Thrown when a document can't be stored: it is not a change-set document, or its content does not hash to its digest. */
36
+ export class ChangeSetStoreError extends Error {
37
+ constructor(message) {
38
+ super(message);
39
+ this.name = "ChangeSetStoreError";
40
+ }
41
+ }
42
+ /**
43
+ * Store a change-set document under its digest. A document already stored
44
+ * under the digest is never rewritten. Refuses a document whose content does
45
+ * not hash to its own `digest`. Does not push: call `pushLifecycleReport`
46
+ * (./git.ts) after, or let the gate's own pending fact push it.
47
+ */
48
+ export async function persistChangeSet(doc, opts) {
49
+ if (doc?.$schema !== CHANGE_SET_SCHEMA_ID || doc.contract !== CHANGE_SET_CONTRACT) {
50
+ throw new ChangeSetStoreError(`not a change-set document: its $schema is not ${CHANGE_SET_SCHEMA_ID} with contract ${CHANGE_SET_CONTRACT}`);
51
+ }
52
+ if (!verifyChangeSetDigest(doc)) {
53
+ throw new ChangeSetStoreError(`change set ${doc.digest} does not hash to its own digest; refusing to store it`);
54
+ }
55
+ const file = changeSetFile(doc.digest);
56
+ if ((await readPathSha(CHANGE_SETS_DIR, file, opts)) !== null)
57
+ return { commit: null, written: false };
58
+ const dir = await ledgerDir(CHANGE_SETS_DIR, opts);
59
+ try {
60
+ const commit = await writeLedgerFiles([{ path: `${dir}/${file}`, content: `${JSON.stringify(doc, sortedJsonReplacer)}\n`, expectPriorSha: null }], `Change set ${doc.digest}`, opts);
61
+ return { commit, written: true };
62
+ }
63
+ catch (err) {
64
+ // Another writer stored the same digest first; what is there is the same document.
65
+ if (err instanceof RefCASConflictError)
66
+ return { commit: null, written: false };
67
+ throw err;
68
+ }
69
+ }
70
+ /** Parse a stored file, checking it is the document `digest` names. */
71
+ export function parseStoredChangeSet(text, digest) {
72
+ let doc;
73
+ try {
74
+ doc = JSON.parse(text);
75
+ }
76
+ catch (err) {
77
+ return { status: "malformed", message: `the file stored under ${digest} is not JSON: ${err instanceof Error ? err.message : String(err)}` };
78
+ }
79
+ if (!doc || typeof doc !== "object" || doc.$schema !== CHANGE_SET_SCHEMA_ID || doc.contract !== CHANGE_SET_CONTRACT || !Array.isArray(doc.entries) || !Array.isArray(doc.members)) {
80
+ return { status: "malformed", message: `the file stored under ${digest} is not a change-set document` };
81
+ }
82
+ if (doc.digest !== digest || !verifyChangeSetDigest(doc)) {
83
+ return { status: "malformed", message: `the change set stored under ${digest} does not hash to that digest` };
84
+ }
85
+ return { status: "found", document: doc };
86
+ }
87
+ /**
88
+ * Read the change set stored under `digest`. Reads the local `chant/lifecycle`
89
+ * branch and never fetches. Throws only when git itself fails.
90
+ */
91
+ export async function readStoredChangeSet(digest, opts) {
92
+ const text = await readBlobFromPath(CHANGE_SETS_DIR, changeSetFile(digest), opts);
93
+ if (text === null)
94
+ return { status: "missing" };
95
+ return parseStoredChangeSet(text, digest);
96
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The commit a run, a gate or a deploy is for (#4020), as one answer for every
3
+ * record that carries it. The checkout's `HEAD` is what the process builds
4
+ * from, so it comes first; a CI job whose checkout has no git (a bare
5
+ * artifact job) falls back to the commit the forge says it started for.
6
+ * Undefined when neither is known, so a record leaves the field out rather
7
+ * than guessing.
8
+ */
9
+ export declare function resolveCommitSha(opts?: {
10
+ cwd?: string;
11
+ env?: Record<string, string | undefined>;
12
+ }): Promise<string | undefined>;
13
+ //# sourceMappingURL=commit-sha.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commit-sha.d.ts","sourceRoot":"","sources":["../../src/lifecycle/commit-sha.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,wBAAsB,gBAAgB,CACpC,IAAI,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CAAO,GACpE,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAQ7B"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The commit a run, a gate or a deploy is for (#4020), as one answer for every
3
+ * record that carries it. The checkout's `HEAD` is what the process builds
4
+ * from, so it comes first; a CI job whose checkout has no git (a bare
5
+ * artifact job) falls back to the commit the forge says it started for.
6
+ * Undefined when neither is known, so a record leaves the field out rather
7
+ * than guessing.
8
+ */
9
+ import { ciCommitFromEnv } from "../op/gate-run-locator.js";
10
+ import { getHeadCommit } from "./git.js";
11
+ export async function resolveCommitSha(opts = {}) {
12
+ try {
13
+ const head = await getHeadCommit(opts.cwd ? { cwd: opts.cwd } : undefined);
14
+ if (/^[0-9a-f]{40,64}$/.test(head))
15
+ return head;
16
+ }
17
+ catch {
18
+ // Not a checkout, or no git on the path: the environment may still say.
19
+ }
20
+ return ciCommitFromEnv(opts.env);
21
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Store the change set a gate binds (#4022), mapped onto the member's graph.
3
+ *
4
+ * {@link storeGateChangeSet} is what a gate that binds a change-set document's
5
+ * digest calls before it decides the gate: `components pr-apply`, and
6
+ * `components promote --release` before it decides a release gate or writes
7
+ * an `empty` resolution (#4045). It reads the member's
8
+ * graph the way `chant workspace graph` reads it, from the member's own
9
+ * `chant graph --format ir`, maps each entry onto a node
10
+ * (`../change-set-graph.ts`), and stores the document under its digest
11
+ * (`./change-set-store.ts`).
12
+ *
13
+ * The graph is read only when the digest is not stored yet. A graph that
14
+ * can't be read never stops the gate: the document is stored with `graph:
15
+ * null` and every `node` null, and the caller gets a warning to print.
16
+ */
17
+ import type { ChangeSetDocument, ChangeSetGraph } from "../change-set.js";
18
+ /** Reads the node ids of the graph of the project at `projectDir`. */
19
+ export type GraphIdReader = (projectDir: string) => Promise<{
20
+ ids: string[];
21
+ } | {
22
+ error: string;
23
+ }>;
24
+ /**
25
+ * The node ids of `chant graph --format ir` in `projectDir`, run under the
26
+ * chant that directory resolves (its own `node_modules/.bin/chant`, else this
27
+ * one), as `chant workspace graph` runs each member. `args` are passed after
28
+ * `graph --format ir`, such as the run's `--param` flags.
29
+ */
30
+ export declare function readGraphIds(projectDir: string, args?: readonly string[]): Promise<{
31
+ ids: string[];
32
+ } | {
33
+ error: string;
34
+ }>;
35
+ /**
36
+ * Replace how a gate reads the graph wherever the default is taken, such as
37
+ * in `components pr-apply`; `undefined` restores {@link readGraphIds}. For
38
+ * tests that drive a gate and read node ids in process, so they don't start a
39
+ * `chant graph` child process (`gate-change-set.e2e.test.ts` covers that one).
40
+ */
41
+ export declare function setGraphIdReader(reader: GraphIdReader | undefined): void;
42
+ /** The graph reader a gate uses: the one {@link setGraphIdReader} set, else {@link readGraphIds} with `args`. */
43
+ export declare function gateGraphReader(args?: readonly string[]): GraphIdReader;
44
+ export interface StoreGateChangeSetInput {
45
+ /** The document whose `digest` the gate binds. */
46
+ doc: ChangeSetDocument;
47
+ /** The member's directory: where the graph is read and whose ledger it is stored in. */
48
+ cwd: string;
49
+ /** The commit the document was planned at, recorded as the graph's `at`. */
50
+ at?: string | null;
51
+ /** How to read the graph. Defaults to {@link gateGraphReader}. */
52
+ readGraph?: GraphIdReader;
53
+ }
54
+ export interface StoreGateChangeSetResult {
55
+ digest: string;
56
+ /** True when this call wrote the document; false when it was stored already. */
57
+ written: boolean;
58
+ /** The graph the stored document's nodes come from, null when none could be read. Absent when it was stored already. */
59
+ graph?: ChangeSetGraph | null;
60
+ /** Why no graph was read, when none was. */
61
+ warning?: string;
62
+ }
63
+ /**
64
+ * Store `doc` under its digest in the member's ledger at `cwd`, mapped onto
65
+ * the member's graph, unless it is stored already. Does not push; the gate's
66
+ * pending fact or resolution pushes the branch after it.
67
+ */
68
+ export declare function storeGateChangeSet(input: StoreGateChangeSetInput): Promise<StoreGateChangeSetResult>;
69
+ //# sourceMappingURL=gate-change-set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-change-set.d.ts","sourceRoot":"","sources":["../../src/lifecycle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AO,CAAC,wBAAwB,CAAC,CAuB1G"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Store the change set a gate binds (#4022), mapped onto the member's graph.
3
+ *
4
+ * {@link storeGateChangeSet} is what a gate that binds a change-set document's
5
+ * digest calls before it decides the gate: `components pr-apply`, and
6
+ * `components promote --release` before it decides a release gate or writes
7
+ * an `empty` resolution (#4045). It reads the member's
8
+ * graph the way `chant workspace graph` reads it, from the member's own
9
+ * `chant graph --format ir`, maps each entry onto a node
10
+ * (`../change-set-graph.ts`), and stores the document under its digest
11
+ * (`./change-set-store.ts`).
12
+ *
13
+ * The graph is read only when the digest is not stored yet. A graph that
14
+ * can't be read never stops the gate: the document is stored with `graph:
15
+ * null` and every `node` null, and the caller gets a warning to print.
16
+ */
17
+ import { spawn } from "node:child_process";
18
+ import { mapChangeSetToGraph } from "../change-set-graph.js";
19
+ import { persistChangeSet, readStoredChangeSet } from "./change-set-store.js";
20
+ import { resolveMemberLedger } from "./member-ledger.js";
21
+ const GRAPH_TIMEOUT_MS = 300000;
22
+ /**
23
+ * The node ids of `chant graph --format ir` in `projectDir`, run under the
24
+ * chant that directory resolves (its own `node_modules/.bin/chant`, else this
25
+ * one), as `chant workspace graph` runs each member. `args` are passed after
26
+ * `graph --format ir`, such as the run's `--param` flags.
27
+ */
28
+ export async function readGraphIds(projectDir, args = []) {
29
+ const { readerToolchain, resolveToolchain } = await import("../workspace/member-commands.js");
30
+ const { readMemberIr } = await import("../workspace/compose-graph.js");
31
+ const { findWorkspaceRoot } = await import("../project-root.js");
32
+ const root = findWorkspaceRoot(projectDir)?.dir ?? projectDir;
33
+ const toolchain = resolveToolchain(projectDir, root, readerToolchain());
34
+ const [command, ...pre] = toolchain.command;
35
+ const out = await new Promise((resolveRun) => {
36
+ const child = spawn(command, [...pre, "graph", "--format", "ir", ...args], { cwd: projectDir, stdio: ["ignore", "pipe", "pipe"] });
37
+ let stdout = "";
38
+ let stderr = "";
39
+ const timer = setTimeout(() => child.kill("SIGKILL"), GRAPH_TIMEOUT_MS);
40
+ child.stdout.on("data", (d) => (stdout += d));
41
+ child.stderr.on("data", (d) => (stderr += d));
42
+ child.on("error", (err) => {
43
+ clearTimeout(timer);
44
+ resolveRun({ code: null, stdout, stderr: err.message });
45
+ });
46
+ child.on("close", (code) => {
47
+ clearTimeout(timer);
48
+ resolveRun({ code, stdout, stderr });
49
+ });
50
+ });
51
+ if (out.code !== 0) {
52
+ const line = out.stderr.split("\n").map((l) => l.trim()).find(Boolean);
53
+ return { error: `chant graph --format ir exited ${out.code ?? "on a signal"}${line ? `: ${line}` : ""}` };
54
+ }
55
+ const read = readMemberIr(out.stdout);
56
+ if ("reason" in read)
57
+ return { error: read.reason.message };
58
+ return { ids: read.ir.nodes.map((n) => n.id) };
59
+ }
60
+ let graphReaderOverride;
61
+ /**
62
+ * Replace how a gate reads the graph wherever the default is taken, such as
63
+ * in `components pr-apply`; `undefined` restores {@link readGraphIds}. For
64
+ * tests that drive a gate and read node ids in process, so they don't start a
65
+ * `chant graph` child process (`gate-change-set.e2e.test.ts` covers that one).
66
+ */
67
+ export function setGraphIdReader(reader) {
68
+ graphReaderOverride = reader;
69
+ }
70
+ /** The graph reader a gate uses: the one {@link setGraphIdReader} set, else {@link readGraphIds} with `args`. */
71
+ export function gateGraphReader(args = []) {
72
+ return graphReaderOverride ?? ((dir) => readGraphIds(dir, args));
73
+ }
74
+ /**
75
+ * Store `doc` under its digest in the member's ledger at `cwd`, mapped onto
76
+ * the member's graph, unless it is stored already. Does not push; the gate's
77
+ * pending fact or resolution pushes the branch after it.
78
+ */
79
+ export async function storeGateChangeSet(input) {
80
+ const { doc, cwd } = input;
81
+ const loc = { cwd };
82
+ if ((await readStoredChangeSet(doc.digest, loc)).status !== "missing")
83
+ return { digest: doc.digest, written: false };
84
+ const ledger = await resolveMemberLedger(cwd);
85
+ const member = ledger.members.length > 0 ? ledger.members.join("/") : null;
86
+ let nodes = null;
87
+ let warning;
88
+ try {
89
+ const read = await (input.readGraph ?? gateGraphReader())(cwd);
90
+ if ("error" in read)
91
+ warning = read.error;
92
+ else
93
+ nodes = { member, at: input.at ?? null, ids: read.ids };
94
+ }
95
+ catch (err) {
96
+ warning = err instanceof Error ? err.message : String(err);
97
+ }
98
+ const mapped = mapChangeSetToGraph(doc, nodes);
99
+ const { written } = await persistChangeSet(mapped, loc);
100
+ return {
101
+ digest: doc.digest,
102
+ written,
103
+ graph: mapped.graph ?? null,
104
+ ...(warning ? { warning: `the change set is stored without graph nodes: ${warning}` } : {}),
105
+ };
106
+ }
@@ -75,6 +75,16 @@ export interface GateResolutionRecord {
75
75
  * such a record proves is that somebody approved *something*.
76
76
  */
77
77
  planDigest?: string;
78
+ /**
79
+ * The commit the gate was waiting on (#4020), copied off the pending fact the
80
+ * approval answers, or the run's own commit for a resolution a run writes
81
+ * itself (a decision point's answer, a review, a carried approval). It is not
82
+ * the approver's checkout, and a seal does not cover it. Absent on a
83
+ * resolution written before 0.124.28 and when no commit was known.
84
+ */
85
+ gitSha?: string;
86
+ /** The run the gate was waiting on (#4020), copied the same way as {@link GateResolutionRecord.gitSha}. */
87
+ runId?: string;
78
88
  /**
79
89
  * The checkpoint this approval lets a run resume from (#3947), copied off
80
90
  * the pending fact it answers. Set only on an approval of a gate that
@@ -88,6 +98,26 @@ export interface GateResolutionRecord {
88
98
  * recorded for its own environment and plan.
89
99
  */
90
100
  environment?: string;
101
+ /**
102
+ * The release this approval is for (#4045, ws-104 question 2), copied off
103
+ * the pending fact it answers. Set on a release gate, the gate `chant
104
+ * components promote --release` passes for an environment. A release gate
105
+ * counts only a resolution recorded for its own release, environment and
106
+ * change-set document digest (`planDigest`), so it names the release it
107
+ * admitted. Absent on every other gate, and on a resolution written before
108
+ * 0.124.28.
109
+ */
110
+ releaseDigest?: string;
111
+ /**
112
+ * The resolution passes a release gate over an empty change set (#4045,
113
+ * ws-104 question 6): the promote wrote it itself, with the actor running
114
+ * it in `resolvedBy`, because the change set its `planDigest` names changes
115
+ * nothing. A gate counts it only after it reads the stored document under
116
+ * `planDigest` and finds it empty, and neither a quorum nor a signing rule
117
+ * applies to it. It never counts as a person's approval. Absent on every
118
+ * other resolution.
119
+ */
120
+ empty?: true;
91
121
  /**
92
122
  * The channel this resolution was authored on (chant#2384) — set by the
93
123
  * writer, never by the caller. `chant approve` records `"cli"`, the
@@ -220,8 +250,19 @@ export interface PendingGateRecord {
220
250
  gate: string;
221
251
  /** The gate's human-readable description, when it declared one — what `chant operator status` shows a reader who wasn't there for the run. */
222
252
  description?: string;
223
- /** The run that reached the gate, when the caller identifies its runs. */
253
+ /**
254
+ * The run that reached the gate. An Op run records its own id; a run with no
255
+ * id of its own (a component gate) records the CI run id when it ran in CI
256
+ * (#4020). Absent outside CI for a run that mints none.
257
+ */
224
258
  runId?: string;
259
+ /**
260
+ * The commit the run reached the gate at (#4020): the checkout's `HEAD`, else
261
+ * the commit the CI job started for. It is the commit the gate waits on, and
262
+ * `chant approve` copies it onto the resolution. Absent on a record written
263
+ * before 0.124.28 and when the run knew no commit.
264
+ */
265
+ gitSha?: string;
225
266
  /** ISO-8601 timestamp, caller-supplied (library code never calls `Date.now()` internally). */
226
267
  timestamp: string;
227
268
  /** ISO-8601 expiry, from the gate's `timeout` (default {@link DEFAULT_GATE_EXPIRY}). Past it, the fact is stale and a run re-records it. */
@@ -262,6 +303,13 @@ export interface PendingGateRecord {
262
303
  * can pick one.
263
304
  */
264
305
  environment?: string;
306
+ /**
307
+ * The release the run reached this gate for (#4045): on a release gate, the
308
+ * `releaseDigest` of the release `chant components promote --release`
309
+ * deploys. `chant approve` copies it onto the approval with the plan.
310
+ * Absent on every other gate, and on a fact written before 0.124.28.
311
+ */
312
+ releaseDigest?: string;
265
313
  /**
266
314
  * The channel the run that reached this gate was driven from (chant#2384).
267
315
  *
@@ -1 +1 @@
1
- {"version":3,"file":"gate-ledger.d.ts","sourceRoot":"","sources":["../../src/lifecycle/gate-ledger.ts"],"names":[],"mappings":"AA6CA,OAAO,EAAqB,KAAK,UAA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  malformed++;
173
173
  continue;
174
174
  }
175
+ // #4045: and for the release a release gate approval is bound to.
176
+ const rawRelease = parsed.releaseDigest;
177
+ if (rawRelease !== undefined && typeof rawRelease !== "string") {
178
+ malformed++;
179
+ continue;
180
+ }
181
+ // #4045: an `empty` that is not a boolean can't be told from a pass or an approval.
182
+ const rawEmpty = parsed.empty;
183
+ if (rawEmpty !== undefined && typeof rawEmpty !== "boolean") {
184
+ malformed++;
185
+ continue;
186
+ }
175
187
  // #3947: and for the checkpoint an approval lets a run resume from.
176
188
  const rawCheckpoint = parsed.checkpointDigest;
177
189
  if (rawCheckpoint !== undefined && typeof rawCheckpoint !== "string") {
178
190
  malformed++;
179
191
  continue;
180
192
  }
193
+ // #4020: a commit or run id of the wrong type is dropped, so a reader can trust the type without losing the line.
194
+ for (const key of ["gitSha", "runId"]) {
195
+ const v = parsed[key];
196
+ if (v !== undefined && typeof v !== "string")
197
+ delete parsed[key];
198
+ }
181
199
  if (parsed.kind === "pending") {
182
200
  if (typeof parsed.expiresAt !== "string") {
183
201
  malformed++;