@intentius/chant 0.124.88 → 0.124.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/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 +193 -0
  10. package/dist/ci-comment-commands.d.ts.map +1 -0
  11. package/dist/ci-comment-commands.js +353 -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-job-guard.d.ts +42 -45
  25. package/dist/ci-job-guard.d.ts.map +1 -1
  26. package/dist/ci-job-guard.js +206 -3
  27. package/dist/ci-note-commands.d.ts +104 -4
  28. package/dist/ci-note-commands.d.ts.map +1 -1
  29. package/dist/ci-note-commands.js +131 -38
  30. package/dist/ci-product-words.d.ts +42 -0
  31. package/dist/ci-product-words.d.ts.map +1 -1
  32. package/dist/ci-product-words.js +25 -0
  33. package/dist/ci-product.d.ts +72 -1
  34. package/dist/ci-product.d.ts.map +1 -1
  35. package/dist/ci-product.js +73 -6
  36. package/dist/cli/commands/build.d.ts.map +1 -1
  37. package/dist/cli/commands/build.js +29 -2
  38. package/dist/cli/handlers/approve.d.ts.map +1 -1
  39. package/dist/cli/handlers/approve.js +2 -1
  40. package/dist/cli/handlers/ci-check.d.ts +1 -1
  41. package/dist/cli/handlers/ci-check.d.ts.map +1 -1
  42. package/dist/cli/handlers/ci-check.js +17 -7
  43. package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
  44. package/dist/cli/handlers/ci-evidence.js +33 -7
  45. package/dist/cli/handlers/components.d.ts.map +1 -1
  46. package/dist/cli/handlers/components.js +3 -1
  47. package/dist/cli/handlers/generated-check.d.ts +8 -0
  48. package/dist/cli/handlers/generated-check.d.ts.map +1 -1
  49. package/dist/cli/handlers/generated-check.js +31 -1
  50. package/dist/cli/handlers/lock.d.ts.map +1 -1
  51. package/dist/cli/handlers/lock.js +121 -4
  52. package/dist/cli/handlers/pr-comment.d.ts +33 -0
  53. package/dist/cli/handlers/pr-comment.d.ts.map +1 -0
  54. package/dist/cli/handlers/pr-comment.js +201 -0
  55. package/dist/cli/handlers/pr-env.d.ts.map +1 -1
  56. package/dist/cli/handlers/pr-env.js +6 -3
  57. package/dist/cli/handlers/pr-notes.d.ts.map +1 -1
  58. package/dist/cli/handlers/pr-notes.js +23 -1
  59. package/dist/cli/handlers/pr.d.ts +23 -1
  60. package/dist/cli/handlers/pr.d.ts.map +1 -1
  61. package/dist/cli/handlers/pr.js +71 -23
  62. package/dist/cli/handlers/promote.d.ts.map +1 -1
  63. package/dist/cli/handlers/promote.js +2 -1
  64. package/dist/cli/handlers/release.d.ts.map +1 -1
  65. package/dist/cli/handlers/release.js +11 -2
  66. package/dist/cli/handlers/run-wave.d.ts.map +1 -1
  67. package/dist/cli/handlers/run-wave.js +180 -4
  68. package/dist/cli/handlers/run.d.ts.map +1 -1
  69. package/dist/cli/handlers/run.js +2 -1
  70. package/dist/cli/main.d.ts.map +1 -1
  71. package/dist/cli/main.js +41 -2
  72. package/dist/cli/parse-args.d.ts.map +1 -1
  73. package/dist/cli/parse-args.js +31 -0
  74. package/dist/cli/registry.d.ts +19 -1
  75. package/dist/cli/registry.d.ts.map +1 -1
  76. package/dist/components/auto-release.d.ts.map +1 -1
  77. package/dist/components/auto-release.js +2 -1
  78. package/dist/components/pr-checks.d.ts +97 -6
  79. package/dist/components/pr-checks.d.ts.map +1 -1
  80. package/dist/components/pr-checks.js +107 -13
  81. package/dist/components/pr-pipeline.d.ts +19 -14
  82. package/dist/components/pr-pipeline.d.ts.map +1 -1
  83. package/dist/components/pr-pipeline.js +7 -13
  84. package/dist/components/product-pipeline.d.ts +96 -3
  85. package/dist/components/product-pipeline.d.ts.map +1 -1
  86. package/dist/components/product-pipeline.js +120 -14
  87. package/dist/components/product-plan.d.ts +203 -6
  88. package/dist/components/product-plan.d.ts.map +1 -1
  89. package/dist/components/product-plan.js +250 -43
  90. package/dist/drift-record.d.ts +7 -0
  91. package/dist/drift-record.d.ts.map +1 -1
  92. package/dist/drift-record.js +19 -0
  93. package/dist/floor-table.data.d.ts.map +1 -1
  94. package/dist/floor-table.data.js +63 -31
  95. package/dist/forge-check/contract.d.ts +11 -1
  96. package/dist/forge-check/contract.d.ts.map +1 -1
  97. package/dist/forge-check/contract.js +4 -1
  98. package/dist/forge-check/index.d.ts +2 -0
  99. package/dist/forge-check/index.d.ts.map +1 -1
  100. package/dist/forge-check/index.js +2 -0
  101. package/dist/gate-resume-run.d.ts +9 -1
  102. package/dist/gate-resume-run.d.ts.map +1 -1
  103. package/dist/gate-resume-run.js +26 -3
  104. package/dist/generated-check.d.ts +18 -4
  105. package/dist/generated-check.d.ts.map +1 -1
  106. package/dist/generated-check.js +37 -5
  107. package/dist/image-pins.d.ts +26 -0
  108. package/dist/image-pins.d.ts.map +1 -0
  109. package/dist/image-pins.js +19 -0
  110. package/dist/lexicon.d.ts +93 -4
  111. package/dist/lexicon.d.ts.map +1 -1
  112. package/dist/lifecycle/gate-applied.d.ts +9 -0
  113. package/dist/lifecycle/gate-applied.d.ts.map +1 -1
  114. package/dist/lifecycle/git.d.ts +11 -0
  115. package/dist/lifecycle/git.d.ts.map +1 -1
  116. package/dist/lifecycle/git.js +30 -3
  117. package/dist/lifecycle/publish-npm.d.ts +11 -0
  118. package/dist/lifecycle/publish-npm.d.ts.map +1 -1
  119. package/dist/lifecycle/publish-npm.js +27 -1
  120. package/dist/lifecycle/reach-locks.d.ts +131 -0
  121. package/dist/lifecycle/reach-locks.d.ts.map +1 -0
  122. package/dist/lifecycle/reach-locks.js +118 -0
  123. package/dist/lifecycle/release-cut.d.ts +3 -1
  124. package/dist/lifecycle/release-cut.d.ts.map +1 -1
  125. package/dist/lifecycle/release-cut.js +15 -0
  126. package/dist/lifecycle/release-images.d.ts.map +1 -1
  127. package/dist/lifecycle/release-images.js +1 -2
  128. package/dist/notify-product.d.ts +12 -3
  129. package/dist/notify-product.d.ts.map +1 -1
  130. package/dist/notify-product.js +10 -6
  131. package/dist/op/activities/source-release.d.ts.map +1 -1
  132. package/dist/op/activities/source-release.js +2 -1
  133. package/dist/op/activities/source-rollback.d.ts.map +1 -1
  134. package/dist/op/activities/source-rollback.js +2 -1
  135. package/dist/op/apply-status.d.ts +84 -0
  136. package/dist/op/apply-status.d.ts.map +1 -0
  137. package/dist/op/apply-status.js +106 -0
  138. package/dist/op/before-merge-decide.d.ts +102 -0
  139. package/dist/op/before-merge-decide.d.ts.map +1 -0
  140. package/dist/op/before-merge-decide.js +142 -0
  141. package/dist/op/before-merge-done.d.ts +56 -0
  142. package/dist/op/before-merge-done.d.ts.map +1 -0
  143. package/dist/op/before-merge-done.js +69 -0
  144. package/dist/op/before-merge-store.d.ts +20 -0
  145. package/dist/op/before-merge-store.d.ts.map +1 -0
  146. package/dist/op/before-merge-store.js +48 -0
  147. package/dist/op/before-merge.d.ts +150 -0
  148. package/dist/op/before-merge.d.ts.map +1 -0
  149. package/dist/op/before-merge.js +207 -0
  150. package/dist/op/follow-on-run.d.ts +117 -0
  151. package/dist/op/follow-on-run.d.ts.map +1 -0
  152. package/dist/op/follow-on-run.js +154 -0
  153. package/dist/op/follow-on-store.d.ts +17 -0
  154. package/dist/op/follow-on-store.d.ts.map +1 -0
  155. package/dist/op/follow-on-store.js +54 -0
  156. package/dist/op/gate.d.ts +6 -0
  157. package/dist/op/gate.d.ts.map +1 -1
  158. package/dist/op/gate.js +10 -1
  159. package/dist/op/index.d.ts +5 -1
  160. package/dist/op/index.d.ts.map +1 -1
  161. package/dist/op/index.js +2 -0
  162. package/dist/op/op-waves-after-plan.d.ts +13 -0
  163. package/dist/op/op-waves-after-plan.d.ts.map +1 -1
  164. package/dist/op/op-waves-evidence-jobs.d.ts +10 -2
  165. package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -1
  166. package/dist/op/op-waves-evidence-jobs.js +19 -5
  167. package/dist/op/op-waves-follow-on.d.ts +162 -0
  168. package/dist/op/op-waves-follow-on.d.ts.map +1 -0
  169. package/dist/op/op-waves-follow-on.js +355 -0
  170. package/dist/op/op-waves-render-spec.d.ts +100 -0
  171. package/dist/op/op-waves-render-spec.d.ts.map +1 -0
  172. package/dist/op/op-waves-render-spec.js +162 -0
  173. package/dist/op/op-waves-run.d.ts +148 -6
  174. package/dist/op/op-waves-run.d.ts.map +1 -1
  175. package/dist/op/op-waves-run.js +873 -100
  176. package/dist/op/op-waves-split.d.ts +122 -0
  177. package/dist/op/op-waves-split.d.ts.map +1 -0
  178. package/dist/op/op-waves-split.js +166 -0
  179. package/dist/op/op-waves.d.ts +24 -0
  180. package/dist/op/op-waves.d.ts.map +1 -1
  181. package/dist/op/op-waves.js +18 -1
  182. package/dist/op/schedule-overdue.d.ts +15 -1
  183. package/dist/op/schedule-overdue.d.ts.map +1 -1
  184. package/dist/op/schedule-overdue.js +77 -5
  185. package/dist/op/stage-hooks.d.ts +36 -1
  186. package/dist/op/stage-hooks.d.ts.map +1 -1
  187. package/dist/op/stage-hooks.js +17 -3
  188. package/dist/op/wave-stop.d.ts +67 -0
  189. package/dist/op/wave-stop.d.ts.map +1 -0
  190. package/dist/op/wave-stop.js +129 -0
  191. package/dist/planned-files.d.ts +76 -0
  192. package/dist/planned-files.d.ts.map +1 -0
  193. package/dist/planned-files.js +108 -0
  194. package/dist/pr-forge-job.d.ts +22 -0
  195. package/dist/pr-forge-job.d.ts.map +1 -0
  196. package/dist/pr-forge-job.js +46 -0
  197. package/dist/pr-loop.d.ts +3 -6
  198. package/dist/pr-loop.d.ts.map +1 -1
  199. package/dist/pr-loop.js +4 -81
  200. package/dist/pr-plan-note.d.ts +97 -0
  201. package/dist/pr-plan-note.d.ts.map +1 -1
  202. package/dist/pr-plan-note.js +94 -1
  203. package/dist/pr-post.d.ts +28 -3
  204. package/dist/pr-post.d.ts.map +1 -1
  205. package/dist/pr-post.js +146 -13
  206. package/dist/pr-status.d.ts +16 -0
  207. package/dist/pr-status.d.ts.map +1 -0
  208. package/dist/pr-status.js +90 -0
  209. package/dist/ref-gate-init.d.ts +16 -2
  210. package/dist/ref-gate-init.d.ts.map +1 -1
  211. package/dist/ref-gate-init.js +24 -13
  212. package/dist/release-floors.d.ts +39 -1
  213. package/dist/release-floors.d.ts.map +1 -1
  214. package/dist/release-floors.js +63 -25
  215. package/dist/render-module.d.ts +15 -0
  216. package/dist/render-module.d.ts.map +1 -0
  217. package/dist/render-module.js +73 -0
  218. package/dist/state-migration.d.ts.map +1 -1
  219. package/dist/state-migration.js +1 -2
  220. package/dist/wave-blocked.d.ts +7 -1
  221. package/dist/wave-blocked.d.ts.map +1 -1
  222. package/dist/wave-blocked.js +7 -2
  223. package/dist/wave-runtime.mjs +366 -350
  224. package/dist/workspace/ci-green-cli.d.ts.map +1 -1
  225. package/dist/workspace/ci-green-cli.js +3 -2
  226. package/dist/workspace/release-train.d.ts.map +1 -1
  227. package/dist/workspace/release-train.js +2 -1
  228. package/dist/workspace/release-workflow.d.ts +4 -3
  229. package/dist/workspace/release-workflow.d.ts.map +1 -1
  230. package/dist/workspace/release-workflow.js +10 -7
  231. package/dist/workspace/trust/check-evidence-report.d.ts +7 -2
  232. package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
  233. package/dist/workspace/trust/check-evidence-report.js +15 -8
  234. package/dist/workspace/trust/ref-gate-cli.d.ts +10 -1
  235. package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
  236. package/dist/workspace/trust/ref-gate-cli.js +30 -10
  237. package/dist/workspace/workspace-run.d.ts.map +1 -1
  238. package/dist/workspace/workspace-run.js +2 -1
  239. package/package.json +1 -1
  240. package/src/actor.test.ts +68 -2
  241. package/src/actor.ts +61 -1
  242. package/src/chant-install.test.ts +2 -3
  243. package/src/chant-install.ts +1 -2
  244. package/src/ci-base.test.ts +41 -0
  245. package/src/ci-base.ts +43 -0
  246. package/src/ci-comment-commands.test.ts +439 -0
  247. package/src/ci-comment-commands.ts +428 -0
  248. package/src/ci-comment-replies.ts +78 -0
  249. package/src/ci-commit.test.ts +2 -3
  250. package/src/ci-evidence-from-job.test.ts +18 -0
  251. package/src/ci-evidence-from-job.ts +58 -2
  252. package/src/ci-evidence-jobs.ts +50 -5
  253. package/src/ci-image.test.ts +130 -10
  254. package/src/ci-image.ts +85 -12
  255. package/src/ci-job-guard.before-merge.test.ts +148 -0
  256. package/src/ci-job-guard.follow-on-record.test.ts +137 -0
  257. package/src/ci-job-guard.follow-on.test.ts +144 -0
  258. package/src/ci-job-guard.ts +221 -3
  259. package/src/ci-note-commands.test.ts +76 -1
  260. package/src/ci-note-commands.ts +198 -46
  261. package/src/ci-product-words.ts +59 -0
  262. package/src/ci-product.ts +90 -6
  263. package/src/cli/commands/build.test.ts +41 -0
  264. package/src/cli/commands/build.ts +27 -2
  265. package/src/cli/handlers/approve.ts +2 -1
  266. package/src/cli/handlers/ci-check.ts +19 -7
  267. package/src/cli/handlers/ci-evidence.ts +29 -8
  268. package/src/cli/handlers/components.ts +3 -1
  269. package/src/cli/handlers/generated-check.ts +31 -1
  270. package/src/cli/handlers/lock-reach.test.ts +103 -0
  271. package/src/cli/handlers/lock.ts +100 -4
  272. package/src/cli/handlers/pr-comment.ts +187 -0
  273. package/src/cli/handlers/pr-env.ts +6 -3
  274. package/src/cli/handlers/pr-notes.ts +30 -6
  275. package/src/cli/handlers/pr-record.test.ts +1 -1
  276. package/src/cli/handlers/pr.ts +64 -21
  277. package/src/cli/handlers/promote.ts +2 -1
  278. package/src/cli/handlers/release.e2e.test.ts +35 -0
  279. package/src/cli/handlers/release.ts +14 -2
  280. package/src/cli/handlers/run-wave.ts +170 -4
  281. package/src/cli/handlers/run.ts +2 -1
  282. package/src/cli/main.ts +41 -2
  283. package/src/cli/parse-args.ts +23 -0
  284. package/src/cli/registry.ts +19 -1
  285. package/src/components/auto-release.ts +2 -1
  286. package/src/components/pr-checks.ts +165 -17
  287. package/src/components/pr-pipeline.ts +22 -18
  288. package/src/components/product-pipeline.apply-status.test.ts +50 -0
  289. package/src/components/product-pipeline.ts +204 -17
  290. package/src/components/product-plan.test.ts +60 -4
  291. package/src/components/product-plan.ts +367 -50
  292. package/src/drift-record.test.ts +20 -0
  293. package/src/drift-record.ts +16 -0
  294. package/src/floor-table.data.ts +63 -31
  295. package/src/forge-check/contract.ts +12 -1
  296. package/src/forge-check/forge-check.test.ts +17 -0
  297. package/src/forge-check/index.ts +2 -0
  298. package/src/gate-resume-run.ts +27 -3
  299. package/src/generated-check.e2e.test.ts +21 -1
  300. package/src/generated-check.test.ts +66 -0
  301. package/src/generated-check.ts +51 -10
  302. package/src/image-pins.ts +31 -0
  303. package/src/lexicon.ts +89 -1
  304. package/src/lifecycle/gate-applied.ts +7 -0
  305. package/src/lifecycle/git.test.ts +48 -0
  306. package/src/lifecycle/git.ts +27 -4
  307. package/src/lifecycle/publish-npm.ts +31 -1
  308. package/src/lifecycle/reach-locks.test.ts +87 -0
  309. package/src/lifecycle/reach-locks.ts +169 -0
  310. package/src/lifecycle/release-cut.ts +17 -1
  311. package/src/lifecycle/release-images.test.ts +56 -0
  312. package/src/lifecycle/release-images.ts +1 -2
  313. package/src/notify-product.ts +19 -8
  314. package/src/op/activities/source-release.ts +2 -1
  315. package/src/op/activities/source-rollback.ts +2 -1
  316. package/src/op/apply-status.test.ts +83 -0
  317. package/src/op/apply-status.ts +132 -0
  318. package/src/op/before-merge-decide.ts +190 -0
  319. package/src/op/before-merge-done.ts +99 -0
  320. package/src/op/before-merge-store.ts +44 -0
  321. package/src/op/before-merge.test.ts +201 -0
  322. package/src/op/before-merge.ts +266 -0
  323. package/src/op/follow-on-run.ts +206 -0
  324. package/src/op/follow-on-store.ts +54 -0
  325. package/src/op/gate-resume.test.ts +27 -0
  326. package/src/op/gate.ts +16 -1
  327. package/src/op/index.ts +15 -0
  328. package/src/op/op-waves-after-plan.ts +13 -0
  329. package/src/op/op-waves-evidence-jobs.ts +21 -7
  330. package/src/op/op-waves-follow-on-record.test.ts +152 -0
  331. package/src/op/op-waves-follow-on.test.ts +247 -0
  332. package/src/op/op-waves-follow-on.ts +385 -0
  333. package/src/op/op-waves-notify-words.test.ts +18 -0
  334. package/src/op/op-waves-render-spec.test.ts +159 -0
  335. package/src/op/op-waves-render-spec.ts +171 -0
  336. package/src/op/op-waves-run.ts +973 -94
  337. package/src/op/op-waves-split-product.test.ts +288 -0
  338. package/src/op/op-waves-split-step.test.ts +298 -0
  339. package/src/op/op-waves-split.test.ts +196 -0
  340. package/src/op/op-waves-split.ts +189 -0
  341. package/src/op/op-waves.ts +31 -3
  342. package/src/op/schedule-overdue.test.ts +72 -1
  343. package/src/op/schedule-overdue.ts +84 -6
  344. package/src/op/stage-hooks.ts +52 -4
  345. package/src/op/wave-stop.test.ts +72 -0
  346. package/src/op/wave-stop.ts +139 -0
  347. package/src/planned-files.test.ts +80 -0
  348. package/src/planned-files.ts +134 -0
  349. package/src/pr-forge-job.test.ts +53 -0
  350. package/src/pr-forge-job.ts +46 -0
  351. package/src/pr-loop-narrowed.test.ts +2 -1
  352. package/src/pr-loop-words.test.ts +2 -1
  353. package/src/pr-loop.test.ts +1 -2
  354. package/src/pr-loop.ts +4 -80
  355. package/src/pr-plan-note.ts +155 -3
  356. package/src/pr-post-replan.test.ts +144 -0
  357. package/src/pr-post-subject.test.ts +230 -0
  358. package/src/pr-post.test.ts +2 -1
  359. package/src/pr-post.ts +151 -15
  360. package/src/pr-status.ts +91 -0
  361. package/src/ref-gate-init.ts +30 -11
  362. package/src/release-floors.ts +81 -25
  363. package/src/render-module.ts +73 -0
  364. package/src/state-migration-record.test.ts +2 -3
  365. package/src/state-migration.ts +1 -2
  366. package/src/wave-blocked.ts +9 -4
  367. package/src/workspace/ci-green-cli.ts +3 -2
  368. package/src/workspace/ci-green-workflow.test.ts +32 -1
  369. package/src/workspace/release-train.ts +2 -1
  370. package/src/workspace/release-workflow.test.ts +36 -5
  371. package/src/workspace/release-workflow.ts +10 -7
  372. package/src/workspace/trust/check-evidence-report.ts +15 -8
  373. package/src/workspace/trust/check-evidence.test.ts +5 -0
  374. package/src/workspace/trust/ref-gate-cli.ts +30 -8
  375. package/src/workspace/trust/ref-gate-pieces.test.ts +46 -1
  376. package/src/workspace/trust/ref-gate.test.ts +10 -0
  377. package/src/workspace/workspace-run.ts +2 -1
@@ -23,14 +23,17 @@
23
23
  import { layerWaves } from "../gated-waves.js";
24
24
  import { opWaveBinArgv, opWaveJobs, opWavesControlTarget } from "../op/op-waves.js";
25
25
  import { controlNoteCheckout } from "../control/dispatch.js";
26
- import { assertProductWords, CHANT_WORDS, commentLine, } from "../ci-product-words.js";
27
- import { prActionJob, prCommentLockJobs, prCommentPreviewJob, prLoopJobs, prLoopPostJob, prLoopRunner, prNoteCommandsJob, prStaleJob, withProductBin } from "./pr-pipeline.js";
26
+ import { assertProductWords, CHANT_WORDS, CI_PRODUCT_COMMANDS, commentLine, productStatusContext, } from "../ci-product-words.js";
27
+ import { checkJobOptions, PR_LOOP_REPORT_DIR, prActionJob, prCommentLockJobs, prCommentPreviewJob, prLoopJobs, prLoopPostJob, prLoopRunner, prNoteCommandsJob, prStaleJob, withProductBin } from "./pr-pipeline.js";
28
28
  import { resolveAgentSpec } from "../ci-agent.js";
29
29
  import { resolveCommitSpec } from "../ci-commit.js";
30
- import { planEvidenceOf, productPlanJobs } from "./product-plan.js";
30
+ import { planEvidenceOf, productPlanJobs, productPlanReachLock } from "./product-plan.js";
31
31
  import { gitlabOpenEvidenceDir } from "../ci-evidence-jobs.js";
32
32
  import { prCheckJob, prRefGateJob } from "./pr-checks.js";
33
- import { assertRootChecks } from "./pr-pipeline.js";
33
+ import { COMMENT_JOBS_ENV, PR_COMMENT_JOB } from "../ci-comment-commands.js";
34
+ import { GITHUB_JOB_TOKEN } from "../ci-jobs.js";
35
+ import { defaultPipelineFiles } from "../op/before-merge-decide.js";
36
+ import { LOCK_REACH_ENV } from "../lifecycle/reach-locks.js";
34
37
  /** Where the generator writes a product's waves spec, which chant reads at base (#4550). */
35
38
  export const PRODUCT_WAVES_SPEC_DIR = ".chant/op-waves";
36
39
  /** The waves spec file of op `name`: `.chant/op-waves/<name>.spec.json`. */
@@ -120,11 +123,13 @@ export function productPipelineJobs(forge, env, options) {
120
123
  // Words that ask for before-merge keep it when the pipeline has that job beside its waves.
121
124
  const built = options.waves || options.componentWaves ? "on-merge" : options.applyBeforeMerge ? "before-merge" : "release";
122
125
  const applyMode = options.words.applyMode === "before-merge" && options.applyBeforeMerge ? "before-merge" : built;
123
- const words = assertProductWords({ ...options.words, applyMode }, { jobs });
124
- const { waves: given, wavesSpecFile, member, agent: _agent, commits: _commits, actions: _actions, componentWaves, productPlan, evidence, ...loop } = options;
126
+ // #4946: the comment job answers every command but a commit word (the commit job's) with a reply, so the words may name any.
127
+ const answered = options.commentJob ? [...new Set([...jobs, ...CI_PRODUCT_COMMANDS.filter((c) => c !== "commit")])] : jobs;
128
+ const words = assertProductWords({ ...options.words, applyMode }, { jobs: answered });
129
+ const { waves: given, wavesSpecFile, member, agent: _agent, commits: _commits, actions: _actions, componentWaves, productPlan, evidence, commentJob: _commentJob, wavesBeforeMerge, applyStatus: _applyStatus, ...loop } = options;
130
+ if (options.applyStatus && !given && !componentWaves)
131
+ throw new Error("applyStatus posts the waves' apply statuses, and there are none: give waves (or componentWaves)");
125
132
  const { respond } = options;
126
- // #4935: the check job and the ref gate's status judge the commit once, from the root pipeline.
127
- assertRootChecks({ checkJob: options.checkJob, refGateStatus: options.refGateStatus }, member);
128
133
  // #4629: the pull request loop puts the responses on the apply and note jobs, as `chant build --pr-loop --respond` does.
129
134
  const prLoop = { ...loop, words, gate: options.gate ?? words.prGate };
130
135
  const [plan, apply, record] = prLoopJobs(forge, env, prLoop, member);
@@ -145,27 +150,39 @@ export function productPipelineJobs(forge, env, options) {
145
150
  const out = {
146
151
  words,
147
152
  plan: plan,
148
- // #4870: the note job signs the plan job's plan and policy checks before it posts.
149
- post: { ...post, ...(controlTarget ? { control: controlNoteCheckout(forge, controlTarget, words) } : {}), ...defaultRunner, ...(evidence ? { evidence: planEvidenceOf(forge, evidence, words, plan.jobName) } : {}) },
153
+ // #4870: the note job signs the plan job's plan and policy checks before it posts; #4964: a member's under its name.
154
+ post: { ...post, ...(controlTarget ? { control: controlNoteCheckout(forge, controlTarget, words) } : {}), ...defaultRunner, ...(evidence ? { evidence: planEvidenceOf(forge, evidence, words, plan.jobName, member ? { member: { name: member, reportPath: PR_LOOP_REPORT_DIR } } : {}) } : {}) },
150
155
  comments,
151
156
  ...(options.applyBeforeMerge ? { applyBeforeMerge: apply } : {}),
152
157
  // #4799: the product's plan verb, a plan job and a note job per target.
153
158
  ...(productPlan ? { productPlan: productPlanJobs(forge, env, { ...prLoop, plan: productPlan }, words, evidence) } : {}),
154
159
  };
155
160
  // #4935: the check job runs the change's code on the plan runner; the signing and the status run on the default one.
156
- if (options.checkJob) {
161
+ // #4964: with the product's own services, variables, lines and report directory.
162
+ const checkOptions = checkJobOptions(options.checkJob);
163
+ if (checkOptions) {
157
164
  const planRunner = prLoopRunner(options, "plan");
158
- out.check = { ...prCheckJob(forge, { ...(words.bin ? { bin: words.bin } : {}), ...(evidence ? { evidence } : {}), ...(productPlan?.forks === "skip" ? { noForks: true } : {}) }), ...(planRunner !== undefined ? { runner: planRunner } : {}), ...(runnerOfDefault !== undefined ? { evidenceRunner: runnerOfDefault } : {}) };
165
+ out.check = { ...prCheckJob(forge, { ...checkOptions, ...(words.bin ? { bin: words.bin } : {}), ...(evidence ? { evidence } : {}), ...(productPlan?.forks === "skip" ? { noForks: true } : {}) }), ...(planRunner !== undefined ? { runner: planRunner } : {}), ...(runnerOfDefault !== undefined ? { evidenceRunner: runnerOfDefault } : {}) };
159
166
  }
160
167
  if (options.refGateStatus)
161
168
  out.refGate = { ...prRefGateJob(forge, { ...(words.bin ? { bin: words.bin } : {}), ...(options.branch ? { branch: options.branch } : {}) }), ...defaultRunner };
162
169
  const locks = prCommentLockJobs(forge, { locks: options.locks, words });
163
170
  if (locks.length > 0)
164
171
  out.locks = locks.map((job) => ({ ...job, ...defaultRunner }));
172
+ // #4979: the product plan's reach says what the lock job locks.
173
+ const reachLock = productPlan ? productPlanReachLock(forge, { ...prLoop, plan: productPlan }, words) : undefined;
174
+ if (reachLock)
175
+ out.reachLock = reachLock;
165
176
  const action = prActionJob(forge, prLoop);
166
177
  if (action)
167
178
  out.action = { ...action, ...(prLoopRunner(options, "apply") !== undefined ? { runner: prLoopRunner(options, "apply") } : {}) };
168
- const stale = prStaleJob(forge, env, prLoop, member);
179
+ // #4987: a product plan's notes are marked from the waves workflow's push run, one --member per target, naming the re-plan comment.
180
+ const planStale = productPlan
181
+ ? prStaleJob(forge, env, { ...prLoop, ...(productPlan.replan ? { previewComment: true } : {}) }, productPlan.targets?.map((t) => t.name) ?? member)
182
+ : undefined;
183
+ if (planStale && !options.waves && !options.componentWaves)
184
+ throw new Error("staleNotes with the product plan marks the notes from the waves workflow's push run, beside wave 1, and there are no waves: give waves (or componentWaves), or drop staleNotes");
185
+ const stale = productPlan ? undefined : prStaleJob(forge, env, prLoop, member);
169
186
  if (stale)
170
187
  out.stale = { ...stale, ...defaultRunner };
171
188
  // #4785: GitLab's comment commands, polled from the notes; waves on merge are retried by an apply on a merged merge request.
@@ -194,6 +211,64 @@ export function productPipelineJobs(forge, env, options) {
194
211
  const spec = given ?? (componentWaves
195
212
  ? componentWavesSpec(componentWaves.components, words, componentWaveSteps({ ...(words.bin ? { bin: words.bin } : {}), env, base: componentWaves.base ?? "HEAD^1", ...(member ? { member } : {}), op, gate: prLoop.gate }), { ...(componentWaves.waveGate ? { gate: componentWaves.waveGate } : {}) })
196
213
  : undefined);
214
+ // #4984: the waves before merge: the comment job (the note poll on GitLab) decides an open pull request's apply and starts them.
215
+ const wavesOp = spec ? (words.op ?? spec.name) : undefined;
216
+ let bmJobs;
217
+ if (wavesBeforeMerge) {
218
+ if (!spec || !wavesOp)
219
+ throw new Error("wavesBeforeMerge runs the waves on an open pull request's head, and there are none: give waves (or componentWaves)");
220
+ if (options.applyBeforeMerge)
221
+ throw new Error("wavesBeforeMerge and applyBeforeMerge both answer an open pull request's apply; give one");
222
+ if (forge === "gitlab" ? !options.noteCommands : !options.commentJob)
223
+ throw new Error(`wavesBeforeMerge is decided by ${forge === "gitlab" ? "the note poll: set noteCommands" : "the comment job: set commentJob"}`);
224
+ const targets = productPlan?.targets?.map((t) => t.name);
225
+ bmJobs = {
226
+ ...(forge !== "gitlab" ? { workflow: `${wavesOp}.yml` } : {}),
227
+ ...(wavesBeforeMerge.requires ? { requires: [...wavesBeforeMerge.requires] } : {}),
228
+ plan: targets?.length ? targets.map((t) => productStatusContext(words, "plan", t)) : [productStatusContext(words, "plan", member)],
229
+ pipelineFiles: wavesBeforeMerge.pipelineFiles ?? defaultPipelineFiles(forge),
230
+ ...(productPlan?.reach ? { locks: { ...(productPlan.reach.gate ? { gate: productPlan.reach.gate } : {}) } } : {}),
231
+ };
232
+ }
233
+ // #4984: GitLab's note poll writes a wave stop for a merged merge request, and decides the waves before merge.
234
+ if (out.noteCommands && spec && wavesOp) {
235
+ out.noteCommands = {
236
+ ...out.noteCommands,
237
+ env: {
238
+ [COMMENT_JOBS_ENV]: JSON.stringify({ waves: { op: wavesOp, count: spec.waves.length }, ...(bmJobs ? { wavesBeforeMerge: bmJobs } : {}) }),
239
+ ...(bmJobs && productPlan?.reach ? { [LOCK_REACH_ENV]: productPlan.reach.command } : {}),
240
+ },
241
+ };
242
+ }
243
+ // #4946: the comment job answers what no other job of the pipeline takes, so it is told which jobs there are.
244
+ if (options.commentJob) {
245
+ // #4963's re-plan reply answers the same stray comments, so one of the two answers them.
246
+ if (typeof productPlan?.replan === "object" && productPlan.replan.reply)
247
+ throw new Error("commentJob answers every /<product> comment no other job takes, and so does the product plan's replan.reply; drop replan.reply, since the comment job answers the re-plan's refusals too");
248
+ // The product plan's re-plan skips a target that is none of its own and, with forks: "skip", a fork's pull request without a word; the comment job says why.
249
+ const planTargets = productPlan?.replan ? productPlan.targets?.map((t) => t.name) : undefined;
250
+ const commentJobs = {
251
+ ...(productPlan?.replan || options.previewComment ? { preview: true } : {}),
252
+ ...(planTargets?.length ? { targets: planTargets } : {}),
253
+ ...(productPlan?.replan && productPlan.forks === "skip" ? { skipForks: true } : {}),
254
+ ...(options.applyBeforeMerge ? { applyBeforeMerge: true } : {}),
255
+ ...(given || componentWaves ? { applyOnMerge: true } : {}),
256
+ // #4979: the waves' op (the name productWavesSpec gives them) and count, so a wave-<n> stops a re-run after wave n.
257
+ ...(spec ? { waves: { op: words.op ?? spec.name, count: spec.waves.length } } : {}),
258
+ ...(bmJobs ? { wavesBeforeMerge: bmJobs } : {}),
259
+ // #4979: the product plan's re-plan takes no flags, so the comment job answers a plan comment that carries them.
260
+ ...(productPlan?.replan ? { noPlanFlags: true } : {}),
261
+ ...(locks.length > 0 ? { locks: true } : {}),
262
+ ...(out.agent ? { agent: true } : {}),
263
+ ...(out.commits ? { commits: true } : {}),
264
+ ...(options.actions || options.actionJob ? { actions: true } : {}),
265
+ };
266
+ const comment = productCommentJob(forge, words, commentJobs);
267
+ // #4984: the decision before merge locks what the reach line prints, at stage apply.
268
+ if (bmJobs && productPlan?.reach)
269
+ comment.env = { ...comment.env, [LOCK_REACH_ENV]: productPlan.reach.command };
270
+ out.comment = { ...comment, ...defaultRunner };
271
+ }
197
272
  if (!spec)
198
273
  return { ...out, record: record };
199
274
  const wavesRespond = respond ? Object.fromEntries(Object.entries(respond).filter(([e]) => e !== "description")) : {};
@@ -208,7 +283,17 @@ export function productPipelineJobs(forge, env, options) {
208
283
  ...(Object.keys(wavesRespond).length > 0 ? { respond: { ...(spec.respond ?? {}), ...wavesRespond } } : {}),
209
284
  };
210
285
  const specFile = wavesSpecFile ?? productWavesSpecFile(named.name);
211
- return { ...out, waves: { spec: named, specFile, jobs: opWaveJobs(named, specFile, { bin: words.bin }) } };
286
+ // #4984: what the generator's before-merge mode takes: the merge after the last wave and the lock file it releases.
287
+ const beforeMerge = wavesBeforeMerge
288
+ ? { ...(wavesBeforeMerge.merge ? { merge: wavesBeforeMerge.merge } : {}), ...(wavesBeforeMerge.mergeTokenSecret ? { mergeTokenSecret: wavesBeforeMerge.mergeTokenSecret } : {}), ...(productPlan?.reach?.gate ? { gate: productPlan.reach.gate } : {}) }
289
+ : undefined;
290
+ // #4987: the apply statuses after each wave, and with a product plan the stale marking beside wave 1, one --member per target.
291
+ const pipeline = {
292
+ ...(beforeMerge ? { beforeMerge } : {}),
293
+ ...(options.applyStatus ? { applyStatus: { context: productStatusContext(words, "apply", member) } } : {}),
294
+ ...(planStale ? { staleNotes: planStale } : {}),
295
+ };
296
+ return { ...out, waves: { spec: named, specFile, jobs: opWaveJobs(named, specFile, { bin: words.bin, ...(beforeMerge ? { beforeMerge: true } : {}) }), ...(beforeMerge ? { beforeMerge } : {}), pipeline } };
212
297
  }
213
298
  /** Where a component waves spec keeps the outputs each wave's components left, for the next wave's plans (#4588). */
214
299
  export function componentWaveOutputsFile(op) {
@@ -268,6 +353,27 @@ export function componentWavesSpec(components, wordsIn, steps, options = {}) {
268
353
  approvals: { ...(named.approvals ?? {}), pullRequest: { gate: options.prGate ?? words.prGate } },
269
354
  };
270
355
  }
356
+ /**
357
+ * The comment job's descriptor (#4946): `chant components pr-comment
358
+ * --forge <forge>` through the words' bin, the jobs it leaves comments to as
359
+ * {@link COMMENT_JOBS_ENV}, and the comment prefixes the forge's `if:`
360
+ * starts it on. Throws on GitLab, whose note-commands job answers every
361
+ * note.
362
+ */
363
+ export function productCommentJob(forge, words, jobs) {
364
+ if (forge === "gitlab")
365
+ throw new Error("the comment job answers a GitHub or Forgejo comment; on GitLab the note-commands job (noteCommands) answers every note, so drop commentJob");
366
+ for (const a of words.aliases)
367
+ if (/['\\]/.test(a.from))
368
+ throw new Error(`the alias ${JSON.stringify(a.from)} holds a quote, which the comment job's condition cannot carry`);
369
+ return {
370
+ jobName: PR_COMMENT_JOB,
371
+ command: withProductBin(`chant components pr-comment --forge ${forge}`, words.bin),
372
+ env: { GITHUB_TOKEN: GITHUB_JOB_TOKEN, [COMMENT_JOBS_ENV]: JSON.stringify(jobs) },
373
+ prefixes: [`/${words.product}`, ...words.aliases.map((a) => a.from)],
374
+ jobs,
375
+ };
376
+ }
271
377
  /** A shell line with the product's bin in place of `chant`, for a product's own jobs beside these. */
272
378
  export function productCommand(words, line) {
273
379
  return withProductBin(line, words.bin);
@@ -25,6 +25,9 @@
25
25
  * target's own variables and secrets, and an optional write probe before the
26
26
  * plan. A target is the note's and the status's member: `pr-post --member
27
27
  * <target>`, so each target has its note and its `<product>/plan/<target>`.
28
+ * With `evidence`, a target's note job (GitLab: `<target>-plan-evidence`)
29
+ * signs `plan:<target>` and `policy:<target>` (#4978,
30
+ * `targetEvidenceCheck`): one target's plan says nothing of another's.
28
31
  *
29
32
  * The forge lexicons render these descriptors
30
33
  * (`generateProductPlanPipeline` in each): the products call them in
@@ -35,11 +38,12 @@ import type { CiRunner } from "../ci-jobs.js";
35
38
  import type { CiProductWords } from "../ci-product-words.js";
36
39
  import type { PrPlanNoteWords } from "../pr-plan-note.js";
37
40
  import { type PipelineEvidence } from "../ci-evidence-jobs.js";
38
- import { type PrLoopPipelineOptions } from "./pr-pipeline.js";
41
+ import { PR_LOCK_JOB, type PrLoopPipelineOptions } from "./pr-pipeline.js";
39
42
  import { type CloudLoginSpec } from "../ci-login.js";
40
43
  import type { OpWaveRunStep } from "../lexicon.js";
41
44
  import { type ControlNoteCheckout, type ControlTarget } from "../control/dispatch.js";
42
45
  import { type ScheduledWatch } from "../op/schedule-overdue.js";
46
+ import { type CloudTradeSpec } from "../ci-identity.js";
43
47
  /** The variable the plan-note job reads the product's note words from (#4799), as JSON. Set from the pipeline, never from the report. */
44
48
  export declare const PR_PLAN_NOTE_WORDS_ENV = "CHANT_PLAN_NOTE_WORDS";
45
49
  /** One target the product plans in a job of its own (#4799): an environment, for sql-yodeler. */
@@ -65,6 +69,48 @@ export interface ProductPlanTarget {
65
69
  login?: CloudLoginSpec;
66
70
  /** OIDC tokens this target's plan job requests besides its login's, `{ <variable>: <audience> }`, in place of the plan's {@link ProductPlanOptions.idTokens}. */
67
71
  idTokens?: Record<string, string>;
72
+ /** This target's trade (#4963), in place of the plan's {@link ProductPlanOptions.trade}. A target gives one of `login` and `trade`. */
73
+ trade?: CloudTradeSpec;
74
+ }
75
+ /**
76
+ * What the comment re-plan does besides answering the plan command (#4963),
77
+ * `replan: { ... }` in place of `replan: true`.
78
+ */
79
+ export interface ProductPlanReplanOptions {
80
+ /**
81
+ * Re-plan from `workflow_dispatch` too, on GitHub and Forgejo: the inputs
82
+ * `pr` (the pull request) and `argument` (default `argument`; the target,
83
+ * or the one word {@link PLAN_ARGUMENT_ENV} reads, such as terragucci's
84
+ * `root`). Either forge lets only someone who can write to the repository
85
+ * dispatch, so the decision asks no permission for it. On GitLab a web
86
+ * pipeline of the target branch with `CHANT_PREVIEW_PR` and
87
+ * `CHANT_PREVIEW_COMMENT` is the dispatch already, so it renders nothing
88
+ * more there.
89
+ */
90
+ dispatch?: boolean | {
91
+ argument?: string;
92
+ };
93
+ /**
94
+ * Reply to a `/<product>` comment no other job takes (#4963), on GitHub
95
+ * and Forgejo: a word that is not the plan command, a target that is none
96
+ * of the plan's, and a pull request from a fork with `forks: "skip"`. The
97
+ * reply names the commands. `others` are the comments the product's own
98
+ * jobs answer, such as `/terragucci apply`: the re-plan leaves them alone.
99
+ * With targets, the first target's re-plan job replies. GitLab's
100
+ * note-commands job answers every comment already.
101
+ */
102
+ reply?: boolean | {
103
+ others?: string[];
104
+ };
105
+ /**
106
+ * Reply "not affected" for a re-plan narrowed to one argument the change
107
+ * does not reach (#4963): when the hand-off's note says `nothing` (or a
108
+ * `PrReport` says `nothing`), the re-plan's note job comments
109
+ * `<product>: <argument> is not affected by this pull request, so
110
+ * nothing was planned.` and leaves the note and the status as they were
111
+ * (`pr-post --not-affected <argument>`).
112
+ */
113
+ notAffected?: boolean;
68
114
  }
69
115
  /**
70
116
  * A step a product's plan job runs before its setup lines (#4899): a shell
@@ -108,7 +154,27 @@ export interface ProductPlanReplanJob {
108
154
  };
109
155
  /** The artifact the note job (GitHub, Forgejo) or the re-plan job (GitLab) keeps the directory as. */
110
156
  artifact: string;
157
+ /** With `dispatch` (#4963), GitHub and Forgejo: the `workflow_dispatch` input that names the argument. */
158
+ dispatch?: {
159
+ argument: string;
160
+ };
161
+ /** With `reply` (#4963), GitHub and Forgejo, on one re-plan job: the product's prefix and the comments other jobs answer. */
162
+ reply?: {
163
+ prefix: string;
164
+ others: string[];
165
+ };
166
+ /** With `notAffected` (#4963): the note job's command carries `--not-affected`, and reads the argument as {@link PLAN_ARGUMENT_ENV}. */
167
+ notAffected?: true;
111
168
  }
169
+ /**
170
+ * The one word a comment re-plan takes after the command (#4899): letters,
171
+ * digits and `_./@+=,:-`, and (#4984) never starting with `-`, so a flag
172
+ * such as `--target=x` is refused rather than read as a root. The source
173
+ * of a regular expression, without anchors.
174
+ */
175
+ export declare const REPLAN_WORD_SOURCE = "[A-Za-z0-9_.\\/@+=,:][A-Za-z0-9_.\\/@+=,:-]*";
176
+ /** Whether `word` is one a re-plan takes (#4984). */
177
+ export declare function isReplanWord(word: string): boolean;
112
178
  /** The variable a comment re-plan's one argument reaches the plan verb in (#4899). Empty on a pull request's own plan. */
113
179
  export declare const PLAN_ARGUMENT_ENV = "CHANT_PLAN_ARGUMENT";
114
180
  /** The file the note job's own lines write extra notices to, one a line (#4931): `pr-post` adds them under the note's counts. */
@@ -205,7 +271,37 @@ export interface ProductPlanOptions {
205
271
  * pipeline of the target branch for the comment, which runs the re-plan
206
272
  * jobs whose target the comment names.
207
273
  */
208
- replan?: boolean;
274
+ replan?: boolean | ProductPlanReplanOptions;
275
+ /**
276
+ * The plan job's trade (#4963): chant's trade of the job's OIDC token for
277
+ * the plan identities' own credentials (`@intentius/chant/ci-identity`,
278
+ * #4296), before the change is checked out, as terragucci's re-plan
279
+ * trades. The plan job and the re-plan job trade in a step of their own
280
+ * (GitHub, Forgejo: after the pending status and the re-plan's decision,
281
+ * before the checkout; GitLab: the script's first lines, before the
282
+ * re-plan checks out the head), and every later step starts without the
283
+ * variables a token is requested with, so the change's code holds the
284
+ * traded credentials and no OIDC token. Give one of `login` and `trade`.
285
+ */
286
+ trade?: CloudTradeSpec;
287
+ /**
288
+ * The previous note's product marker for the plan verb (#4963), on GitHub
289
+ * and Forgejo: a step before the checkout, which alone holds the job's
290
+ * token, finds the pull request's note by chant's marker and sets
291
+ * `CHANT_PLAN_PREVIOUS_MARKER` to the body of its second line, the
292
+ * product's own (`noteWords.productMarker`, a hand-off's `marker`), so a
293
+ * plan verb such as `yodel plan` reads the digest subject it left there
294
+ * and says what moved. Empty when there is no note yet. The body was
295
+ * checked against the marker's pattern before chant posted it, and is
296
+ * checked again. Needs `noteWords.productMarker`. GitLab's plan job holds
297
+ * no token to read a note with, so it takes none.
298
+ *
299
+ * @deprecated #4972: hand the plan's `subject` in the plan note hand-off
300
+ * instead. The note job compares it with the previous note's on every
301
+ * forge and says what changed, so the plan job reads no note. This option
302
+ * still works on GitHub and Forgejo.
303
+ */
304
+ previousMarker?: boolean;
209
305
  /**
210
306
  * Lines the note job runs (#4931), on GitHub and Forgejo, in the job that
211
307
  * holds the token and none of the change's code: `before` after the report
@@ -215,10 +311,16 @@ export interface ProductPlanOptions {
215
311
  * note's counts, such as terragucci's notice naming whose review does not
216
312
  * count. They reach the job's token as `GITHUB_TOKEN`. GitLab's note job
217
313
  * posts every open merge request's note in one run, so it takes none.
314
+ *
315
+ * With `pullRequest` (#4963) the lines also read the pull request and the
316
+ * commit planned as `PR_NUMBER` and `HEAD_SHA`, the note's own, which in
317
+ * a re-plan's note job come from the re-plan job, such as terragucci's
318
+ * notice and approval status, which ask the forge about the head.
218
319
  */
219
320
  noteSteps?: {
220
321
  before?: string[];
221
322
  after?: string[];
323
+ pullRequest?: boolean;
222
324
  };
223
325
  /**
224
326
  * The product's own scheduled jobs the note job checks for having stopped
@@ -228,7 +330,10 @@ export interface ProductPlanOptions {
228
330
  * so `pr-post` asks the forge when each last ran, in its checkout of the
229
331
  * target branch's commit, and adds the line for one that is overdue under
230
332
  * the note's counts. They reach it as `CHANT_PLAN_WATCHES`, from the
231
- * pipeline, never from the plan job's report.
333
+ * pipeline, never from the plan job's report. #4988: a watch's `targets`
334
+ * scope it to those targets' notes, such as an environment's drift
335
+ * watch to that environment's note; left out, every target's note checks
336
+ * it.
232
337
  */
233
338
  watches?: ScheduledWatch[];
234
339
  /**
@@ -245,7 +350,48 @@ export interface ProductPlanOptions {
245
350
  * Unsigned, as `pr-plan`'s is (#4328). Default off.
246
351
  */
247
352
  record?: boolean;
353
+ /**
354
+ * What the lock job locks under `locks: "plan"` (#4979): the targets the
355
+ * change reaches, by the product's reach line, in place of what a
356
+ * `PrReport` selected. `command` is one shell line that prints the target
357
+ * names the change from `$BASE_SHA` to `$HEAD_SHA` reaches, one a line,
358
+ * reading the change's files as data from git (`git diff`, `git show`),
359
+ * such as terragucci's roots, Terragrunt units or Atmos instances. It
360
+ * runs at the target branch's commit, after chant fetched the pull
361
+ * request's head and checked it is the head the job was started for
362
+ * (`chant lock --reach`, ../lifecycle/reach-locks.ts), so none of the
363
+ * change's code runs in the job that holds the write token. `gate` names
364
+ * the lock file, `_locks/<gate>.json` (default the pull request loop's).
365
+ *
366
+ * GitHub and Forgejo run one `lock` job on each push of a pull request
367
+ * from this repository, beside the plan, and the `unlock` job on close.
368
+ * On GitLab, where a merge request's pipeline is built from its own files,
369
+ * the `lock` job runs in the target branch's plan notes pipeline and locks
370
+ * every open merge request (`--open`), releasing the locks of one that is
371
+ * no longer open; with `noteCommands` the comment lock and unlock jobs
372
+ * answer `/<product> lock` and `/<product> unlock` there too.
373
+ */
374
+ reach?: {
375
+ command: string;
376
+ gate?: string;
377
+ };
378
+ }
379
+ /** The lock job a product plan with {@link ProductPlanOptions.reach} writes (#4979): its command and the values the command reads. */
380
+ export interface ProductPlanReachLock {
381
+ jobName: typeof PR_LOCK_JOB;
382
+ command: string;
383
+ env: Record<string, string>;
384
+ runner?: CiRunner;
248
385
  }
386
+ /**
387
+ * The reach lock job (#4979), under `locks: "plan"` with `reach`: `chant lock
388
+ * --reach` through the words' bin, with the reach line as
389
+ * {@link LOCK_REACH_ENV}. On GitHub and Forgejo it locks the pull request of
390
+ * the event; on GitLab every open merge request into the branch.
391
+ */
392
+ export declare function productPlanReachLock(forge: ForgeKind, loop: Pick<PrLoopPipelineOptions, "locks" | "runners"> & {
393
+ plan: Pick<ProductPlanOptions, "reach">;
394
+ }, words: CiProductWords): ProductPlanReachLock | undefined;
249
395
  /** The file a product plan job writes its run record to under the hand-off directory, and the Op it is recorded under: `pr-plan`'s (#4899, ../pr-plan-record.ts). */
250
396
  export { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE } from "../pr-plan-record.js";
251
397
  /** The variable the plan step reads the record's op, environment and labels from (#4899), as JSON. */
@@ -277,7 +423,8 @@ export interface ProductPlanJob {
277
423
  noteRunner?: CiRunner;
278
424
  /**
279
425
  * With the pipeline's `evidence` (#4870): the lines that sign the plan
280
- * job's `plan` and `policy` checks from its report, and their variables
426
+ * job's `plan` and `policy` checks from its report (with a target,
427
+ * `plan:<target>` and `policy:<target>`, #4978), and their variables
281
428
  * (the runner key from its secret). GitHub and Forgejo run them in the
282
429
  * note job before `pr-post`; GitLab in a job of their own, `jobName`, in
283
430
  * the target branch's plan notes pipeline before the note job (#4914),
@@ -316,10 +463,18 @@ export interface ProductPlanJob {
316
463
  report?: string;
317
464
  /** The comment re-plan's jobs for this target (#4899). */
318
465
  replan?: ProductPlanReplanJob;
319
- /** The note job's own lines (#4931). */
466
+ /** The note job's own lines (#4931); with `pullRequest` (#4963) they read `PR_NUMBER` and `HEAD_SHA`. */
320
467
  noteSteps?: {
321
468
  before: string[];
322
469
  after: string[];
470
+ pullRequest?: true;
471
+ };
472
+ /** The trade before the checkout (#4963), and on GitLab the `id_tokens` it reads (in `idTokens` too). */
473
+ trade?: CloudTradeSpec;
474
+ /** With `previousMarker` (#4963): the note's marker and the product marker's name the read step looks for. */
475
+ previous?: {
476
+ marker: string;
477
+ name: string;
323
478
  };
324
479
  /** With `record` (#4899): the plan step writes the run record, `env` its op, environment and labels as {@link PLAN_RUN_RECORD_ENV}; the note job's command records it. */
325
480
  record?: {
@@ -362,6 +517,37 @@ export declare function gitlabReplanCommentIf(replan: Pick<ProductPlanReplanJob,
362
517
  * `head`, `base` and `argument` to the step's outputs.
363
518
  */
364
519
  export declare const REPLAN_DECIDE_JS: string;
520
+ /**
521
+ * The re-plan's decision script (#4899) with what `replan`'s options add
522
+ * (#4963). With neither it is {@link REPLAN_DECIDE_JS}, as before.
523
+ *
524
+ * - `dispatch`: on `workflow_dispatch` the pull request is the `pr` input
525
+ * and the argument the input `CHANT_REPLAN_DISPATCH_ARGUMENT` names;
526
+ * a `pr` that is not a number, or an argument that is not one plain
527
+ * word, fails the job. No permission is asked: only a writer dispatches.
528
+ * - `reply`: a comment that starts with `CHANT_REPLAN_PRODUCT` and is not
529
+ * the plan command, nor one of `CHANT_REPLAN_OTHERS`, a target that is
530
+ * none of the plan's, and a fork's pull request with `forks: "skip"`
531
+ * get a reply comment with the reason, once the commenter's permission
532
+ * is known (Forgejo). A dispatch's reason goes to the log alone.
533
+ */
534
+ export declare function replanDecideJs(opts?: {
535
+ dispatch?: boolean;
536
+ reply?: boolean;
537
+ }): string;
538
+ /**
539
+ * The previous note's read step on GitHub and Forgejo (#4963): `node -e`,
540
+ * from `/`, with the job's token in `CHANT_PREVIOUS_TOKEN` alone. It pages
541
+ * through pull request `CHANT_PREVIOUS_PR`'s comments for the one whose
542
+ * first line is `CHANT_PREVIOUS_NOTE` (chant's marker), takes its second
543
+ * line's body when it is `<!-- <CHANT_PREVIOUS_NAME> <body> -->` and the
544
+ * body is plain words, and appends `CHANT_PLAN_PREVIOUS_MARKER=<body>` to
545
+ * `$GITHUB_ENV`, empty when there is none. A forge that refuses is a
546
+ * warning: the plan verb plans without it.
547
+ */
548
+ export declare const PREVIOUS_MARKER_JS: string;
549
+ /** The GitLab re-plan's lines that set {@link PLAN_ARGUMENT_ENV} from the comment's one word after the command (#4899), which the rule already held to plain characters. */
550
+ export declare function gitlabReplanArgumentLines(replan: Pick<ProductPlanReplanJob, "comments" | "gated">): string[];
365
551
  /**
366
552
  * The pending step's script on GitHub and Forgejo (#4899): `node -e`, from
367
553
  * `/`, posting the plan status pending at `CHANT_PENDING_SHA` with the token
@@ -385,9 +571,20 @@ export declare function planVerbLines(p: Pick<ProductPlanJob, "command" | "repor
385
571
  * job names.
386
572
  */
387
573
  export declare const PLAN_RECORD_JS: string;
388
- /** The evidence step of one plan job (#4870), as {@link ProductPlanJob.evidence}. */
574
+ /**
575
+ * The evidence step of one plan job (#4870), as {@link ProductPlanJob.evidence}.
576
+ * #4964: for a workspace member's pipeline (`member`) the checks are signed
577
+ * as `plan:<member>` and `policy:<member>` (`--member`), and on GitLab the
578
+ * report is read from the plan job's artifact at the member's `reportPath`.
579
+ * #4978: a product plan target's plan job is signed the same way, under the
580
+ * target's name.
581
+ */
389
582
  export declare function planEvidenceOf(forge: ForgeKind, evidence: PipelineEvidence, words: CiProductWords, planJob: string, opts?: {
390
583
  noForks?: boolean;
584
+ member?: {
585
+ name: string;
586
+ reportPath: string;
587
+ };
391
588
  }): NonNullable<ProductPlanJob["evidence"]>;
392
589
  /** The GitHub and Forgejo condition that a pull request is from this repository, not a fork (#4799). */
393
590
  export declare const SAME_REPOSITORY_IF = "github.event.pull_request.head.repo.full_name == github.repository";
@@ -1 +1 @@
1
- {"version":3,"file":"product-plan.d.ts","sourceRoot":"","sources":["../../src/components/product-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAA0I,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACpM,OAAO,EAAyG,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAElK,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAuB,KAAK,mBAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAExG,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGtG,yIAAyI;AACzI,eAAO,MAAM,sBAAsB,0BAA0B,CAAC;AAE9D,iGAAiG;AACjG,MAAM,WAAW,iBAAiB;IAChC,wHAAwH;IACxH,IAAI,EAAE,MAAM,CAAC;IACb,4GAA4G;IAC5G,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,gIAAgI;IAChI,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM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