@intentius/chant 0.124.88 → 0.124.89

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 (303) hide show
  1. package/dist/actor.d.ts +36 -1
  2. package/dist/actor.d.ts.map +1 -1
  3. package/dist/actor.js +39 -1
  4. package/dist/chant-install.d.ts.map +1 -1
  5. package/dist/chant-install.js +1 -2
  6. package/dist/ci-base.d.ts +30 -0
  7. package/dist/ci-base.d.ts.map +1 -0
  8. package/dist/ci-base.js +33 -0
  9. package/dist/ci-comment-commands.d.ts +177 -0
  10. package/dist/ci-comment-commands.d.ts.map +1 -0
  11. package/dist/ci-comment-commands.js +325 -0
  12. package/dist/ci-comment-replies.d.ts +40 -0
  13. package/dist/ci-comment-replies.d.ts.map +1 -0
  14. package/dist/ci-comment-replies.js +59 -0
  15. package/dist/ci-evidence-from-job.d.ts +25 -0
  16. package/dist/ci-evidence-from-job.d.ts.map +1 -1
  17. package/dist/ci-evidence-from-job.js +43 -2
  18. package/dist/ci-evidence-jobs.d.ts +30 -1
  19. package/dist/ci-evidence-jobs.d.ts.map +1 -1
  20. package/dist/ci-evidence-jobs.js +46 -3
  21. package/dist/ci-image.d.ts +21 -4
  22. package/dist/ci-image.d.ts.map +1 -1
  23. package/dist/ci-image.js +62 -10
  24. package/dist/ci-note-commands.d.ts +63 -3
  25. package/dist/ci-note-commands.d.ts.map +1 -1
  26. package/dist/ci-note-commands.js +69 -35
  27. package/dist/ci-product-words.d.ts +42 -0
  28. package/dist/ci-product-words.d.ts.map +1 -1
  29. package/dist/ci-product-words.js +25 -0
  30. package/dist/ci-product.d.ts +31 -0
  31. package/dist/ci-product.d.ts.map +1 -1
  32. package/dist/ci-product.js +34 -4
  33. package/dist/cli/commands/build.d.ts.map +1 -1
  34. package/dist/cli/commands/build.js +29 -2
  35. package/dist/cli/handlers/approve.d.ts.map +1 -1
  36. package/dist/cli/handlers/approve.js +2 -1
  37. package/dist/cli/handlers/ci-check.d.ts +1 -1
  38. package/dist/cli/handlers/ci-check.d.ts.map +1 -1
  39. package/dist/cli/handlers/ci-check.js +17 -7
  40. package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
  41. package/dist/cli/handlers/ci-evidence.js +33 -7
  42. package/dist/cli/handlers/components.d.ts.map +1 -1
  43. package/dist/cli/handlers/components.js +3 -1
  44. package/dist/cli/handlers/generated-check.d.ts +8 -0
  45. package/dist/cli/handlers/generated-check.d.ts.map +1 -1
  46. package/dist/cli/handlers/generated-check.js +31 -1
  47. package/dist/cli/handlers/lock.d.ts.map +1 -1
  48. package/dist/cli/handlers/lock.js +121 -4
  49. package/dist/cli/handlers/pr-comment.d.ts +21 -0
  50. package/dist/cli/handlers/pr-comment.d.ts.map +1 -0
  51. package/dist/cli/handlers/pr-comment.js +112 -0
  52. package/dist/cli/handlers/pr-env.d.ts.map +1 -1
  53. package/dist/cli/handlers/pr-env.js +6 -3
  54. package/dist/cli/handlers/pr.d.ts +23 -1
  55. package/dist/cli/handlers/pr.d.ts.map +1 -1
  56. package/dist/cli/handlers/pr.js +55 -9
  57. package/dist/cli/handlers/promote.d.ts.map +1 -1
  58. package/dist/cli/handlers/promote.js +2 -1
  59. package/dist/cli/handlers/release.d.ts.map +1 -1
  60. package/dist/cli/handlers/release.js +11 -2
  61. package/dist/cli/handlers/run-wave.d.ts.map +1 -1
  62. package/dist/cli/handlers/run-wave.js +28 -2
  63. package/dist/cli/handlers/run.d.ts.map +1 -1
  64. package/dist/cli/handlers/run.js +2 -1
  65. package/dist/cli/main.d.ts.map +1 -1
  66. package/dist/cli/main.js +24 -2
  67. package/dist/cli/parse-args.d.ts.map +1 -1
  68. package/dist/cli/parse-args.js +16 -0
  69. package/dist/cli/registry.d.ts +11 -0
  70. package/dist/cli/registry.d.ts.map +1 -1
  71. package/dist/components/auto-release.d.ts.map +1 -1
  72. package/dist/components/auto-release.js +2 -1
  73. package/dist/components/pr-checks.d.ts +70 -6
  74. package/dist/components/pr-checks.d.ts.map +1 -1
  75. package/dist/components/pr-checks.js +74 -13
  76. package/dist/components/pr-pipeline.d.ts +16 -12
  77. package/dist/components/pr-pipeline.d.ts.map +1 -1
  78. package/dist/components/pr-pipeline.js +3 -11
  79. package/dist/components/product-pipeline.d.ts +42 -1
  80. package/dist/components/product-pipeline.d.ts.map +1 -1
  81. package/dist/components/product-pipeline.js +64 -12
  82. package/dist/components/product-plan.d.ts +190 -5
  83. package/dist/components/product-plan.d.ts.map +1 -1
  84. package/dist/components/product-plan.js +220 -39
  85. package/dist/drift-record.d.ts +7 -0
  86. package/dist/drift-record.d.ts.map +1 -1
  87. package/dist/drift-record.js +19 -0
  88. package/dist/floor-table.data.d.ts.map +1 -1
  89. package/dist/floor-table.data.js +54 -31
  90. package/dist/forge-check/contract.d.ts +11 -1
  91. package/dist/forge-check/contract.d.ts.map +1 -1
  92. package/dist/forge-check/contract.js +4 -1
  93. package/dist/forge-check/index.d.ts +2 -0
  94. package/dist/forge-check/index.d.ts.map +1 -1
  95. package/dist/forge-check/index.js +2 -0
  96. package/dist/gate-resume-run.d.ts +9 -1
  97. package/dist/gate-resume-run.d.ts.map +1 -1
  98. package/dist/gate-resume-run.js +26 -3
  99. package/dist/generated-check.d.ts +18 -4
  100. package/dist/generated-check.d.ts.map +1 -1
  101. package/dist/generated-check.js +37 -5
  102. package/dist/image-pins.d.ts +26 -0
  103. package/dist/image-pins.d.ts.map +1 -0
  104. package/dist/image-pins.js +19 -0
  105. package/dist/lexicon.d.ts +11 -0
  106. package/dist/lexicon.d.ts.map +1 -1
  107. package/dist/lifecycle/git.d.ts +11 -0
  108. package/dist/lifecycle/git.d.ts.map +1 -1
  109. package/dist/lifecycle/git.js +30 -3
  110. package/dist/lifecycle/publish-npm.d.ts +11 -0
  111. package/dist/lifecycle/publish-npm.d.ts.map +1 -1
  112. package/dist/lifecycle/publish-npm.js +27 -1
  113. package/dist/lifecycle/reach-locks.d.ts +131 -0
  114. package/dist/lifecycle/reach-locks.d.ts.map +1 -0
  115. package/dist/lifecycle/reach-locks.js +118 -0
  116. package/dist/lifecycle/release-cut.d.ts +3 -1
  117. package/dist/lifecycle/release-cut.d.ts.map +1 -1
  118. package/dist/lifecycle/release-cut.js +15 -0
  119. package/dist/lifecycle/release-images.d.ts.map +1 -1
  120. package/dist/lifecycle/release-images.js +1 -2
  121. package/dist/notify-product.d.ts +12 -3
  122. package/dist/notify-product.d.ts.map +1 -1
  123. package/dist/notify-product.js +10 -6
  124. package/dist/op/activities/source-release.d.ts.map +1 -1
  125. package/dist/op/activities/source-release.js +2 -1
  126. package/dist/op/activities/source-rollback.d.ts.map +1 -1
  127. package/dist/op/activities/source-rollback.js +2 -1
  128. package/dist/op/index.d.ts +2 -0
  129. package/dist/op/index.d.ts.map +1 -1
  130. package/dist/op/index.js +1 -0
  131. package/dist/op/op-waves-evidence-jobs.d.ts +6 -1
  132. package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -1
  133. package/dist/op/op-waves-evidence-jobs.js +9 -3
  134. package/dist/op/op-waves-render-spec.d.ts +100 -0
  135. package/dist/op/op-waves-render-spec.d.ts.map +1 -0
  136. package/dist/op/op-waves-render-spec.js +162 -0
  137. package/dist/op/op-waves-run.d.ts +2 -0
  138. package/dist/op/op-waves-run.d.ts.map +1 -1
  139. package/dist/op/op-waves-run.js +2 -1
  140. package/dist/op/op-waves.d.ts +4 -0
  141. package/dist/op/op-waves.d.ts.map +1 -1
  142. package/dist/op/op-waves.js +4 -1
  143. package/dist/op/schedule-overdue.d.ts.map +1 -1
  144. package/dist/op/schedule-overdue.js +59 -3
  145. package/dist/op/wave-stop.d.ts +64 -0
  146. package/dist/op/wave-stop.d.ts.map +1 -0
  147. package/dist/op/wave-stop.js +127 -0
  148. package/dist/planned-files.d.ts +76 -0
  149. package/dist/planned-files.d.ts.map +1 -0
  150. package/dist/planned-files.js +108 -0
  151. package/dist/pr-forge-job.d.ts +22 -0
  152. package/dist/pr-forge-job.d.ts.map +1 -0
  153. package/dist/pr-forge-job.js +46 -0
  154. package/dist/pr-loop.d.ts +3 -6
  155. package/dist/pr-loop.d.ts.map +1 -1
  156. package/dist/pr-loop.js +4 -81
  157. package/dist/pr-plan-note.d.ts +97 -0
  158. package/dist/pr-plan-note.d.ts.map +1 -1
  159. package/dist/pr-plan-note.js +94 -1
  160. package/dist/pr-post.d.ts +28 -3
  161. package/dist/pr-post.d.ts.map +1 -1
  162. package/dist/pr-post.js +145 -13
  163. package/dist/pr-status.d.ts +16 -0
  164. package/dist/pr-status.d.ts.map +1 -0
  165. package/dist/pr-status.js +90 -0
  166. package/dist/ref-gate-init.d.ts +16 -2
  167. package/dist/ref-gate-init.d.ts.map +1 -1
  168. package/dist/ref-gate-init.js +24 -13
  169. package/dist/release-floors.d.ts +37 -1
  170. package/dist/release-floors.d.ts.map +1 -1
  171. package/dist/release-floors.js +61 -25
  172. package/dist/render-module.d.ts +15 -0
  173. package/dist/render-module.d.ts.map +1 -0
  174. package/dist/render-module.js +73 -0
  175. package/dist/state-migration.d.ts.map +1 -1
  176. package/dist/state-migration.js +1 -2
  177. package/dist/wave-runtime.mjs +304 -301
  178. package/dist/workspace/ci-green-cli.d.ts.map +1 -1
  179. package/dist/workspace/ci-green-cli.js +3 -2
  180. package/dist/workspace/release-train.d.ts.map +1 -1
  181. package/dist/workspace/release-train.js +2 -1
  182. package/dist/workspace/release-workflow.d.ts +4 -3
  183. package/dist/workspace/release-workflow.d.ts.map +1 -1
  184. package/dist/workspace/release-workflow.js +10 -7
  185. package/dist/workspace/trust/check-evidence-report.d.ts +7 -2
  186. package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
  187. package/dist/workspace/trust/check-evidence-report.js +15 -8
  188. package/dist/workspace/trust/ref-gate-cli.d.ts +10 -1
  189. package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
  190. package/dist/workspace/trust/ref-gate-cli.js +30 -10
  191. package/dist/workspace/workspace-run.d.ts.map +1 -1
  192. package/dist/workspace/workspace-run.js +2 -1
  193. package/package.json +1 -1
  194. package/src/actor.test.ts +68 -2
  195. package/src/actor.ts +61 -1
  196. package/src/chant-install.test.ts +2 -3
  197. package/src/chant-install.ts +1 -2
  198. package/src/ci-base.test.ts +41 -0
  199. package/src/ci-base.ts +43 -0
  200. package/src/ci-comment-commands.test.ts +376 -0
  201. package/src/ci-comment-commands.ts +389 -0
  202. package/src/ci-comment-replies.ts +78 -0
  203. package/src/ci-commit.test.ts +2 -3
  204. package/src/ci-evidence-from-job.test.ts +18 -0
  205. package/src/ci-evidence-from-job.ts +58 -2
  206. package/src/ci-evidence-jobs.ts +50 -5
  207. package/src/ci-image.test.ts +130 -9
  208. package/src/ci-image.ts +85 -12
  209. package/src/ci-note-commands.ts +104 -41
  210. package/src/ci-product-words.ts +59 -0
  211. package/src/ci-product.ts +40 -4
  212. package/src/cli/commands/build.test.ts +41 -0
  213. package/src/cli/commands/build.ts +27 -2
  214. package/src/cli/handlers/approve.ts +2 -1
  215. package/src/cli/handlers/ci-check.ts +19 -7
  216. package/src/cli/handlers/ci-evidence.ts +29 -8
  217. package/src/cli/handlers/components.ts +3 -1
  218. package/src/cli/handlers/generated-check.ts +31 -1
  219. package/src/cli/handlers/lock-reach.test.ts +103 -0
  220. package/src/cli/handlers/lock.ts +100 -4
  221. package/src/cli/handlers/pr-comment.ts +104 -0
  222. package/src/cli/handlers/pr-env.ts +6 -3
  223. package/src/cli/handlers/pr-record.test.ts +1 -1
  224. package/src/cli/handlers/pr.ts +50 -10
  225. package/src/cli/handlers/promote.ts +2 -1
  226. package/src/cli/handlers/release.e2e.test.ts +35 -0
  227. package/src/cli/handlers/release.ts +14 -2
  228. package/src/cli/handlers/run-wave.ts +28 -2
  229. package/src/cli/handlers/run.ts +2 -1
  230. package/src/cli/main.ts +24 -2
  231. package/src/cli/parse-args.ts +12 -0
  232. package/src/cli/registry.ts +11 -0
  233. package/src/components/auto-release.ts +2 -1
  234. package/src/components/pr-checks.ts +112 -17
  235. package/src/components/pr-pipeline.ts +17 -15
  236. package/src/components/product-pipeline.ts +93 -11
  237. package/src/components/product-plan.test.ts +40 -2
  238. package/src/components/product-plan.ts +331 -45
  239. package/src/drift-record.test.ts +20 -0
  240. package/src/drift-record.ts +16 -0
  241. package/src/floor-table.data.ts +54 -31
  242. package/src/forge-check/contract.ts +12 -1
  243. package/src/forge-check/forge-check.test.ts +17 -0
  244. package/src/forge-check/index.ts +2 -0
  245. package/src/gate-resume-run.ts +27 -3
  246. package/src/generated-check.e2e.test.ts +21 -1
  247. package/src/generated-check.test.ts +66 -0
  248. package/src/generated-check.ts +51 -10
  249. package/src/image-pins.ts +31 -0
  250. package/src/lexicon.ts +11 -0
  251. package/src/lifecycle/git.test.ts +48 -0
  252. package/src/lifecycle/git.ts +27 -4
  253. package/src/lifecycle/publish-npm.ts +31 -1
  254. package/src/lifecycle/reach-locks.test.ts +87 -0
  255. package/src/lifecycle/reach-locks.ts +169 -0
  256. package/src/lifecycle/release-cut.ts +17 -1
  257. package/src/lifecycle/release-images.test.ts +56 -0
  258. package/src/lifecycle/release-images.ts +1 -2
  259. package/src/notify-product.ts +19 -8
  260. package/src/op/activities/source-release.ts +2 -1
  261. package/src/op/activities/source-rollback.ts +2 -1
  262. package/src/op/gate-resume.test.ts +27 -0
  263. package/src/op/index.ts +10 -0
  264. package/src/op/op-waves-evidence-jobs.ts +10 -4
  265. package/src/op/op-waves-notify-words.test.ts +18 -0
  266. package/src/op/op-waves-render-spec.test.ts +160 -0
  267. package/src/op/op-waves-render-spec.ts +171 -0
  268. package/src/op/op-waves-run.ts +2 -1
  269. package/src/op/op-waves.ts +5 -2
  270. package/src/op/schedule-overdue.test.ts +43 -0
  271. package/src/op/schedule-overdue.ts +57 -3
  272. package/src/op/wave-stop.test.ts +72 -0
  273. package/src/op/wave-stop.ts +137 -0
  274. package/src/planned-files.test.ts +80 -0
  275. package/src/planned-files.ts +134 -0
  276. package/src/pr-forge-job.test.ts +53 -0
  277. package/src/pr-forge-job.ts +46 -0
  278. package/src/pr-loop-narrowed.test.ts +2 -1
  279. package/src/pr-loop-words.test.ts +2 -1
  280. package/src/pr-loop.test.ts +1 -2
  281. package/src/pr-loop.ts +4 -80
  282. package/src/pr-plan-note.ts +155 -3
  283. package/src/pr-post-replan.test.ts +144 -0
  284. package/src/pr-post-subject.test.ts +230 -0
  285. package/src/pr-post.test.ts +2 -1
  286. package/src/pr-post.ts +150 -15
  287. package/src/pr-status.ts +91 -0
  288. package/src/ref-gate-init.ts +30 -11
  289. package/src/release-floors.ts +78 -25
  290. package/src/render-module.ts +73 -0
  291. package/src/state-migration-record.test.ts +2 -3
  292. package/src/state-migration.ts +1 -2
  293. package/src/workspace/ci-green-cli.ts +3 -2
  294. package/src/workspace/ci-green-workflow.test.ts +32 -1
  295. package/src/workspace/release-train.ts +2 -1
  296. package/src/workspace/release-workflow.test.ts +36 -5
  297. package/src/workspace/release-workflow.ts +10 -7
  298. package/src/workspace/trust/check-evidence-report.ts +15 -8
  299. package/src/workspace/trust/check-evidence.test.ts +5 -0
  300. package/src/workspace/trust/ref-gate-cli.ts +30 -8
  301. package/src/workspace/trust/ref-gate-pieces.test.ts +46 -1
  302. package/src/workspace/trust/ref-gate.test.ts +10 -0
  303. package/src/workspace/workspace-run.ts +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ci-green-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAA4G,cAAc,EAAE,MAAM,YAAY,CAAC;AAWtJ,OAAO,EAAE,cAAc,EAAE,CAAC;AAe1B,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBzE;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBpE;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyCvE;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBpE;AAID,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoBpE;AAeD,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgFxE"}
1
+ {"version":3,"file":"ci-green-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/ci-green-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAA4G,cAAc,EAAE,MAAM,YAAY,CAAC;AAWtJ,OAAO,EAAE,cAAc,EAAE,CAAC;AAe1B,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBzE;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBpE;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyCvE;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBpE;AAID,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoBpE;AAeD,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiFxE"}
@@ -234,10 +234,11 @@ export async function runCiWorkflow(ctx) {
234
234
  const root = realpathSync(found.dir);
235
235
  const repoRoot = gitTop(root) ?? root;
236
236
  const member = resolveMemberContext(cwd, found);
237
- const target = ctx.args.output ? resolve(realpathSync(cwd), ctx.args.output) : join(repoRoot, CI_GREEN_WORKFLOW_FILE);
238
237
  // #4909: under `chant dev generated-check` the file goes to the render
239
- // tree; it is read and named as the committed file it stands for.
238
+ // tree; it is read and named as the committed file it stands for. #4950:
239
+ // with no --output too, so a render needs no `--output {out}/...`.
240
240
  const { committedPathOf, isRenderPath, renderPathOf } = await import("../generated-check.js");
241
+ const target = ctx.args.output ? resolve(realpathSync(cwd), ctx.args.output) : renderPathOf(join(repoRoot, CI_GREEN_WORKFLOW_FILE));
241
242
  const rendering = isRenderPath(target);
242
243
  const asCommitted = committedPathOf(target);
243
244
  const fromRepo = relative(repoRoot, asCommitted).split(sep).join("/");
@@ -1 +1 @@
1
- {"version":3,"file":"release-train.d.ts","sourceRoot":"","sources":["../../src/workspace/release-train.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAMtD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,CAAC,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAID,sEAAsE;AACtE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE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;AAID,sEAAsE;AACtE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,EAAE,IAAI,GAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAa,GAAG;IAAE,OAAO,EAAE,WAAW,EAAE,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAgBhK;AAED,+EAA+E;AAC/E,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAkB/E;AAOD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAE/H;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAEjG;AAID,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiD5E"}
@@ -16,6 +16,7 @@ import { readAllReleases, readCuts } from "../lifecycle/release-store.js";
16
16
  import { readDeclaration, WorkspaceReadError } from "./declaration.js";
17
17
  import { locateWorkspace } from "./which-chant.js";
18
18
  import { appendWorkspaceLine, readWorkspaceLines } from "./workspace-ledger.js";
19
+ import { actorFromEnv } from "../actor.js";
19
20
  const TRAINS_FILE = "trains.jsonl";
20
21
  /**
21
22
  * Pick each member's release, pure. `pins` maps a member to a label or a
@@ -112,7 +113,7 @@ export async function runWorkspaceTrain(ctx) {
112
113
  console.error(` ${p}`);
113
114
  return 1;
114
115
  }
115
- const actor = ctx.args.actor ?? process.env.GITHUB_ACTOR ?? process.env.GITLAB_USER_LOGIN ?? process.env.USER ?? "unknown";
116
+ const actor = ctx.args.actor ?? actorFromEnv();
116
117
  const record = { version: 1, id: `train-${randomUUID()}`, env, timestamp: new Date().toISOString(), actor, members: picked.members };
117
118
  if (!ctx.args.dryRun)
118
119
  await appendReleaseTrain(root, record);
@@ -128,8 +128,8 @@ export declare const NPM_TRUSTED_PUBLISHING_SETUP = "have=\"$(npm --version)\";
128
128
  export declare function targetExtras(forge: ReleaseWorkflowForge, targets: ReadonlyArray<ReleaseWorkflowTarget>, p: ReleasePipelineConfig): Pick<ReleasePipelineConfig, "permissions" | "env" | "setup">;
129
129
  /** The platform the jobs `chant release workflow` writes run on: GitHub's and Forgejo's `ubuntu-latest`, and a GitLab runner's default (#4876). */
130
130
  export declare const RELEASE_RUNNER_PLATFORM = "linux/amd64";
131
- /** The binfmt image a GitLab job installs QEMU's handlers with (#4876). */
132
- export declare const RELEASE_BINFMT_IMAGE = "tonistiigi/binfmt";
131
+ /** The binfmt image a GitLab job installs QEMU's handlers with (#4876): the repository, which a config's own setup line is recognised by. */
132
+ export declare const RELEASE_BINFMT_IMAGE: string;
133
133
  /** The architectures among `platforms` the runner can't run, as QEMU names them (`linux/arm/v7` is `arm`), each once. */
134
134
  export declare function qemuArchitectures(platforms: readonly string[]): string[];
135
135
  /**
@@ -137,7 +137,8 @@ export declare function qemuArchitectures(platforms: readonly string[]): string[
137
137
  * runner can't, such as `linux/arm64` on an amd64 runner (#4876), so no
138
138
  * product names it in `release.workflow.setup`. GitHub and Forgejo get
139
139
  * `docker/setup-qemu-action` at its pin; GitLab a `docker run --privileged`
140
- * of {@link RELEASE_BINFMT_IMAGE}, which `chant release workflow` notes needs
140
+ * of {@link RELEASE_BINFMT_IMAGE} by the digest `IMAGE_PINS.binfmt` records
141
+ * (#4941, ../image-pins.ts), which `chant release workflow` notes needs
141
142
  * an executor that runs privileged containers. A config whose `setup` names
142
143
  * the action or the binfmt image already gets nothing more, so its file
143
144
  * renders as it did.
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AuB,gBAAgB,CAAC;AAErD,6IAA6I;AAC7I,eAAO,MAAM,oBAAoB,QAA+B,CAAC;AAEjE,yHAAyH;AACzH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAExE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,EAAE,qBAAqB,GAAG,WAAW,EAAE,CAM5H;AAED,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,GAAG,MAAM,EAAE,CAEzE;AAED,8HAA8H;AAC9H,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAItE,CAAC;AAOF,iEAAiE;AACjE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAoHzE;AAuFD,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAuN9D,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,OAAO,iBAAiB,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAuEvG"}
@@ -28,6 +28,7 @@
28
28
  * renders the tag-triggered file it always did.
29
29
  */
30
30
  import { ACTION_PINS, tagComments, usesRef } from "../action-pins.js";
31
+ import { IMAGE_PINS, imageRef } from "../image-pins.js";
31
32
  import { releaseImagePlatforms, resolveReleaseImages } from "../lifecycle/release-images.js";
32
33
  import { GENERATED_MARKER } from "../discovery/files.js";
33
34
  export const RELEASE_WORKFLOW_FORGES = ["github", "forgejo", "gitlab"];
@@ -75,8 +76,8 @@ export function targetExtras(forge, targets, p) {
75
76
  }
76
77
  /** The platform the jobs `chant release workflow` writes run on: GitHub's and Forgejo's `ubuntu-latest`, and a GitLab runner's default (#4876). */
77
78
  export const RELEASE_RUNNER_PLATFORM = "linux/amd64";
78
- /** The binfmt image a GitLab job installs QEMU's handlers with (#4876). */
79
- export const RELEASE_BINFMT_IMAGE = "tonistiigi/binfmt";
79
+ /** The binfmt image a GitLab job installs QEMU's handlers with (#4876): the repository, which a config's own setup line is recognised by. */
80
+ export const RELEASE_BINFMT_IMAGE = IMAGE_PINS.binfmt.repository;
80
81
  /** The architectures among `platforms` the runner can't run, as QEMU names them (`linux/arm/v7` is `arm`), each once. */
81
82
  export function qemuArchitectures(platforms) {
82
83
  return [...new Set(platforms.filter((p) => p.split("/").slice(0, 2).join("/") !== RELEASE_RUNNER_PLATFORM).map((p) => p.split("/")[1] ?? p))].sort();
@@ -86,7 +87,8 @@ export function qemuArchitectures(platforms) {
86
87
  * runner can't, such as `linux/arm64` on an amd64 runner (#4876), so no
87
88
  * product names it in `release.workflow.setup`. GitHub and Forgejo get
88
89
  * `docker/setup-qemu-action` at its pin; GitLab a `docker run --privileged`
89
- * of {@link RELEASE_BINFMT_IMAGE}, which `chant release workflow` notes needs
90
+ * of {@link RELEASE_BINFMT_IMAGE} by the digest `IMAGE_PINS.binfmt` records
91
+ * (#4941, ../image-pins.ts), which `chant release workflow` notes needs
90
92
  * an executor that runs privileged containers. A config whose `setup` names
91
93
  * the action or the binfmt image already gets nothing more, so its file
92
94
  * renders as it did.
@@ -98,7 +100,7 @@ export function qemuSetup(forge, platforms, p) {
98
100
  const named = (p.setup ?? []).some((s) => ("uses" in s ? /^docker\/setup-qemu-action@/.test(s.uses) : s.run.includes(RELEASE_BINFMT_IMAGE)));
99
101
  if (named)
100
102
  return [];
101
- return forge === "gitlab" ? [{ run: `docker run --privileged --rm ${RELEASE_BINFMT_IMAGE} --install ${archs.join(",")}` }] : [{ uses: usesRef(ACTION_PINS.dockerSetupQemu4), with: { platforms: archs.join(",") } }];
103
+ return forge === "gitlab" ? [{ run: `docker run --privileged --rm ${imageRef(IMAGE_PINS.binfmt)} --install ${archs.join(",")}` }] : [{ uses: usesRef(ACTION_PINS.dockerSetupQemu4), with: { platforms: archs.join(",") } }];
102
104
  }
103
105
  /** The flags `chant release publish` gets under the groups. */
104
106
  export function publishFlags(groups) {
@@ -531,11 +533,12 @@ export async function runReleaseWorkflow(ctx) {
531
533
  ...(args.buildCommand ? { build: args.buildCommand } : {}),
532
534
  ...(args.ciChant ? { chant: args.ciChant } : {}),
533
535
  });
534
- const target = args.output ? resolve(process.cwd(), args.output) : join(repoRoot, release?.workflow?.file ?? RELEASE_WORKFLOW_FILES[forge]);
535
536
  // #4909: under `chant dev generated-check` the header names the committed file the render stands for.
536
- const { committedPathOf, isRenderPath } = await import("../generated-check.js");
537
- const asCommitted = committedPathOf(target);
537
+ // #4950: with no --output the file goes to the render tree too, so a render needs no `--output {out}/...`.
538
+ const { committedPathOf, isRenderPath, renderPathOf } = await import("../generated-check.js");
538
539
  const defaultTarget = join(repoRoot, release?.workflow?.file ?? RELEASE_WORKFLOW_FILES[forge]);
540
+ const target = args.output ? resolve(process.cwd(), args.output) : renderPathOf(defaultTarget);
541
+ const asCommitted = committedPathOf(target);
539
542
  const parts = ["chant", "release", "workflow", "--forge", forge];
540
543
  if (args.ciInstall)
541
544
  parts.push("--install", args.ciInstall);
@@ -42,8 +42,13 @@ export interface CheckEvidenceNote {
42
42
  reason: string;
43
43
  }>;
44
44
  }
45
- /** The checks to sign from the plan job's hand-off directory and result, and those left unsigned with why. */
46
- export declare function planReportChecks(dir: string, result: string | undefined): {
45
+ /**
46
+ * The checks to sign from the plan job's hand-off directory and result, and
47
+ * those left unsigned with why. #4964: a workspace member's plan job plans
48
+ * that member alone, so with `member` the two are `plan:<member>` and
49
+ * `policy:<member>`.
50
+ */
51
+ export declare function planReportChecks(dir: string, result: string | undefined, member?: string): {
47
52
  sign: Array<{
48
53
  check: string;
49
54
  claim?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WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIzF;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWrE"}
@@ -66,27 +66,34 @@ function policyOf(dir) {
66
66
  const standing = overrides.filter((o) => !o.override).length;
67
67
  return standing === 0 ? { passed: true, reason: "the policy denied nothing that stands" } : { passed: false, reason: `the policy denied ${standing} unit${standing === 1 ? "" : "s"} with no override` };
68
68
  }
69
- /** The checks to sign from the plan job's hand-off directory and result, and those left unsigned with why. */
70
- export function planReportChecks(dir, result) {
69
+ /**
70
+ * The checks to sign from the plan job's hand-off directory and result, and
71
+ * those left unsigned with why. #4964: a workspace member's plan job plans
72
+ * that member alone, so with `member` the two are `plan:<member>` and
73
+ * `policy:<member>`.
74
+ */
75
+ export function planReportChecks(dir, result, member) {
76
+ const planCheck = member ? `plan:${member}` : "plan";
77
+ const policyCheck = member ? `policy:${member}` : "policy";
71
78
  const file = [REPORT_FILE, HANDOFF_FILE].map((f) => join(dir, f)).find((f) => existsSync(f));
72
79
  if (result !== "success") {
73
80
  const why = `the plan job's result is ${result ?? "not given"}`;
74
- return { sign: [], skipped: [{ check: "plan", reason: why }, { check: "policy", reason: why }] };
81
+ return { sign: [], skipped: [{ check: planCheck, reason: why }, { check: policyCheck, reason: why }] };
75
82
  }
76
83
  if (!file) {
77
84
  const why = `the plan job left no ${REPORT_FILE} or ${HANDOFF_FILE}`;
78
- return { sign: [], skipped: [{ check: "plan", reason: why }, { check: "policy", reason: why }] };
85
+ return { sign: [], skipped: [{ check: planCheck, reason: why }, { check: policyCheck, reason: why }] };
79
86
  }
80
87
  const claim = readFileSync(file);
81
- const sign = [{ check: "plan", claim }];
88
+ const sign = [{ check: planCheck, claim }];
82
89
  const skipped = [];
83
90
  const policy = policyOf(dir);
84
91
  if (policy === null)
85
- skipped.push({ check: "policy", reason: "the plan ran no policy" });
92
+ skipped.push({ check: policyCheck, reason: "the plan ran no policy" });
86
93
  else if (policy.passed)
87
- sign.push({ check: "policy", claim });
94
+ sign.push({ check: policyCheck, claim });
88
95
  else
89
- skipped.push({ check: "policy", reason: policy.reason });
96
+ skipped.push({ check: policyCheck, reason: policy.reason });
90
97
  return { sign, skipped };
91
98
  }
92
99
  /**
@@ -20,7 +20,16 @@ export declare const REF_GATE_OUTPUT_SCHEMA_ID = "https://intentius.io/chant/sch
20
20
  /** The line a hook chant writes carries, so `install` knows it may replace it. */
21
21
  export declare const REF_GATE_HOOK_MARK = "# chant ref gate (#4867)";
22
22
  export declare function runWorkspaceRefGate(ctx: CommandContext): Promise<number>;
23
- /** The commit status a forge requires for `d`'s ref: `success` when it is admitted, `failure` naming the missing checks when not. */
23
+ /** The status `d` sets: its rule's, or `chant/ref-gate` when the gate could not decide (#4964); null when no rule matched. */
24
+ export declare function refGateStatusContext(d: Pick<RefDecision, "status" | "error">): string | null;
25
+ /**
26
+ * The commit status a forge requires for `d`'s ref: `success` when it is
27
+ * admitted, `failure` naming the missing checks when not. A gate that could
28
+ * not decide (#4964: the policy at base does not read, or the commit is not
29
+ * there) fails `chant/ref-gate` closed: the policy that would name another
30
+ * status is the one that did not read, and a forge that requires the status
31
+ * then refuses the merge rather than waiting for a status that never comes.
32
+ */
24
33
  export declare function postRefGateStatus(forge: {
25
34
  setStatus(sha: string, status: {
26
35
  context: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ref-gate-cli.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/ref-gate-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,O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C,WAAW,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI,CAE5F;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE;IAAE,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAevM;AAED,2FAA2F;AAC3F,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,UAAU,EAAE,OAAO,SAAU,GAAG,MAAM,CAEvF"}
@@ -17,7 +17,7 @@ import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "n
17
17
  import { join } from "node:path";
18
18
  import { formatError, formatSuccess } from "../../cli/format.js";
19
19
  import { readerVersion } from "../declaration.js";
20
- import { appendRefGateLedger, attachEvidence, commitOf, decideRefUpdate, describeDecision, readRefGateLedger, refGateLedgerPath, RefUpdateInputError, runPrePush, runPreReceive, spentOverrides, } from "./ref-gate.js";
20
+ import { appendRefGateLedger, attachEvidence, commitOf, decideRefUpdate, describeDecision, readRefGateLedger, refGateLedgerPath, REF_GATE_STATUS, RefUpdateInputError, runPrePush, runPreReceive, spentOverrides, } from "./ref-gate.js";
21
21
  import { resolveBase } from "./provenance.js";
22
22
  import { spawnSync } from "node:child_process";
23
23
  export const REF_GATE_CONTRACT_VERSION = 1;
@@ -181,18 +181,21 @@ export async function runWorkspaceRefGate(ctx) {
181
181
  print(args.json, [d], args.dryRun ? undefined : ledger, "out");
182
182
  if (site === "check" && d.decision === "refuse" && !args.dryRun && !here.bare)
183
183
  await recordRequests(here.repo, [d], now);
184
- if (site === "status" && d.status !== null) {
184
+ const context = refGateStatusContext(d);
185
+ if (site === "status" && context !== null) {
185
186
  if (args.dryRun) {
186
- console.error(`chant ref gate: would set ${d.status} to ${d.decision === "admit" ? "success" : "failure"} on ${at.slice(0, 8)}`);
187
+ console.error(`chant ref gate: would set ${context} to ${d.decision === "admit" ? "success" : "failure"} on ${at.slice(0, 8)}`);
187
188
  }
188
189
  else {
189
- const { detectForge, forgeFromEnv } = await import("../../pr-forge.js");
190
+ const { detectForge } = await import("../../pr-forge.js");
190
191
  const kind = detectForge();
191
192
  if (!kind) {
192
- console.error(formatError({ message: `no forge detected, so ${d.status} was not set`, hint: "run it in a GitHub, GitLab or Forgejo job, or pass --dry-run" }));
193
+ console.error(formatError({ message: `no forge detected, so ${context} was not set`, hint: "run it in a GitHub, GitLab or Forgejo job, or pass --dry-run" }));
193
194
  return 1;
194
195
  }
195
- await postRefGateStatus(forgeFromEnv(kind), d);
196
+ // #4964: `--at` is a pull_request run's merge preview; the status goes on the pull request's head.
197
+ const { forgeFromJobEnv } = await import("../../pr-forge-job.js");
198
+ await postRefGateStatus(forgeFromJobEnv(kind), d);
196
199
  }
197
200
  }
198
201
  return d.decision === "admit" ? 0 : 1;
@@ -236,8 +239,9 @@ async function statusOpen(repo, ref, baseRev, ledgerFlag, dryRun, json, now) {
236
239
  const d = decideRefUpdate({ repo, update: { ref, old: base, new: pr.headSha }, base, spent, now });
237
240
  decisions.push(d);
238
241
  if (dryRun) {
239
- if (d.status !== null)
240
- console.error(`chant ref gate: would set ${d.status} to ${d.decision === "admit" ? "success" : "failure"} on #${pr.number} at ${pr.headSha.slice(0, 8)}`);
242
+ const context = refGateStatusContext(d);
243
+ if (context !== null)
244
+ console.error(`chant ref gate: would set ${context} to ${d.decision === "admit" ? "success" : "failure"} on #${pr.number} at ${pr.headSha.slice(0, 8)}`);
241
245
  continue;
242
246
  }
243
247
  appendRefGateLedger(ledger, [{ ...d, version: 1, kind: "ref-update", site: "status", timestamp: now }]);
@@ -253,10 +257,26 @@ async function statusOpen(repo, ref, baseRev, ledgerFlag, dryRun, json, now) {
253
257
  console.error(`chant ref gate: no open pull request into ${branch} to set a status on`);
254
258
  return 0;
255
259
  }
256
- /** The commit status a forge requires for `d`'s ref: `success` when it is admitted, `failure` naming the missing checks when not. */
260
+ /** The status `d` sets: its rule's, or `chant/ref-gate` when the gate could not decide (#4964); null when no rule matched. */
261
+ export function refGateStatusContext(d) {
262
+ return d.status ?? (d.error ? REF_GATE_STATUS : null);
263
+ }
264
+ /**
265
+ * The commit status a forge requires for `d`'s ref: `success` when it is
266
+ * admitted, `failure` naming the missing checks when not. A gate that could
267
+ * not decide (#4964: the policy at base does not read, or the commit is not
268
+ * there) fails `chant/ref-gate` closed: the policy that would name another
269
+ * status is the one that did not read, and a forge that requires the status
270
+ * then refuses the merge rather than waiting for a status that never comes.
271
+ */
257
272
  export async function postRefGateStatus(forge, d) {
258
- if (d.status === null || d.new === null)
273
+ const context = refGateStatusContext(d);
274
+ if (context === null || d.new === null)
259
275
  return;
276
+ if (d.status === null) {
277
+ await forge.setStatus(d.new, { context, state: "failure", description: `refused: ${d.error.code}` });
278
+ return;
279
+ }
260
280
  const missing = d.checks.filter((c) => c.action === "block" && (c.status === "missing" || c.status === "stale"));
261
281
  const overridden = d.checks.filter((c) => c.status === "overridden").map((c) => c.check);
262
282
  const description = d.error
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-run.d.ts","sourceRoot":"","sources":["../../src/workspace/workspace-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAsB,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACvG,OAAO,EAAgE,KAAK,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAMnJ,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKpE,OAAO,EAAsB,KAAK,kBAAkB,EAAyB,MAAM,oBAA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C;IAAC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;CAAE,GACrE;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,gBAAgB,EAAE,CAAA;CAAE,GAC/E;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,kBAAkB,CAAC;IAAC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AA0D/I,8HAA8H;AAC9H,wBAAsB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAkGzF;AAQD,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAuE1E"}
@@ -43,6 +43,7 @@ import { executePlan, planMembers } from "./member-commands.js";
43
43
  import { locateWorkspace } from "./which-chant.js";
44
44
  import { appendWorkspaceRun } from "./workspace-ledger.js";
45
45
  import { appendWorkspaceGatePending } from "./workspace-gates.js";
46
+ import { actorFromEnv } from "../actor.js";
46
47
  /** `chant run`'s exit code for a run that stopped at an unapproved gate (`GATED_EXIT_CODE`). */
47
48
  const GATED_EXIT = CHANT_EXIT.waiting;
48
49
  const USAGE = "chant workspace run <member>/<op>... [--env <env>] [--gate <name>] [--dry-run] [--json] | chant workspace run --dependents-of <member> --op <op> [--env <env>] [--gate <name>] [--dry-run] [--json] | chant workspace run approve <gate> [--plan <digest>] [--approver <principal>]";
@@ -412,7 +413,7 @@ async function runWorkspaceRunApprove(ctx, words) {
412
413
  return 1;
413
414
  }
414
415
  const { approveWorkspaceGate } = await import("./workspace-gates.js");
415
- const approvedBy = ctx.args.approver ?? ctx.args.actor ?? process.env.GITHUB_ACTOR ?? process.env.GITLAB_USER_LOGIN ?? process.env.USER ?? "unknown";
416
+ const approvedBy = ctx.args.approver ?? ctx.args.actor ?? actorFromEnv();
416
417
  try {
417
418
  const record = await approveWorkspaceGate(resolve("."), {
418
419
  gate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.124.88",
3
+ "version": "0.124.89",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
package/src/actor.test.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  /** #4911: one actor fallback for the lexicons' gated requests and the products' requesters. */
2
- import { expect, test } from "vitest";
3
- import { actorFromEnv } from "./actor";
2
+ import { execFileSync } from "node:child_process";
3
+ import { mkdtempSync, readdirSync, readFileSync, statSync } from "node:fs";
4
+ import { tmpdir } from "node:os";
5
+ import { join, relative } from "node:path";
6
+ import { beforeAll, describe, expect, test } from "vitest";
7
+ import { ACTOR_ENV_ORDER, actorFromEnv, actorOf, actorOrder } from "./actor";
4
8
 
5
9
  test("the forge's actor, then the login, then unknown", () => {
6
10
  expect(actorFromEnv({ GITHUB_ACTOR: "octo", GITLAB_USER_LOGIN: "gl", USER: "me" })).toBe("octo");
@@ -10,3 +14,65 @@ test("the forge's actor, then the login, then unknown", () => {
10
14
  expect(actorFromEnv({})).toBe("unknown");
11
15
  expect(actorFromEnv({}, "chant")).toBe("chant");
12
16
  });
17
+
18
+ /** #4966: a product's requester order, with the triggering actor and git's user.name. */
19
+ describe("actorOf", () => {
20
+ let repo: string;
21
+ beforeAll(() => {
22
+ repo = mkdtempSync(join(tmpdir(), "chant-actor-"));
23
+ execFileSync("git", ["init", "-q", repo]);
24
+ execFileSync("git", ["-C", repo, "config", "user.name", "Ada Person"]);
25
+ execFileSync("git", ["-C", repo, "config", "user.email", "ada@example.com"]);
26
+ });
27
+
28
+ test("with no options it answers as actorFromEnv", () => {
29
+ for (const env of [{ GITHUB_ACTOR: "octo", USER: "me" }, { GITLAB_USER_LOGIN: "gl" }, { USERNAME: "win" }, {}]) {
30
+ expect(actorOf({ env })).toBe(actorFromEnv(env));
31
+ }
32
+ expect(actorOrder()).toEqual([...ACTOR_ENV_ORDER]);
33
+ });
34
+
35
+ test("the triggering actor comes ahead of the forge's actor", () => {
36
+ expect(actorOf({ env: { GITHUB_TRIGGERING_ACTOR: "rerunner", GITHUB_ACTOR: "starter" }, triggering: true })).toBe("rerunner");
37
+ expect(actorOf({ env: { GITHUB_TRIGGERING_ACTOR: " ", GITHUB_ACTOR: "starter" }, triggering: true })).toBe("starter");
38
+ expect(actorOf({ env: { GITHUB_TRIGGERING_ACTOR: "rerunner", GITHUB_ACTOR: "starter" } })).toBe("starter");
39
+ });
40
+
41
+ test("git's user.name comes after the forge's actor and before the login", () => {
42
+ expect(actorOf({ env: { GITHUB_ACTOR: "octo", USER: "me" }, repo })).toBe("octo");
43
+ expect(actorOf({ env: { USER: "me" }, repo })).toBe("Ada Person");
44
+ expect(actorOf({ env: { USER: "me" }, repo, gitKeys: ["user.email", "user.name"] })).toBe("ada@example.com");
45
+ expect(actorOrder({ triggering: true, repo })).toEqual(["GITHUB_TRIGGERING_ACTOR", "GITHUB_ACTOR", "GITLAB_USER_LOGIN", "git:user.name", "USER", "USERNAME"]);
46
+ });
47
+
48
+ test("the forge and the login can be left out, and the fallback named", () => {
49
+ expect(actorOf({ env: { GITHUB_ACTOR: "octo", USER: "me" }, forge: false, repo })).toBe("Ada Person");
50
+ expect(actorOf({ env: { USER: "me" }, triggering: true, login: false, fallback: "" })).toBe("");
51
+ expect(actorOf({ env: {}, fallback: "terragucci" })).toBe("terragucci");
52
+ });
53
+ });
54
+
55
+ /**
56
+ * #4952: chant's own handlers and records read the fallback from
57
+ * `actorFromEnv`, so none writes the order inline. A cut's actor
58
+ * (`lifecycle/release-workstation.ts`) is another order, with git's
59
+ * `user.email` between the forge and the login, and stays its own.
60
+ */
61
+ test("no source under packages/core/src writes the actor fallback inline", () => {
62
+ const root = __dirname;
63
+ const own = new Set(["actor.ts", "lifecycle/release-workstation.ts"]);
64
+ const inline = /GITHUB_ACTOR\s*(?:\?\?|\|\|)\s*(?:process\.)?env\.GITLAB_USER_LOGIN/;
65
+ const found: string[] = [];
66
+ const walk = (dir: string): void => {
67
+ for (const name of readdirSync(dir)) {
68
+ const path = join(dir, name);
69
+ if (statSync(path).isDirectory()) {
70
+ if (name !== "node_modules" && name !== "__fixtures__") walk(path);
71
+ } else if (name.endsWith(".ts") && !name.endsWith(".test.ts") && !own.has(relative(root, path))) {
72
+ if (inline.test(readFileSync(path, "utf-8"))) found.push(relative(root, path));
73
+ }
74
+ }
75
+ };
76
+ walk(root);
77
+ expect(found).toEqual([]);
78
+ });
package/src/actor.ts CHANGED
@@ -3,9 +3,19 @@
3
3
  * actor in a job (`GITHUB_ACTOR`, which Forgejo sets too, then
4
4
  * `GITLAB_USER_LOGIN`), else the login (`USER`, `USERNAME` on Windows).
5
5
  * The terraform and pulumi lexicons' gated requests and the products'
6
- * requesters read it here rather than each writing the order.
6
+ * requesters read it here rather than each writing the order, and so do
7
+ * chant's own CLI handlers and the records they write (#4952). A caller
8
+ * that refuses when nobody is named passes `""` as the fallback.
9
+ *
10
+ * {@link actorOf} is the same order with the two places a product's
11
+ * requester also looks (#4966): `GITHUB_TRIGGERING_ACTOR` ahead of the
12
+ * forge's actor, which names who re-ran a job rather than who started its
13
+ * run, and git's `user.name` in the checkout between the forge's actor and
14
+ * the login, which names the person at a laptop better than `$USER`.
7
15
  */
8
16
 
17
+ import { spawnSync } from "node:child_process";
18
+
9
19
  /** The actor fallback's variables, in the order {@link actorFromEnv} reads them. */
10
20
  export const ACTOR_ENV_ORDER = ["GITHUB_ACTOR", "GITLAB_USER_LOGIN", "USER", "USERNAME"] as const;
11
21
 
@@ -17,3 +27,53 @@ export function actorFromEnv(env: Record<string, string | undefined> = process.e
17
27
  }
18
28
  return fallback;
19
29
  }
30
+
31
+ /** Which of the places {@link actorOf} reads, and the answer when none is set. */
32
+ export interface ActorOptions {
33
+ /** The variables. Default `process.env`. */
34
+ env?: Record<string, string | undefined>;
35
+ /** Read `GITHUB_TRIGGERING_ACTOR` first: who re-ran the job, ahead of who started the run. Default false. */
36
+ triggering?: boolean;
37
+ /** Read the forge's actor (`GITHUB_ACTOR`, `GITLAB_USER_LOGIN`). Default true. */
38
+ forge?: boolean;
39
+ /** A checkout whose git config is read after the forge's actor. Unset, git is not asked. */
40
+ repo?: string;
41
+ /** The git config keys read in `repo`, in order. Default `["user.name"]`. */
42
+ gitKeys?: readonly string[];
43
+ /** Read the login (`USER`, `USERNAME`) last. Default true. */
44
+ login?: boolean;
45
+ /** The answer when nothing is set. Default `unknown`; `""` for a caller that refuses. */
46
+ fallback?: string;
47
+ }
48
+
49
+ /** The places {@link actorOf} reads for `options`, in order: variable names, and `git:<key>` for a git config key. */
50
+ export function actorOrder(options: Omit<ActorOptions, "env" | "fallback"> = {}): string[] {
51
+ return [
52
+ ...(options.triggering ? ["GITHUB_TRIGGERING_ACTOR"] : []),
53
+ ...(options.forge === false ? [] : ["GITHUB_ACTOR", "GITLAB_USER_LOGIN"]),
54
+ ...(options.repo !== undefined ? (options.gitKeys ?? ["user.name"]).map((k) => `git:${k}`) : []),
55
+ ...(options.login === false ? [] : ["USER", "USERNAME"]),
56
+ ];
57
+ }
58
+
59
+ function gitConfig(repo: string, key: string): string | undefined {
60
+ const r = spawnSync("git", ["-C", repo, "config", key], { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] });
61
+ return r.status === 0 ? r.stdout.trim() : undefined;
62
+ }
63
+
64
+ /**
65
+ * The first place of {@link actorOrder} set to something other than blanks,
66
+ * else `fallback` (#4966). With no options it answers as
67
+ * {@link actorFromEnv}. A git config key is read only when every place
68
+ * before it is empty, so a job with a forge actor runs no git.
69
+ */
70
+ export function actorOf(options: ActorOptions = {}): string {
71
+ const env = options.env ?? process.env;
72
+ for (const place of actorOrder(options)) {
73
+ const v = (place.startsWith("git:") ? gitConfig(options.repo!, place.slice(4)) : env[place])?.trim();
74
+ if (v) return v;
75
+ }
76
+ return options.fallback ?? "unknown";
77
+ }
78
+
79
+ export { ACTOR_ORDER_FLOOR } from "./release-floors";
@@ -27,7 +27,6 @@ import {
27
27
  lastJsonLine,
28
28
  runChant,
29
29
  } from "./chant-install";
30
- import { NEXT_RELEASE } from "./release-floors";
31
30
 
32
31
  const scratch = mkdtempSync(join(tmpdir(), "chant-install-"));
33
32
  afterAll(() => rmSync(scratch, { recursive: true, force: true }));
@@ -214,7 +213,7 @@ describe("runChant (#4889)", () => {
214
213
  await expect(runChant([], { chant: join(scratch, "no-such-chant") })).rejects.toThrow(/ENOENT/);
215
214
  });
216
215
 
217
- test("CHANT_RUN_FLOOR is the next release", () => {
218
- expect(CHANT_RUN_FLOOR).toBe(NEXT_RELEASE);
216
+ test("CHANT_RUN_FLOOR is the release that shipped it", () => {
217
+ expect(CHANT_RUN_FLOOR).toBe("0.124.88");
219
218
  });
220
219
  });
@@ -33,10 +33,9 @@ import { existsSync, readFileSync } from "node:fs";
33
33
  import * as nodeModule from "node:module";
34
34
  import { delimiter, dirname, join, resolve, sep } from "node:path";
35
35
  import { fileURLToPath, pathToFileURL } from "node:url";
36
- import { NEXT_RELEASE } from "./release-floors";
37
36
 
38
37
  /** The first chant with `runChant`, `lastJsonLine`, `installResolveFallback` and `fallbackImportArgs` in `@intentius/chant/chant-install` (#4889): a product runs chant and reads its `--json` document, and a file with no `node_modules` above it imports the product's packages, with no code of the product's own. */
39
- export const CHANT_RUN_FLOOR = NEXT_RELEASE;
38
+ export const CHANT_RUN_FLOOR = "0.124.88";
40
39
 
41
40
  /** Where a chant package is installed. */
42
41
  export interface ChantInstall {
@@ -0,0 +1,41 @@
1
+ /** #4966: the base a CI job measures a change from, and `chant ci check`'s default `--base`. */
2
+ import { afterEach, describe, expect, test, vi } from "vitest";
3
+ import { ciBaseRef } from "./ci-base";
4
+ import type { CommandContext } from "./cli/registry";
5
+ import { runCiCheck } from "./cli/handlers/ci-check";
6
+
7
+ describe("ciBaseRef", () => {
8
+ test("a pull request's target branch, on GitHub and Forgejo, and on GitLab", () => {
9
+ expect(ciBaseRef({ GITHUB_BASE_REF: "main", GITHUB_REF_NAME: "12/merge" })).toBe("origin/main");
10
+ expect(ciBaseRef({ CI_MERGE_REQUEST_TARGET_BRANCH_NAME: "release", CI_COMMIT_BRANCH: "feature" })).toBe("origin/release");
11
+ });
12
+
13
+ test("a push to another branch than the default is measured from the default branch", () => {
14
+ expect(ciBaseRef({ GITHUB_REF_NAME: "feature" }, { defaultBranch: "main" })).toBe("origin/main");
15
+ expect(ciBaseRef({ CI_COMMIT_BRANCH: "feature", CI_DEFAULT_BRANCH: "trunk" })).toBe("origin/trunk");
16
+ expect(ciBaseRef({ CI_COMMIT_BRANCH: "feature", CI_DEFAULT_BRANCH: "trunk" }, { remote: "upstream" })).toBe("upstream/trunk");
17
+ });
18
+
19
+ test("a push to the default branch, or a job that names no default branch, has no base", () => {
20
+ expect(ciBaseRef({ GITHUB_REF_NAME: "main" }, { defaultBranch: "main" })).toBeUndefined();
21
+ expect(ciBaseRef({ GITHUB_REF_NAME: "feature" })).toBeUndefined();
22
+ expect(ciBaseRef({})).toBeUndefined();
23
+ });
24
+
25
+ test("a base the caller has wins, and blanks count as unset", () => {
26
+ expect(ciBaseRef({ GITHUB_BASE_REF: "main" }, { base: "HEAD^" })).toBe("HEAD^");
27
+ expect(ciBaseRef({ GITHUB_BASE_REF: " ", CI_MERGE_REQUEST_TARGET_BRANCH_NAME: "main" }, { base: " " })).toBe("origin/main");
28
+ });
29
+ });
30
+
31
+ describe("chant ci check with no --base", () => {
32
+ afterEach(() => vi.restoreAllMocks());
33
+
34
+ test("refuses when the job names no base either", async () => {
35
+ const errors: string[] = [];
36
+ vi.spyOn(console, "error").mockImplementation((m: unknown) => void errors.push(String(m)));
37
+ const ctx = { args: { positionals: ["ci", "check"] }, plugins: [], serializers: [] } as unknown as CommandContext;
38
+ expect(await runCiCheck(ctx, { GITHUB_REF_NAME: "main" })).toBe(1);
39
+ expect(errors.join("\n")).toContain("the job names no pull request target or default branch to take it from");
40
+ });
41
+ });