@intentius/chant 0.124.85 → 0.124.87

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 (286) hide show
  1. package/dist/bundle-check.d.ts +102 -0
  2. package/dist/bundle-check.d.ts.map +1 -0
  3. package/dist/bundle-check.js +310 -0
  4. package/dist/chant-install.d.ts +100 -0
  5. package/dist/chant-install.d.ts.map +1 -0
  6. package/dist/chant-install.js +158 -0
  7. package/dist/ci-commit.d.ts +19 -6
  8. package/dist/ci-commit.d.ts.map +1 -1
  9. package/dist/ci-commit.js +23 -4
  10. package/dist/ci-evidence-jobs.d.ts +78 -0
  11. package/dist/ci-evidence-jobs.d.ts.map +1 -0
  12. package/dist/ci-evidence-jobs.js +85 -0
  13. package/dist/ci-image.d.ts +274 -0
  14. package/dist/ci-image.d.ts.map +1 -0
  15. package/dist/ci-image.js +635 -0
  16. package/dist/ci-login.d.ts +150 -0
  17. package/dist/ci-login.d.ts.map +1 -0
  18. package/dist/ci-login.js +240 -0
  19. package/dist/ci-product.d.ts +16 -0
  20. package/dist/ci-product.d.ts.map +1 -1
  21. package/dist/ci-product.js +17 -0
  22. package/dist/cli/commands/import-index.js +2 -2
  23. package/dist/cli/handlers/build.d.ts +8 -0
  24. package/dist/cli/handlers/build.d.ts.map +1 -1
  25. package/dist/cli/handlers/build.js +22 -4
  26. package/dist/cli/handlers/ci-check.d.ts.map +1 -1
  27. package/dist/cli/handlers/ci-check.js +61 -2
  28. package/dist/cli/handlers/ci-evidence.d.ts +3 -0
  29. package/dist/cli/handlers/ci-evidence.d.ts.map +1 -0
  30. package/dist/cli/handlers/ci-evidence.js +174 -0
  31. package/dist/cli/handlers/components.js +3 -3
  32. package/dist/cli/handlers/dead-guards.d.ts +3 -0
  33. package/dist/cli/handlers/dead-guards.d.ts.map +1 -0
  34. package/dist/cli/handlers/dead-guards.js +35 -0
  35. package/dist/cli/handlers/graph.js +4 -4
  36. package/dist/cli/handlers/lifecycle.d.ts +2 -1
  37. package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
  38. package/dist/cli/handlers/lifecycle.js +5 -4
  39. package/dist/cli/handlers/local-chant.d.ts +16 -0
  40. package/dist/cli/handlers/local-chant.d.ts.map +1 -0
  41. package/dist/cli/handlers/local-chant.js +109 -0
  42. package/dist/cli/handlers/operator.js +2 -2
  43. package/dist/cli/handlers/search.js +5 -5
  44. package/dist/cli/main.d.ts.map +1 -1
  45. package/dist/cli/main.js +38 -0
  46. package/dist/cli/parse-args.d.ts.map +1 -1
  47. package/dist/cli/parse-args.js +28 -0
  48. package/dist/cli/registry.d.ts +16 -0
  49. package/dist/cli/registry.d.ts.map +1 -1
  50. package/dist/components/check-hooks.d.ts +49 -0
  51. package/dist/components/check-hooks.d.ts.map +1 -1
  52. package/dist/components/check-hooks.js +64 -4
  53. package/dist/components/check-steps.d.ts +17 -0
  54. package/dist/components/check-steps.d.ts.map +1 -1
  55. package/dist/components/check-steps.js +37 -5
  56. package/dist/components/product-pipeline.d.ts +23 -0
  57. package/dist/components/product-pipeline.d.ts.map +1 -1
  58. package/dist/components/product-pipeline.js +6 -2
  59. package/dist/components/product-plan.d.ts +143 -0
  60. package/dist/components/product-plan.d.ts.map +1 -0
  61. package/dist/components/product-plan.js +145 -0
  62. package/dist/components/release-compile.d.ts.map +1 -1
  63. package/dist/components/release-compile.js +2 -2
  64. package/dist/config.d.ts +39 -1
  65. package/dist/config.d.ts.map +1 -1
  66. package/dist/config.js +35 -3
  67. package/dist/dead-guards.d.ts +82 -0
  68. package/dist/dead-guards.d.ts.map +1 -0
  69. package/dist/dead-guards.js +436 -0
  70. package/dist/discovery/files.d.ts +3 -1
  71. package/dist/discovery/files.d.ts.map +1 -1
  72. package/dist/discovery/files.js +5 -3
  73. package/dist/drift-issue.d.ts +152 -0
  74. package/dist/drift-issue.d.ts.map +1 -0
  75. package/dist/drift-issue.js +167 -0
  76. package/dist/floor-table.d.ts +30 -0
  77. package/dist/floor-table.d.ts.map +1 -0
  78. package/dist/floor-table.data.d.ts +3 -0
  79. package/dist/floor-table.data.d.ts.map +1 -0
  80. package/dist/floor-table.data.js +179 -0
  81. package/dist/floor-table.js +56 -0
  82. package/dist/forge-flags.d.ts +90 -0
  83. package/dist/forge-flags.d.ts.map +1 -0
  84. package/dist/forge-flags.js +184 -0
  85. package/dist/lexicon.d.ts +69 -0
  86. package/dist/lexicon.d.ts.map +1 -1
  87. package/dist/lifecycle/gated-op.d.ts +7 -1
  88. package/dist/lifecycle/gated-op.d.ts.map +1 -1
  89. package/dist/lifecycle/gated-op.js +7 -4
  90. package/dist/local-chant.d.ts +98 -0
  91. package/dist/local-chant.d.ts.map +1 -0
  92. package/dist/local-chant.js +307 -0
  93. package/dist/op/activities/predict-behaviour.js +2 -2
  94. package/dist/op/op-waves-evidence-spec.d.ts +13 -0
  95. package/dist/op/op-waves-evidence-spec.d.ts.map +1 -0
  96. package/dist/op/op-waves-evidence-spec.js +21 -0
  97. package/dist/op/op-waves-evidence.d.ts +40 -0
  98. package/dist/op/op-waves-evidence.d.ts.map +1 -0
  99. package/dist/op/op-waves-evidence.js +58 -0
  100. package/dist/op/op-waves-run.d.ts +4 -0
  101. package/dist/op/op-waves-run.d.ts.map +1 -1
  102. package/dist/op/op-waves-run.js +24 -1
  103. package/dist/op/op-waves.d.ts +17 -1
  104. package/dist/op/op-waves.d.ts.map +1 -1
  105. package/dist/op/op-waves.js +23 -0
  106. package/dist/op/schedule-overdue.d.ts +41 -9
  107. package/dist/op/schedule-overdue.d.ts.map +1 -1
  108. package/dist/op/schedule-overdue.js +154 -25
  109. package/dist/plan-summary.d.ts +25 -0
  110. package/dist/plan-summary.d.ts.map +1 -1
  111. package/dist/plan-summary.js +31 -0
  112. package/dist/pr-plan-note.d.ts +35 -0
  113. package/dist/pr-plan-note.d.ts.map +1 -1
  114. package/dist/pr-plan-note.js +10 -0
  115. package/dist/pr-post.d.ts +23 -0
  116. package/dist/pr-post.d.ts.map +1 -1
  117. package/dist/pr-post.js +125 -3
  118. package/dist/release-floors.d.ts +33 -1
  119. package/dist/release-floors.d.ts.map +1 -1
  120. package/dist/release-floors.js +33 -1
  121. package/dist/state-migration.d.ts +24 -0
  122. package/dist/state-migration.d.ts.map +1 -1
  123. package/dist/state-migration.js +100 -5
  124. package/dist/wave-runtime.mjs +309 -302
  125. package/dist/workspace/ci-green.d.ts.map +1 -1
  126. package/dist/workspace/ci-green.js +4 -3
  127. package/dist/workspace/lexicon-outputs.d.ts.map +1 -1
  128. package/dist/workspace/lexicon-outputs.js +21 -7
  129. package/dist/workspace/reason-codes.d.ts +3 -0
  130. package/dist/workspace/reason-codes.d.ts.map +1 -1
  131. package/dist/workspace/reason-codes.js +4 -0
  132. package/dist/workspace/ref-gate.schema.json +85 -0
  133. package/dist/workspace/search-contract.d.ts +1 -1
  134. package/dist/workspace/search-contract.d.ts.map +1 -1
  135. package/dist/workspace/trust/check-evidence-report.d.ts +58 -0
  136. package/dist/workspace/trust/check-evidence-report.d.ts.map +1 -0
  137. package/dist/workspace/trust/check-evidence-report.js +109 -0
  138. package/dist/workspace/trust/check-evidence.d.ts +160 -0
  139. package/dist/workspace/trust/check-evidence.d.ts.map +1 -0
  140. package/dist/workspace/trust/check-evidence.js +309 -0
  141. package/dist/workspace/trust/ci-tag-statement.d.ts +2 -2
  142. package/dist/workspace/trust/ci-tag-statement.d.ts.map +1 -1
  143. package/dist/workspace/trust/dsse.d.ts +40 -2
  144. package/dist/workspace/trust/dsse.d.ts.map +1 -1
  145. package/dist/workspace/trust/dsse.js +34 -2
  146. package/dist/workspace/trust/evidence.d.ts +2 -2
  147. package/dist/workspace/trust/evidence.d.ts.map +1 -1
  148. package/dist/workspace/trust/keyless-fixture.d.ts +41 -0
  149. package/dist/workspace/trust/keyless-fixture.d.ts.map +1 -0
  150. package/dist/workspace/trust/keyless-fixture.js +161 -0
  151. package/dist/workspace/trust/keyless.d.ts +202 -0
  152. package/dist/workspace/trust/keyless.d.ts.map +1 -0
  153. package/dist/workspace/trust/keyless.js +488 -0
  154. package/dist/workspace/trust/local-evidence.d.ts +123 -0
  155. package/dist/workspace/trust/local-evidence.d.ts.map +1 -0
  156. package/dist/workspace/trust/local-evidence.js +259 -0
  157. package/dist/workspace/trust/op-run-statement.d.ts +2 -2
  158. package/dist/workspace/trust/op-run-statement.d.ts.map +1 -1
  159. package/dist/workspace/trust/policy.d.ts +140 -1
  160. package/dist/workspace/trust/policy.d.ts.map +1 -1
  161. package/dist/workspace/trust/policy.js +197 -3
  162. package/dist/workspace/trust/ref-gate-cli.d.ts +33 -0
  163. package/dist/workspace/trust/ref-gate-cli.d.ts.map +1 -0
  164. package/dist/workspace/trust/ref-gate-cli.js +234 -0
  165. package/dist/workspace/trust/ref-gate-fixture.d.ts +38 -0
  166. package/dist/workspace/trust/ref-gate-fixture.d.ts.map +1 -0
  167. package/dist/workspace/trust/ref-gate-fixture.js +97 -0
  168. package/dist/workspace/trust/ref-gate.d.ts +187 -0
  169. package/dist/workspace/trust/ref-gate.d.ts.map +1 -0
  170. package/dist/workspace/trust/ref-gate.js +432 -0
  171. package/dist/workspace/trust/run-statement.d.ts +3 -3
  172. package/dist/workspace/trust/run-statement.d.ts.map +1 -1
  173. package/dist/workspace/trust/runner-identity.d.ts +56 -0
  174. package/dist/workspace/trust/runner-identity.d.ts.map +1 -0
  175. package/dist/workspace/trust/runner-identity.js +65 -0
  176. package/dist/workspace/trust/trust-files.d.ts.map +1 -1
  177. package/dist/workspace/trust/trust-files.js +25 -1
  178. package/package.json +1 -1
  179. package/src/bundle-check.test.ts +140 -0
  180. package/src/bundle-check.ts +352 -0
  181. package/src/chant-install.test.ts +112 -0
  182. package/src/chant-install.ts +179 -0
  183. package/src/ci-commit.test.ts +45 -0
  184. package/src/ci-commit.ts +38 -4
  185. package/src/ci-evidence-jobs.ts +105 -0
  186. package/src/ci-image.test.ts +506 -0
  187. package/src/ci-image.ts +822 -0
  188. package/src/ci-login.test.ts +235 -0
  189. package/src/ci-login.ts +307 -0
  190. package/src/ci-product.ts +18 -0
  191. package/src/cli/commands/__fixtures__/source-dir-include/chant.config.json +1 -0
  192. package/src/cli/commands/__fixtures__/source-dir-include/infra.ts +1 -0
  193. package/src/cli/commands/__fixtures__/source-dir-include/scripts/run-on-load.ts +3 -0
  194. package/src/cli/commands/__fixtures__/source-dir-root/chant.config.json +1 -0
  195. package/src/cli/commands/__fixtures__/source-dir-root/infra.test.ts +1 -0
  196. package/src/cli/commands/__fixtures__/source-dir-root/infra.ts +1 -0
  197. package/src/cli/commands/__fixtures__/source-dir-root/scripts/run-on-load.ts +3 -0
  198. package/src/cli/commands/__fixtures__/source-dir-scoped/app.ts +3 -0
  199. package/src/cli/commands/__fixtures__/source-dir-scoped/chant.config.json +1 -0
  200. package/src/cli/commands/__fixtures__/source-dir-scoped/infra/net.ts +1 -0
  201. package/src/cli/commands/__fixtures__/source-dir-scoped/scripts/run-on-load.ts +3 -0
  202. package/src/cli/commands/import-index.ts +2 -2
  203. package/src/cli/handlers/build-source-dir.test.ts +64 -0
  204. package/src/cli/handlers/build.ts +21 -4
  205. package/src/cli/handlers/ci-check.ts +60 -3
  206. package/src/cli/handlers/ci-evidence.ts +167 -0
  207. package/src/cli/handlers/components.ts +3 -3
  208. package/src/cli/handlers/dead-guards.ts +37 -0
  209. package/src/cli/handlers/graph.ts +4 -4
  210. package/src/cli/handlers/lifecycle.ts +5 -4
  211. package/src/cli/handlers/local-chant.ts +106 -0
  212. package/src/cli/handlers/operator.ts +2 -2
  213. package/src/cli/handlers/search.ts +5 -5
  214. package/src/cli/main.test.ts +7 -0
  215. package/src/cli/main.ts +38 -0
  216. package/src/cli/parse-args.ts +21 -0
  217. package/src/cli/registry.ts +16 -0
  218. package/src/components/check-evidence-stage.test.ts +80 -0
  219. package/src/components/check-hooks.ts +84 -4
  220. package/src/components/check-local-evidence-stage.test.ts +141 -0
  221. package/src/components/check-steps.ts +56 -6
  222. package/src/components/product-pipeline.ts +28 -3
  223. package/src/components/product-plan.test.ts +87 -0
  224. package/src/components/product-plan.ts +230 -0
  225. package/src/components/release-compile.ts +2 -2
  226. package/src/config.ts +44 -3
  227. package/src/dead-guards.test.ts +206 -0
  228. package/src/dead-guards.ts +446 -0
  229. package/src/discovery/files.ts +5 -3
  230. package/src/drift-issue-bundle.test.ts +31 -0
  231. package/src/drift-issue.test.ts +206 -0
  232. package/src/drift-issue.ts +274 -0
  233. package/src/fit-note.test.ts +44 -0
  234. package/src/floor-table.data.ts +181 -0
  235. package/src/floor-table.ts +77 -0
  236. package/src/forge-flags.test.ts +110 -0
  237. package/src/forge-flags.ts +208 -0
  238. package/src/gate-decision-bundle.test.ts +1 -0
  239. package/src/lexicon.ts +68 -0
  240. package/src/lifecycle/gated-op.ts +10 -5
  241. package/src/local-chant.e2e.test.ts +94 -0
  242. package/src/local-chant.test.ts +162 -0
  243. package/src/local-chant.ts +341 -0
  244. package/src/op/activities/predict-behaviour.ts +2 -2
  245. package/src/op/op-waves-evidence-spec.ts +24 -0
  246. package/src/op/op-waves-evidence.test.ts +130 -0
  247. package/src/op/op-waves-evidence.ts +58 -0
  248. package/src/op/op-waves-run.ts +25 -1
  249. package/src/op/op-waves.ts +31 -1
  250. package/src/op/schedule-overdue.test.ts +85 -0
  251. package/src/op/schedule-overdue.ts +162 -26
  252. package/src/plan-summary.ts +40 -0
  253. package/src/pr-plan-note.ts +34 -0
  254. package/src/pr-post-plan-note.test.ts +146 -0
  255. package/src/pr-post.ts +127 -3
  256. package/src/release-floors.ts +47 -1
  257. package/src/stage-hooks-bundle.test.ts +1 -0
  258. package/src/state-migration.test.ts +52 -1
  259. package/src/state-migration.ts +107 -5
  260. package/src/workspace/ci-green.ts +4 -3
  261. package/src/workspace/lexicon-outputs.ts +23 -6
  262. package/src/workspace/reason-codes.test.ts +3 -0
  263. package/src/workspace/reason-codes.ts +4 -0
  264. package/src/workspace/ref-gate.schema.json +85 -0
  265. package/src/workspace/trust/check-evidence-report.ts +115 -0
  266. package/src/workspace/trust/check-evidence.test.ts +133 -0
  267. package/src/workspace/trust/check-evidence.ts +327 -0
  268. package/src/workspace/trust/ci-tag-statement.ts +2 -2
  269. package/src/workspace/trust/dsse.ts +48 -4
  270. package/src/workspace/trust/evidence.ts +2 -2
  271. package/src/workspace/trust/keyless-fixture.ts +214 -0
  272. package/src/workspace/trust/keyless.test.ts +220 -0
  273. package/src/workspace/trust/keyless.ts +557 -0
  274. package/src/workspace/trust/local-evidence.test.ts +127 -0
  275. package/src/workspace/trust/local-evidence.ts +268 -0
  276. package/src/workspace/trust/op-run-statement.ts +2 -2
  277. package/src/workspace/trust/policy.ts +263 -3
  278. package/src/workspace/trust/ref-gate-cli.ts +244 -0
  279. package/src/workspace/trust/ref-gate-fixture.ts +125 -0
  280. package/src/workspace/trust/ref-gate.e2e.test.ts +76 -0
  281. package/src/workspace/trust/ref-gate.test.ts +247 -0
  282. package/src/workspace/trust/ref-gate.ts +539 -0
  283. package/src/workspace/trust/run-statement.ts +3 -3
  284. package/src/workspace/trust/runner-identity.ts +92 -0
  285. package/src/workspace/trust/trust-files.test.ts +22 -0
  286. package/src/workspace/trust/trust-files.ts +54 -1
@@ -0,0 +1,158 @@
1
+ /**
2
+ * #4800 — the chant a product is installed with, and how to run it.
3
+ *
4
+ * A product runs the `chant` CLI as a child for the commands it does not run
5
+ * in process, and the chant it runs must be the one in its own dependencies,
6
+ * not whatever `chant` is first on the PATH. Each product found it its own
7
+ * way: SQL Yodeler resolved `@intentius/chant` and ran `src/cli/main.ts`
8
+ * under its own tsx, terragucci walked up its directories for
9
+ * `node_modules/@intentius/chant/package.json` and read `bin.chant`, and
10
+ * plywood added a resolve hook so the Op files a repository holds find
11
+ * chant in plywood's install when the repository has none. This module is
12
+ * the one copy.
13
+ *
14
+ * {@link bundledChant} is the package this module belongs to, so a product
15
+ * that imports `@intentius/chant/chant-install` gets its own chant. When a
16
+ * product bundles this module into a file of its own, the module no longer
17
+ * sits in chant's package, and it walks up from where it is instead.
18
+ * {@link chantArgv} runs the package's `bin/chant` with the node running
19
+ * now: the bin picks the compiled CLI in an installed package and the source
20
+ * in a checkout (#3878), so a product never chooses between them.
21
+ */
22
+ import { existsSync, readFileSync } from "node:fs";
23
+ import * as nodeModule from "node:module";
24
+ import { delimiter, dirname, join, resolve } from "node:path";
25
+ import { fileURLToPath } from "node:url";
26
+ const PACKAGE = "@intentius/chant";
27
+ /** The install whose manifest is `<root>/package.json`, when it is chant's and names a bin that is there. */
28
+ function installAt(root) {
29
+ const manifest = join(root, "package.json");
30
+ if (!existsSync(manifest))
31
+ return undefined;
32
+ try {
33
+ const m = JSON.parse(readFileSync(manifest, "utf-8"));
34
+ if (m.name !== PACKAGE)
35
+ return undefined;
36
+ const rel = typeof m.bin === "string" ? m.bin : m.bin && typeof m.bin === "object" ? m.bin.chant : undefined;
37
+ if (typeof rel !== "string")
38
+ return undefined;
39
+ const bin = resolve(root, rel);
40
+ if (!existsSync(bin))
41
+ return undefined;
42
+ return { root, bin, binDir: dirname(bin), ...(typeof m.version === "string" ? { version: m.version } : {}) };
43
+ }
44
+ catch {
45
+ // An unreadable manifest is not an install.
46
+ return undefined;
47
+ }
48
+ }
49
+ /**
50
+ * The chant installed for the first of `from` that has one: each directory
51
+ * and every directory above it, through `node_modules/@intentius/chant`
52
+ * (terragucci's `installedChant`, which looked from its own file and then
53
+ * from the repository). The package exports no `./package.json`, so the
54
+ * manifest is read from disk, not resolved. Undefined when none has it.
55
+ */
56
+ export function installedChant(from) {
57
+ for (const start of from) {
58
+ for (let dir = resolve(start);;) {
59
+ const found = installAt(join(dir, "node_modules", "@intentius", "chant"));
60
+ if (found)
61
+ return found;
62
+ const up = dirname(dir);
63
+ if (up === dir)
64
+ break;
65
+ dir = up;
66
+ }
67
+ }
68
+ return undefined;
69
+ }
70
+ let bundled;
71
+ /**
72
+ * The chant this module is part of: `src/chant-install.ts` or
73
+ * `dist/chant-install.js`, one level under the package root. Bundled into a
74
+ * product's own file, the module is not in chant's package, and this is the
75
+ * chant {@link installedChant} finds from the module's directory. Undefined
76
+ * when neither has one.
77
+ */
78
+ export function bundledChant() {
79
+ if (bundled === undefined) {
80
+ const here = dirname(fileURLToPath(import.meta.url));
81
+ bundled = installAt(dirname(here)) ?? installedChant([here]) ?? null;
82
+ }
83
+ return bundled ?? undefined;
84
+ }
85
+ /**
86
+ * The chant executable a product runs: `chant` when the caller names one
87
+ * (a `--chant` flag), else {@link bundledChant}'s bin, else the first of
88
+ * `from` {@link installedChant} finds, else `chant` on the PATH.
89
+ */
90
+ export function chantCommand(options = {}) {
91
+ return options.chant ?? bundledChant()?.bin ?? installedChant(options.from ?? [])?.bin ?? "chant";
92
+ }
93
+ /**
94
+ * The argv to spawn `chant <args>` with: the node running now, `nodeArgs`
95
+ * (a product's own `--import` hooks), the install's bin and `args`. Running
96
+ * the bin through `process.execPath` works where a shebang does not
97
+ * (Windows, #4734). Throws when no install is found.
98
+ */
99
+ export function chantArgv(args, options = {}) {
100
+ const install = options.install ?? bundledChant();
101
+ if (!install)
102
+ throw new Error(`${PACKAGE} is not installed beside this module; install it, or name the chant to run`);
103
+ return [process.execPath, ...(options.nodeArgs ?? []), install.bin, ...args];
104
+ }
105
+ /**
106
+ * `base` with the install's bin directory first on PATH, for a chant child:
107
+ * chant's own Op activities run `chant` themselves (`lifecycleDiff` runs
108
+ * `chant lifecycle diff`), and they must find the same one.
109
+ */
110
+ export function chantEnv(base = process.env, install = bundledChant()) {
111
+ if (!install)
112
+ return { ...base };
113
+ return { ...base, PATH: [install.binDir, base.PATH ?? ""].filter(Boolean).join(delimiter) };
114
+ }
115
+ /** The specifiers {@link chantResolveFallback} covers: chant and its lexicons, with any subpath. */
116
+ export const CHANT_SPECIFIER = /^@intentius\/chant(?:-lexicon-[a-z0-9-]+)?(?:\/|$)/;
117
+ /**
118
+ * A resolve hook (plywood's `chantResolveHook`): a chant or lexicon import
119
+ * the importing file's own `node_modules` cannot satisfy resolves from
120
+ * `from`, a file URL in the product's install. A repository that runs the
121
+ * product from a global install has no chant of its own, and the Op files
122
+ * it holds import `@intentius/chant/op`. Any other specifier, and any other
123
+ * failure, is left as Node reports it.
124
+ */
125
+ export function chantResolveFallback(from) {
126
+ return (specifier, context, next) => {
127
+ try {
128
+ return next(specifier, context);
129
+ }
130
+ catch (err) {
131
+ const code = err.code;
132
+ if (!CHANT_SPECIFIER.test(specifier) || (code !== "ERR_MODULE_NOT_FOUND" && code !== "MODULE_NOT_FOUND"))
133
+ throw err;
134
+ if (context.parentURL === from)
135
+ throw err;
136
+ return next(specifier, { ...context, parentURL: from });
137
+ }
138
+ };
139
+ }
140
+ const FALLBACK = Symbol.for("chant.resolveFallback");
141
+ /**
142
+ * Install {@link chantResolveFallback} once in this process. `from` is a
143
+ * file URL in the product's install, by default this module's own, which
144
+ * sits in the chant the product depends on. Returns whether it is
145
+ * installed: false on a Node without `module.registerHooks`, where the
146
+ * repository needs chant in its own `node_modules`.
147
+ */
148
+ export function installChantResolveFallback(from = import.meta.url) {
149
+ const flags = globalThis;
150
+ if (flags[FALLBACK])
151
+ return true;
152
+ const register = nodeModule.registerHooks;
153
+ if (typeof register !== "function")
154
+ return false;
155
+ register({ resolve: chantResolveFallback(from) });
156
+ flags[FALLBACK] = true;
157
+ return true;
158
+ }
@@ -45,6 +45,8 @@ export declare const CI_COMMIT_REPLY_FLOOR = "0.124.77";
45
45
  export declare const CI_COMMIT_ARG_FLOOR = "0.124.78";
46
46
  /** The first chant whose `commit land` reads {@link COMMIT_HARNESS_BREAK_ENV} in a BREAK arm of chant's e2e harness (#4836). */
47
47
  export declare const CI_COMMIT_HARNESS_BREAK_FLOOR = "0.124.78";
48
+ /** The first chant whose `commit land` replies to a comment refused as it is read, such as a bad argument or a stray word (#4838). */
49
+ export declare const CI_COMMIT_REFUSAL_REPLY_FLOOR = "0.124.87";
48
50
  /** What starts a commit run: a person's comment, or a check job's finding. */
49
51
  export type CommitTrigger = "comment" | "check";
50
52
  export declare const COMMIT_TRIGGERS: readonly CommitTrigger[];
@@ -232,6 +234,21 @@ export interface CommitRequest {
232
234
  /** The comment's argument (#4820), checked against `commentArg`. */
233
235
  arg?: string;
234
236
  }
237
+ /**
238
+ * A request refused (#4838). `replyOn` is set when the comment named this
239
+ * job's command and was refused as it was read (a bad argument, a stray
240
+ * word): the pull request, who asked, and the comment's first line, so land
241
+ * can say why on the pull request. A comment for another word has none,
242
+ * since that word's own job answers it.
243
+ */
244
+ export interface CommitRequestRefusal {
245
+ refused: string;
246
+ replyOn?: {
247
+ pr: number;
248
+ user: string;
249
+ asked: string;
250
+ };
251
+ }
235
252
  /**
236
253
  * The request from the run. `comment`: the event's comment on GitHub and
237
254
  * Forgejo, read against the product's grammar, which must name this job's
@@ -240,18 +257,14 @@ export interface CommitRequest {
240
257
  * pull request the check ran for, from the `pull_request` event or the
241
258
  * merge request pipeline.
242
259
  */
243
- export declare function commitRequestFromRun(words: CiProductWords, s: Pick<CommitSettings, "on" | "comment"> & Partial<Pick<CommitSettings, "commentArg">>, env: Record<string, string | undefined>, event: unknown): CommitRequest | {
244
- refused: string;
245
- };
260
+ export declare function commitRequestFromRun(words: CiProductWords, s: Pick<CommitSettings, "on" | "comment"> & Partial<Pick<CommitSettings, "commentArg">>, env: Record<string, string | undefined>, event: unknown): CommitRequest | CommitRequestRefusal;
246
261
  /**
247
262
  * {@link commitRequestFromRun}, and for the `check` trigger of a check that
248
263
  * runs on push (as terragucci's does), the open pull request whose head is
249
264
  * the pushed branch, asked of the forge on GitHub and Forgejo. A branch with
250
265
  * no open pull request is refused as before, which the check trigger skips.
251
266
  */
252
- export declare function resolveCommitRequest(words: CiProductWords, s: Pick<CommitSettings, "on" | "comment"> & Partial<Pick<CommitSettings, "commentArg">>, env: Record<string, string | undefined>, event: unknown, forge?: Partial<Pick<PrForge, "findPullRequest">>): Promise<CommitRequest | {
253
- refused: string;
254
- }>;
267
+ export declare function resolveCommitRequest(words: CiProductWords, s: Pick<CommitSettings, "on" | "comment"> & Partial<Pick<CommitSettings, "commentArg">>, env: Record<string, string | undefined>, event: unknown, forge?: Partial<Pick<PrForge, "findPullRequest">>): Promise<CommitRequest | CommitRequestRefusal>;
255
268
  /** How a run ended, as its record says. `skipped` is a run with nothing to do, which says nothing and is not recorded. */
256
269
  export type CommitResult = "pushed" | "refused" | "stopped" | "skipped" | "failed";
257
270
  /** What `commit prepare` decided. The push job reads it as data and checks every field it uses. */
@@ -1 +1 @@
1
- {"version":3,"file":"ci-commit.d.ts","sourceRoot":"","sources":["../src/ci-commit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,OAAO,EAA6E,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtH,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClG,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,uHAAuH;AACvH,eAAO,MAAM,eAAe,aAAa,CAAC;AAE1C,wIAAwI;AACxI,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAC/C,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAChD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAChD,+HAA+H;AAC/H,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,gIAAgI;AAChI,eAAO,MAAM,6BAA6B,aAAa,CAAC;AAExD,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAChD,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAAyB,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,aAAa,CAAC;IAClB,iIAAiI;IACjI,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+GAA+G;IAC/G,OAAO,E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,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9D,GAAG,EAAE,QAAQ,CAAC;IACd,uDAAuD;IACvD,IAAI,EAAE,CAAC,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACvC,QAAQ,EAAE,YAAY,CAAC;IACvB,yDAAyD;IACzD,MAAM,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,GAAG,EAAE,MAAM,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,qEAAqE;IACrE,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC;AAID;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAqLrF;AAID,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,GAAE,MAAmB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAOjK"}
package/dist/ci-commit.js CHANGED
@@ -28,6 +28,7 @@ import { spawn } from "node:child_process";
28
28
  import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
29
29
  import { join } from "node:path";
30
30
  import { CHANT_EXIT } from "./exit-codes.js";
31
+ import { NEXT_RELEASE } from "./release-floors.js";
31
32
  import { FORGE_TOKEN_VARS } from "./ci-handover.js";
32
33
  import { agentForbiddenPaths, AgentError, branchOk, errText, LOGIN, readSmall, SHA } from "./ci-agent.js";
33
34
  import { COMMIT_COMMENT_ARG, parseProductComment } from "./ci-product-words.js";
@@ -47,6 +48,8 @@ export const CI_COMMIT_REPLY_FLOOR = "0.124.77";
47
48
  export const CI_COMMIT_ARG_FLOOR = "0.124.78";
48
49
  /** The first chant whose `commit land` reads {@link COMMIT_HARNESS_BREAK_ENV} in a BREAK arm of chant's e2e harness (#4836). */
49
50
  export const CI_COMMIT_HARNESS_BREAK_FLOOR = "0.124.78";
51
+ /** The first chant whose `commit land` replies to a comment refused as it is read, such as a bad argument or a stray word (#4838). */
52
+ export const CI_COMMIT_REFUSAL_REPLY_FLOOR = NEXT_RELEASE;
50
53
  export const COMMIT_TRIGGERS = ["comment", "check"];
51
54
  export const COMMIT_MAX_RUNS = 3;
52
55
  export const COMMIT_TIMEOUT_MINUTES = 10;
@@ -323,6 +326,13 @@ function inAllowed(path, allowed, files = []) {
323
326
  export function commitRefusedPaths(paths, s) {
324
327
  return { forbidden: agentForbiddenPaths(paths, s.guarded), outside: paths.filter((p) => !inAllowed(p, s.allowed, s.allowedFiles ?? [])) };
325
328
  }
329
+ /** The most of a comment a refusal reply quotes (#4838). */
330
+ const ASKED_MAX = 100;
331
+ /** The comment's first line as a reply quotes it, cut at {@link ASKED_MAX}. */
332
+ function askedLine(body) {
333
+ const line = body.trim().split(/\r?\n/)[0].trim();
334
+ return line.length > ASKED_MAX ? `${line.slice(0, ASKED_MAX - 3)}...` : line;
335
+ }
326
336
  /**
327
337
  * The request from the run. `comment`: the event's comment on GitHub and
328
338
  * Forgejo, read against the product's grammar, which must name this job's
@@ -360,8 +370,12 @@ export function commitRequestFromRun(words, s, env, event) {
360
370
  if (typeof user !== "string" || !LOGIN.test(user))
361
371
  return { refused: "the run names nobody who asked" };
362
372
  const parsed = parseProductComment(words, body, env, commentArgPatterns(s));
363
- if (parsed?.kind === "refused")
364
- return { refused: parsed.reason };
373
+ if (parsed?.kind === "refused") {
374
+ // #4838: answered only when the comment's command is this job's, so two jobs never both reply.
375
+ const said = typeof body === "string" ? body.trim().split(/[ \t\r\n]+/) : [];
376
+ const ours = said[0] === `/${words.product}` && said[1] === word;
377
+ return { refused: parsed.reason, ...(ours ? { replyOn: { pr, user, asked: askedLine(body) } } : {}) };
378
+ }
365
379
  if (parsed?.kind !== "commit" || parsed.word !== word)
366
380
  return { refused: `the comment is not ${s.comment}` };
367
381
  return { pr, user, ...(parsed.arg !== undefined ? { arg: parsed.arg } : {}) };
@@ -777,8 +791,13 @@ export async function landCommitChange(i) {
777
791
  };
778
792
  // Who asked and for which pull request: from the event, never from the commit job's files.
779
793
  const req = await resolveCommitRequest(i.words, s, i.env, i.event, i.forge);
780
- if ("refused" in req)
781
- return finish({ result: s.on === "check" ? "skipped" : "refused", reason: req.refused });
794
+ if ("refused" in req) {
795
+ // #4838: a comment refused as it was read is answered, naming it and why.
796
+ if (!req.replyOn)
797
+ return finish({ result: s.on === "check" ? "skipped" : "refused", reason: req.refused });
798
+ ({ pr, user } = req.replyOn);
799
+ return finish({ result: "refused", reason: req.refused }, `${code(req.replyOn.asked)} was refused: ${req.refused}. ${s.name} did not run, and nothing was pushed.`);
800
+ }
782
801
  ({ pr, user } = req);
783
802
  // #4836: a BREAK arm of the harness may turn a check off; anywhere else the switch fails the land.
784
803
  const harness = commitHarnessBreaks(i.env);
@@ -0,0 +1,78 @@
1
+ /**
2
+ * What a generated pipeline adds to sign evidence for the named checks it
3
+ * runs (#4870), for the forge lexicons to render. No import beyond the
4
+ * words' bin swap, so the generators' bundles stay small.
5
+ *
6
+ * A project switches it on by naming the secret (GitHub, Forgejo) or CI/CD
7
+ * variable (GitLab) that holds its runner key, the PEM key whose public half
8
+ * `.chant/trust.json` lists under `runners`: the same secret the green
9
+ * workflow takes as `--runner-key-secret`. Without it nothing is added and
10
+ * every generated file is as before.
11
+ *
12
+ * - The plan note job (the product plan pipeline, GitHub and Forgejo) signs
13
+ * `plan` and `policy` from the plan job's report, after taking it back and
14
+ * before posting the note, which then says which checks were signed. The
15
+ * key is in that one step, in a job that runs none of the change's code.
16
+ * GitLab posts its notes from a target-branch pipeline that reads every
17
+ * open merge request, so there a job of its own after each plan job
18
+ * (`<plan job>-evidence`) signs from the plan job's artifact.
19
+ * - A wave job (the waves pipeline) gets the key on its `chant run wave`
20
+ * step, and signs `plan:<wave>` and `policy:<wave>` once the wave is
21
+ * planned (../op/op-waves-evidence.ts).
22
+ * - A product's check job runs `chant ci check` with the key in
23
+ * `CHANT_RUNNER_KEY`; the check runner signs each hook (./components/check-steps.ts).
24
+ *
25
+ * With `identity: "oidc"` (#4869) the same steps sign keyless from the
26
+ * job's OIDC identity: no secret, `CHANT_RUNNER_IDENTITY=oidc` on the
27
+ * signing step, and the job asks the forge for a token, so no product adds
28
+ * that itself: `id-token: write` on GitHub (Forgejo's dialect turns it into
29
+ * `enable-openid-connect: true`), and on GitLab `id_tokens:` with
30
+ * `CHANT_ID_TOKEN_SIGSTORE` for the signing audience. `.chant/trust.json`
31
+ * at base lists the workflow's identity under `keyless`.
32
+ */
33
+ import type { ForgeKind } from "./pr-forge.js";
34
+ /** The variable the signing steps read the key from. */
35
+ export declare const EVIDENCE_KEY_ENV = "CHANT_RUNNER_KEY";
36
+ /** The variable that makes a signing step sign keyless (#4869). */
37
+ export declare const EVIDENCE_IDENTITY_ENV = "CHANT_RUNNER_IDENTITY";
38
+ /** The GitLab `id_tokens` variable a keyless signing job's token comes in (#4869). */
39
+ export declare const EVIDENCE_ID_TOKEN_VAR = "CHANT_ID_TOKEN_SIGSTORE";
40
+ /** The audience a keyless signing job's token is requested for unless told: sigstore's. */
41
+ export declare const EVIDENCE_DEFAULT_AUDIENCE = "sigstore";
42
+ export { CHECK_EVIDENCE_FLOOR, KEYLESS_EVIDENCE_FLOOR, LOCAL_EVIDENCE_FLOOR } from "./release-floors.js";
43
+ /**
44
+ * A pipeline's runner identity (#4870): a runner key's secret, or (#4869)
45
+ * the job's own OIDC identity. Exactly one.
46
+ */
47
+ export interface PipelineEvidence {
48
+ /** The secret (GitHub, Forgejo) or CI/CD variable (GitLab) holding the runner key as PEM. */
49
+ runnerKeySecret?: string;
50
+ /** `oidc` (#4869): sign keyless from the job's OIDC identity, which `.chant/trust.json` at base lists under `keyless.identities`. */
51
+ identity?: "oidc";
52
+ /** With `identity`: the token's audience, as `keyless.audience` in `.chant/trust.json` says. Default `sigstore`. */
53
+ audience?: string;
54
+ }
55
+ /** Refuse a secret name the forge could not hold, and an evidence block that names both identities or neither. */
56
+ export declare function assertPipelineEvidence(evidence: PipelineEvidence | undefined): void;
57
+ /** Whether the pipeline signs keyless (#4869), so its signing jobs ask the forge for an OIDC token. */
58
+ export declare function evidenceKeyless(evidence: PipelineEvidence | undefined): boolean;
59
+ /** The GitLab `id_tokens:` a keyless signing job requests (#4869); empty with a runner key. */
60
+ export declare function evidenceIdTokens(evidence: PipelineEvidence | undefined): Record<string, {
61
+ aud: string;
62
+ }>;
63
+ /** The signing step's variables: the key from the forge's secret, or (#4869) `CHANT_RUNNER_IDENTITY=oidc`. */
64
+ export declare function evidenceKeyEnv(forge: ForgeKind, evidence: PipelineEvidence): Record<string, string>;
65
+ /**
66
+ * The plan job's evidence step (#4870): fetch the planned commit (the note
67
+ * job checks out the target branch's), then sign `plan` and `policy` from
68
+ * the report directory. `result` is the plan job's result as the shell
69
+ * reads it.
70
+ */
71
+ export declare function planEvidenceLines(opts: {
72
+ dir: string;
73
+ at: string;
74
+ base: string;
75
+ result: string;
76
+ bin?: string;
77
+ }): string[];
78
+ //# sourceMappingURL=ci-evidence-jobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci-evidence-jobs.d.ts","sourceRoot":"","sources":["../src/ci-evidence-jobs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,mEAAmE;AACn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870), for the forge lexicons to render. No import beyond the
4
+ * words' bin swap, so the generators' bundles stay small.
5
+ *
6
+ * A project switches it on by naming the secret (GitHub, Forgejo) or CI/CD
7
+ * variable (GitLab) that holds its runner key, the PEM key whose public half
8
+ * `.chant/trust.json` lists under `runners`: the same secret the green
9
+ * workflow takes as `--runner-key-secret`. Without it nothing is added and
10
+ * every generated file is as before.
11
+ *
12
+ * - The plan note job (the product plan pipeline, GitHub and Forgejo) signs
13
+ * `plan` and `policy` from the plan job's report, after taking it back and
14
+ * before posting the note, which then says which checks were signed. The
15
+ * key is in that one step, in a job that runs none of the change's code.
16
+ * GitLab posts its notes from a target-branch pipeline that reads every
17
+ * open merge request, so there a job of its own after each plan job
18
+ * (`<plan job>-evidence`) signs from the plan job's artifact.
19
+ * - A wave job (the waves pipeline) gets the key on its `chant run wave`
20
+ * step, and signs `plan:<wave>` and `policy:<wave>` once the wave is
21
+ * planned (../op/op-waves-evidence.ts).
22
+ * - A product's check job runs `chant ci check` with the key in
23
+ * `CHANT_RUNNER_KEY`; the check runner signs each hook (./components/check-steps.ts).
24
+ *
25
+ * With `identity: "oidc"` (#4869) the same steps sign keyless from the
26
+ * job's OIDC identity: no secret, `CHANT_RUNNER_IDENTITY=oidc` on the
27
+ * signing step, and the job asks the forge for a token, so no product adds
28
+ * that itself: `id-token: write` on GitHub (Forgejo's dialect turns it into
29
+ * `enable-openid-connect: true`), and on GitLab `id_tokens:` with
30
+ * `CHANT_ID_TOKEN_SIGSTORE` for the signing audience. `.chant/trust.json`
31
+ * at base lists the workflow's identity under `keyless`.
32
+ */
33
+ /** The variable the signing steps read the key from. */
34
+ export const EVIDENCE_KEY_ENV = "CHANT_RUNNER_KEY";
35
+ /** The variable that makes a signing step sign keyless (#4869). */
36
+ export const EVIDENCE_IDENTITY_ENV = "CHANT_RUNNER_IDENTITY";
37
+ /** The GitLab `id_tokens` variable a keyless signing job's token comes in (#4869). */
38
+ export const EVIDENCE_ID_TOKEN_VAR = "CHANT_ID_TOKEN_SIGSTORE";
39
+ /** The audience a keyless signing job's token is requested for unless told: sigstore's. */
40
+ export const EVIDENCE_DEFAULT_AUDIENCE = "sigstore";
41
+ export { CHECK_EVIDENCE_FLOOR, KEYLESS_EVIDENCE_FLOOR, LOCAL_EVIDENCE_FLOOR } from "./release-floors.js";
42
+ const SECRET_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
43
+ /** Refuse a secret name the forge could not hold, and an evidence block that names both identities or neither. */
44
+ export function assertPipelineEvidence(evidence) {
45
+ if (evidence === undefined)
46
+ return;
47
+ if (evidence.identity !== undefined) {
48
+ if (evidence.runnerKeySecret !== undefined)
49
+ throw new Error("evidence names a runnerKeySecret and an identity; a pipeline signs with one of them (#4869)");
50
+ if (evidence.identity !== "oidc")
51
+ throw new Error(`evidence.identity ${JSON.stringify(evidence.identity)} is not oidc, the one identity chant signs with keyless`);
52
+ if (evidence.audience !== undefined && !/^[\x21-\x7e]+$/.test(evidence.audience))
53
+ throw new Error(`evidence.audience ${JSON.stringify(evidence.audience)} is not printable ASCII with no space`);
54
+ return;
55
+ }
56
+ if (!SECRET_NAME.test(evidence.runnerKeySecret ?? ""))
57
+ throw new Error(`evidence.runnerKeySecret ${JSON.stringify(evidence.runnerKeySecret)} is not a secret name: letters, digits and _, not starting with a digit`);
58
+ }
59
+ /** Whether the pipeline signs keyless (#4869), so its signing jobs ask the forge for an OIDC token. */
60
+ export function evidenceKeyless(evidence) {
61
+ return evidence?.identity === "oidc";
62
+ }
63
+ /** The GitLab `id_tokens:` a keyless signing job requests (#4869); empty with a runner key. */
64
+ export function evidenceIdTokens(evidence) {
65
+ return evidenceKeyless(evidence) ? { [EVIDENCE_ID_TOKEN_VAR]: { aud: evidence.audience ?? EVIDENCE_DEFAULT_AUDIENCE } } : {};
66
+ }
67
+ /** The signing step's variables: the key from the forge's secret, or (#4869) `CHANT_RUNNER_IDENTITY=oidc`. */
68
+ export function evidenceKeyEnv(forge, evidence) {
69
+ if (evidenceKeyless(evidence))
70
+ return { [EVIDENCE_IDENTITY_ENV]: "oidc" };
71
+ return { [EVIDENCE_KEY_ENV]: forge === "gitlab" ? `$${evidence.runnerKeySecret}` : `\${{ secrets.${evidence.runnerKeySecret} }}` };
72
+ }
73
+ /**
74
+ * The plan job's evidence step (#4870): fetch the planned commit (the note
75
+ * job checks out the target branch's), then sign `plan` and `policy` from
76
+ * the report directory. `result` is the plan job's result as the shell
77
+ * reads it.
78
+ */
79
+ export function planEvidenceLines(opts) {
80
+ const chant = opts.bin ?? "chant";
81
+ return [
82
+ `git fetch --quiet --no-tags --depth=1 origin ${opts.at} || true`,
83
+ `${chant} ci evidence sign --from-report ${opts.dir} --result ${opts.result} --at ${opts.at} --base ${opts.base}`,
84
+ ];
85
+ }