@intentius/chant 0.124.86 → 0.124.88

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 (384) 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 +12 -0
  5. package/dist/actor.d.ts.map +1 -0
  6. package/dist/actor.js +18 -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 +204 -2
  13. package/dist/ci-commit.d.ts.map +1 -1
  14. package/dist/ci-commit.js +1 -2
  15. package/dist/ci-control.d.ts +1 -1
  16. package/dist/ci-control.d.ts.map +1 -1
  17. package/dist/ci-control.js +1 -1
  18. package/dist/ci-evidence-claims.d.ts +59 -0
  19. package/dist/ci-evidence-claims.d.ts.map +1 -0
  20. package/dist/ci-evidence-claims.js +87 -0
  21. package/dist/ci-evidence-from-job.d.ts +103 -0
  22. package/dist/ci-evidence-from-job.d.ts.map +1 -0
  23. package/dist/ci-evidence-from-job.js +162 -0
  24. package/dist/ci-evidence-jobs.d.ts +69 -10
  25. package/dist/ci-evidence-jobs.d.ts.map +1 -1
  26. package/dist/ci-evidence-jobs.js +72 -8
  27. package/dist/ci-handover.d.ts +12 -0
  28. package/dist/ci-handover.d.ts.map +1 -1
  29. package/dist/ci-handover.js +15 -3
  30. package/dist/ci-identity.d.ts +32 -6
  31. package/dist/ci-identity.d.ts.map +1 -1
  32. package/dist/ci-identity.js +40 -8
  33. package/dist/ci-image.d.ts +47 -9
  34. package/dist/ci-image.d.ts.map +1 -1
  35. package/dist/ci-image.js +45 -18
  36. package/dist/ci-jobs.d.ts +1 -1
  37. package/dist/ci-jobs.d.ts.map +1 -1
  38. package/dist/ci-jobs.js +7 -2
  39. package/dist/ci-login.d.ts +75 -13
  40. package/dist/ci-login.d.ts.map +1 -1
  41. package/dist/ci-login.js +89 -37
  42. package/dist/ci-product-words.d.ts +20 -1
  43. package/dist/ci-product-words.d.ts.map +1 -1
  44. package/dist/ci-product-words.js +27 -1
  45. package/dist/ci-product.d.ts +20 -1
  46. package/dist/ci-product.d.ts.map +1 -1
  47. package/dist/ci-product.js +21 -2
  48. package/dist/cli/handlers/approve-confirm.d.ts +14 -0
  49. package/dist/cli/handlers/approve-confirm.d.ts.map +1 -1
  50. package/dist/cli/handlers/approve-confirm.js +46 -0
  51. package/dist/cli/handlers/build.d.ts +1 -1
  52. package/dist/cli/handlers/build.d.ts.map +1 -1
  53. package/dist/cli/handlers/build.js +22 -1
  54. package/dist/cli/handlers/ci-check.d.ts.map +1 -1
  55. package/dist/cli/handlers/ci-check.js +38 -14
  56. package/dist/cli/handlers/ci-evidence.d.ts.map +1 -1
  57. package/dist/cli/handlers/ci-evidence.js +238 -26
  58. package/dist/cli/handlers/ci-forge-check.d.ts.map +1 -1
  59. package/dist/cli/handlers/ci-forge-check.js +34 -17
  60. package/dist/cli/handlers/generated-check.d.ts +3 -0
  61. package/dist/cli/handlers/generated-check.d.ts.map +1 -0
  62. package/dist/cli/handlers/generated-check.js +41 -0
  63. package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
  64. package/dist/cli/handlers/lifecycle.js +3 -0
  65. package/dist/cli/handlers/local-chant.d.ts +13 -0
  66. package/dist/cli/handlers/local-chant.d.ts.map +1 -1
  67. package/dist/cli/handlers/local-chant.js +42 -1
  68. package/dist/cli/handlers/pr.d.ts.map +1 -1
  69. package/dist/cli/handlers/pr.js +42 -5
  70. package/dist/cli/handlers/run-wave.js +8 -0
  71. package/dist/cli/main.d.ts.map +1 -1
  72. package/dist/cli/main.js +38 -4
  73. package/dist/cli/parse-args.d.ts.map +1 -1
  74. package/dist/cli/parse-args.js +66 -0
  75. package/dist/cli/registry.d.ts +24 -0
  76. package/dist/cli/registry.d.ts.map +1 -1
  77. package/dist/components/check-hooks.d.ts +10 -0
  78. package/dist/components/check-hooks.d.ts.map +1 -1
  79. package/dist/components/check-hooks.js +21 -3
  80. package/dist/components/check-steps.js +1 -1
  81. package/dist/components/pr-checks.d.ts +105 -0
  82. package/dist/components/pr-checks.d.ts.map +1 -0
  83. package/dist/components/pr-checks.js +119 -0
  84. package/dist/components/pr-pipeline.d.ts +34 -0
  85. package/dist/components/pr-pipeline.d.ts.map +1 -1
  86. package/dist/components/pr-pipeline.js +14 -1
  87. package/dist/components/product-pipeline.d.ts +16 -1
  88. package/dist/components/product-pipeline.d.ts.map +1 -1
  89. package/dist/components/product-pipeline.js +17 -2
  90. package/dist/components/product-plan.d.ts +262 -3
  91. package/dist/components/product-plan.d.ts.map +1 -1
  92. package/dist/components/product-plan.js +243 -11
  93. package/dist/config.d.ts +10 -6
  94. package/dist/config.d.ts.map +1 -1
  95. package/dist/config.js +11 -6
  96. package/dist/control/consumers.d.ts +6 -0
  97. package/dist/control/consumers.d.ts.map +1 -1
  98. package/dist/control/consumers.js +6 -0
  99. package/dist/dead-guards.d.ts.map +1 -1
  100. package/dist/dead-guards.js +9 -6
  101. package/dist/discovery/files.d.ts +1 -1
  102. package/dist/discovery/files.js +1 -1
  103. package/dist/drift-issue.d.ts +20 -3
  104. package/dist/drift-issue.d.ts.map +1 -1
  105. package/dist/drift-issue.js +16 -0
  106. package/dist/drift-record.d.ts +45 -5
  107. package/dist/drift-record.d.ts.map +1 -1
  108. package/dist/drift-record.js +27 -6
  109. package/dist/floor-table.d.ts +6 -6
  110. package/dist/floor-table.d.ts.map +1 -1
  111. package/dist/floor-table.data.d.ts.map +1 -1
  112. package/dist/floor-table.data.js +58 -20
  113. package/dist/floor-table.js +10 -7
  114. package/dist/forge-check/contract.d.ts +8 -0
  115. package/dist/forge-check/contract.d.ts.map +1 -1
  116. package/dist/forge-check/contract.js +4 -1
  117. package/dist/forge-check/index.d.ts +2 -0
  118. package/dist/forge-check/index.d.ts.map +1 -1
  119. package/dist/forge-check/index.js +2 -0
  120. package/dist/forge-flags.d.ts +10 -0
  121. package/dist/forge-flags.d.ts.map +1 -1
  122. package/dist/forge-flags.js +31 -0
  123. package/dist/forge-remote.d.ts +47 -0
  124. package/dist/forge-remote.d.ts.map +1 -0
  125. package/dist/forge-remote.js +69 -0
  126. package/dist/generated-check.d.ts +74 -0
  127. package/dist/generated-check.d.ts.map +1 -0
  128. package/dist/generated-check.js +216 -0
  129. package/dist/lexicon.d.ts +16 -0
  130. package/dist/lexicon.d.ts.map +1 -1
  131. package/dist/lifecycle/publish-npm.d.ts +15 -0
  132. package/dist/lifecycle/publish-npm.d.ts.map +1 -1
  133. package/dist/lifecycle/publish-npm.js +49 -3
  134. package/dist/lifecycle/release-images.d.ts +22 -1
  135. package/dist/lifecycle/release-images.d.ts.map +1 -1
  136. package/dist/lifecycle/release-images.js +27 -3
  137. package/dist/lifecycle/release-ledger.d.ts +4 -3
  138. package/dist/lifecycle/release-ledger.d.ts.map +1 -1
  139. package/dist/lifecycle/release-ledger.js +3 -2
  140. package/dist/local-chant.d.ts +57 -3
  141. package/dist/local-chant.d.ts.map +1 -1
  142. package/dist/local-chant.js +122 -13
  143. package/dist/op/op-waves-evidence-jobs.d.ts +92 -0
  144. package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -0
  145. package/dist/op/op-waves-evidence-jobs.js +112 -0
  146. package/dist/op/op-waves-evidence.d.ts +17 -4
  147. package/dist/op/op-waves-evidence.d.ts.map +1 -1
  148. package/dist/op/op-waves-evidence.js +32 -10
  149. package/dist/op/op-waves-run.d.ts +12 -1
  150. package/dist/op/op-waves-run.d.ts.map +1 -1
  151. package/dist/op/op-waves-run.js +54 -3
  152. package/dist/op/op-waves.d.ts +8 -0
  153. package/dist/op/op-waves.d.ts.map +1 -1
  154. package/dist/op/op-waves.js +10 -0
  155. package/dist/op/schedule-overdue.d.ts +39 -2
  156. package/dist/op/schedule-overdue.d.ts.map +1 -1
  157. package/dist/op/schedule-overdue.js +89 -7
  158. package/dist/pr-forge-reads.d.ts +21 -1
  159. package/dist/pr-forge-reads.d.ts.map +1 -1
  160. package/dist/pr-forge-reads.js +19 -1
  161. package/dist/pr-forge.d.ts +7 -1
  162. package/dist/pr-forge.d.ts.map +1 -1
  163. package/dist/pr-forge.js +7 -2
  164. package/dist/pr-plan-note.d.ts +24 -0
  165. package/dist/pr-plan-note.d.ts.map +1 -1
  166. package/dist/pr-plan-note.js +11 -1
  167. package/dist/pr-plan-record.d.ts +47 -0
  168. package/dist/pr-plan-record.d.ts.map +1 -0
  169. package/dist/pr-plan-record.js +89 -0
  170. package/dist/pr-post.d.ts +40 -0
  171. package/dist/pr-post.d.ts.map +1 -1
  172. package/dist/pr-post.js +79 -6
  173. package/dist/pr-requires.d.ts +8 -0
  174. package/dist/pr-requires.d.ts.map +1 -1
  175. package/dist/pr-requires.js +3 -1
  176. package/dist/ref-gate-init.d.ts +76 -0
  177. package/dist/ref-gate-init.d.ts.map +1 -0
  178. package/dist/ref-gate-init.js +144 -0
  179. package/dist/ref-gate-rules.d.ts +19 -0
  180. package/dist/ref-gate-rules.d.ts.map +1 -0
  181. package/dist/ref-gate-rules.js +17 -0
  182. package/dist/release-floors.d.ts +51 -1
  183. package/dist/release-floors.d.ts.map +1 -1
  184. package/dist/release-floors.js +66 -16
  185. package/dist/state-migration.d.ts +23 -0
  186. package/dist/state-migration.d.ts.map +1 -1
  187. package/dist/state-migration.js +39 -3
  188. package/dist/state-unlock.d.ts +32 -1
  189. package/dist/state-unlock.d.ts.map +1 -1
  190. package/dist/state-unlock.js +31 -0
  191. package/dist/wave-runtime.mjs +310 -303
  192. package/dist/workspace/ci-green-cli.d.ts.map +1 -1
  193. package/dist/workspace/ci-green-cli.js +13 -7
  194. package/dist/workspace/ci-green.d.ts.map +1 -1
  195. package/dist/workspace/ci-green.js +4 -3
  196. package/dist/workspace/drift-cli.d.ts +1 -1
  197. package/dist/workspace/drift-cli.d.ts.map +1 -1
  198. package/dist/workspace/drift-cli.js +5 -12
  199. package/dist/workspace/forge-work.d.ts +3 -2
  200. package/dist/workspace/forge-work.d.ts.map +1 -1
  201. package/dist/workspace/forge-work.js +7 -17
  202. package/dist/workspace/lexicon-outputs.js +2 -2
  203. package/dist/workspace/release-workflow.d.ts +26 -3
  204. package/dist/workspace/release-workflow.d.ts.map +1 -1
  205. package/dist/workspace/release-workflow.js +48 -6
  206. package/dist/workspace/trust/check-evidence-report.d.ts +25 -0
  207. package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -1
  208. package/dist/workspace/trust/check-evidence-report.js +20 -0
  209. package/dist/workspace/trust/check-evidence.d.ts +59 -13
  210. package/dist/workspace/trust/check-evidence.d.ts.map +1 -1
  211. package/dist/workspace/trust/check-evidence.js +101 -24
  212. package/dist/workspace/trust/ci-tag-statement.d.ts +2 -2
  213. package/dist/workspace/trust/ci-tag-statement.d.ts.map +1 -1
  214. package/dist/workspace/trust/dsse.d.ts +40 -2
  215. package/dist/workspace/trust/dsse.d.ts.map +1 -1
  216. package/dist/workspace/trust/dsse.js +34 -2
  217. package/dist/workspace/trust/evidence.d.ts +7 -2
  218. package/dist/workspace/trust/evidence.d.ts.map +1 -1
  219. package/dist/workspace/trust/evidence.js +5 -0
  220. package/dist/workspace/trust/keyless-fixture.d.ts +41 -0
  221. package/dist/workspace/trust/keyless-fixture.d.ts.map +1 -0
  222. package/dist/workspace/trust/keyless-fixture.js +161 -0
  223. package/dist/workspace/trust/keyless.d.ts +202 -0
  224. package/dist/workspace/trust/keyless.d.ts.map +1 -0
  225. package/dist/workspace/trust/keyless.js +488 -0
  226. package/dist/workspace/trust/local-evidence.d.ts +3 -0
  227. package/dist/workspace/trust/local-evidence.d.ts.map +1 -1
  228. package/dist/workspace/trust/op-run-statement.d.ts +2 -2
  229. package/dist/workspace/trust/op-run-statement.d.ts.map +1 -1
  230. package/dist/workspace/trust/open-evidence.d.ts +67 -0
  231. package/dist/workspace/trust/open-evidence.d.ts.map +1 -0
  232. package/dist/workspace/trust/open-evidence.js +92 -0
  233. package/dist/workspace/trust/policy.d.ts +56 -1
  234. package/dist/workspace/trust/policy.d.ts.map +1 -1
  235. package/dist/workspace/trust/policy.js +103 -2
  236. package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -1
  237. package/dist/workspace/trust/ref-gate-cli.js +65 -3
  238. package/dist/workspace/trust/ref-gate.d.ts +62 -3
  239. package/dist/workspace/trust/ref-gate.d.ts.map +1 -1
  240. package/dist/workspace/trust/ref-gate.js +75 -8
  241. package/dist/workspace/trust/run-statement.d.ts +3 -3
  242. package/dist/workspace/trust/run-statement.d.ts.map +1 -1
  243. package/dist/workspace/trust/runner-identity.d.ts +56 -0
  244. package/dist/workspace/trust/runner-identity.d.ts.map +1 -0
  245. package/dist/workspace/trust/runner-identity.js +65 -0
  246. package/dist/workspace/trust/trust-files.d.ts.map +1 -1
  247. package/dist/workspace/trust/trust-files.js +8 -1
  248. package/package.json +1 -1
  249. package/src/action-pins.ts +2 -0
  250. package/src/actor.test.ts +12 -0
  251. package/src/actor.ts +19 -0
  252. package/src/bundle-check.test.ts +22 -0
  253. package/src/bundle-check.ts +33 -5
  254. package/src/chant-install.test.ts +109 -1
  255. package/src/chant-install.ts +243 -2
  256. package/src/ci-commit.test.ts +51 -5
  257. package/src/ci-commit.ts +1 -2
  258. package/src/ci-control.ts +1 -0
  259. package/src/ci-evidence-claims.ts +102 -0
  260. package/src/ci-evidence-from-job.test.ts +147 -0
  261. package/src/ci-evidence-from-job.ts +195 -0
  262. package/src/ci-evidence-jobs.ts +85 -10
  263. package/src/ci-handover.ts +16 -3
  264. package/src/ci-identity.test.ts +3 -3
  265. package/src/ci-identity.ts +51 -11
  266. package/src/ci-image.test.ts +60 -10
  267. package/src/ci-image.ts +78 -19
  268. package/src/ci-jobs.ts +7 -2
  269. package/src/ci-login.test.ts +131 -3
  270. package/src/ci-login.token-drop.test.ts +204 -0
  271. package/src/ci-login.ts +137 -39
  272. package/src/ci-product-words.ts +30 -0
  273. package/src/ci-product.ts +26 -1
  274. package/src/cli/commands/__fixtures__/source-dir-root/migrations/0001-init/backfill.ts +3 -0
  275. package/src/cli/handlers/approve-confirm.test.ts +35 -0
  276. package/src/cli/handlers/approve-confirm.ts +44 -0
  277. package/src/cli/handlers/build-source-dir.test.ts +4 -0
  278. package/src/cli/handlers/build.ts +20 -2
  279. package/src/cli/handlers/ci-check.ts +35 -13
  280. package/src/cli/handlers/ci-evidence-open.test.ts +164 -0
  281. package/src/cli/handlers/ci-evidence.ts +223 -24
  282. package/src/cli/handlers/ci-forge-check.ts +22 -9
  283. package/src/cli/handlers/generated-check.ts +39 -0
  284. package/src/cli/handlers/lifecycle.test.ts +20 -0
  285. package/src/cli/handlers/lifecycle.ts +4 -0
  286. package/src/cli/handlers/local-chant.ts +39 -1
  287. package/src/cli/handlers/pr.ts +43 -5
  288. package/src/cli/handlers/run-wave.ts +7 -0
  289. package/src/cli/main.ts +38 -4
  290. package/src/cli/parse-args.ts +46 -0
  291. package/src/cli/registry.ts +24 -0
  292. package/src/components/check-hooks.ts +25 -3
  293. package/src/components/check-report-summary.test.ts +78 -0
  294. package/src/components/check-steps.ts +1 -1
  295. package/src/components/pr-checks.ts +159 -0
  296. package/src/components/pr-pipeline.ts +41 -1
  297. package/src/components/product-pipeline.ts +25 -3
  298. package/src/components/product-plan.test.ts +102 -1
  299. package/src/components/product-plan.ts +419 -14
  300. package/src/config.ts +13 -8
  301. package/src/control/consumers.ts +7 -0
  302. package/src/dead-guards.test.ts +27 -5
  303. package/src/dead-guards.ts +9 -6
  304. package/src/discovery/files.ts +1 -1
  305. package/src/drift-issue.test.ts +29 -1
  306. package/src/drift-issue.ts +28 -3
  307. package/src/drift-record.test.ts +25 -0
  308. package/src/drift-record.ts +55 -6
  309. package/src/floor-table.data.ts +58 -20
  310. package/src/floor-table.ts +12 -9
  311. package/src/forge-check/contract.ts +11 -1
  312. package/src/forge-check/forge-check.test.ts +8 -0
  313. package/src/forge-check/index.ts +2 -0
  314. package/src/forge-flags.test.ts +25 -1
  315. package/src/forge-flags.ts +34 -0
  316. package/src/forge-remote.test.ts +37 -0
  317. package/src/forge-remote.ts +79 -0
  318. package/src/generated-check.e2e.test.ts +98 -0
  319. package/src/generated-check.test.ts +104 -0
  320. package/src/generated-check.ts +269 -0
  321. package/src/lexicon.ts +17 -0
  322. package/src/lifecycle/publish-npm.ts +56 -3
  323. package/src/lifecycle/release-catalog.test.ts +2 -2
  324. package/src/lifecycle/release-images-dockerfile.test.ts +20 -0
  325. package/src/lifecycle/release-images.test.ts +44 -0
  326. package/src/lifecycle/release-images.ts +39 -3
  327. package/src/lifecycle/release-ledger.ts +4 -3
  328. package/src/local-chant.e2e.test.ts +81 -6
  329. package/src/local-chant.test.ts +22 -3
  330. package/src/local-chant.ts +130 -13
  331. package/src/op/op-waves-evidence-jobs.ts +134 -0
  332. package/src/op/op-waves-evidence.test.ts +37 -4
  333. package/src/op/op-waves-evidence.ts +32 -11
  334. package/src/op/op-waves-run.ts +57 -2
  335. package/src/op/op-waves.ts +11 -0
  336. package/src/op/schedule-overdue.test.ts +83 -1
  337. package/src/op/schedule-overdue.ts +107 -9
  338. package/src/pr-forge-reads-compare.test.ts +2 -1
  339. package/src/pr-forge-reads.ts +37 -1
  340. package/src/pr-forge.ts +14 -3
  341. package/src/pr-plan-note.ts +32 -3
  342. package/src/pr-plan-record.test.ts +75 -0
  343. package/src/pr-plan-record.ts +101 -0
  344. package/src/pr-post-plan-note.test.ts +60 -0
  345. package/src/pr-post.test.ts +30 -0
  346. package/src/pr-post.ts +110 -6
  347. package/src/pr-requires.test.ts +20 -0
  348. package/src/pr-requires.ts +10 -1
  349. package/src/ref-gate-init.ts +189 -0
  350. package/src/ref-gate-rules.ts +26 -0
  351. package/src/release-floors.ts +88 -16
  352. package/src/state-migration-record.test.ts +90 -0
  353. package/src/state-migration.test.ts +1 -1
  354. package/src/state-migration.ts +52 -3
  355. package/src/state-unlock.test.ts +33 -1
  356. package/src/state-unlock.ts +49 -1
  357. package/src/workspace/ci-green-cli.ts +12 -6
  358. package/src/workspace/ci-green.ts +4 -3
  359. package/src/workspace/drift-cli.ts +6 -18
  360. package/src/workspace/forge-work.ts +7 -14
  361. package/src/workspace/lexicon-outputs.ts +2 -2
  362. package/src/workspace/release-workflow.test.ts +70 -0
  363. package/src/workspace/release-workflow.ts +56 -8
  364. package/src/workspace/trust/check-evidence-report.ts +33 -0
  365. package/src/workspace/trust/check-evidence.test.ts +3 -3
  366. package/src/workspace/trust/check-evidence.ts +110 -28
  367. package/src/workspace/trust/ci-tag-statement.ts +2 -2
  368. package/src/workspace/trust/dsse.ts +48 -4
  369. package/src/workspace/trust/evidence.ts +7 -2
  370. package/src/workspace/trust/keyless-fixture.ts +214 -0
  371. package/src/workspace/trust/keyless.test.ts +220 -0
  372. package/src/workspace/trust/keyless.ts +557 -0
  373. package/src/workspace/trust/local-evidence.ts +3 -1
  374. package/src/workspace/trust/op-run-statement.ts +2 -2
  375. package/src/workspace/trust/open-evidence.ts +129 -0
  376. package/src/workspace/trust/policy.ts +129 -2
  377. package/src/workspace/trust/ref-gate-cli.ts +59 -3
  378. package/src/workspace/trust/ref-gate-pieces.test.ts +175 -0
  379. package/src/workspace/trust/ref-gate.e2e.test.ts +17 -0
  380. package/src/workspace/trust/ref-gate.ts +90 -8
  381. package/src/workspace/trust/run-statement.ts +3 -3
  382. package/src/workspace/trust/runner-identity.ts +92 -0
  383. package/src/workspace/trust/trust-files.test.ts +6 -0
  384. package/src/workspace/trust/trust-files.ts +14 -1
@@ -0,0 +1,92 @@
1
+ /**
2
+ * `chant ci evidence sign --open` (#4914): the GitLab signing job, in a
3
+ * pipeline of the target branch, signs the checks of every open merge
4
+ * request into the branch from its newest pipeline's job.
5
+ *
6
+ * A merge request pipeline is built from the merge request's own files, so
7
+ * a job there that holds the runner key (or asks for a signing token) runs
8
+ * whatever the change wrote. The plan notes pipeline (#4328) is the target
9
+ * branch's: its jobs come from the branch's files, and its protected
10
+ * variables reach it. So the signing moves there, as the note posting did:
11
+ * for each open merge request GitLab names the newest pipeline's `job`
12
+ * (`plan`, `<target>-plan`, `check`), the report is read from that job's
13
+ * artifacts as data, the head is fetched, and the checks are signed for
14
+ * the head as `sign --from-report` signs them. What was signed and why the
15
+ * rest were not is kept as `<out>/<iid>/evidence.json`, with the merge
16
+ * request and the head, which the note job reads (`pr-post --open
17
+ * --evidence-dir`, ../../pr-post.ts) for the note's "Checks:" line.
18
+ *
19
+ * A job that has not settled is left for the next pipeline. A merge request
20
+ * whose report does not read, whose head does not fetch, or that the forge
21
+ * refuses is a warning, and the others go on.
22
+ */
23
+ import { mkdirSync, writeFileSync } from "node:fs";
24
+ import { join } from "node:path";
25
+ import { CHECK_EVIDENCE_FILE } from "./check-evidence-report.js";
26
+ /** The report files a job's artifact is read for, in order: a plan report, a product's plan note hand-off, then a check job's report. */
27
+ export const OPEN_PLAN_FILES = ["pr-plan.json", "pr-plan-note.json"];
28
+ export const OPEN_CHECK_FILE = "check-hooks.json";
29
+ /** Sign every open merge request's settled `job` into `branch` (#4914). */
30
+ export async function signOpenReports(input) {
31
+ const { forge } = input;
32
+ if (!forge.mergeRequestJobs || !forge.jobArtifact) {
33
+ throw new Error(`ci evidence sign --open reads the jobs of open merge requests, which ${forge.kind} cannot say; it is for GitLab`);
34
+ }
35
+ const done = [];
36
+ const warnings = [];
37
+ const at = input.artifactDir.replace(/\/+$/, "");
38
+ let forks = new Set();
39
+ if (input.noForks) {
40
+ if (!forge.openPullRequests)
41
+ throw new Error(`ci evidence sign --open --no-forks reads which merge requests come from a fork, which ${forge.kind} cannot say`);
42
+ forks = new Set((await forge.openPullRequests(input.branch)).filter((p) => p.fork).map((p) => p.number));
43
+ }
44
+ for (const job of await forge.mergeRequestJobs(input.branch, input.job)) {
45
+ if (forks.has(job.pr)) {
46
+ done.push({ pr: job.pr, head: job.head, skipped: "the merge request is from a fork" });
47
+ continue;
48
+ }
49
+ const result = job.status === "success" ? "success" : job.status === "failed" ? "failure" : job.status === "canceled" ? "cancelled" : undefined;
50
+ if (!result) {
51
+ done.push({ pr: job.pr, head: job.head, skipped: `the ${input.job} job is ${job.status}` });
52
+ continue;
53
+ }
54
+ try {
55
+ const dir = join(input.out, String(job.pr));
56
+ mkdirSync(dir, { recursive: true });
57
+ // A plan report wins over a check report, as `sign --from-report` reads a directory.
58
+ let found = false;
59
+ for (const file of OPEN_PLAN_FILES) {
60
+ const text = await forge.jobArtifact(job.id, `${at}/${file}`);
61
+ if (text === undefined)
62
+ continue;
63
+ writeFileSync(join(dir, file), text);
64
+ found = true;
65
+ break;
66
+ }
67
+ if (!found) {
68
+ const text = await forge.jobArtifact(job.id, `${at}/${OPEN_CHECK_FILE}`);
69
+ if (text !== undefined) {
70
+ writeFileSync(join(dir, OPEN_CHECK_FILE), text);
71
+ found = true;
72
+ }
73
+ }
74
+ if (!found) {
75
+ done.push({ pr: job.pr, head: job.head, skipped: `the ${input.job} job left no report under ${at}` });
76
+ continue;
77
+ }
78
+ if (!input.fetchHead(job.pr, job.head)) {
79
+ done.push({ pr: job.pr, head: job.head, skipped: `the head ${job.head.slice(0, 12)} did not fetch` });
80
+ continue;
81
+ }
82
+ const note = await input.sign(dir, job.head, result);
83
+ const kept = { pr: job.pr, head: job.head, ...note };
84
+ writeFileSync(join(dir, CHECK_EVIDENCE_FILE), JSON.stringify(kept, null, 2) + "\n");
85
+ done.push({ pr: job.pr, head: job.head, note });
86
+ }
87
+ catch (err) {
88
+ warnings.push(`!${job.pr}: ${err instanceof Error ? err.message : String(err)}`);
89
+ }
90
+ }
91
+ return { done, warnings };
92
+ }
@@ -24,6 +24,8 @@ import { z } from "zod";
24
24
  import type { RecordSource } from "../record-source.js";
25
25
  import { type ExcludedSigner, type Signer } from "./trust-files.js";
26
26
  import type { PasskeySigner } from "../../lifecycle/gate-webauthn.js";
27
+ import { type KeylessRoots } from "./keyless.js";
28
+ import type { DsseSignature, KeylessCheck } from "./dsse.js";
27
29
  export { DEFAULT_SIGNERS_PATH, TRUST_CONFIG_PATH, parseAllowedSigners, renderAllowedSigners, type ExcludedSigner, type Signer, type SignerSet, } from "./trust-files.js";
28
30
  /** A check name a ref rule requires (#4867): it is also part of an override's subject. */
29
31
  export declare const REF_CHECK_NAME: RegExp;
@@ -57,6 +59,22 @@ export declare const trustConfigSchema: z.ZodObject<{
57
59
  }>;
58
60
  key: z.ZodString;
59
61
  }, z.core.$strict>>>;
62
+ keyless: z.ZodOptional<z.ZodObject<{
63
+ trustedRoot: z.ZodString;
64
+ identities: z.ZodArray<z.ZodObject<{
65
+ principal: z.ZodString;
66
+ class: z.ZodEnum<{
67
+ runner: "runner";
68
+ service: "service";
69
+ }>;
70
+ issuer: z.ZodString;
71
+ subject: z.ZodString;
72
+ }, z.core.$strict>>;
73
+ since: z.ZodOptional<z.ZodString>;
74
+ fulcio: z.ZodOptional<z.ZodString>;
75
+ timestamp: z.ZodOptional<z.ZodString>;
76
+ audience: z.ZodOptional<z.ZodString>;
77
+ }, z.core.$strict>>;
60
78
  passkeys: z.ZodOptional<z.ZodArray<z.ZodObject<{
61
79
  principal: z.ZodString;
62
80
  id: z.ZodString;
@@ -148,6 +166,27 @@ export interface RunnerKey {
148
166
  /** `ssh-ed25519 <base64>`. */
149
167
  key: string;
150
168
  }
169
+ /** A CI identity that signs runner statements keyless (#4869), with the trusted root it is verified against. */
170
+ export interface RunnerIdentity {
171
+ principal: string;
172
+ class: "runner" | "service";
173
+ issuer: string;
174
+ /** A pattern over the certificate's subject alternative name: `*` within a `/` segment, `**` across. */
175
+ subject: string;
176
+ roots: KeylessRoots;
177
+ /** Verifies one keyless signature against this identity and its trusted root (./dsse.ts's `TrustedIdentity`). */
178
+ verifyKeyless(message: Buffer, signature: DsseSignature): KeylessCheck;
179
+ }
180
+ /** A runner as a statement's verifier takes it: a key, or a keyless identity. */
181
+ export type Runner = RunnerKey | RunnerIdentity;
182
+ /** Where a keyless signing job trades its token (#4869), and from which commit only keyless statements count. */
183
+ export interface KeylessPolicy {
184
+ since?: string;
185
+ fulcio: string;
186
+ timestamp: string;
187
+ audience: string;
188
+ trustedRoot: string;
189
+ }
151
190
  /** The policy a check applies, as read at base. */
152
191
  export interface TrustPolicy {
153
192
  /** The full commit id the policy was read at, or null when there is no base. */
@@ -165,6 +204,10 @@ export interface TrustPolicy {
165
204
  }>;
166
205
  /** Runner and service keys that may sign runner evidence (#2553). */
167
206
  runners: RunnerKey[];
207
+ /** CI identities that sign runner statements keyless (#4869). Absent on a policy built by hand: none. */
208
+ runnerIdentities?: RunnerIdentity[];
209
+ /** The keyless settings (#4869), when `keyless` is set and its trusted root reads. */
210
+ keyless?: KeylessPolicy;
168
211
  /** Runner entries that are not used, and why. */
169
212
  excludedRunners: Array<{
170
213
  principal: string;
@@ -196,8 +239,20 @@ export interface TrustPolicy {
196
239
  signers: Signer[];
197
240
  } | null;
198
241
  }
199
- /** Paths whose change is a protected write under `policy`: the config, the signers file and its rotation file (#2553). */
242
+ /** Paths whose change is a protected write under `policy`: the config, the signers file and its rotation file (#2553), and the keyless trusted root (#4869). */
200
243
  export declare function protectedPaths(policy: TrustPolicy): string[];
244
+ /**
245
+ * The runners whose statements over `commit` count (#4869): the runner keys
246
+ * and the keyless identities. With `keyless.since`, a runner key counts
247
+ * only for a commit that is a strict ancestor of `since`, the way
248
+ * `ci.green.signedSince` judges tags by position in history; a `since` the
249
+ * clone does not have leaves the keys out. Without `at`, under `since`, only
250
+ * the identities.
251
+ */
252
+ export declare function runnersAt(policy: TrustPolicy, at?: {
253
+ repo: string;
254
+ commit: string;
255
+ }): Runner[];
201
256
  /** Principals allowed to change the policy: the admins when any are granted, otherwise every signer. */
202
257
  export declare function policyWriters(policy: TrustPolicy): Set<string>;
203
258
  /** A policy with nothing in it: attestation off. */
@@ -1 +1 @@
1
- {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,CAAC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AAG,WAAW,CAsDtF;AAuDD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,GAAG,WAAW,CAE3E;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKnF"}
@@ -23,6 +23,8 @@
23
23
  import { posix } from "node:path";
24
24
  import { z } from "zod";
25
25
  import { DEFAULT_SIGNERS_PATH, TRUST_CONFIG_PATH, parseAllowedSigners } from "./trust-files.js";
26
+ import { execFileSync } from "node:child_process";
27
+ import { DEFAULT_FULCIO_URL, DEFAULT_SIGNING_AUDIENCE, DEFAULT_TIMESTAMP_URL, keylessVerifier, parseTrustedRoot } from "./keyless.js";
26
28
  export { DEFAULT_SIGNERS_PATH, TRUST_CONFIG_PATH, parseAllowedSigners, renderAllowedSigners, } from "./trust-files.js";
27
29
  // ── trust.json ───────────────────────────────────────────────────────────────
28
30
  const fullCommit = z.string().regex(/^[0-9a-f]{40}([0-9a-f]{24})?$/, "a full commit id");
@@ -33,6 +35,8 @@ const repoPath = z
33
35
  .refine((p) => !p.startsWith("/") && !p.includes("\\") && posix.normalize(p) === p && !p.split("/").includes(".."), {
34
36
  message: "a path inside the repository, with / separators and no ..",
35
37
  });
38
+ /** An http or https URL (#4869): an OIDC issuer, a certificate or timestamp authority. */
39
+ const httpUrl = z.string().regex(/^https?:\/\/[^\s]+$/, "an http or https URL");
36
40
  /** A check name a ref rule requires (#4867): it is also part of an override's subject. */
37
41
  export const REF_CHECK_NAME = /^[A-Za-z0-9][A-Za-z0-9._:-]*$/;
38
42
  /** A ref pattern (#4867): a full ref name, where `*` matches within one `/` segment and `**` matches across them. */
@@ -79,6 +83,38 @@ export const trustConfigSchema = z
79
83
  })
80
84
  .strict())
81
85
  .optional(),
86
+ /**
87
+ * CI identities that sign runner statements keyless (#4869): each an
88
+ * OIDC issuer and a pattern over the subject alternative name of the
89
+ * certificate the job's token was traded for, which names the
90
+ * repository, the workflow and the ref. `trustedRoot` is a file in
91
+ * sigstore's `trusted_root.json` format with the certificate and
92
+ * timestamp authorities. `fulcio`, `timestamp` and `audience` tell a
93
+ * signing job where to trade its token; sigstore's public instances by
94
+ * default. With `since`, a statement over that commit or any commit not
95
+ * a strict ancestor of it counts only when signed keyless; a runner key's
96
+ * statement over an earlier commit still counts.
97
+ */
98
+ keyless: z
99
+ .object({
100
+ trustedRoot: repoPath,
101
+ identities: z
102
+ .array(z
103
+ .object({
104
+ principal: z.string().min(1),
105
+ class: z.enum(["runner", "service"]),
106
+ issuer: httpUrl,
107
+ subject: z.string().min(1),
108
+ })
109
+ .strict())
110
+ .min(1),
111
+ since: fullCommit.optional(),
112
+ fulcio: httpUrl.optional(),
113
+ timestamp: httpUrl.optional(),
114
+ audience: z.string().min(1).optional(),
115
+ })
116
+ .strict()
117
+ .optional(),
82
118
  /**
83
119
  * Passkeys that sign gate approvals for people (#4646): a WebAuthn
84
120
  * credential's id, its public key as base64url DER SubjectPublicKeyInfo,
@@ -182,10 +218,39 @@ export const trustConfigSchema = z
182
218
  .strict();
183
219
  /** The role whose holders may change the policy. Without any grant of it, every signer may. */
184
220
  export const ADMIN_ROLE = "admin";
185
- /** Paths whose change is a protected write under `policy`: the config, the signers file and its rotation file (#2553). */
221
+ /** Paths whose change is a protected write under `policy`: the config, the signers file and its rotation file (#2553), and the keyless trusted root (#4869). */
186
222
  export function protectedPaths(policy) {
187
223
  const s = policy.signersPath;
188
- return [...new Set([TRUST_CONFIG_PATH, s, posix.join(posix.dirname(s), `${posix.basename(s)}.rotation.json`)])].sort();
224
+ return [...new Set([TRUST_CONFIG_PATH, s, posix.join(posix.dirname(s), `${posix.basename(s)}.rotation.json`), ...(policy.keyless ? [policy.keyless.trustedRoot] : [])])].sort();
225
+ }
226
+ /**
227
+ * The runners whose statements over `commit` count (#4869): the runner keys
228
+ * and the keyless identities. With `keyless.since`, a runner key counts
229
+ * only for a commit that is a strict ancestor of `since`, the way
230
+ * `ci.green.signedSince` judges tags by position in history; a `since` the
231
+ * clone does not have leaves the keys out. Without `at`, under `since`, only
232
+ * the identities.
233
+ */
234
+ export function runnersAt(policy, at) {
235
+ const ids = policy.runnerIdentities ?? [];
236
+ const since = policy.keyless?.since;
237
+ if (!since)
238
+ return [...policy.runners, ...ids];
239
+ if (!at || !strictAncestor(at.repo, at.commit, since))
240
+ return ids;
241
+ return [...policy.runners, ...ids];
242
+ }
243
+ function strictAncestor(repo, commit, of) {
244
+ try {
245
+ const full = execFileSync("git", ["rev-parse", "--verify", "--quiet", `${commit}^{commit}`], { cwd: repo, encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
246
+ if (full === of)
247
+ return false;
248
+ execFileSync("git", ["merge-base", "--is-ancestor", full, of], { cwd: repo, stdio: "ignore" });
249
+ return true;
250
+ }
251
+ catch {
252
+ return false;
253
+ }
189
254
  }
190
255
  /** Principals allowed to change the policy: the admins when any are granted, otherwise every signer. */
191
256
  export function policyWriters(policy) {
@@ -242,6 +307,7 @@ export function readTrustPolicy(source, base) {
242
307
  runners.push(r);
243
308
  }
244
309
  }
310
+ const { runnerIdentities, keyless } = keylessOf(config, source, humanNames, excludedRunners);
245
311
  return {
246
312
  base,
247
313
  signersPath,
@@ -252,6 +318,7 @@ export function readTrustPolicy(source, base) {
252
318
  adopted: config.adopted ?? [],
253
319
  runners,
254
320
  excludedRunners,
321
+ ...(keyless ? { runnerIdentities, keyless } : {}),
255
322
  passkeys: config.passkeys ?? [],
256
323
  admitted: admittedOf(config),
257
324
  refs: (config.refs ?? []).map((r) => ({ ...r, checks: r.checks.map((c) => ({ ...c, action: c.action ?? "block" })) })),
@@ -275,6 +342,40 @@ function localOf(config, runners) {
275
342
  }
276
343
  return { keys, excluded, checks: (config.local?.checks ?? []).map((c) => ({ check: c.check, from: c.from ?? ["person"] })) };
277
344
  }
345
+ /**
346
+ * The keyless identities (#4869), each with the trusted root read through
347
+ * `source`. A trusted root that cannot be read leaves every identity out,
348
+ * with the reason in `excluded`; the runner keys still count.
349
+ */
350
+ function keylessOf(config, source, humanNames, excluded) {
351
+ const k = config.keyless;
352
+ if (!k)
353
+ return { runnerIdentities: [] };
354
+ // Kept when the root does not read, so `since` still leaves the keys out: fail closed.
355
+ const keyless = { ...(k.since ? { since: k.since } : {}), fulcio: k.fulcio ?? DEFAULT_FULCIO_URL, timestamp: k.timestamp ?? DEFAULT_TIMESTAMP_URL, audience: k.audience ?? DEFAULT_SIGNING_AUDIENCE, trustedRoot: k.trustedRoot };
356
+ let roots;
357
+ try {
358
+ const text = readOptional(source, k.trustedRoot);
359
+ if (text === undefined)
360
+ throw new Error("the file is not there");
361
+ roots = parseTrustedRoot(text);
362
+ }
363
+ catch (err) {
364
+ for (const i of k.identities)
365
+ excluded.push({ principal: i.principal, reason: `the keyless trusted root ${k.trustedRoot} cannot be read: ${err instanceof Error ? err.message : String(err)}` });
366
+ return { runnerIdentities: [], keyless };
367
+ }
368
+ const runnerIdentities = [];
369
+ for (const i of k.identities) {
370
+ if (humanNames.has(i.principal))
371
+ excluded.push({ principal: i.principal, reason: "the signers file lists this principal; a keyless identity is a CI job's, never a signer's" });
372
+ else {
373
+ const verify = keylessVerifier({ ...i, roots });
374
+ runnerIdentities.push({ ...i, roots, verifyKeyless: (message, signature) => verify(message, signature) });
375
+ }
376
+ }
377
+ return { runnerIdentities, keyless };
378
+ }
278
379
  /** The admitted signers, by return id. Two entries for one return add up. */
279
380
  function admittedOf(config) {
280
381
  const out = {};
@@ -1 +1 @@
1
- {"version":3,"file":"ref-gate-cli.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/ref-gate-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAYL,KAAK,WAAW,EAGjB,MAAM,YAAY,CAAC;AAIpB,eAAO,MAAM,yBAAyB,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,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAUvM;AAED,2FAA2F;AAC3F,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,UAAU,EAAE,OAAO,SAAU,GAAG,MAAM,CAEvF"}
@@ -28,6 +28,7 @@ export const REF_GATE_HOOK_MARK = "# chant ref gate (#4867)";
28
28
  const OVERRIDE_REQUEST_HOURS = 72;
29
29
  const USAGE = "chant workspace ref-gate check --ref <ref> [--at <rev>] [--base <rev>] [--dry-run] [--ledger <file>] [--json]\n" +
30
30
  " chant workspace ref-gate status --ref <ref> [--at <rev>] [--base <rev>] [--dry-run] [--ledger <file>] [--json]\n" +
31
+ " chant workspace ref-gate status --open --ref refs/heads/<branch> [--base <rev>] [--dry-run] [--ledger <file>] [--json]\n" +
31
32
  " chant workspace ref-gate pre-receive|pre-push [--ledger <file>] [--dry-run] [--json] (git hook input on stdin)\n" +
32
33
  " chant workspace ref-gate attach --envelope <file> [--at <rev>]\n" +
33
34
  " chant workspace ref-gate install --hook pre-receive|pre-push [--git-dir <dir>] [--chant <command>]";
@@ -59,7 +60,7 @@ function repoHere() {
59
60
  }
60
61
  return { repo: top, bare: false };
61
62
  }
62
- function print(json, decisions, ledger, stream) {
63
+ function print(json, decisions, ledger, stream, site) {
63
64
  const ok = decisions.every((d) => d.decision === "admit");
64
65
  if (json) {
65
66
  console.log(JSON.stringify({ ...head(), ok, ...(ledger ? { ledger } : {}), decisions }, null, 2));
@@ -68,7 +69,7 @@ function print(json, decisions, ledger, stream) {
68
69
  for (const d of decisions) {
69
70
  if (d.status === null && d.checks.length === 0 && !d.error)
70
71
  continue;
71
- const text = describeDecision(d).join("\n");
72
+ const text = describeDecision(d, site ? { site } : {}).join("\n");
72
73
  if (stream === "err" || d.decision === "refuse")
73
74
  console.error(text);
74
75
  else
@@ -142,7 +143,7 @@ export async function runWorkspaceRefGate(ctx) {
142
143
  try {
143
144
  if (sub === "pre-receive") {
144
145
  const r = runPreReceive(here.repo, stdin, { ...(args.ledger ? { ledger: args.ledger } : {}), now });
145
- print(args.json, r.decisions, r.ledger, "err");
146
+ print(args.json, r.decisions, r.ledger, "err", "pre-receive");
146
147
  return r.ok ? 0 : 1;
147
148
  }
148
149
  const r = runPrePush(here.repo, stdin, { ...(args.ledger ? { ledger: args.ledger } : {}), now, base: (repo) => resolveBase(repo).commit });
@@ -160,6 +161,11 @@ export async function runWorkspaceRefGate(ctx) {
160
161
  // check and status: one update, from a checkout or a CI job.
161
162
  if (!args.ref || !args.ref.startsWith("refs/"))
162
163
  return usage("--ref <ref> is required, as a full ref name such as refs/heads/main");
164
+ if (args.open) {
165
+ if (sub !== "status")
166
+ return usage("--open sets the status of every open pull request, so it goes with status");
167
+ return statusOpen(here.repo, args.ref, args.base, args.ledger, args.dryRun === true, args.json, now);
168
+ }
163
169
  const at = commitOf(here.repo, args.at ?? "HEAD");
164
170
  if (!at)
165
171
  return fail(args.json, "revision-unknown", `--at ${args.at ?? "HEAD"} names no commit`);
@@ -191,6 +197,62 @@ export async function runWorkspaceRefGate(ctx) {
191
197
  }
192
198
  return d.decision === "admit" ? 0 : 1;
193
199
  }
200
+ /**
201
+ * `status --open --ref refs/heads/<branch>` (#4935): the status of every open
202
+ * pull request into the branch, from a pipeline of the branch. GitLab sets a
203
+ * commit status only with the protected token a target-branch pipeline holds
204
+ * (#4328), so its generated `ref-gate` job runs here, beside the plan notes.
205
+ * Each head is fetched and decided as `status --at <head>` decides it, against
206
+ * the policy at `base` (default this checkout's `HEAD`, the branch's commit).
207
+ * A head that does not fetch, or a forge that refuses one status, is said
208
+ * and the others go on. Exits 0 once each is set, whatever it decided: each
209
+ * pull request's status says it.
210
+ */
211
+ async function statusOpen(repo, ref, baseRev, ledgerFlag, dryRun, json, now) {
212
+ if (!ref.startsWith("refs/heads/"))
213
+ return usage("--open names the branch the pull requests merge into: --ref refs/heads/<branch>");
214
+ const base = commitOf(repo, baseRev ?? "HEAD");
215
+ if (!base)
216
+ return fail(json, "revision-unknown", `--base ${baseRev ?? "HEAD"} names no commit`);
217
+ const { detectForge, forgeFromEnv } = await import("../../pr-forge.js");
218
+ const kind = detectForge();
219
+ if (!kind && !dryRun) {
220
+ console.error(formatError({ message: "no forge detected, so no status was set", hint: "run it in a GitHub, GitLab or Forgejo job, or pass --dry-run" }));
221
+ return 1;
222
+ }
223
+ const forge = kind ? forgeFromEnv(kind) : undefined;
224
+ if (!forge?.openPullRequests)
225
+ return fail(json, "ref-update-invalid", `--open lists the open pull requests, which ${kind ?? "no"} forge client here can`);
226
+ const branch = ref.slice("refs/heads/".length);
227
+ const ledger = ledgerFlag ?? refGateLedgerPath(repo);
228
+ const decisions = [];
229
+ for (const pr of await forge.openPullRequests(branch)) {
230
+ const fetched = spawnSync("git", ["fetch", "--quiet", "--no-tags", "origin", pr.headSha], { cwd: repo, encoding: "utf-8" });
231
+ if (!commitOf(repo, pr.headSha)) {
232
+ console.error(`chant ref gate: #${pr.number}'s head ${pr.headSha.slice(0, 8)} did not fetch${fetched.stderr ? ` (${fetched.stderr.trim().split("\n")[0]})` : ""}, so its status is left as it is`);
233
+ continue;
234
+ }
235
+ const spent = spentOverrides(readRefGateLedger(ledger));
236
+ const d = decideRefUpdate({ repo, update: { ref, old: base, new: pr.headSha }, base, spent, now });
237
+ decisions.push(d);
238
+ if (dryRun) {
239
+ if (d.status !== null)
240
+ console.error(`chant ref gate: would set ${d.status} to ${d.decision === "admit" ? "success" : "failure"} on #${pr.number} at ${pr.headSha.slice(0, 8)}`);
241
+ continue;
242
+ }
243
+ appendRefGateLedger(ledger, [{ ...d, version: 1, kind: "ref-update", site: "status", timestamp: now }]);
244
+ try {
245
+ await postRefGateStatus(forge, d);
246
+ }
247
+ catch (err) {
248
+ console.error(`chant ref gate: could not set the status on #${pr.number}: ${err instanceof Error ? err.message : String(err)}`);
249
+ }
250
+ }
251
+ print(json, decisions, dryRun ? undefined : ledger, "err");
252
+ if (decisions.length === 0)
253
+ console.error(`chant ref gate: no open pull request into ${branch} to set a status on`);
254
+ return 0;
255
+ }
194
256
  /** The commit status a forge requires for `d`'s ref: `success` when it is admitted, `failure` naming the missing checks when not. */
195
257
  export async function postRefGateStatus(forge, d) {
196
258
  if (d.status === null || d.new === null)
@@ -31,7 +31,7 @@
31
31
  * ledger, a JSON-lines file in the git directory ({@link refGateLedgerPath}),
32
32
  * since a pre-receive hook may not move a ref.
33
33
  */
34
- import type { RefRule, TrustPolicy } from "./policy.js";
34
+ import { type RefRule, type TrustPolicy } from "./policy.js";
35
35
  import { type AppliedOverrideRecord } from "../../override-gate.js";
36
36
  /** Where runner evidence for a commit is kept (#4867): a git note on the commit, one DSSE envelope per line. */
37
37
  export declare const EVIDENCE_NOTES_REF = "refs/notes/chant/evidence";
@@ -106,6 +106,50 @@ export declare function rulesFor(policy: Pick<TrustPolicy, "refs">, ref: string)
106
106
  status: string;
107
107
  overrides?: "ledger" | "sealed";
108
108
  };
109
+ /** The ref gate's rules for one ref, read at base, as a product reads them (#4913). */
110
+ export interface RefGateRules {
111
+ ref: string;
112
+ /** The commit the policy was read at, or null when there is none. */
113
+ base: string | null;
114
+ /** A rule of the policy at base matches the ref. */
115
+ matched: boolean;
116
+ /** The commit status the ref gate's status job sets for the ref, which the forge should require; null when no rule matches. */
117
+ status: string | null;
118
+ /** The checks an update of the ref needs current evidence for, each once, as {@link rulesFor} merges them. */
119
+ checks: RefRule["checks"];
120
+ overrides?: "ledger" | "sealed";
121
+ /**
122
+ * Why the policy at base cannot be read. The gate then refuses every
123
+ * update of the ref and sets no status, so a product should refuse too.
124
+ */
125
+ problems: string[];
126
+ }
127
+ /**
128
+ * The ref gate's rules for `ref` from the policy at `base` (#4913), the same
129
+ * read {@link decideRefUpdate} makes, for a product that acts on them
130
+ * without deciding an update: an apply that waits for the status the gate
131
+ * sets (`@intentius/chant/ref-gate-rules`), or a forge check that requires
132
+ * it. `base` defaults as `check` and `status` default it: `origin/HEAD`,
133
+ * then `main`, then `master`. A base that names no commit is a problem; no
134
+ * base at all is no policy, so nothing is required.
135
+ */
136
+ export declare function refGateRulesAt(repo: string, opts: {
137
+ ref: string;
138
+ base?: string;
139
+ }): RefGateRules;
140
+ /**
141
+ * The status a forge's default branch should require for the ref gate
142
+ * (#4913), for a forge check whose pipeline renders the `ref-gate` job: the
143
+ * policy's status for `refs/heads/<defaultBranch>`, read at
144
+ * `origin/<defaultBranch>` when the checkout has it, else at `HEAD`. With
145
+ * no rule for the branch the job sets no status, so none is required and
146
+ * `note` says so; a policy that can't be read is a `problem`.
147
+ */
148
+ export declare function refGateStatusFor(repo: string, defaultBranch: string): {
149
+ status?: string;
150
+ note?: string;
151
+ problem?: string;
152
+ };
109
153
  /** The envelopes in a note's text: one per line, or the whole note as one envelope or an array of them. */
110
154
  export declare function parseEvidenceNote(text: string): unknown[];
111
155
  /** The envelopes attached to `commit`, read from the notes commit `notes` (default: {@link EVIDENCE_NOTES_REF}'s tip). */
@@ -182,6 +226,21 @@ export declare function runPrePush(repo: string, stdin: string, opts?: {
182
226
  now?: string;
183
227
  base?: (repo: string) => string | null;
184
228
  }): SiteResult;
185
- /** What the gate says about one decision: each missing check and its command, and how to override a blocked one. */
186
- export declare function describeDecision(d: RefDecision): string[];
229
+ /**
230
+ * The command that records the request for an override of `d`'s blocked
231
+ * checks from a checkout (#4913): `check` for the same ref, commit and base
232
+ * the remote decided, so it reaches the same decision and records the
233
+ * request on `chant/lifecycle`, which a pre-receive hook can't move.
234
+ */
235
+ export declare function requestCommand(d: Pick<RefDecision, "ref" | "new" | "base">): string;
236
+ /**
237
+ * What the gate says about one decision: each missing check and its command,
238
+ * and how to override a blocked one. At `pre-receive` (#4913) the request
239
+ * can't be recorded where the decision is made, so the refusal prints the
240
+ * exact command that records it from the checkout, then the override and
241
+ * the push that spends it.
242
+ */
243
+ export declare function describeDecision(d: RefDecision, opts?: {
244
+ site?: RefGateSite;
245
+ }): string[];
187
246
  //# sourceMappingURL=ref-gate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ref-gate.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/ref-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAQH,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAQL,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAK7B,gHAAgH;AAChH,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAC9D,6DAA6D;AAC7D,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAC1D,mEAAmE;AACnE,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAIhD,kGAAkG;AAClG,eAAO,MAAM,oBAAoB,wGAAyI,CAAC;AAC3K,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,uGAAuG;AACvG,eAAO,MAAM,oBAAoB,sLAQS,CAAC;AAC3C,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,6GAA6G;AAC7G,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gCAAgC;AAChC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,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