@intentius/chant 0.124.87 → 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 (483) hide show
  1. package/dist/action-pins.d.ts +1 -0
  2. package/dist/action-pins.d.ts.map +1 -1
  3. package/dist/action-pins.js +2 -0
  4. package/dist/actor.d.ts +47 -0
  5. package/dist/actor.d.ts.map +1 -0
  6. package/dist/actor.js +56 -0
  7. package/dist/bundle-check.d.ts +20 -5
  8. package/dist/bundle-check.d.ts.map +1 -1
  9. package/dist/bundle-check.js +20 -5
  10. package/dist/chant-install.d.ts +98 -0
  11. package/dist/chant-install.d.ts.map +1 -1
  12. package/dist/chant-install.js +203 -2
  13. package/dist/ci-base.d.ts +30 -0
  14. package/dist/ci-base.d.ts.map +1 -0
  15. package/dist/ci-base.js +33 -0
  16. package/dist/ci-comment-commands.d.ts +177 -0
  17. package/dist/ci-comment-commands.d.ts.map +1 -0
  18. package/dist/ci-comment-commands.js +325 -0
  19. package/dist/ci-comment-replies.d.ts +40 -0
  20. package/dist/ci-comment-replies.d.ts.map +1 -0
  21. package/dist/ci-comment-replies.js +59 -0
  22. package/dist/ci-commit.d.ts +1 -1
  23. package/dist/ci-commit.d.ts.map +1 -1
  24. package/dist/ci-commit.js +1 -2
  25. package/dist/ci-control.d.ts +1 -1
  26. package/dist/ci-control.d.ts.map +1 -1
  27. package/dist/ci-control.js +1 -1
  28. package/dist/ci-evidence-claims.d.ts +59 -0
  29. package/dist/ci-evidence-claims.d.ts.map +1 -0
  30. package/dist/ci-evidence-claims.js +87 -0
  31. package/dist/ci-evidence-from-job.d.ts +128 -0
  32. package/dist/ci-evidence-from-job.d.ts.map +1 -0
  33. package/dist/ci-evidence-from-job.js +203 -0
  34. package/dist/ci-evidence-jobs.d.ts +68 -4
  35. package/dist/ci-evidence-jobs.d.ts.map +1 -1
  36. package/dist/ci-evidence-jobs.js +82 -5
  37. package/dist/ci-handover.d.ts +12 -0
  38. package/dist/ci-handover.d.ts.map +1 -1
  39. package/dist/ci-handover.js +15 -3
  40. package/dist/ci-identity.d.ts +32 -6
  41. package/dist/ci-identity.d.ts.map +1 -1
  42. package/dist/ci-identity.js +40 -8
  43. package/dist/ci-image.d.ts +65 -10
  44. package/dist/ci-image.d.ts.map +1 -1
  45. package/dist/ci-image.js +101 -22
  46. package/dist/ci-jobs.d.ts +1 -1
  47. package/dist/ci-jobs.d.ts.map +1 -1
  48. package/dist/ci-jobs.js +7 -2
  49. package/dist/ci-login.d.ts +75 -13
  50. package/dist/ci-login.d.ts.map +1 -1
  51. package/dist/ci-login.js +89 -37
  52. package/dist/ci-note-commands.d.ts +63 -3
  53. package/dist/ci-note-commands.d.ts.map +1 -1
  54. package/dist/ci-note-commands.js +69 -35
  55. package/dist/ci-product-words.d.ts +62 -1
  56. package/dist/ci-product-words.d.ts.map +1 -1
  57. package/dist/ci-product-words.js +52 -1
  58. package/dist/ci-product.d.ts +52 -2
  59. package/dist/ci-product.d.ts.map +1 -1
  60. package/dist/ci-product.js +51 -2
  61. package/dist/cli/commands/build.d.ts.map +1 -1
  62. package/dist/cli/commands/build.js +29 -2
  63. package/dist/cli/handlers/approve-confirm.d.ts +14 -0
  64. package/dist/cli/handlers/approve-confirm.d.ts.map +1 -1
  65. package/dist/cli/handlers/approve-confirm.js +46 -0
  66. package/dist/cli/handlers/approve.d.ts.map +1 -1
  67. package/dist/cli/handlers/approve.js +2 -1
  68. package/dist/cli/handlers/build.d.ts +1 -1
  69. package/dist/cli/handlers/build.d.ts.map +1 -1
  70. package/dist/cli/handlers/build.js +22 -1
  71. package/dist/cli/handlers/ci-check.d.ts +1 -1
  72. package/dist/cli/handlers/ci-check.d.ts.map +1 -1
  73. package/dist/cli/handlers/ci-check.js +37 -7
  74. package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
  75. package/dist/cli/handlers/ci-evidence.js +255 -20
  76. package/dist/cli/handlers/ci-forge-check.d.ts.map +1 -1
  77. package/dist/cli/handlers/ci-forge-check.js +34 -17
  78. package/dist/cli/handlers/components.d.ts.map +1 -1
  79. package/dist/cli/handlers/components.js +3 -1
  80. package/dist/cli/handlers/generated-check.d.ts +11 -0
  81. package/dist/cli/handlers/generated-check.d.ts.map +1 -0
  82. package/dist/cli/handlers/generated-check.js +71 -0
  83. package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
  84. package/dist/cli/handlers/lifecycle.js +3 -0
  85. package/dist/cli/handlers/local-chant.d.ts +13 -0
  86. package/dist/cli/handlers/local-chant.d.ts.map +1 -1
  87. package/dist/cli/handlers/local-chant.js +42 -1
  88. package/dist/cli/handlers/lock.d.ts.map +1 -1
  89. package/dist/cli/handlers/lock.js +121 -4
  90. package/dist/cli/handlers/pr-comment.d.ts +21 -0
  91. package/dist/cli/handlers/pr-comment.d.ts.map +1 -0
  92. package/dist/cli/handlers/pr-comment.js +112 -0
  93. package/dist/cli/handlers/pr-env.d.ts.map +1 -1
  94. package/dist/cli/handlers/pr-env.js +6 -3
  95. package/dist/cli/handlers/pr.d.ts +23 -1
  96. package/dist/cli/handlers/pr.d.ts.map +1 -1
  97. package/dist/cli/handlers/pr.js +97 -14
  98. package/dist/cli/handlers/promote.d.ts.map +1 -1
  99. package/dist/cli/handlers/promote.js +2 -1
  100. package/dist/cli/handlers/release.d.ts.map +1 -1
  101. package/dist/cli/handlers/release.js +11 -2
  102. package/dist/cli/handlers/run-wave.d.ts.map +1 -1
  103. package/dist/cli/handlers/run-wave.js +36 -2
  104. package/dist/cli/handlers/run.d.ts.map +1 -1
  105. package/dist/cli/handlers/run.js +2 -1
  106. package/dist/cli/main.d.ts.map +1 -1
  107. package/dist/cli/main.js +60 -4
  108. package/dist/cli/parse-args.d.ts.map +1 -1
  109. package/dist/cli/parse-args.js +82 -0
  110. package/dist/cli/registry.d.ts +35 -0
  111. package/dist/cli/registry.d.ts.map +1 -1
  112. package/dist/components/auto-release.d.ts.map +1 -1
  113. package/dist/components/auto-release.js +2 -1
  114. package/dist/components/check-hooks.d.ts +10 -0
  115. package/dist/components/check-hooks.d.ts.map +1 -1
  116. package/dist/components/check-hooks.js +18 -0
  117. package/dist/components/pr-checks.d.ts +169 -0
  118. package/dist/components/pr-checks.d.ts.map +1 -0
  119. package/dist/components/pr-checks.js +180 -0
  120. package/dist/components/pr-pipeline.d.ts +38 -0
  121. package/dist/components/pr-pipeline.d.ts.map +1 -1
  122. package/dist/components/pr-pipeline.js +6 -1
  123. package/dist/components/product-pipeline.d.ts +58 -2
  124. package/dist/components/product-pipeline.d.ts.map +1 -1
  125. package/dist/components/product-pipeline.js +76 -9
  126. package/dist/components/product-plan.d.ts +445 -7
  127. package/dist/components/product-plan.d.ts.map +1 -1
  128. package/dist/components/product-plan.js +426 -15
  129. package/dist/config.d.ts +10 -6
  130. package/dist/config.d.ts.map +1 -1
  131. package/dist/config.js +11 -6
  132. package/dist/control/consumers.d.ts +6 -0
  133. package/dist/control/consumers.d.ts.map +1 -1
  134. package/dist/control/consumers.js +6 -0
  135. package/dist/dead-guards.d.ts.map +1 -1
  136. package/dist/dead-guards.js +9 -6
  137. package/dist/discovery/files.d.ts +1 -1
  138. package/dist/discovery/files.js +1 -1
  139. package/dist/drift-issue.d.ts +20 -3
  140. package/dist/drift-issue.d.ts.map +1 -1
  141. package/dist/drift-issue.js +16 -0
  142. package/dist/drift-record.d.ts +52 -5
  143. package/dist/drift-record.d.ts.map +1 -1
  144. package/dist/drift-record.js +46 -6
  145. package/dist/floor-table.d.ts +6 -6
  146. package/dist/floor-table.d.ts.map +1 -1
  147. package/dist/floor-table.data.d.ts.map +1 -1
  148. package/dist/floor-table.data.js +81 -21
  149. package/dist/floor-table.js +10 -7
  150. package/dist/forge-check/contract.d.ts +19 -1
  151. package/dist/forge-check/contract.d.ts.map +1 -1
  152. package/dist/forge-check/contract.js +8 -2
  153. package/dist/forge-check/index.d.ts +4 -0
  154. package/dist/forge-check/index.d.ts.map +1 -1
  155. package/dist/forge-check/index.js +4 -0
  156. package/dist/forge-flags.d.ts +10 -0
  157. package/dist/forge-flags.d.ts.map +1 -1
  158. package/dist/forge-flags.js +31 -0
  159. package/dist/forge-remote.d.ts +47 -0
  160. package/dist/forge-remote.d.ts.map +1 -0
  161. package/dist/forge-remote.js +69 -0
  162. package/dist/gate-resume-run.d.ts +9 -1
  163. package/dist/gate-resume-run.d.ts.map +1 -1
  164. package/dist/gate-resume-run.js +26 -3
  165. package/dist/generated-check.d.ts +88 -0
  166. package/dist/generated-check.d.ts.map +1 -0
  167. package/dist/generated-check.js +248 -0
  168. package/dist/image-pins.d.ts +26 -0
  169. package/dist/image-pins.d.ts.map +1 -0
  170. package/dist/image-pins.js +19 -0
  171. package/dist/lexicon.d.ts +27 -0
  172. package/dist/lexicon.d.ts.map +1 -1
  173. package/dist/lifecycle/git.d.ts +11 -0
  174. package/dist/lifecycle/git.d.ts.map +1 -1
  175. package/dist/lifecycle/git.js +30 -3
  176. package/dist/lifecycle/publish-npm.d.ts +26 -0
  177. package/dist/lifecycle/publish-npm.d.ts.map +1 -1
  178. package/dist/lifecycle/publish-npm.js +76 -4
  179. package/dist/lifecycle/reach-locks.d.ts +131 -0
  180. package/dist/lifecycle/reach-locks.d.ts.map +1 -0
  181. package/dist/lifecycle/reach-locks.js +118 -0
  182. package/dist/lifecycle/release-cut.d.ts +3 -1
  183. package/dist/lifecycle/release-cut.d.ts.map +1 -1
  184. package/dist/lifecycle/release-cut.js +15 -0
  185. package/dist/lifecycle/release-images.d.ts +22 -1
  186. package/dist/lifecycle/release-images.d.ts.map +1 -1
  187. package/dist/lifecycle/release-images.js +26 -3
  188. package/dist/lifecycle/release-ledger.d.ts +4 -3
  189. package/dist/lifecycle/release-ledger.d.ts.map +1 -1
  190. package/dist/lifecycle/release-ledger.js +3 -2
  191. package/dist/local-chant.d.ts +57 -3
  192. package/dist/local-chant.d.ts.map +1 -1
  193. package/dist/local-chant.js +122 -13
  194. package/dist/notify-product.d.ts +12 -3
  195. package/dist/notify-product.d.ts.map +1 -1
  196. package/dist/notify-product.js +10 -6
  197. package/dist/op/activities/source-release.d.ts.map +1 -1
  198. package/dist/op/activities/source-release.js +2 -1
  199. package/dist/op/activities/source-rollback.d.ts.map +1 -1
  200. package/dist/op/activities/source-rollback.js +2 -1
  201. package/dist/op/index.d.ts +2 -0
  202. package/dist/op/index.d.ts.map +1 -1
  203. package/dist/op/index.js +1 -0
  204. package/dist/op/op-waves-evidence-jobs.d.ts +97 -0
  205. package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -0
  206. package/dist/op/op-waves-evidence-jobs.js +118 -0
  207. package/dist/op/op-waves-evidence.d.ts +12 -1
  208. package/dist/op/op-waves-evidence.d.ts.map +1 -1
  209. package/dist/op/op-waves-evidence.js +23 -2
  210. package/dist/op/op-waves-render-spec.d.ts +100 -0
  211. package/dist/op/op-waves-render-spec.d.ts.map +1 -0
  212. package/dist/op/op-waves-render-spec.js +162 -0
  213. package/dist/op/op-waves-run.d.ts +14 -1
  214. package/dist/op/op-waves-run.d.ts.map +1 -1
  215. package/dist/op/op-waves-run.js +56 -4
  216. package/dist/op/op-waves.d.ts +12 -0
  217. package/dist/op/op-waves.d.ts.map +1 -1
  218. package/dist/op/op-waves.js +14 -1
  219. package/dist/op/schedule-overdue.d.ts +39 -2
  220. package/dist/op/schedule-overdue.d.ts.map +1 -1
  221. package/dist/op/schedule-overdue.js +148 -10
  222. package/dist/op/wave-stop.d.ts +64 -0
  223. package/dist/op/wave-stop.d.ts.map +1 -0
  224. package/dist/op/wave-stop.js +127 -0
  225. package/dist/planned-files.d.ts +76 -0
  226. package/dist/planned-files.d.ts.map +1 -0
  227. package/dist/planned-files.js +108 -0
  228. package/dist/pr-forge-job.d.ts +22 -0
  229. package/dist/pr-forge-job.d.ts.map +1 -0
  230. package/dist/pr-forge-job.js +46 -0
  231. package/dist/pr-forge-reads.d.ts +21 -1
  232. package/dist/pr-forge-reads.d.ts.map +1 -1
  233. package/dist/pr-forge-reads.js +19 -1
  234. package/dist/pr-forge.d.ts +7 -1
  235. package/dist/pr-forge.d.ts.map +1 -1
  236. package/dist/pr-forge.js +7 -2
  237. package/dist/pr-loop.d.ts +3 -6
  238. package/dist/pr-loop.d.ts.map +1 -1
  239. package/dist/pr-loop.js +4 -81
  240. package/dist/pr-plan-note.d.ts +121 -0
  241. package/dist/pr-plan-note.d.ts.map +1 -1
  242. package/dist/pr-plan-note.js +104 -1
  243. package/dist/pr-plan-record.d.ts +47 -0
  244. package/dist/pr-plan-record.d.ts.map +1 -0
  245. package/dist/pr-plan-record.js +89 -0
  246. package/dist/pr-post.d.ts +68 -3
  247. package/dist/pr-post.d.ts.map +1 -1
  248. package/dist/pr-post.js +218 -13
  249. package/dist/pr-requires.d.ts +8 -0
  250. package/dist/pr-requires.d.ts.map +1 -1
  251. package/dist/pr-requires.js +3 -1
  252. package/dist/pr-status.d.ts +16 -0
  253. package/dist/pr-status.d.ts.map +1 -0
  254. package/dist/pr-status.js +90 -0
  255. package/dist/ref-gate-init.d.ts +90 -0
  256. package/dist/ref-gate-init.d.ts.map +1 -0
  257. package/dist/ref-gate-init.js +155 -0
  258. package/dist/ref-gate-rules.d.ts +19 -0
  259. package/dist/ref-gate-rules.d.ts.map +1 -0
  260. package/dist/ref-gate-rules.js +17 -0
  261. package/dist/release-floors.d.ts +100 -16
  262. package/dist/release-floors.d.ts.map +1 -1
  263. package/dist/release-floors.js +101 -17
  264. package/dist/render-module.d.ts +15 -0
  265. package/dist/render-module.d.ts.map +1 -0
  266. package/dist/render-module.js +73 -0
  267. package/dist/state-migration.d.ts +24 -1
  268. package/dist/state-migration.d.ts.map +1 -1
  269. package/dist/state-migration.js +39 -4
  270. package/dist/state-unlock.d.ts +32 -1
  271. package/dist/state-unlock.d.ts.map +1 -1
  272. package/dist/state-unlock.js +31 -0
  273. package/dist/wave-runtime.mjs +307 -297
  274. package/dist/workspace/ci-green-cli.d.ts.map +1 -1
  275. package/dist/workspace/ci-green-cli.js +15 -8
  276. package/dist/workspace/drift-cli.d.ts +1 -1
  277. package/dist/workspace/drift-cli.d.ts.map +1 -1
  278. package/dist/workspace/drift-cli.js +5 -12
  279. package/dist/workspace/forge-work.d.ts +3 -2
  280. package/dist/workspace/forge-work.d.ts.map +1 -1
  281. package/dist/workspace/forge-work.js +7 -17
  282. package/dist/workspace/lexicon-outputs.js +2 -2
  283. package/dist/workspace/release-train.d.ts.map +1 -1
  284. package/dist/workspace/release-train.js +2 -1
  285. package/dist/workspace/release-workflow.d.ts +27 -3
  286. package/dist/workspace/release-workflow.d.ts.map +1 -1
  287. package/dist/workspace/release-workflow.js +52 -7
  288. package/dist/workspace/trust/check-evidence-report.d.ts +25 -2
  289. package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
  290. package/dist/workspace/trust/check-evidence-report.js +28 -8
  291. package/dist/workspace/trust/check-evidence.d.ts +13 -1
  292. package/dist/workspace/trust/check-evidence.d.ts.map +1 -1
  293. package/dist/workspace/trust/check-evidence.js +8 -3
  294. package/dist/workspace/trust/evidence.d.ts +5 -0
  295. package/dist/workspace/trust/evidence.d.ts.map +1 -1
  296. package/dist/workspace/trust/evidence.js +5 -0
  297. package/dist/workspace/trust/open-evidence.d.ts +67 -0
  298. package/dist/workspace/trust/open-evidence.d.ts.map +1 -0
  299. package/dist/workspace/trust/open-evidence.js +92 -0
  300. package/dist/workspace/trust/ref-gate-cli.d.ts +10 -1
  301. package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
  302. package/dist/workspace/trust/ref-gate-cli.js +93 -11
  303. package/dist/workspace/trust/ref-gate.d.ts +61 -2
  304. package/dist/workspace/trust/ref-gate.d.ts.map +1 -1
  305. package/dist/workspace/trust/ref-gate.js +72 -7
  306. package/dist/workspace/workspace-run.d.ts.map +1 -1
  307. package/dist/workspace/workspace-run.js +2 -1
  308. package/package.json +1 -1
  309. package/src/action-pins.ts +2 -0
  310. package/src/actor.test.ts +78 -0
  311. package/src/actor.ts +79 -0
  312. package/src/bundle-check.test.ts +22 -0
  313. package/src/bundle-check.ts +33 -5
  314. package/src/chant-install.test.ts +108 -1
  315. package/src/chant-install.ts +242 -2
  316. package/src/ci-base.test.ts +41 -0
  317. package/src/ci-base.ts +43 -0
  318. package/src/ci-comment-commands.test.ts +376 -0
  319. package/src/ci-comment-commands.ts +389 -0
  320. package/src/ci-comment-replies.ts +78 -0
  321. package/src/ci-commit.test.ts +51 -6
  322. package/src/ci-commit.ts +1 -2
  323. package/src/ci-control.ts +1 -0
  324. package/src/ci-evidence-claims.ts +102 -0
  325. package/src/ci-evidence-from-job.test.ts +165 -0
  326. package/src/ci-evidence-from-job.ts +251 -0
  327. package/src/ci-evidence-jobs.ts +88 -6
  328. package/src/ci-handover.ts +16 -3
  329. package/src/ci-identity.test.ts +3 -3
  330. package/src/ci-identity.ts +51 -11
  331. package/src/ci-image.test.ts +187 -16
  332. package/src/ci-image.ts +157 -25
  333. package/src/ci-jobs.ts +7 -2
  334. package/src/ci-login.test.ts +131 -3
  335. package/src/ci-login.token-drop.test.ts +204 -0
  336. package/src/ci-login.ts +137 -39
  337. package/src/ci-note-commands.ts +104 -41
  338. package/src/ci-product-words.ts +89 -0
  339. package/src/ci-product.ts +62 -1
  340. package/src/cli/commands/__fixtures__/source-dir-root/migrations/0001-init/backfill.ts +3 -0
  341. package/src/cli/commands/build.test.ts +41 -0
  342. package/src/cli/commands/build.ts +27 -2
  343. package/src/cli/handlers/approve-confirm.test.ts +35 -0
  344. package/src/cli/handlers/approve-confirm.ts +44 -0
  345. package/src/cli/handlers/approve.ts +2 -1
  346. package/src/cli/handlers/build-source-dir.test.ts +4 -0
  347. package/src/cli/handlers/build.ts +20 -2
  348. package/src/cli/handlers/ci-check.ts +37 -7
  349. package/src/cli/handlers/ci-evidence-open.test.ts +164 -0
  350. package/src/cli/handlers/ci-evidence.ts +233 -18
  351. package/src/cli/handlers/ci-forge-check.ts +22 -9
  352. package/src/cli/handlers/components.ts +3 -1
  353. package/src/cli/handlers/generated-check.ts +69 -0
  354. package/src/cli/handlers/lifecycle.test.ts +20 -0
  355. package/src/cli/handlers/lifecycle.ts +4 -0
  356. package/src/cli/handlers/local-chant.ts +39 -1
  357. package/src/cli/handlers/lock-reach.test.ts +103 -0
  358. package/src/cli/handlers/lock.ts +100 -4
  359. package/src/cli/handlers/pr-comment.ts +104 -0
  360. package/src/cli/handlers/pr-env.ts +6 -3
  361. package/src/cli/handlers/pr-record.test.ts +1 -1
  362. package/src/cli/handlers/pr.ts +93 -15
  363. package/src/cli/handlers/promote.ts +2 -1
  364. package/src/cli/handlers/release.e2e.test.ts +35 -0
  365. package/src/cli/handlers/release.ts +14 -2
  366. package/src/cli/handlers/run-wave.ts +35 -2
  367. package/src/cli/handlers/run.ts +2 -1
  368. package/src/cli/main.ts +60 -4
  369. package/src/cli/parse-args.ts +58 -0
  370. package/src/cli/registry.ts +35 -0
  371. package/src/components/auto-release.ts +2 -1
  372. package/src/components/check-hooks.ts +22 -0
  373. package/src/components/check-report-summary.test.ts +78 -0
  374. package/src/components/pr-checks.ts +254 -0
  375. package/src/components/pr-pipeline.ts +43 -1
  376. package/src/components/product-pipeline.ts +113 -9
  377. package/src/components/product-plan.test.ts +140 -1
  378. package/src/components/product-plan.ts +707 -20
  379. package/src/config.ts +13 -8
  380. package/src/control/consumers.ts +7 -0
  381. package/src/dead-guards.test.ts +27 -5
  382. package/src/dead-guards.ts +9 -6
  383. package/src/discovery/files.ts +1 -1
  384. package/src/drift-issue.test.ts +29 -1
  385. package/src/drift-issue.ts +28 -3
  386. package/src/drift-record.test.ts +45 -0
  387. package/src/drift-record.ts +71 -6
  388. package/src/floor-table.data.ts +81 -21
  389. package/src/floor-table.ts +12 -9
  390. package/src/forge-check/contract.ts +23 -2
  391. package/src/forge-check/forge-check.test.ts +25 -0
  392. package/src/forge-check/index.ts +4 -0
  393. package/src/forge-flags.test.ts +25 -1
  394. package/src/forge-flags.ts +34 -0
  395. package/src/forge-remote.test.ts +37 -0
  396. package/src/forge-remote.ts +79 -0
  397. package/src/gate-resume-run.ts +27 -3
  398. package/src/generated-check.e2e.test.ts +118 -0
  399. package/src/generated-check.test.ts +170 -0
  400. package/src/generated-check.ts +310 -0
  401. package/src/image-pins.ts +31 -0
  402. package/src/lexicon.ts +28 -0
  403. package/src/lifecycle/git.test.ts +48 -0
  404. package/src/lifecycle/git.ts +27 -4
  405. package/src/lifecycle/publish-npm.ts +87 -4
  406. package/src/lifecycle/reach-locks.test.ts +87 -0
  407. package/src/lifecycle/reach-locks.ts +169 -0
  408. package/src/lifecycle/release-catalog.test.ts +2 -2
  409. package/src/lifecycle/release-cut.ts +17 -1
  410. package/src/lifecycle/release-images-dockerfile.test.ts +20 -0
  411. package/src/lifecycle/release-images.test.ts +100 -0
  412. package/src/lifecycle/release-images.ts +38 -3
  413. package/src/lifecycle/release-ledger.ts +4 -3
  414. package/src/local-chant.e2e.test.ts +81 -6
  415. package/src/local-chant.test.ts +22 -3
  416. package/src/local-chant.ts +130 -13
  417. package/src/notify-product.ts +19 -8
  418. package/src/op/activities/source-release.ts +2 -1
  419. package/src/op/activities/source-rollback.ts +2 -1
  420. package/src/op/gate-resume.test.ts +27 -0
  421. package/src/op/index.ts +10 -0
  422. package/src/op/op-waves-evidence-jobs.ts +140 -0
  423. package/src/op/op-waves-evidence.test.ts +36 -3
  424. package/src/op/op-waves-evidence.ts +23 -3
  425. package/src/op/op-waves-notify-words.test.ts +18 -0
  426. package/src/op/op-waves-render-spec.test.ts +160 -0
  427. package/src/op/op-waves-render-spec.ts +171 -0
  428. package/src/op/op-waves-run.ts +59 -3
  429. package/src/op/op-waves.ts +16 -2
  430. package/src/op/schedule-overdue.test.ts +126 -1
  431. package/src/op/schedule-overdue.ts +164 -12
  432. package/src/op/wave-stop.test.ts +72 -0
  433. package/src/op/wave-stop.ts +137 -0
  434. package/src/planned-files.test.ts +80 -0
  435. package/src/planned-files.ts +134 -0
  436. package/src/pr-forge-job.test.ts +53 -0
  437. package/src/pr-forge-job.ts +46 -0
  438. package/src/pr-forge-reads-compare.test.ts +2 -1
  439. package/src/pr-forge-reads.ts +37 -1
  440. package/src/pr-forge.ts +14 -3
  441. package/src/pr-loop-narrowed.test.ts +2 -1
  442. package/src/pr-loop-words.test.ts +2 -1
  443. package/src/pr-loop.test.ts +1 -2
  444. package/src/pr-loop.ts +4 -80
  445. package/src/pr-plan-note.ts +184 -3
  446. package/src/pr-plan-record.test.ts +75 -0
  447. package/src/pr-plan-record.ts +101 -0
  448. package/src/pr-post-plan-note.test.ts +60 -0
  449. package/src/pr-post-replan.test.ts +144 -0
  450. package/src/pr-post-subject.test.ts +230 -0
  451. package/src/pr-post.test.ts +32 -1
  452. package/src/pr-post.ts +254 -15
  453. package/src/pr-requires.test.ts +20 -0
  454. package/src/pr-requires.ts +10 -1
  455. package/src/pr-status.ts +91 -0
  456. package/src/ref-gate-init.ts +208 -0
  457. package/src/ref-gate-rules.ts +26 -0
  458. package/src/release-floors.ts +139 -17
  459. package/src/render-module.ts +73 -0
  460. package/src/state-migration-record.test.ts +89 -0
  461. package/src/state-migration.test.ts +1 -1
  462. package/src/state-migration.ts +52 -4
  463. package/src/state-unlock.test.ts +33 -1
  464. package/src/state-unlock.ts +49 -1
  465. package/src/workspace/ci-green-cli.ts +14 -7
  466. package/src/workspace/ci-green-workflow.test.ts +32 -1
  467. package/src/workspace/drift-cli.ts +6 -18
  468. package/src/workspace/forge-work.ts +7 -14
  469. package/src/workspace/lexicon-outputs.ts +2 -2
  470. package/src/workspace/release-train.ts +2 -1
  471. package/src/workspace/release-workflow.test.ts +104 -3
  472. package/src/workspace/release-workflow.ts +60 -9
  473. package/src/workspace/trust/check-evidence-report.ts +39 -8
  474. package/src/workspace/trust/check-evidence.test.ts +5 -0
  475. package/src/workspace/trust/check-evidence.ts +17 -5
  476. package/src/workspace/trust/evidence.ts +5 -0
  477. package/src/workspace/trust/open-evidence.ts +129 -0
  478. package/src/workspace/trust/ref-gate-cli.ts +88 -10
  479. package/src/workspace/trust/ref-gate-pieces.test.ts +220 -0
  480. package/src/workspace/trust/ref-gate.e2e.test.ts +17 -0
  481. package/src/workspace/trust/ref-gate.test.ts +10 -0
  482. package/src/workspace/trust/ref-gate.ts +87 -6
  483. package/src/workspace/workspace-run.ts +2 -1
@@ -20,8 +20,17 @@
20
20
  * is signed as local evidence instead, under `refs/notes/chant/local-evidence`.
21
21
  * Without one, a hook whose check `local.checks` at base names is skipped
22
22
  * when current local evidence for the tree stands in for it; the rest run.
23
+ *
24
+ * #4914: `--summary <file>` appends the report's markdown section
25
+ * (`checkReportSummary`) to the file, as a product's check report keeps it,
26
+ * and a job with `GITHUB_STEP_SUMMARY` set gets it in its summary too.
27
+ *
28
+ * #4966: `--base` defaults to the job's base (`ciBaseRef`,
29
+ * `@intentius/chant/ci-base`), `--branch` naming the default branch on a
30
+ * forge whose job does not carry it.
23
31
  */
24
32
  import { resolve } from "node:path";
33
+ import { ciBaseRef } from "../../ci-base.js";
25
34
  import { CHANT_EXIT } from "../../exit-codes.js";
26
35
  import { formatError } from "../format.js";
27
36
  /**
@@ -42,7 +51,7 @@ async function lexiconCheckSteps(ctx, cwd) {
42
51
  }
43
52
  return plugins.map((p) => p.checkSteps?.()).filter((a) => a !== undefined);
44
53
  }
45
- const USAGE = "chant ci check --base <rev> [<target>...] [--output <dir>] [--no-push] [--json]";
54
+ const USAGE = "chant ci check [--base <rev>] [--branch <default branch>] [<target>...] [--output <dir>] [--summary <file>] [--no-push] [--json]";
46
55
  /**
47
56
  * The check stage's signer (#4870), when the job has a runner identity: a
48
57
  * runner key in `CHANT_RUNNER_KEY`, or its OIDC identity with
@@ -83,10 +92,15 @@ async function localEvidenceAt(base) {
83
92
  return undefined;
84
93
  }
85
94
  }
86
- export async function runCiCheck(ctx) {
95
+ export async function runCiCheck(ctx, env = process.env) {
87
96
  const { args } = ctx;
88
- if (!args.base) {
89
- console.error(formatError({ message: "chant ci check needs --base <rev>, the commit the change is measured from", hint: `${USAGE}. The hooks are read at base, so a change cannot remove a required check.` }));
97
+ // #4966: with no --base, the job's own (`ciBaseRef`): a pull request's target branch, else the default branch (--branch) for a push to another branch.
98
+ const base = args.base ?? ciBaseRef(env, args.branch ? { defaultBranch: args.branch } : {});
99
+ if (!base) {
100
+ console.error(formatError({
101
+ message: "chant ci check needs --base <rev>, the commit the change is measured from, and the job names no pull request target or default branch to take it from",
102
+ hint: `${USAGE}. The hooks are read at base, so a change cannot remove a required check.`,
103
+ }));
90
104
  return 1;
91
105
  }
92
106
  const targets = (args.positionals ?? []).slice(1);
@@ -94,15 +108,31 @@ export async function runCiCheck(ctx) {
94
108
  let report;
95
109
  try {
96
110
  const adapters = await lexiconCheckSteps(ctx, process.cwd());
97
- const evidence = await checkEvidenceSigner(args.base, args.noPush === true);
111
+ const evidence = await checkEvidenceSigner(base, args.noPush === true);
98
112
  // #4868: a job that signs local evidence runs every hook; any other may skip one on local evidence.
99
- const local = evidence && "class" in evidence.signer ? undefined : await localEvidenceAt(args.base);
100
- report = await runCheckStage({ base: args.base, targets, adapters, ...(args.output ? { dir: args.output } : {}), ...(evidence ? { evidence } : {}), ...(local ? { localEvidence: local } : {}) });
113
+ const local = evidence && "class" in evidence.signer ? undefined : await localEvidenceAt(base);
114
+ report = await runCheckStage({ base, targets, adapters, ...(args.output ? { dir: args.output } : {}), ...(evidence ? { evidence } : {}), ...(local ? { localEvidence: local } : {}) });
101
115
  }
102
116
  catch (err) {
103
117
  console.error(formatError({ message: err instanceof Error ? err.message : String(err), hint: USAGE }));
104
118
  return CHANT_EXIT.failed;
105
119
  }
120
+ // #4914: the report's markdown section, in the product's own report and the job summary of a forge that keeps one.
121
+ for (const file of [...new Set([args.checkSummary, process.env.GITHUB_STEP_SUMMARY].filter((f) => Boolean(f)))]) {
122
+ const { checkReportSummary } = await import("../../components/check-hooks.js");
123
+ const lines = checkReportSummary(report);
124
+ if (lines.length === 0)
125
+ continue;
126
+ try {
127
+ const { appendFileSync, mkdirSync } = await import("node:fs");
128
+ const { dirname } = await import("node:path");
129
+ mkdirSync(dirname(resolve(file)), { recursive: true });
130
+ appendFileSync(file, `${lines.join("\n")}\n`);
131
+ }
132
+ catch (err) {
133
+ console.error(`ci check: could not write the summary to ${file}: ${err instanceof Error ? err.message : String(err)}`);
134
+ }
135
+ }
106
136
  if (args.json)
107
137
  console.log(JSON.stringify(report, null, 2));
108
138
  else if (report.status === "none")
@@ -1 +1 @@
1
- {"version":3,"file":"ci-evidence.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-evidence.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA6BlD,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAWxE"}
1
+ {"version":3,"file":"ci-evidence.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-evidence.ts"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA+BlD,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAWxE"}
@@ -14,7 +14,29 @@
14
14
  * `<dir>`, and `policy` when the policy evaluated inside that plan did not
15
15
  * deny it (a `pr-plan.json`'s `policy`, a plan note hand-off's overrides).
16
16
  * It writes `evidence.json` in `<dir>`, which `pr-post` reads to say in the
17
- * note which checks were signed.
17
+ * note which checks were signed. With `--member <name>` (#4964), a
18
+ * workspace member's plan report or (#4978) a product plan target's, the
19
+ * two are `plan:<name>` and `policy:<name>`.
20
+ * - `sign --from-report <dir>` on a check job's report (#4935), a
21
+ * `check-hooks.json` from `chant ci check`, is the `check-evidence` job's
22
+ * form: it signs each hook that passed, by name, with the runs as its
23
+ * claim, as `ci check` with a runner identity signs them. A hook skipped on
24
+ * local evidence did not pass here and is not signed. With `--result`, a
25
+ * check job that neither succeeded nor failed signs nothing.
26
+ * - `sign --open --job <job> --from-report <dir> -o <out>` (#4914) is the
27
+ * GitLab signing job's form, in a pipeline of the target branch: for each
28
+ * open merge request it reads the report from the newest pipeline's
29
+ * `<job>` artifact, fetches the head and signs it as `--from-report`
30
+ * does, skipping a check already signed for the head's tree, and keeps
31
+ * `<out>/<iid>/evidence.json` for the note job. No job of a merge request
32
+ * pipeline, which the change's own files build, holds the key.
33
+ * - `sign --from-job <job> --check-id <id>[,<id>...] [--claims <dir>]`
34
+ * (#4926) is a wave's evidence job's form: it reads the job of that name
35
+ * in this run through the forge, refuses one of another run or commit,
36
+ * and signs each check whose step (named in `CHANT_EVIDENCE_SOURCES`; on
37
+ * GitLab, whose jobs have no steps, the job) the forge reports passed and
38
+ * whose claim file in `<dir>` says so. Each statement names the run, job
39
+ * and step it relied on (`source`).
18
40
  * - `verify --check-id <id>[,<id>...]` reads the evidence for `--at`'s tree
19
41
  * and verifies it against the runner keys at `--base`; exits 1 when one
20
42
  * is not current.
@@ -27,15 +49,19 @@
27
49
  * `local.keys` at base lists, and pushes `refs/notes/chant/local-evidence`;
28
50
  * `verify --local` says whether CI would skip each check on that evidence.
29
51
  */
30
- import { readFileSync, writeFileSync } from "node:fs";
52
+ import { execFileSync, spawnSync } from "node:child_process";
53
+ import { existsSync, readFileSync, writeFileSync } from "node:fs";
31
54
  import { join } from "node:path";
55
+ import { EVIDENCE_MEMBER_NAME } from "../../ci-evidence-jobs.js";
32
56
  import { CHANT_EXIT } from "../../exit-codes.js";
33
57
  import { formatError } from "../format.js";
34
58
  import { gitRoot } from "../../workspace/record-source.js";
35
59
  import { resolveBase } from "../../workspace/trust/provenance.js";
36
60
  import { CHECK_EVIDENCE_KEY_ENV, noRunnerIdentity, readCheckEvidence, recordChecks, RUNNER_IDENTITY_ENV, runnerEvidenceSigner, signChecks, } from "../../workspace/trust/check-evidence.js";
37
61
  import { CHECK_EVIDENCE_FILE, LOCAL_EVIDENCE_KEY_ENV, planReportChecks } from "../../workspace/trust/check-evidence-report.js";
38
- const USAGE = "chant ci evidence sign (--check-id <id>[,<id>...] | --from-report <dir> --result <result>) [--at <rev>] [--base <rev>] [--key <file>] [--claim <file>] [--no-push] [--json]\n" +
62
+ const USAGE = "chant ci evidence sign (--check-id <id>[,<id>...] | --from-report <dir> [--member <name>] --result <result>) [--at <rev>] [--base <rev>] [--key <file>] [--claim <file>] [--no-push] [--json]\n" +
63
+ " chant ci evidence sign --open --job <job> --from-report <dir> [--member <name>] -o <out> [--branch <branch>] [--base <rev>] [--key <file>] [--no-push] [--json]\n" +
64
+ " chant ci evidence sign --from-job <job> --check-id <id>[,<id>...] [--claims <dir>] [--at <rev>] [--base <rev>] [--key <file>] [--no-push] [--json]\n" +
39
65
  " chant ci evidence sign --local --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--key <file>] [--claim <file>] [--no-push] [--json]\n" +
40
66
  " chant ci evidence verify [--local] --check-id <id>[,<id>...] [--at <rev>] [--base <rev>] [--json]";
41
67
  function usage(message) {
@@ -107,35 +133,117 @@ async function verifyLocal(ctx, repo, base, at) {
107
133
  console.error(v.status === "accepted" ? ` accepted ${v.check} (${v.class} ${v.signer} at ${v.commit.slice(0, 12)})` : ` ${v.status.padEnd(12)} ${v.check}: ${v.reason}`);
108
134
  return verdicts.every((v) => v.status === "accepted") ? CHANT_EXIT.done : CHANT_EXIT.failed;
109
135
  }
136
+ /**
137
+ * `sign --from-job <job>` (#4926): the wave's evidence job, signing each
138
+ * named check whose step in that job of this run and commit the forge
139
+ * reports as passed (../../ci-evidence-from-job.ts). Exits 1 when the job is
140
+ * another run's or commit's.
141
+ */
142
+ async function signFromJobCommand(ctx, repo, base) {
143
+ const { args } = ctx;
144
+ const checks = idsOf(args.checkId);
145
+ if (checks.length === 0)
146
+ return usage("sign --from-job needs --check-id <id>[,<id>...], the checks the job ran");
147
+ if (args.fromReport)
148
+ return usage("--from-job and --from-report are two ways to sign; pass one");
149
+ const pem = args.key ? readFileSync(args.key, "utf-8") : undefined;
150
+ try {
151
+ const { forgeTargetFromEnv } = await import("../../pr-forge.js");
152
+ const { forgeReadsFor } = await import("../../pr-forge-reads.js");
153
+ const { signFromJob } = await import("../../ci-evidence-from-job.js");
154
+ const reads = forgeReadsFor(forgeTargetFromEnv(process.env));
155
+ const done = await signFromJob({ repo, base, fromJob: args.fromJob, checks, ...(args.claims ? { claims: args.claims } : {}), ...(args.at ? { at: args.at } : {}), reads, ...(pem ? { key: pem } : {}), push: !args.noPush });
156
+ if ("refused" in done) {
157
+ console.error(formatError({ message: `ci evidence: ${done.refused}`, hint: USAGE }));
158
+ return CHANT_EXIT.failed;
159
+ }
160
+ if (args.json)
161
+ console.log(JSON.stringify({ signed: done.signed, skipped: done.skipped }, null, 2));
162
+ return CHANT_EXIT.done;
163
+ }
164
+ catch (err) {
165
+ console.error(formatError({ message: err instanceof Error ? err.message : String(err), hint: USAGE }));
166
+ return CHANT_EXIT.failed;
167
+ }
168
+ }
110
169
  async function sign(ctx, repo, base, at) {
111
170
  const { args } = ctx;
171
+ if (args.open && args.fromJob)
172
+ return usage("--open and --from-job are two ways to sign; pass one");
173
+ if (args.open)
174
+ return signOpen(ctx, repo, base);
175
+ if (args.fromJob)
176
+ return signFromJobCommand(ctx, repo, base);
112
177
  const fromReport = args.fromReport;
113
178
  if (!fromReport && idsOf(args.checkId).length === 0)
114
179
  return usage("sign needs --check-id <id>, or --from-report <dir> in a plan note job");
180
+ const member = memberOf(args.members, Boolean(fromReport));
181
+ if (typeof member === "object")
182
+ return usage(member.usage);
115
183
  const pem = args.key ? readFileSync(args.key, "utf-8") : process.env[CHECK_EVIDENCE_KEY_ENV];
184
+ let wanted;
185
+ if (!fromReport) {
186
+ const claim = args.claim ? readFileSync(args.claim) : undefined;
187
+ wanted = idsOf(args.checkId).map((check) => ({ check, ...(claim ? { claim } : {}) }));
188
+ }
189
+ const done = await signChecksOf(repo, base, at, { ...(fromReport ? { fromReport } : {}), ...(wanted ? { wanted } : {}), ...(args.planResult ? { result: args.planResult } : {}), ...(member ? { member } : {}), pem, push: !args.noPush });
190
+ if ("usage" in done)
191
+ return usage(done.usage);
192
+ if (fromReport)
193
+ writeFileSync(join(fromReport, CHECK_EVIDENCE_FILE), JSON.stringify(done.note, null, 2) + "\n");
194
+ if (args.json)
195
+ console.log(JSON.stringify(done.note, null, 2));
196
+ return done.code;
197
+ }
198
+ /**
199
+ * `--member <name>` (#4964): the workspace member whose plan report this is,
200
+ * or (#4978) the product plan target whose plan job wrote it, so `plan` and
201
+ * `policy` are signed as `plan:<name>` and `policy:<name>`. One name, and
202
+ * only with a plan report.
203
+ */
204
+ function memberOf(members, fromReport) {
205
+ if (!members || members.length === 0)
206
+ return undefined;
207
+ if (!fromReport)
208
+ return { usage: "--member names the member whose plan report --from-report signs; --check-id names its checks in full" };
209
+ if (members.length > 1 || !EVIDENCE_MEMBER_NAME.test(members[0]))
210
+ return { usage: `--member takes one member or target name, letters, digits, - and _, not ${members.join(",")}` };
211
+ return members[0];
212
+ }
213
+ /**
214
+ * Sign the checks of a report directory (`fromReport`) or the named ones
215
+ * (`wanted`) at `at`, against the runner identities at `base`. With
216
+ * `skipCurrent` (#4914), a check whose current evidence the notes already
217
+ * hold is not signed again and is listed as signed by that runner, so a
218
+ * pipeline that runs on every schedule signs each head once.
219
+ */
220
+ async function signChecksOf(repo, base, at, opts) {
221
+ const { fromReport, pem } = opts;
116
222
  const identity = pem !== undefined && pem !== "" ? "key" : process.env[RUNNER_IDENTITY_ENV] ? "oidc" : undefined;
117
223
  const note = { signed: [], skipped: [] };
118
224
  let wanted;
119
- if (fromReport) {
120
- const decided = planReportChecks(fromReport, args.planResult);
225
+ if (fromReport && isCheckReportDir(fromReport)) {
226
+ // #4935: a check job's report, each passed hook signed by name; #4964: a hook is the workspace's or the member's by its own name.
227
+ if (opts.member)
228
+ return { usage: `--member names a plan report's member, and ${fromReport} is a check job's report, whose hooks are signed by their own names` };
229
+ const decided = await checkReportChecks(fromReport, opts.result);
230
+ if ("error" in decided)
231
+ return { usage: decided.error };
232
+ wanted = decided.sign;
233
+ note.skipped.push(...decided.skipped);
234
+ }
235
+ else if (fromReport) {
236
+ const decided = planReportChecks(fromReport, opts.result, opts.member);
121
237
  wanted = decided.sign;
122
238
  note.skipped.push(...decided.skipped);
123
239
  }
124
240
  else {
125
- const claim = args.claim ? readFileSync(args.claim) : undefined;
126
- wanted = idsOf(args.checkId).map((check) => ({ check, ...(claim ? { claim } : {}) }));
241
+ wanted = opts.wanted ?? [];
127
242
  }
128
- const finish = (code) => {
129
- if (fromReport)
130
- writeFileSync(join(fromReport, CHECK_EVIDENCE_FILE), JSON.stringify(note, null, 2) + "\n");
131
- if (args.json)
132
- console.log(JSON.stringify(note, null, 2));
133
- return code;
134
- };
135
243
  if (!identity) {
136
244
  note.skipped.push(...wanted.map((w) => ({ check: w.check, reason: noRunnerIdentity() })));
137
245
  console.error(`ci evidence: ${noRunnerIdentity()}, so no check was signed`);
138
- return finish(CHANT_EXIT.done);
246
+ return { note, code: CHANT_EXIT.done };
139
247
  }
140
248
  let signer;
141
249
  try {
@@ -143,21 +251,148 @@ async function sign(ctx, repo, base, at) {
143
251
  }
144
252
  catch (err) {
145
253
  console.error(formatError({ message: err instanceof Error ? err.message : String(err), hint: USAGE }));
146
- return finish(CHANT_EXIT.failed);
254
+ return { note, code: CHANT_EXIT.failed };
147
255
  }
148
256
  for (const s of note.skipped)
149
257
  console.error(`ci evidence: ${s.check} not signed: ${s.reason}`);
258
+ if (opts.skipCurrent && wanted.length > 0) {
259
+ const { tree } = commitTree(repo, at);
260
+ const current = (await readCheckEvidence(repo, at, base, wanted.map((w) => w.check))).filter((v) => v.status === "current");
261
+ for (const v of current) {
262
+ note.signed.push({ check: v.check, runner: v.runner, commit: v.commit, tree });
263
+ console.error(`ci evidence: ${v.check} at ${at.slice(0, 12)} is already signed by ${v.runner}`);
264
+ }
265
+ const kept = new Set(current.map((v) => v.check));
266
+ wanted = wanted.filter((w) => !kept.has(w.check));
267
+ }
150
268
  if (wanted.length === 0)
151
- return finish(CHANT_EXIT.done);
269
+ return { note, code: CHANT_EXIT.done };
152
270
  const signed = await signChecks(repo, at, wanted, signer);
153
- const pushed = await recordChecks(repo, signed, { push: !args.noPush });
271
+ const pushed = await recordChecks(repo, signed, { push: opts.push });
154
272
  for (const s of signed) {
155
273
  note.signed.push({ check: s.check, runner: s.runner, commit: s.commit, tree: s.tree });
156
274
  console.error(`ci evidence: signed ${s.check} at ${s.commit.slice(0, 12)} as ${s.runner}`);
157
275
  }
158
- if (!args.noPush && !pushed.pushed && pushed.pushWarning)
276
+ if (opts.push && !pushed.pushed && pushed.pushWarning)
159
277
  console.error(`ci evidence: the evidence is attached here, and the push did not land: ${pushed.pushWarning}`);
160
- return finish(CHANT_EXIT.done);
278
+ return { note, code: CHANT_EXIT.done };
279
+ }
280
+ /** A commit's full sha and tree, read with git. */
281
+ function commitTree(repo, rev) {
282
+ const read = (spec) => execFileSync("git", ["rev-parse", "--verify", spec], { cwd: repo, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] }).trim();
283
+ return { commit: read(`${rev}^{commit}`), tree: read(`${rev}^{tree}`) };
284
+ }
285
+ /**
286
+ * `sign --open --job <job> --from-report <dir> -o <out>` (#4914): in a
287
+ * GitLab pipeline of the target branch, sign each open merge request's
288
+ * settled `job` from its artifact (../../workspace/trust/open-evidence.ts),
289
+ * against the policy at `--base` (the generated job passes the branch's
290
+ * commit). The branch is `--branch`, else the pipeline's own. Exits 0 once
291
+ * each merge request is signed or said, and 1 when the job's runner
292
+ * identity is not one the policy at base lists.
293
+ */
294
+ async function signOpen(ctx, repo, base) {
295
+ const { args } = ctx;
296
+ if (!args.ciJob || !/^[A-Za-z0-9][A-Za-z0-9_.-]*$/.test(args.ciJob))
297
+ return usage("sign --open needs the job to sign for, by name: --job plan");
298
+ if (!args.fromReport)
299
+ return usage("sign --open needs the job's report directory as its artifact keeps it: --from-report .chant/pr");
300
+ if (!args.output)
301
+ return usage("sign --open needs where to keep each merge request's evidence.json: -o .chant/evidence/<job>");
302
+ if (args.checkId || args.at || args.planResult)
303
+ return usage("sign --open finds each merge request's head and its job's result itself, so it takes no --check-id, --at or --result");
304
+ const member = memberOf(args.members, true);
305
+ if (typeof member === "object")
306
+ return usage(member.usage);
307
+ const branch = args.branch ?? process.env.CI_COMMIT_BRANCH;
308
+ if (!branch)
309
+ return usage("sign --open signs for the merge requests into a branch: run it in a branch pipeline, or pass --branch <branch>");
310
+ const pem = args.key ? readFileSync(args.key, "utf-8") : process.env[CHECK_EVIDENCE_KEY_ENV];
311
+ const { forgeFromEnv } = await import("../../pr-forge.js");
312
+ const { signOpenReports } = await import("../../workspace/trust/open-evidence.js");
313
+ // The notes there are the ones to skip a head already signed by, and to add to.
314
+ spawnSync("git", ["fetch", "--quiet", "--no-tags", "origin", "+refs/notes/chant/evidence:refs/notes/chant/evidence"], { cwd: repo, encoding: "utf-8" });
315
+ let failed = false;
316
+ let done;
317
+ try {
318
+ done = await signOpenReports({
319
+ forge: forgeFromEnv("gitlab"),
320
+ branch,
321
+ job: args.ciJob,
322
+ artifactDir: args.fromReport,
323
+ out: args.output,
324
+ ...(args.noForks ? { noForks: true } : {}),
325
+ fetchHead: (pr, head) => fetchMergeRequestHead(repo, pr, head),
326
+ sign: async (dir, head, result) => {
327
+ const r = await signChecksOf(repo, base, head, { fromReport: dir, result, ...(member ? { member } : {}), ...(pem ? { pem } : {}), push: !args.noPush, skipCurrent: true });
328
+ if ("usage" in r)
329
+ throw new Error(r.usage);
330
+ if (r.code !== CHANT_EXIT.done)
331
+ failed = true;
332
+ return r.note;
333
+ },
334
+ });
335
+ }
336
+ catch (err) {
337
+ console.error(formatError({ message: err instanceof Error ? err.message : String(err), hint: USAGE }));
338
+ return CHANT_EXIT.failed;
339
+ }
340
+ for (const w of done.warnings)
341
+ console.error(`ci evidence: ${w}`);
342
+ for (const d of done.done) {
343
+ if (d.skipped)
344
+ console.error(`ci evidence: !${d.pr}: ${d.skipped}`);
345
+ else
346
+ console.error(`ci evidence: !${d.pr} at ${d.head.slice(0, 12)}: signed ${d.note.signed.map((s) => s.check).join(", ") || "nothing"}`);
347
+ }
348
+ if (done.done.length === 0)
349
+ console.error(`ci evidence: no open merge request into ${branch} has a ${args.ciJob} job`);
350
+ if (args.json)
351
+ console.log(JSON.stringify(done.done, null, 2));
352
+ return failed ? CHANT_EXIT.failed : CHANT_EXIT.done;
353
+ }
354
+ /** Fetch merge request `pr`'s head (`refs/merge-requests/<iid>/head`, a fork's too), else the commit itself; true once it is here. */
355
+ function fetchMergeRequestHead(repo, pr, head) {
356
+ const here = () => spawnSync("git", ["cat-file", "-e", `${head}^{commit}`], { cwd: repo }).status === 0;
357
+ if (here())
358
+ return true;
359
+ spawnSync("git", ["fetch", "--quiet", "--no-tags", "origin", `refs/merge-requests/${pr}/head`], { cwd: repo, encoding: "utf-8" });
360
+ if (here())
361
+ return true;
362
+ spawnSync("git", ["fetch", "--quiet", "--no-tags", "origin", head], { cwd: repo, encoding: "utf-8" });
363
+ return here();
364
+ }
365
+ /** Whether `dir` holds a check job's report and no plan report (#4935). */
366
+ function isCheckReportDir(dir) {
367
+ return existsSync(join(dir, "check-hooks.json")) && !existsSync(join(dir, "pr-plan.json")) && !existsSync(join(dir, "pr-plan-note.json"));
368
+ }
369
+ /**
370
+ * The hooks to sign from a check job's report (#4935): each hook whose every
371
+ * run passed, with its runs as the claim, as the check runner signs them
372
+ * (../../components/check-steps.ts). The report is the check job's, which ran
373
+ * the change's code, so it is read as data: a hook with no name or outcome is
374
+ * left out. A job `result` other than success or failure signs none.
375
+ */
376
+ async function checkReportChecks(dir, result) {
377
+ const { CHECK_HOOKS_REPORT_FILE, passedCheckHooks } = await import("../../components/check-hooks.js");
378
+ let doc;
379
+ try {
380
+ doc = JSON.parse(readFileSync(join(dir, CHECK_HOOKS_REPORT_FILE), "utf-8"));
381
+ }
382
+ catch (err) {
383
+ return { error: `--from-report ${dir}: ${CHECK_HOOKS_REPORT_FILE} does not read: ${err instanceof Error ? err.message : String(err)}` };
384
+ }
385
+ const hooks = doc && typeof doc === "object" && Array.isArray(doc.hooks) ? doc.hooks : undefined;
386
+ if (!hooks)
387
+ return { error: `--from-report ${dir}: ${CHECK_HOOKS_REPORT_FILE} lists no hooks` };
388
+ const runs = hooks.filter((h) => h && typeof h.name === "string" && h.name.length > 0 && h.name.length <= 200 && (h.outcome === "passed" || h.outcome === "failed" || h.outcome === "skipped"));
389
+ const passed = passedCheckHooks(runs);
390
+ if (result !== undefined && result !== "success" && result !== "failure") {
391
+ return { sign: [], skipped: passed.map((p) => ({ check: p.check, reason: `the check job's result is ${result}` })) };
392
+ }
393
+ const signed = new Set(passed.map((p) => p.check));
394
+ const skipped = [...new Set(runs.map((h) => h.name))].filter((n) => !signed.has(n)).map((check) => ({ check, reason: "the hook did not pass in the check job" }));
395
+ return { sign: passed.map((p) => ({ check: p.check, claim: JSON.stringify(p.runs) })), skipped };
161
396
  }
162
397
  async function verify(ctx, repo, base, at) {
163
398
  const { args } = ctx;
@@ -1 +1 @@
1
- {"version":3,"file":"ci-forge-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-forge-check.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAOlD,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAuE1E"}
1
+ {"version":3,"file":"ci-forge-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/ci-forge-check.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAOlD,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiF1E"}
@@ -1,14 +1,17 @@
1
1
  /**
2
2
  * `chant ci forge-check [--env <env>] [--member <name>] [--forge <forge>]
3
- * [--repo <owner/name>] [--branch <default>] [--require-clouds] [--json]`
4
- * (#4608): read the live forge, the clouds and Pulumi Cloud against the
5
- * pull-request pipelines `ci.identity.cloud` gives the workspace, one row
6
- * per expected setting. Read-only. Exits chant's `failed` (1) on a
3
+ * [--repo <owner/name>] [--branch <default>] [--require-clouds]
4
+ * [--ref-gate-status] [--json]` (#4608): read the live forge, the clouds and
5
+ * Pulumi Cloud against the pull-request pipelines `ci.identity.cloud` gives
6
+ * the workspace, one row per expected setting. With `--ref-gate-status`
7
+ * (#4913), for pipelines built with it, the default branch also requires
8
+ * the ref gate's status, named as the policy at `origin/<default>` (else
9
+ * `HEAD`) names it. Read-only. Exits chant's `failed` (1) on a
7
10
  * mismatch, or with --require-clouds on a cloud left unchecked; `done` (0)
8
11
  * otherwise. See ../../forge-check/index.ts.
9
12
  */
10
13
  import { formatError } from "../format.js";
11
- const USAGE = "chant ci forge-check [--env <env>] [--member <name>] [--forge github|gitlab|forgejo] [--repo <owner/name>] [--branch <default>] [--require-clouds] [--json]";
14
+ const USAGE = "chant ci forge-check [--env <env>] [--member <name>] [--forge github|gitlab|forgejo] [--repo <owner/name>] [--branch <default>] [--require-clouds] [--ref-gate-status] [--json]";
12
15
  /** The environment chant's generated pull-request pipelines default to. */
13
16
  const DEFAULT_ENV = "production";
14
17
  export async function runCiForgeCheck(ctx) {
@@ -60,27 +63,41 @@ export async function runCiForgeCheck(ctx) {
60
63
  });
61
64
  const words = activeProductWords();
62
65
  const host = target.host;
66
+ // #4913: with --ref-gate-status the default branch requires the ref gate's status too, named as the policy names it.
67
+ let gate = {};
68
+ const statusFor = args.refGateStatus ? (await import("../../ref-gate-rules.js")).refGateStatusFor : undefined;
63
69
  const result = await forgeCheck({
64
70
  target,
65
71
  words,
66
72
  ...(args.requireClouds ? { requireClouds: true } : {}),
67
- contract: (live) => pipelineContract({
68
- forge: target.kind,
69
- repository: {
70
- host,
71
- path: live.path ?? target.repo,
72
- defaultBranch: args.branch ?? live.defaultBranch ?? "main",
73
- ...(live.ownerId ? { ownerId: live.ownerId } : {}),
74
- ...(live.repoId ? { repoId: live.repoId } : {}),
75
- },
76
- pipelines,
77
- words,
78
- }),
73
+ contract: (live) => {
74
+ const defaultBranch = args.branch ?? live.defaultBranch ?? "main";
75
+ if (statusFor)
76
+ gate = statusFor(found?.dir ?? process.cwd(), defaultBranch);
77
+ const status = gate.status;
78
+ return pipelineContract({
79
+ forge: target.kind,
80
+ repository: {
81
+ host,
82
+ path: live.path ?? target.repo,
83
+ defaultBranch,
84
+ ...(live.ownerId ? { ownerId: live.ownerId } : {}),
85
+ ...(live.repoId ? { repoId: live.repoId } : {}),
86
+ },
87
+ pipelines,
88
+ words,
89
+ ...(status ? { refGateStatus: status } : {}),
90
+ });
91
+ },
79
92
  }, { fetch: globalThis.fetch, env: process.env });
93
+ if (gate.problem)
94
+ return fail(`--ref-gate-status: ${gate.problem}`);
80
95
  if (args.json)
81
96
  console.log(JSON.stringify(result, null, 2));
82
97
  else
83
98
  console.log(describeForgeCheck(result));
99
+ if (gate.note)
100
+ console.error(`ci forge-check: ${gate.note}`);
84
101
  if (!decl)
85
102
  console.error("ci forge-check: no ci.identity.cloud in the workspace declaration, so no trust was checked");
86
103
  else if (pipelines.length === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;AAKnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA+GrF;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiH9E;AA6DD;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;6EAQ6E;AAC7E,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAMzD;AAgHD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoT9E;AAED,kEAAkE;AAClE,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/E"}
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;AAMnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgHrF;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiH9E;AA6DD;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;6EAQ6E;AAC7E,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAMzD;AAgHD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoT9E;AAED,kEAAkE;AAClE,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/E"}
@@ -47,6 +47,7 @@ import { normalizeObservation, mergeObservations, unobservedAll } from "../../ob
47
47
  import { deployUnits } from "../../components/deploy-units.js";
48
48
  import { sortedJsonReplacer } from "../../utils.js";
49
49
  import { withoutReadFlags } from "../../lifecycle/legacy-digest.js";
50
+ import { actorFromEnv } from "../../actor.js";
50
51
  /**
51
52
  * chant components release <env> --component <name> --digest <sha256:...>
52
53
  * [--git-sha <sha>] [--run-id <id>] [--actor <name>]
@@ -127,7 +128,8 @@ export async function runComponentsReleaseRecord(ctx) {
127
128
  // Id + origin resolved together from the same environment (#2045), so the
128
129
  // recorded runId always says which id space it lives in and how to reach it.
129
130
  const { runId, runOrigin } = resolveRunId(args.runId);
130
- const actor = args.actor ?? process.env.GITHUB_ACTOR ?? process.env.GITLAB_USER_LOGIN ?? process.env.USER;
131
+ // #4952: the fallback is actorFromEnv's; an empty answer is no actor, refused below.
132
+ const actor = args.actor ?? (actorFromEnv(process.env, "") || undefined);
131
133
  // Who approved a gated change (#1035). Optional — omitted for an ungated
132
134
  // change, and never defaulted to `actor`, since recording the approver as the
133
135
  // triggerer would defeat the separation-of-duties the field exists to attest.
@@ -0,0 +1,11 @@
1
+ import type { CommandContext } from "../registry.js";
2
+ export declare function runDevGeneratedCheck(ctx: CommandContext): Promise<number>;
3
+ /**
4
+ * `chant dev render <module> <export> [--output <root>]` (#4950): import the
5
+ * module, call its export (a `{ path: text }` object, or a function that
6
+ * returns one) and write each file at its path below the root, the working
7
+ * directory unless `--output` names one. Under `chant dev generated-check`
8
+ * a path inside the product goes to the render tree instead.
9
+ */
10
+ export declare function runDevRender(ctx: CommandContext): Promise<number>;
11
+ //# sourceMappingURL=generated-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-check.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/generated-check.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwB/E;AAID;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBvE"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * `chant dev generated-check [<render>...] [--json]` (#4909): render the
3
+ * product's declared generated files (`chantGenerated` in its root
4
+ * package.json) into a directory under the OS temp directory, compare each
5
+ * with the committed file, and exit 1 naming every one that drifted. The
6
+ * directory is left in place and printed. Exit 2 when the product declares
7
+ * no `chantGenerated`. Also `chant dev render` (#4950), which writes a
8
+ * module's file-text export in place.
9
+ */
10
+ import { checkGenerated, readGeneratedCheckConfig } from "../../generated-check.js";
11
+ import { formatError } from "../format.js";
12
+ const USAGE = "chant dev generated-check [<render>...] [--json]";
13
+ export async function runDevGeneratedCheck(ctx) {
14
+ const productDir = process.cwd();
15
+ let config;
16
+ try {
17
+ config = readGeneratedCheckConfig(productDir);
18
+ }
19
+ catch (err) {
20
+ console.error(formatError({ message: err instanceof Error ? err.message : String(err), hint: USAGE }));
21
+ return 2;
22
+ }
23
+ if (!config) {
24
+ console.error(formatError({ message: "package.json here declares no chantGenerated", hint: USAGE }));
25
+ return 2;
26
+ }
27
+ const only = (ctx.args.positionals ?? []).slice(1);
28
+ const result = await checkGenerated(productDir, config, { only });
29
+ if (ctx.args.json) {
30
+ console.log(JSON.stringify(result, null, 2));
31
+ }
32
+ else {
33
+ for (const f of result.matched)
34
+ console.error(` generated-check: ${f} matches its render`);
35
+ for (const p of result.problems)
36
+ console.error(`generated-check: ${p}`);
37
+ console.error(`generated-check: the renders are in ${result.out}`);
38
+ if (result.ok)
39
+ console.error(`generated-check: ${result.matched.length} files match ${result.renders.length} renders`);
40
+ }
41
+ return result.ok ? 0 : 1;
42
+ }
43
+ const RENDER_USAGE = "chant dev render <module> <export> [--output <root>]";
44
+ /**
45
+ * `chant dev render <module> <export> [--output <root>]` (#4950): import the
46
+ * module, call its export (a `{ path: text }` object, or a function that
47
+ * returns one) and write each file at its path below the root, the working
48
+ * directory unless `--output` names one. Under `chant dev generated-check`
49
+ * a path inside the product goes to the render tree instead.
50
+ */
51
+ export async function runDevRender(ctx) {
52
+ const [, modulePath, exportName] = ctx.args.positionals ?? [];
53
+ if (!modulePath || !exportName) {
54
+ console.error(formatError({ message: "name the module and its export that returns the files", hint: RENDER_USAGE }));
55
+ return 2;
56
+ }
57
+ const { resolve } = await import("node:path");
58
+ const { renderPathOf } = await import("../../generated-check.js");
59
+ const { renderModuleFiles, writeRenderedFiles } = await import("../../render-module.js");
60
+ try {
61
+ const files = await renderModuleFiles(modulePath, exportName);
62
+ const root = resolve(ctx.args.output ?? ".");
63
+ for (const path of writeRenderedFiles(root, files, renderPathOf))
64
+ console.error(` wrote ${path}`);
65
+ return 0;
66
+ }
67
+ catch (err) {
68
+ console.error(formatError({ message: `chant dev render: ${err instanceof Error ? err.message : String(err)}`, hint: RENDER_USAGE }));
69
+ return 1;
70
+ }
71
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAE9E;AAED;;cAEc;AACd,UAAU,WAAW;IACnB;iDAC6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;0CACsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb;;;6DAGyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE,CAMxF;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8H/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA6C3E;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8B/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8Q3E;AA8xBD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA2R3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA2L/E;AAsBD;;GAEG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoB1E;AAgBD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmE7E;AAiCD;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM9E;AAkBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA0E/E"}
1
+ {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/lifecycle.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAE9E;AAED;;cAEc;AACd,UAAU,WAAW;IACnB;iDAC6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;0CACsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb;;;6DAGyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE,CAMxF;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8H/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA6C3E;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8B/E;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8Q3E;AAkyBD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA2R3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA2L/E;AAsBD;;GAEG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoB1E;AAgBD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmE7E;AAiCD;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM9E;AAkBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA0E/E"}
@@ -807,6 +807,9 @@ async function runLifecycleDiffLive(args) {
807
807
  if (args.json) {
808
808
  const entry = (byLexicon[lexiconName] ?? (byLexicon[lexiconName] = {}));
809
809
  entry.resources = diff;
810
+ // What a confirmed-absent entity is, when the lexicon says (#4896); left out for every other lexicon.
811
+ if (plugin.liveAbsentStatus)
812
+ entry.absent = plugin.liveAbsentStatus;
810
813
  entry.observed = observedNow; // live state (#862) — status/attributes per resource
811
814
  if (Object.keys(observed.unobserved).length > 0)
812
815
  entry.unobserved = observed.unobserved;