@intentius/chant 0.124.90 → 0.124.92

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 (99) hide show
  1. package/dist/actor.d.ts +5 -3
  2. package/dist/actor.d.ts.map +1 -1
  3. package/dist/actor.js +7 -5
  4. package/dist/audit/core.d.ts.map +1 -1
  5. package/dist/audit/core.js +11 -1
  6. package/dist/ci-comment-commands.d.ts +11 -1
  7. package/dist/ci-comment-commands.d.ts.map +1 -1
  8. package/dist/ci-comment-commands.js +10 -3
  9. package/dist/ci-product.d.ts +27 -1
  10. package/dist/ci-product.d.ts.map +1 -1
  11. package/dist/ci-product.js +36 -10
  12. package/dist/cli/handlers/pr-comment.d.ts.map +1 -1
  13. package/dist/cli/handlers/pr-comment.js +17 -4
  14. package/dist/cli/handlers/pr.d.ts +2 -2
  15. package/dist/cli/handlers/pr.d.ts.map +1 -1
  16. package/dist/cli/handlers/pr.js +32 -10
  17. package/dist/cli/parse-args.d.ts.map +1 -1
  18. package/dist/cli/parse-args.js +13 -0
  19. package/dist/cli/registry.d.ts +4 -0
  20. package/dist/cli/registry.d.ts.map +1 -1
  21. package/dist/components/pr-checks.d.ts +11 -0
  22. package/dist/components/pr-checks.d.ts.map +1 -1
  23. package/dist/components/pr-checks.js +15 -5
  24. package/dist/components/pr-pipeline.d.ts +13 -4
  25. package/dist/components/pr-pipeline.d.ts.map +1 -1
  26. package/dist/components/pr-pipeline.js +23 -9
  27. package/dist/components/product-pipeline.d.ts +41 -7
  28. package/dist/components/product-pipeline.d.ts.map +1 -1
  29. package/dist/components/product-pipeline.js +63 -23
  30. package/dist/components/product-plan.d.ts +86 -1
  31. package/dist/components/product-plan.d.ts.map +1 -1
  32. package/dist/components/product-plan.js +141 -16
  33. package/dist/floor-table.data.d.ts.map +1 -1
  34. package/dist/floor-table.data.js +18 -9
  35. package/dist/lexicon-module.d.ts +2 -0
  36. package/dist/lexicon-module.d.ts.map +1 -1
  37. package/dist/lexicon-module.js +6 -2
  38. package/dist/lexicon.d.ts +42 -1
  39. package/dist/lexicon.d.ts.map +1 -1
  40. package/dist/op/before-merge-decide.d.ts +2 -0
  41. package/dist/op/before-merge-decide.d.ts.map +1 -1
  42. package/dist/op/op-waves-evidence-jobs.d.ts +3 -2
  43. package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -1
  44. package/dist/op/op-waves-evidence-jobs.js +4 -3
  45. package/dist/op/op-waves-follow-on.d.ts +2 -0
  46. package/dist/op/op-waves-follow-on.d.ts.map +1 -1
  47. package/dist/op/op-waves-follow-on.js +8 -2
  48. package/dist/op/op-waves-names.d.ts +122 -0
  49. package/dist/op/op-waves-names.d.ts.map +1 -0
  50. package/dist/op/op-waves-names.js +151 -0
  51. package/dist/planned-files.d.ts +16 -8
  52. package/dist/planned-files.d.ts.map +1 -1
  53. package/dist/planned-files.js +12 -8
  54. package/dist/pr-forge-job.d.ts +8 -0
  55. package/dist/pr-forge-job.d.ts.map +1 -1
  56. package/dist/pr-forge-job.js +13 -0
  57. package/dist/pr-plan-record.d.ts +3 -1
  58. package/dist/pr-plan-record.d.ts.map +1 -1
  59. package/dist/pr-plan-record.js +1 -1
  60. package/dist/pr-post.d.ts +15 -3
  61. package/dist/pr-post.d.ts.map +1 -1
  62. package/dist/pr-post.js +10 -6
  63. package/dist/release-floors.d.ts +7 -1
  64. package/dist/release-floors.d.ts.map +1 -1
  65. package/dist/release-floors.js +8 -2
  66. package/dist/wave-runtime.mjs +276 -276
  67. package/package.json +1 -1
  68. package/src/actor.test.ts +14 -1
  69. package/src/actor.ts +8 -6
  70. package/src/audit/core.ts +13 -1
  71. package/src/audit/first-load.test.ts +101 -0
  72. package/src/ci-comment-commands.test.ts +19 -5
  73. package/src/ci-comment-commands.ts +18 -3
  74. package/src/ci-product.ts +42 -10
  75. package/src/cli/handlers/pr-comment.ts +14 -4
  76. package/src/cli/handlers/pr.ts +27 -10
  77. package/src/cli/parse-args.ts +9 -0
  78. package/src/cli/registry.ts +4 -0
  79. package/src/components/pr-checks.ts +16 -5
  80. package/src/components/pr-pipeline.ts +24 -11
  81. package/src/components/product-job-names.test.ts +176 -0
  82. package/src/components/product-pipeline.ts +101 -31
  83. package/src/components/product-plan-names.test.ts +135 -0
  84. package/src/components/product-plan.ts +218 -18
  85. package/src/floor-table.data.ts +18 -9
  86. package/src/lexicon-module.ts +6 -2
  87. package/src/lexicon.ts +42 -1
  88. package/src/op/before-merge-decide.ts +2 -0
  89. package/src/op/op-waves-evidence-jobs.ts +4 -3
  90. package/src/op/op-waves-follow-on.ts +10 -2
  91. package/src/op/op-waves-names.test.ts +131 -0
  92. package/src/op/op-waves-names.ts +241 -0
  93. package/src/planned-files.test.ts +33 -0
  94. package/src/planned-files.ts +26 -10
  95. package/src/pr-forge-job.ts +13 -0
  96. package/src/pr-plan-record.ts +4 -2
  97. package/src/pr-post-head.test.ts +116 -0
  98. package/src/pr-post.ts +26 -9
  99. package/src/release-floors.ts +11 -2
@@ -45,6 +45,7 @@ import { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE } from "../pr-plan-record.js";
45
45
  import { idTokenVar, tradedClouds } from "../ci-identity.js";
46
46
  import { prNoteMarker } from "../pr-loop.js";
47
47
  import { PRODUCT_MARKER_NAME } from "../pr-plan-note.js";
48
+ import { gitlabJobArtifacts } from "./pr-checks.js";
48
49
  /** The variable the plan-note job reads the product's note words from (#4799), as JSON. Set from the pipeline, never from the report. */
49
50
  export const PR_PLAN_NOTE_WORDS_ENV = "CHANT_PLAN_NOTE_WORDS";
50
51
  /**
@@ -100,6 +101,39 @@ export function productPlanReachLock(forge, loop, words) {
100
101
  export { PLAN_RUN_OP, PLAN_RUN_RECORD_FILE } from "../pr-plan-record.js";
101
102
  /** The variable the plan step reads the record's op, environment and labels from (#4899), as JSON. */
102
103
  export const PLAN_RUN_RECORD_ENV = "CHANT_PLAN_RECORD";
104
+ /** The plan status's context of one plan job (#5003): its own, else the words'. */
105
+ export function productPlanContext(p, words) {
106
+ return p.context ?? productStatusContext(words, "plan", p.target);
107
+ }
108
+ /** The directory one plan job hands on (#5003): its own, else {@link PR_LOOP_REPORT_DIR}. */
109
+ export function productPlanReportDir(p) {
110
+ return p.reportDir ?? PR_LOOP_REPORT_DIR;
111
+ }
112
+ /** The workflow's default name (#4799): `chant-pr-<env>`. */
113
+ function defaultWorkflowName(env) {
114
+ return `chant-pr-${env}`;
115
+ }
116
+ /**
117
+ * The file a product plan's workflow is written to (#5003),
118
+ * {@link ProductPlanOptions.workflowFile}: the product's, checked for the
119
+ * forge, else the workflow's name in the forge's workflow directory
120
+ * (`.gitlab/<name>.gitlab-ci.yml` on GitLab).
121
+ */
122
+ export function productPlanWorkflowFile(forge, env, plan) {
123
+ const name = plan.workflow ?? defaultWorkflowName(env);
124
+ const dir = forge === "github" ? ".github/workflows" : forge === "forgejo" ? ".forgejo/workflows" : ".gitlab";
125
+ const file = plan.workflowFile;
126
+ if (file === undefined)
127
+ return forge === "gitlab" ? `${dir}/${name}.gitlab-ci.yml` : `${dir}/${name}.yml`;
128
+ if (!/\.ya?ml$/.test(file))
129
+ throw new Error(`the product plan's workflowFile ${JSON.stringify(file)} is not a .yml or .yaml file`);
130
+ if (file.startsWith("/") || file.split("/").some((part) => part === "" || part === "." || part === "..") || !/^[A-Za-z0-9_.\/-]+$/.test(file)) {
131
+ throw new Error(`the product plan's workflowFile ${JSON.stringify(file)} is not a path from the repository root of letters, digits and _.-, inside it`);
132
+ }
133
+ if (forge !== "gitlab" && (!file.startsWith(`${dir}/`) || file.slice(dir.length + 1).includes("/")))
134
+ throw new Error(`the product plan's workflowFile ${JSON.stringify(file)} is not directly under ${dir}/, where ${forge === "github" ? "GitHub" : "Forgejo"} reads workflows`);
135
+ return file;
136
+ }
103
137
  const TARGET_NAME = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
104
138
  /** The pull request loop's options the product plan's jobs do not carry, and what each needs. Each is refused with `plan` (#4799). */
105
139
  const NOT_WITH_PLAN = [
@@ -154,6 +188,21 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
154
188
  seen.add(t.name);
155
189
  }
156
190
  const github = forge !== "gitlab";
191
+ // #5003: the product's own names, checked before any job is written.
192
+ if (plan.workflowFile !== undefined)
193
+ productPlanWorkflowFile(forge, env, plan);
194
+ const reportDir = plan.reportDir;
195
+ if (reportDir !== undefined && !isReportDir(reportDir))
196
+ throw new Error(`the product plan's reportDir ${JSON.stringify(reportDir)} is not a directory from the checkout's root that stays inside it: letters, digits and _.-, parts joined by /, with no . or .. part and no / at either end`);
197
+ const outputDir = reportDir ?? PR_LOOP_REPORT_DIR;
198
+ const statusContext = plan.statusContext;
199
+ if (statusContext !== undefined) {
200
+ if (!/^[A-Za-z0-9][A-Za-z0-9_.\/:{}-]*$/.test(statusContext) || /[{}]/.test(statusContext.replaceAll("{target}", "")))
201
+ throw new Error(`the product plan's statusContext ${JSON.stringify(statusContext)} is not a status context of letters, digits and _./:-${targets ? ", with {target}" : ""}`);
202
+ if (Boolean(targets) !== statusContext.includes("{target}"))
203
+ throw new Error(targets ? `the product plan's statusContext ${JSON.stringify(statusContext)} is every target's, so it holds {target}` : `the product plan's statusContext ${JSON.stringify(statusContext)} holds {target}, and the plan has no targets`);
204
+ }
205
+ const namesOf = productPlanJobNames(forge, plan, targets?.map((t) => t.name));
157
206
  const shared = prLoopPassedEnv(forge, loop);
158
207
  const jobEnv = plan.env ? prLoopPassedEnv(forge, { variables: plan.env }) : {};
159
208
  for (const key of Object.keys(jobEnv)) {
@@ -211,12 +260,17 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
211
260
  ...(plan.noteWords ? { [PR_PLAN_NOTE_WORDS_ENV]: JSON.stringify(plan.noteWords) } : {}),
212
261
  ...(plan.watches?.length ? { [PLAN_WATCHES_ENV]: JSON.stringify(plan.watches) } : {}),
213
262
  };
214
- const fill = (line, name) => line.replaceAll("{target}", name ?? env).replaceAll("{output}", PR_LOOP_REPORT_DIR);
263
+ const fill = (line, name) => line.replaceAll("{target}", name ?? env).replaceAll("{output}", outputDir);
215
264
  const control = plan.controlRead ? controlNoteCheckout(forge, plan.controlRead, words) : undefined;
216
265
  const one = (target) => {
217
266
  const name = target?.name;
218
- const jobName = github ? (name ? `plan-${name}` : "plan") : gitlabPlanJobName(name);
219
- const noteJobName = github ? (name ? `${PR_PLAN_NOTE_JOB}-${name}` : PR_PLAN_NOTE_JOB) : name ? `${name}-${PR_PLAN_NOTE_JOB}` : PR_PLAN_NOTE_JOB;
267
+ const names = namesOf(name);
268
+ const jobName = names.plan;
269
+ const noteJobName = names.note;
270
+ // #5003: the product's status context, and on GitLab its plan job's name for `pr-post --open` to find.
271
+ const context = statusContext?.replaceAll("{target}", name ?? "");
272
+ const named = [...(context !== undefined ? ["--context", context] : []), ...(!github && jobName !== gitlabPlanJobName(name) ? ["--plan-job", jobName] : [])];
273
+ const withNames = (p) => (named.length > 0 ? { ...p, command: `${p.command} ${named.join(" ")}` } : p);
220
274
  const own = target ? prLoopPassedEnv(forge, { ...(target.variables ? { variables: target.variables } : {}), ...(target.secrets ? { secrets: target.secrets } : {}) }) : {};
221
275
  for (const key of Object.keys(own)) {
222
276
  if (key in shared)
@@ -225,7 +279,7 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
225
279
  throw new Error(`target ${name}'s ${key} is the product plan's env too; give it once`);
226
280
  }
227
281
  // #4987: with staleNotes each target's note carries the target branch's commit, so the waves' push can mark it stale.
228
- const post0 = prLoopPostJob(forge, env, name, words, loop.staleNotes ? { staleNotes: true } : {});
282
+ const post0 = withNames(prLoopPostJob(forge, env, name, words, { ...(loop.staleNotes ? { staleNotes: true } : {}), ...(reportDir !== undefined ? { output: reportDir } : {}) }));
229
283
  // #4899: the note job records the plan job's run, named by that job.
230
284
  const post1 = plan.record ? { ...post0, command: `${post0.command} --record-run ${jobName}` } : post0;
231
285
  // #4914: on GitLab the signing job of the same pipeline keeps each merge request's evidence, which the note's checks line reads.
@@ -256,11 +310,26 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
256
310
  }
257
311
  const idTokens = { ...(login?.idTokens ?? {}), ...tradeTokens, ...(ownTokens ?? {}) };
258
312
  const artifact = plan.artifact ? (name ? `${plan.artifact}-${name}` : plan.artifact) : name ? `chant-pr-plan-${name}` : "chant-pr-plan";
313
+ // #5004: on GitLab the plan job's own paths and reports beside the report directory, such as terragucci's terraform report.
314
+ const given = plan.artifacts;
315
+ const artifacts = given
316
+ ? gitlabJobArtifacts(forge, {
317
+ ...(given.paths ? { paths: given.paths.map((p) => fill(p, name)) } : {}),
318
+ ...(given.reports ? { reports: Object.fromEntries(Object.entries(given.reports).map(([type, p]) => [type, Array.isArray(p) ? p.map((q) => fill(q, name)) : fill(p, name)])) } : {}),
319
+ }, { job: "the product plan", last: "the plan verb is the plan job's last step" })
320
+ : undefined;
259
321
  // #4963: on GitHub and Forgejo the first re-plan job replies to the comments no other job takes.
260
322
  const replies = github && Boolean(replanOpts.reply) && (targets === undefined || target === targets[0]);
261
323
  const replan0 = replanComments
262
324
  ? {
263
- ...replanJobOf(forge, env, words, name, artifact, noteWords, { notAffected: replanOpts.notAffected === true, ...(loop.staleNotes ? { staleNotes: true } : {}) }),
325
+ ...replanJobOf(forge, env, words, name, artifact, noteWords, {
326
+ notAffected: replanOpts.notAffected === true,
327
+ ...(loop.staleNotes ? { staleNotes: true } : {}),
328
+ jobName: names.replan,
329
+ noteJobName: names.replanNote,
330
+ ...(reportDir !== undefined ? { output: reportDir } : {}),
331
+ ...(context !== undefined ? { context } : {}),
332
+ }),
264
333
  ...replanComments,
265
334
  ...(github && dispatchArg !== undefined ? { dispatch: { argument: dispatchArg } } : {}),
266
335
  ...(replies ? { reply: { prefix: `/${words.product}`, others } } : {}),
@@ -283,11 +352,12 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
283
352
  ...(planRunner !== undefined ? { runner: planRunner } : {}),
284
353
  ...(noteRunner !== undefined ? { noteRunner } : {}),
285
354
  // #4978: a target's plan job plans that target alone, so its checks are `plan:<target>` and `policy:<target>`.
286
- ...(evidence ? { evidence: planEvidenceOf(forge, evidence, words, jobName, { ...(plan.forks === "skip" ? { noForks: true } : {}), ...(name ? { member: { name, reportPath: PR_LOOP_REPORT_DIR } } : {}) }) } : {}),
355
+ ...(evidence ? { evidence: planEvidenceOf(forge, evidence, words, jobName, { ...(plan.forks === "skip" ? { noForks: true } : {}), ...(name ? { member: { name, reportPath: outputDir } } : {}), ...(reportDir !== undefined ? { dir: reportDir } : {}) }) } : {}),
287
356
  ...(Object.keys(jobEnv).length > 0 ? { jobEnv } : {}),
288
357
  ...(login && login.steps.length > 0 ? { login: login.steps } : {}),
289
358
  ...(Object.keys(idTokens).length > 0 ? { idTokens } : {}),
290
- ...(plan.pending && github ? { pending: { context: productStatusContext(words, "plan", name), description: "planning" } } : {}),
359
+ ...(Object.keys(ownTokens ?? {}).length > 0 ? { ownIdTokens: true } : {}),
360
+ ...(plan.pending && github ? { pending: { context: context ?? productStatusContext(words, "plan", name), description: "planning" } } : {}),
291
361
  ...(control ? { control } : {}),
292
362
  ...(plan.setup?.length ? { setup: plan.setup } : {}),
293
363
  ...(plan.report ? { report: fill(plan.report, name) } : {}),
@@ -296,10 +366,62 @@ export function productPlanJobs(forge, env, loop, words, evidence) {
296
366
  ...(record ? { record } : {}),
297
367
  ...(tradeSpec ? { trade: tradeSpec } : {}),
298
368
  ...(plan.previousMarker && productMarker ? { previous: { marker: prNoteMarker(env, name), name: productMarker } } : {}),
369
+ ...(context !== undefined ? { context } : {}),
370
+ ...(reportDir !== undefined ? { reportDir } : {}),
371
+ ...(artifacts ? { artifacts } : {}),
299
372
  };
300
373
  };
301
374
  return targets ? targets.map(one) : [one()];
302
375
  }
376
+ /** Whether `dir` is a report directory a product plan takes (#5003): a relative path that stays in the checkout. */
377
+ function isReportDir(dir) {
378
+ return /^[A-Za-z0-9_.\/-]+$/.test(dir) && !dir.startsWith("-") && dir.split("/").every((part) => part !== "" && part !== "." && part !== "..");
379
+ }
380
+ /** GitLab's top-level keywords, which no job may be named (#5003). */
381
+ const GITLAB_KEYWORDS = new Set(["default", "include", "stages", "variables", "workflow", "image", "services", "cache", "before_script", "after_script", "spec", "pages"]);
382
+ /**
383
+ * The plan jobs' names for each target (#5003), from
384
+ * {@link ProductPlanOptions.jobNames}, else chant's. Throws on a name that
385
+ * is not one, a `{target}` given without targets or left out with them, and
386
+ * two jobs of the plan that share a name.
387
+ */
388
+ function productPlanJobNames(forge, plan, targets) {
389
+ const github = forge !== "gitlab";
390
+ const given = plan.jobNames ?? {};
391
+ const chant = { plan: "plan", note: PR_PLAN_NOTE_JOB, replan: REPLAN_JOB, replanNote: REPLAN_NOTE_JOB };
392
+ const keys = ["plan", "note", "replan", "replanNote"];
393
+ for (const key of keys) {
394
+ const t = given[key];
395
+ if (t === undefined)
396
+ continue;
397
+ if (Boolean(targets) !== t.includes("{target}"))
398
+ throw new Error(targets ? `the product plan's jobNames.${key} ${JSON.stringify(t)} names every target's job, so it holds {target}` : `the product plan's jobNames.${key} ${JSON.stringify(t)} holds {target}, and the plan has no targets`);
399
+ }
400
+ const namesOf = (target) => {
401
+ const out = {};
402
+ for (const key of keys) {
403
+ const t = given[key];
404
+ // chant's: `plan-<target>` on GitHub and Forgejo, `<target>-plan` on GitLab.
405
+ out[key] = t !== undefined ? t.replaceAll("{target}", target ?? "") : target ? (github ? `${chant[key]}-${target}` : `${target}-${chant[key]}`) : chant[key];
406
+ }
407
+ return out;
408
+ };
409
+ const seen = new Map();
410
+ for (const target of targets ?? [undefined]) {
411
+ const names = namesOf(target);
412
+ for (const key of plan.replan ? keys : ["plan", "note"]) {
413
+ const n = names[key];
414
+ const ok = github ? /^[A-Za-z_][A-Za-z0-9_-]*$/.test(n) : /^[A-Za-z0-9_][A-Za-z0-9_-]*$/.test(n) && !GITLAB_KEYWORDS.has(n);
415
+ if (!ok)
416
+ throw new Error(`the product plan's ${given[key] !== undefined ? `jobNames.${key}` : `${key} job`} ${JSON.stringify(n)} is not a job name of letters, digits, _ and -, starting with a letter or _${github ? "" : " or a digit, and no GitLab keyword"}`);
417
+ const other = seen.get(n);
418
+ if (other !== undefined)
419
+ throw new Error(`the product plan names two jobs ${n}: ${other} and ${key}${target ? ` of ${target}` : ""}`);
420
+ seen.set(n, `${key}${target ? ` of ${target}` : ""}`);
421
+ }
422
+ }
423
+ return namesOf;
424
+ }
303
425
  /** The comments the re-plan answers (#4899): the plan command, then the words' aliases for it. Refused when the words name no plan command. */
304
426
  function replanCommentsOf(words) {
305
427
  const command = commentLine(words, "plan");
@@ -309,16 +431,17 @@ function replanCommentsOf(words) {
309
431
  return { comments: [command, ...aliases.filter((a) => a.when === undefined).map((a) => a.from)], gated: aliases.filter((a) => a.when !== undefined).map((a) => ({ comment: a.from, when: a.when })) };
310
432
  }
311
433
  /** The re-plan's jobs for one target (#4899), its comments filled in by the caller. */
312
- function replanJobOf(forge, env, words, name, artifact, noteWords0, opts = {}) {
434
+ function replanJobOf(forge, env, words, name, artifact, noteWords0, opts) {
313
435
  const github = forge !== "gitlab";
314
- const jobName = github ? (name ? `${REPLAN_JOB}-${name}` : REPLAN_JOB) : name ? `${name}-${REPLAN_JOB}` : REPLAN_JOB;
315
- const noteJobName = github ? (name ? `${REPLAN_NOTE_JOB}-${name}` : REPLAN_NOTE_JOB) : name ? `${name}-${REPLAN_NOTE_JOB}` : REPLAN_NOTE_JOB;
436
+ const { jobName, noteJobName } = opts;
316
437
  // pr-post reads the pull request and the head from the re-plan job, never the comment. GitLab's is GitHub's line with its own --forge.
317
438
  // #4987: with staleNotes the note's tip line is the target branch's commit the re-plan ran at, as the comment preview's is.
318
- const stale = opts.staleNotes ? { staleNotes: true } : {};
319
- const command0 = github ? prLoopPostJob(forge, env, name, words, stale).command : prLoopPostJob("github", env, name, words, stale).command.replace(" --forge github ", " --forge gitlab ");
439
+ // #5003: the product's report directory and status context.
440
+ const post0 = { ...(opts.staleNotes ? { staleNotes: true } : {}), ...(opts.output !== undefined ? { output: opts.output } : {}) };
441
+ const command0 = github ? prLoopPostJob(forge, env, name, words, post0).command : prLoopPostJob("github", env, name, words, post0).command.replace(" --forge github ", " --forge gitlab ");
442
+ const command1 = opts.context !== undefined ? `${command0} --context ${opts.context}` : command0;
320
443
  // #4963: the argument the re-plan was narrowed to, which pr-post answers "not affected" for when the change does not reach it.
321
- const command = opts.notAffected ? `${command0} --not-affected "$${PLAN_ARGUMENT_ENV}"` : command0;
444
+ const command = opts.notAffected ? `${command1} --not-affected "$${PLAN_ARGUMENT_ENV}"` : command1;
322
445
  const noteWords1 = opts.notAffected && github ? { ...noteWords0, [PLAN_ARGUMENT_ENV]: `\${{ needs.${jobName}.outputs.argument }}` } : noteWords0;
323
446
  const noteWords = opts.staleNotes ? { ...noteWords1, TIP_SHA: github ? "${{ github.sha }}" : "$CI_COMMIT_SHA" } : noteWords1;
324
447
  const post = github
@@ -523,7 +646,7 @@ export function planVerbLines(p) {
523
646
  `${p.command} || chant_plan_exit=$?`,
524
647
  ...(p.report ? [`${p.report} || echo "chant: the report line exited $?" >&2`] : []),
525
648
  // #4899: the run record goes into the hand-off, for the note job to keep on chant/lifecycle.
526
- ...(p.record ? [`CHANT_PLAN_EXIT="$chant_plan_exit" CHANT_PLAN_STARTED="$chant_plan_started" node -e '${PLAN_RECORD_JS}' ${PR_LOOP_REPORT_DIR} || echo "chant: the plan's run record was not written" >&2`] : []),
649
+ ...(p.record ? [`CHANT_PLAN_EXIT="$chant_plan_exit" CHANT_PLAN_STARTED="$chant_plan_started" node -e '${PLAN_RECORD_JS}' ${productPlanReportDir(p)} || echo "chant: the plan's run record was not written" >&2`] : []),
527
650
  '[ "$chant_plan_exit" -eq 0 ] || exit "$chant_plan_exit"',
528
651
  ];
529
652
  }
@@ -558,20 +681,22 @@ export function planEvidenceOf(forge, evidence, words, planJob, opts = {}) {
558
681
  const key = evidenceKeyEnv(forge, evidence);
559
682
  const bin = words.bin;
560
683
  const member = opts.member ? { member: opts.member.name } : {};
684
+ // #5003: the product plan's report directory, which the plan job handed on.
685
+ const reportDir = opts.dir ?? PR_LOOP_REPORT_DIR;
561
686
  if (forge === "gitlab") {
562
687
  // #4914: the job runs in the target branch's plan notes pipeline, before the note job, and signs every open
563
688
  // merge request's settled plan job from its artifact; no job of a merge request pipeline holds the key.
564
689
  const dir = gitlabOpenEvidenceDir(planJob);
565
690
  return {
566
691
  jobName: `${planJob}-evidence`,
567
- lines: openEvidenceLines({ job: planJob, dir: opts.member?.reportPath ?? PR_LOOP_REPORT_DIR, out: dir, ...(bin ? { bin } : {}), ...(opts.noForks ? { noForks: true } : {}), ...member }),
692
+ lines: openEvidenceLines({ job: planJob, dir: opts.member?.reportPath ?? reportDir, out: dir, ...(bin ? { bin } : {}), ...(opts.noForks ? { noForks: true } : {}), ...member }),
568
693
  env: key,
569
694
  dir,
570
695
  ...(evidenceKeyless(evidence) ? { idTokens: evidenceIdTokens(evidence) } : {}),
571
696
  };
572
697
  }
573
698
  return {
574
- lines: planEvidenceLines({ dir: PR_LOOP_REPORT_DIR, at: '"$HEAD_SHA"', base: '"$BASE_SHA"', result: '"$PLAN_RESULT"', ...(bin ? { bin } : {}), ...member }),
699
+ lines: planEvidenceLines({ dir: reportDir, at: '"$HEAD_SHA"', base: '"$BASE_SHA"', result: '"$PLAN_RESULT"', ...(bin ? { bin } : {}), ...member }),
575
700
  env: { HEAD_SHA: "${{ github.sha }}", BASE_SHA: "${{ github.event.pull_request.base.sha }}", PLAN_RESULT: `\${{ needs.${planJob}.result }}`, ...key },
576
701
  ...(evidenceKeyless(evidence) ? { idToken: true } : {}),
577
702
  };
@@ -1 +1 @@
1
- {"version":3,"file":"floor-table.data.d.ts","sourceRoot":"","sources":["../src/floor-table.data.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAkPzC,CAAC"}
1
+ {"version":3,"file":"floor-table.data.d.ts","sourceRoot":"","sources":["../src/floor-table.data.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EA2PzC,CAAC"}
@@ -36,18 +36,24 @@ export const FLOOR_ROWS = [
36
36
  { name: "COMMENT_COMMANDS_FLOOR", version: "0.124.89", gates: "The first chant with the comment job on GitHub and Forgejo and the replies to commands no job runs (#4946): `commentJob` in the product pipeline (`chant components pr-comment`, `answerProductComment` in `@intentius/chant/ci-comment-commands`), which replies to a refusal and to a command the pipeline runs no job for, and with waves on merge starts a merged pull request's apply again; the words' `replies` and an alias's `refuse`, which the GitLab note poll reads too, as `chantNoteRuns`' `members`; `retryApply`; and `locks: \"plan\"` in GitHub's and Forgejo's product plan, with the lock, unlock and comment lock jobs.", issue: "#4946", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
37
37
  { name: "PRODUCT_PLAN_REACH_LOCKS_FLOOR", version: "0.124.89", gates: "The first chant whose product plan locks what a change reaches (#4979): `productPlan.reach`, a reach line the lock job runs at the target branch's commit with `chant lock --reach` (`@intentius/chant/lifecycle/reach-locks`), on GitHub, Forgejo and GitLab, where the lock job runs in the plan notes pipeline with `--open` beside the comment lock and unlock jobs; and whose comment job answers a re-plan comment with flags the product plan's re-plan cannot take (`noPlanFlags`).", issue: "#4979", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
38
38
  { name: "WAVE_STOP_FLOOR", version: "0.124.89", gates: "The first chant whose comment job stops a merged pull request's re-run at a wave (#4979): `/<product> apply wave-<n>` writes a stop for the merge commit on `chant/lifecycle` (`_waves/<op>.stops.json`, `@intentius/chant/op/wave-stop`) before GitHub's re-run or Forgejo's dispatch, and `chant run wave` leaves each wave after n waiting (exit 3).", issue: "#4979", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
39
- { name: "WAVES_BEFORE_MERGE_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose Op waves run before merge (#4984): `wavesBeforeMerge` in the product pipeline, where the comment job (GitHub, Forgejo) or the note poll (GitLab) decides `/<product> apply [wave-<n>]` on an open pull request (`decideWavesBeforeMerge`, `@intentius/chant/op/before-merge-decide`), records the head and its digest on `chant/lifecycle` (`_waves/<op>.before-merge.json`) and starts the waves for it; the generators' `beforeMerge`, whose guard admits that head alone, whose jobs check it out and read the base from the default branch, and whose `before-merge-done` job merges and releases the locks (`chant run wave --merge`); `waveJobs.<wave>.prelude`; the GitLab note poll's wave stop (`chantNoteRuns`' `waves`); a re-plan word that never starts with `-`; and the terraform lexicon's reach helpers (`@intentius/chant-lexicon-terraform/reach`).", issue: "#4984", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
40
- { name: "WAVES_APPLY_STATUS_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose Op waves post the apply statuses (#4987): the generators' `applyStatus`, a job `apply-status-<n>` after each wave at the default branch's commit that posts `<product>/apply` on the commit the waves applied (a before-merge run's decided head) with `chant run wave --apply-status` (`@intentius/chant/op/apply-status`), and the product pipeline's `applyStatus`; whose product plan takes `staleNotes`, each target's note carrying the target branch's commit and a `stale-notes` job beside wave 1 on a push marking each target's note (`pr-post --stale` with one `--member` per target); whose `productPipelineJobs` returns `waves.pipeline` for the generators; and whose GitLab reach line reaches the lock and note-commands jobs unexpanded (`expand: false`).", issue: "#4987", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
41
- { name: "WAVES_BEFORE_MERGE_SPLIT_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose before-merge waves never run the change's code beside a write token (#4987): with `beforeMerge` each wave is a plan job (the change's code, a checkout with no credentials kept, a read-only token; GitLab drops `CHANT_FORGE_TOKEN` and the job token), a gate job at the default branch with the token, an applying job on the saved plan with no write token, and a record job at the default branch that writes the run records (`chant run wave --phase plan|gate|apply|record`, `@intentius/chant/op/op-waves-split`).", issue: "#4987", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
42
- { name: "WAVES_BEFORE_MERGE_STEP_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose split before-merge waves take a `step` spec, Forgejo's hand-off, holds on other gates and one approval per wave (#4992): the plan job saves each run's step plan, the gate job leases the rows they change (no heartbeat; the decision names the lease) before it spends the approval, the applying job plans its runs again through the step and applies each whose digest the decision holds, and the record job writes the release records and lets go of the rows; a hook in the plan or apply job that holds the wave on another gate reads it with no write token and leaves its pending fact to the gate or record job; on Forgejo the plan and applying jobs hand their files on as job outputs (`packJs`), never through the artifact upload, and the gate and record jobs keep them as the artifacts; the plan job names no environment on GitHub (a wave's `planEnvironment` when set; on GitLab it prepares it), so the environment's reviewers are asked once.", issue: "#4992", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
43
- { name: "WAVES_PRODUCT_HOOKS_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose split waves run a product's own process in every job (#4994): the product wave hook's `hooks` (`runChantInProcess([\"run\", \"wave\", ..., \"--phase\", <phase>], words, { wave: { afterPlan, capabilities, hookExec, runHooks, hooks } })`, `RunOpWaveOptions.inProcessHooks`) serves a spec hook by its name in the process of whichever job runs it, plan, gate or applying job or the one-job shape, in place of a command that called back over a socket; `opWaveProductStateDir` is where the plan job's code keeps what the later jobs read; a `record: true` hold in the plan job is spent by the gate job for a re-run of the hook at the wave's commit (an applied line with `rerun.head`), which the next run's plan job runs and its gate job finishes (`holdsFinished`); and `waveJobs.<wave>.artifact.path` takes a list and `waveJobs.<wave>.gate` gives the gate job a report and an artifact, so a product's own upload steps go through chant's Forgejo hand-off.", issue: "#4994", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
44
- { name: "WAVES_BEFORE_MERGE_REST_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose split before-merge waves take a `rest` wave (#4992): its four jobs run one wave per run, the wave `CHANT_WAVES_WAVE` names (their own by default), and its record job, once the run applied and the plan found another wave, starts the waves workflow again for it (GitHub and Forgejo: a dispatch with the inputs `wave` and the decision's `pr`, `head` and `digest`, or a push's `commit`; GitLab: a pipeline with the same variables, with `CHANT_FORGE_TOKEN`), whose guard admits it as the same decided head; the jobs of the waves before it do not run in that follow-on; the record job's note (`rest-wave.json` beside the outcomes, `@intentius/chant/op/op-waves-follow-on`) tells `before-merge-done`, the control dispatch and the apply status that a run which started a follow-on is not the last.", issue: "#4992", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
45
- { name: "WAVES_FOLLOW_ON_RECORD_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose rest wave's record job records each follow-on it starts on `chant/lifecycle` before it starts it (#4998): `_waves/<op>.follow-on.json` keeps, per decided head or pushed commit, the wave started, the run that started it, the decision (`pr`, `digest`) or the `commit`, and the outcomes of every run of the chain so far; the guard admits a follow-on only for the wave that record names, so a wave started by hand past it is refused; and the last run's control dispatch, apply status and `before-merge-done` add up the outcomes of every run of the chain (the note's `chain`), so a chain whose last wave changed nothing reports `applied`.", issue: "#4998", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
39
+ { name: "WAVES_BEFORE_MERGE_FLOOR", version: "0.124.90", gates: "The first chant whose Op waves run before merge (#4984): `wavesBeforeMerge` in the product pipeline, where the comment job (GitHub, Forgejo) or the note poll (GitLab) decides `/<product> apply [wave-<n>]` on an open pull request (`decideWavesBeforeMerge`, `@intentius/chant/op/before-merge-decide`), records the head and its digest on `chant/lifecycle` (`_waves/<op>.before-merge.json`) and starts the waves for it; the generators' `beforeMerge`, whose guard admits that head alone, whose jobs check it out and read the base from the default branch, and whose `before-merge-done` job merges and releases the locks (`chant run wave --merge`); `waveJobs.<wave>.prelude`; the GitLab note poll's wave stop (`chantNoteRuns`' `waves`); a re-plan word that never starts with `-`; and the terraform lexicon's reach helpers (`@intentius/chant-lexicon-terraform/reach`).", issue: "#4984", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
40
+ { name: "WAVES_APPLY_STATUS_FLOOR", version: "0.124.90", gates: "The first chant whose Op waves post the apply statuses (#4987): the generators' `applyStatus`, a job `apply-status-<n>` after each wave at the default branch's commit that posts `<product>/apply` on the commit the waves applied (a before-merge run's decided head) with `chant run wave --apply-status` (`@intentius/chant/op/apply-status`), and the product pipeline's `applyStatus`; whose product plan takes `staleNotes`, each target's note carrying the target branch's commit and a `stale-notes` job beside wave 1 on a push marking each target's note (`pr-post --stale` with one `--member` per target); whose `productPipelineJobs` returns `waves.pipeline` for the generators; and whose GitLab reach line reaches the lock and note-commands jobs unexpanded (`expand: false`).", issue: "#4987", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
41
+ { name: "WAVES_BEFORE_MERGE_SPLIT_FLOOR", version: "0.124.90", gates: "The first chant whose before-merge waves never run the change's code beside a write token (#4987): with `beforeMerge` each wave is a plan job (the change's code, a checkout with no credentials kept, a read-only token; GitLab drops `CHANT_FORGE_TOKEN` and the job token), a gate job at the default branch with the token, an applying job on the saved plan with no write token, and a record job at the default branch that writes the run records (`chant run wave --phase plan|gate|apply|record`, `@intentius/chant/op/op-waves-split`).", issue: "#4987", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
42
+ { name: "WAVES_BEFORE_MERGE_STEP_FLOOR", version: "0.124.90", gates: "The first chant whose split before-merge waves take a `step` spec, Forgejo's hand-off, holds on other gates and one approval per wave (#4992): the plan job saves each run's step plan, the gate job leases the rows they change (no heartbeat; the decision names the lease) before it spends the approval, the applying job plans its runs again through the step and applies each whose digest the decision holds, and the record job writes the release records and lets go of the rows; a hook in the plan or apply job that holds the wave on another gate reads it with no write token and leaves its pending fact to the gate or record job; on Forgejo the plan and applying jobs hand their files on as job outputs (`packJs`), never through the artifact upload, and the gate and record jobs keep them as the artifacts; the plan job names no environment on GitHub (a wave's `planEnvironment` when set; on GitLab it prepares it), so the environment's reviewers are asked once.", issue: "#4992", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
43
+ { name: "WAVES_PRODUCT_HOOKS_FLOOR", version: "0.124.90", gates: "The first chant whose split waves run a product's own process in every job (#4994): the product wave hook's `hooks` (`runChantInProcess([\"run\", \"wave\", ..., \"--phase\", <phase>], words, { wave: { afterPlan, capabilities, hookExec, runHooks, hooks } })`, `RunOpWaveOptions.inProcessHooks`) serves a spec hook by its name in the process of whichever job runs it, plan, gate or applying job or the one-job shape, in place of a command that called back over a socket; `opWaveProductStateDir` is where the plan job's code keeps what the later jobs read; a `record: true` hold in the plan job is spent by the gate job for a re-run of the hook at the wave's commit (an applied line with `rerun.head`), which the next run's plan job runs and its gate job finishes (`holdsFinished`); and `waveJobs.<wave>.artifact.path` takes a list and `waveJobs.<wave>.gate` gives the gate job a report and an artifact, so a product's own upload steps go through chant's Forgejo hand-off.", issue: "#4994", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
44
+ { name: "WAVES_BEFORE_MERGE_REST_FLOOR", version: "0.124.90", gates: "The first chant whose split before-merge waves take a `rest` wave (#4992): its four jobs run one wave per run, the wave `CHANT_WAVES_WAVE` names (their own by default), and its record job, once the run applied and the plan found another wave, starts the waves workflow again for it (GitHub and Forgejo: a dispatch with the inputs `wave` and the decision's `pr`, `head` and `digest`, or a push's `commit`; GitLab: a pipeline with the same variables, with `CHANT_FORGE_TOKEN`), whose guard admits it as the same decided head; the jobs of the waves before it do not run in that follow-on; the record job's note (`rest-wave.json` beside the outcomes, `@intentius/chant/op/op-waves-follow-on`) tells `before-merge-done`, the control dispatch and the apply status that a run which started a follow-on is not the last.", issue: "#4992", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
45
+ { name: "WAVES_FOLLOW_ON_RECORD_FLOOR", version: "0.124.90", gates: "The first chant whose rest wave's record job records each follow-on it starts on `chant/lifecycle` before it starts it (#4998): `_waves/<op>.follow-on.json` keeps, per decided head or pushed commit, the wave started, the run that started it, the decision (`pr`, `digest`) or the `commit`, and the outcomes of every run of the chain so far; the guard admits a follow-on only for the wave that record names, so a wave started by hand past it is refused; and the last run's control dispatch, apply status and `before-merge-done` add up the outcomes of every run of the chain (the note's `chain`), so a chain whose last wave changed nothing reports `applied`.", issue: "#4998", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
46
46
  { name: "PRODUCT_PLAN_WATCHES_FLOOR", version: "0.124.88", gates: "The first chant whose product plan takes `watches`, the product's own scheduled jobs the note job's `pr-post` checks for having stopped with the job's token (#4888), and whose `checkOverdueOps` and `overdueOpsAt` take a product's `logPrefix` and `label`.", issue: "#4888", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
47
- { name: "PRODUCT_PLAN_WATCH_TARGETS_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose product plan's `watches` take `targets` (#4988): a watch scoped to those targets is checked by their notes alone, and the note of another target checks neither it nor the discovered Op of its name (`watchesForTarget`).", issue: "#4988", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
47
+ { name: "PRODUCT_PLAN_WATCH_TARGETS_FLOOR", version: "0.124.90", gates: "The first chant whose product plan's `watches` take `targets` (#4988): a watch scoped to those targets is checked by their notes alone, and the note of another target checks neither it nor the discovered Op of its name (`watchesForTarget`).", issue: "#4988", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
48
48
  { name: "PRODUCT_PLAN_RECORD_FLOOR", version: "0.124.88", gates: "The first chant whose product plan takes `record` (#4899): the plan step writes the plan job's run record into the hand-off, and the note job keeps it as Op `pr-plan` on `chant/lifecycle` with `pr-post --record-run <plan job>` (`--open` on GitLab), as `chant ci run plan --in-place` records `pr-plan`'s.", issue: "#4899", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
49
49
  { name: "PRODUCT_PLAN_REPLAN_FLOOR", version: "0.124.89", gates: "The first chant whose product plan carries what terragucci's and sql-yodeler's plan jobs did themselves (#4963, #4951): `trade` (a plan's or a target's) before the checkout, `replan: { dispatch, reply, notAffected }` (a re-plan from `workflow_dispatch`, a reply to a comment no other job takes, `pr-post --not-affected`), `previousMarker` (`CHANT_PLAN_PREVIOUS_MARKER`), `noteSteps.pullRequest`, a `PrReport`'s `marker`, and a hand-off of the product's own note text (`planBodyHandoff`).", issue: "#4963", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
50
50
  { name: "PRODUCT_PLAN_SUBJECT_FLOOR", version: "0.124.89", gates: "The first chant whose note job compares the plan's subject with the previous note's (#4972), on GitHub, Forgejo and GitLab: a plan note hand-off's `subject` (`PrPlanSubject`, an id and named parts) is kept in the note, and `pr-post` adds the note words' `sinceLast` line, naming the parts added, gone and changed (`subjectParts`), when the previous note kept another id.", issue: "#4972", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
51
+ { name: "PRODUCT_PLAN_NAMES_FLOOR", version: "0.124.91", gates: "The first chant whose product plan keeps a product's own names (#5003): `workflowFile` (the generators' `path`), `jobNames` (the plan, note, re-plan and re-plan note jobs, with `{target}`), `statusContext` (which `pr-post --context`, the pending step, the stale job and the apply before merge use) and `reportDir` (`{output}`, the hand-off, the artifact's path and `pr-post --output`), and whose `pr-post --open` finds a plan job of the product's name (`--plan-job`).", issue: "#5003", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
52
+ { name: "PRODUCT_PLAN_ARTIFACTS_FLOOR", version: "0.124.91", gates: "The first chant whose GitLab product plan job keeps a product's own artifacts beside the report directory (#5004): `productPlan.artifacts: { paths, reports }`, as `artifacts:paths` and `artifacts:reports`, such as terragucci's `terraform` report for the merge request's widget, with `{target}` and `{output}` filled.", issue: "#5004", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
53
+ { name: "PRODUCT_PLAN_LOGIN_TOKENS_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose GitHub and Forgejo product plan, after a `login` or with `idTokens`, starts every step after the checkout but the login's without `ACTIONS_ID_TOKEN_REQUEST_URL` and `ACTIONS_ID_TOKEN_REQUEST_TOKEN` (#5021), as after a `trade`: the setup, the probe and the plan step, in the plan and the re-plan job, so the change's code can request no token.", issue: "#5021", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
54
+ { name: "PR_HEAD_SHA_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose pull request jobs on GitHub and Forgejo name the pull request's head, `github.event.pull_request.head.sha`, where `github.sha` named the merge preview (#5020): the product plan's pending step (`CHANT_PENDING_SHA`), the note job's `HEAD_SHA` (the product plan's, the pull request loop's and the product pipeline's) and the `env-post` job's.", issue: "#5020", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
55
+ { name: "OP_WAVES_NAMES_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose Op waves generators keep a product's own names (#5022): `jobNames` (every job they write: a wave's, deciding, share and job group jobs, a split wave's plan, gate, apply and record jobs, the policy and evidence jobs, the apply status, stale, before-merge done and control jobs; `needs:`, `if:`, `{job}` and `--from-job` follow it), `stageNames` (GitLab), `artifactNames` (the outcome, decision, saved plan and check claims artifacts, and the pattern a wave job downloads the earlier outcomes with), `workflowFile` (the generators' file and the follow-on's dispatch), `runIf` (the jobs go in the product's own workflow, each running on a push it admits or a before-merge or follow-on dispatch, with its own permissions; on GitLab joined to every rule) and `dispatchInputs` (the dispatch inputs' names, which the comment job's dispatch and the follow-on use), with `buildForgejoOpWavesDoc` for the Forgejo jobs, and whose product pipeline's `wavesBeforeMerge` takes `workflowFile` and `dispatchInputs`.", issue: "#5022", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
56
+ { name: "PRODUCT_JOB_NAMES_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose product pipeline names its comment job and its waves' jobs as the product does (#5027): `commentJob: { jobName }` (default `comment`, such as terragucci's `apply-comment`), refused when another job of the workflow has the name, and `wavesJobNames`, the Op waves generators' `jobNames`, which `waves.pipeline` carries to the generator and `waves.jobs` takes, and under which the comment job's re-run of a merged pull request's apply looks for the waves' jobs (`CHANT_COMMENT_JOBS` `applyJobs`, `rerunApplyJobs`), so terragucci's `apply-wave-<k>`, `-share-<n>`, group jobs and `apply-rest` run again.", issue: "#5027", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
51
57
  { name: "PRODUCT_ACTIONS_FLOOR", version: "0.124.58", gates: "Day-2 actions in the product pipeline (#4654): the `action` comment command counted as answered by the product's own workflow (`productPipelineJobs(forge, env, { words, actions: true })`), or the pipeline's own action job (`actionJob`, `build --pr-loop --action-job`), which answers the comment and a dispatch with a member and an action input, and runs the product's action verb with `--from-event`.", issue: "#4654", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
52
58
  { name: "APPROVAL_STATUS_FLOOR", version: "0.124.56", gates: "The approval status before merge (#4630): under a `pr-review` wave, the op waves generators add a job that posts `<product>/approval` on each open pull request's head.", issue: "#4630", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
53
59
  { name: "APPROVAL_STATUS_PULL_REQUEST_FLOOR", version: "0.124.56", gates: "The approval status for `pull-request` waves too (#4630, 2026-10-28 ruling): the generators add the record-plans and approval-status jobs for a spec whose waves take the pull request's own approval, and the status reads that approval's coverage of each wave's change set.", issue: "#4630", file: "ci-product.ts", modules: ["@intentius/chant/ci-product"] },
@@ -209,16 +215,19 @@ export const FLOOR_ROWS = [
209
215
  { name: "DRIFT_NOTIFY_STACKS_FLOOR", version: "0.124.89", gates: "The first chant whose `driftNotifyFields` takes `stacks`, each member's drift records, and from them names the drifted members and computes the run's fingerprint (#4944).", issue: "#4944", file: "release-floors.ts", modules: ["@intentius/chant/release-floors"] },
210
216
  { name: "MEMBER_SIGNED_CHECKS_FLOOR", version: "0.124.89", gates: "The first chant whose workspace member's pull request pipeline takes `evidence`, `checkJob` and `refGateStatus` (`chant build --pr-loop` in a member), signing the member's plan job as `plan:<member>` and `policy:<member>` (`ci evidence sign --member`, `memberEvidenceCheck`) and running the check job in the member's directory (#4964).", issue: "#4964", file: "release-floors.ts", modules: ["@intentius/chant/ci-evidence-jobs", "@intentius/chant/components/pr-checks", "@intentius/chant/release-floors"] },
211
217
  { name: "PRODUCT_CHECK_JOBS_FLOOR", version: "0.124.89", gates: "The first chant whose `checkJob` takes `{ services, env, before, dir, args }` (`PrCheckJobOptions`: service containers, the check step's variables and lines, the report directory, the arguments after `--base`) and whose github, forgejo and gitlab lexicons render the check, check evidence and ref gate jobs for a product's own workflow (`productCheckJobs`, `forgejoProductCheckJobs`, `gitlabProductCheckJobs`) (#4964).", issue: "#4964", file: "release-floors.ts", modules: ["@intentius/chant/components/pr-checks", "@intentius/chant/release-floors"] },
212
- { name: "CHECK_JOB_ARTIFACTS_FLOOR", version: NEXT_RELEASE, gates: "The first chant whose `checkJob` takes `artifacts: { paths, reports }` (`PrCheckArtifacts`), which GitLab's check job keeps beside its report as `artifacts:paths` and `artifacts:reports`, such as a lint hook's `codequality` report (#4988).", issue: "#4988", file: "release-floors.ts", modules: ["@intentius/chant/components/pr-checks", "@intentius/chant/release-floors"] },
218
+ { name: "CHECK_JOB_ARTIFACTS_FLOOR", version: "0.124.90", gates: "The first chant whose `checkJob` takes `artifacts: { paths, reports }` (`PrCheckArtifacts`), which GitLab's check job keeps beside its report as `artifacts:paths` and `artifacts:reports`, such as a lint hook's `codequality` report (#4988).", issue: "#4988", file: "release-floors.ts", modules: ["@intentius/chant/components/pr-checks", "@intentius/chant/release-floors"] },
213
219
  { name: "GITLAB_WAVE_KEY_SCOPE_FLOOR", version: "0.124.89", gates: "The first chant whose GitLab Op waves pipeline with a runner key hands it to no wave job: each deciding wave's `<wave job>-evidence` job names the `chant-evidence` environment and signs `plan:<wave>` from the wave job (#4964).", issue: "#4964", file: "release-floors.ts", modules: ["@intentius/chant/ci-evidence-jobs", "@intentius/chant/release-floors"] },
214
220
  { name: "ACTOR_ORDER_FLOOR", version: "0.124.89", gates: "The first chant with `actorOf` and `actorOrder` in `@intentius/chant/actor`: the actor fallback with `GITHUB_TRIGGERING_ACTOR` ahead of the forge's actor and git's `user.name` before the login, each place switched on or off by the caller (#4966).", issue: "#4966", file: "release-floors.ts", modules: ["@intentius/chant/actor", "@intentius/chant/release-floors"] },
221
+ { name: "ACTOR_GIT_ENV_FLOOR", version: "0.124.91", gates: "The first chant whose `actorOf({ env, repo })` runs `git config` in `repo` with the `env` it is given rather than the process's, so a job's `GIT_CONFIG_GLOBAL` or `HOME` picks the `user.name` it reads (#5005).", issue: "#5005", file: "release-floors.ts", modules: ["@intentius/chant/actor", "@intentius/chant/release-floors"] },
215
222
  { name: "CI_BASE_REF_FLOOR", version: "0.124.89", gates: "The first chant with `@intentius/chant/ci-base` (`ciBaseRef`), the base a CI job measures a change from (the pull request's target branch, else the default branch for a push to another branch), and whose `chant ci check` defaults `--base` to it (#4966).", issue: "#4966", file: "release-floors.ts", modules: ["@intentius/chant/ci-base", "@intentius/chant/release-floors"] },
216
223
  { name: "PLANNED_FILES_FLOOR", version: "0.124.89", gates: "The first chant with `@intentius/chant/planned-files` (`planFile`, `planRemoval`, `writePlannedFiles`, `staleGeneratedFiles`): an init's planned files with their modes, written or removed in one call, and the generated files a product no longer renders, found by their header (#4966).", issue: "#4966", file: "release-floors.ts", modules: ["@intentius/chant/planned-files", "@intentius/chant/release-floors"] },
224
+ { name: "PLANNED_BYTES_FLOOR", version: "0.124.91", gates: "The first chant whose `planFile` in `@intentius/chant/planned-files` takes bytes (`Uint8Array` or `Buffer`) as well as text: `writePlannedFiles` writes them unchanged and the plan compares them with the file byte for byte (#5006).", issue: "#5006", file: "release-floors.ts", modules: ["@intentius/chant/planned-files", "@intentius/chant/release-floors"] },
217
225
  { name: "FORGE_CHECK_OWN_JOBS_FLOOR", version: "0.124.89", gates: "The first chant whose `pipelineContract` takes `jobs`, the jobs a product builds from its own config, beside or in place of `pipelines`, so a product's forge check gets the required statuses and `refGateStatus` from chant (#4966).", issue: "#4966", file: "release-floors.ts", modules: ["@intentius/chant/forge-check", "@intentius/chant/forge-check/index", "@intentius/chant/release-floors"] },
218
226
  { name: "BEFORE_MERGE_REF_GATE_FLOOR", version: "0.124.89", gates: "The first chant whose `chant components pr-apply --before-merge` waits for the ref gate's status: the status the policy at base sets for the target branch is passed as `require` to the `checks` require (#4966).", issue: "#4966", file: "release-floors.ts", modules: ["@intentius/chant/release-floors"] },
219
227
  { name: "TARGET_SIGNED_CHECKS_FLOOR", version: "0.124.89", gates: "The first chant whose product plan with `targets` and `evidence` signs each target's plan job as `plan:<target>` and `policy:<target>` (`ci evidence sign --member <target>`, `targetEvidenceCheck`, `productPlanEvidenceChecks`), and whose `refGateInitPlan` takes `targets` and names those checks in the `refs` rule (#4978).", issue: "#4978", file: "release-floors.ts", modules: ["@intentius/chant/ci-evidence-jobs", "@intentius/chant/ref-gate-init", "@intentius/chant/release-floors"] },
220
228
  { name: "RUNTIME_WAVES_SPEC_FLOOR", version: "0.124.89", gates: "The first chant whose Op waves generators take `renderSpec` (the wave jobs run `chant run wave --render-spec`, and `CHANT_WAVES_SPEC_COMMAND` names the product command that prints the spec at the commit in `CHANT_WAVES_SPEC_AT`), so a product whose spec is built from its config at base renders its wave jobs, policy step, evidence job and cloud trade through chant (#4982).", issue: "#4982", file: "release-floors.ts", modules: ["@intentius/chant/op", "@intentius/chant/op/index", "@intentius/chant/op/op-waves-render-spec", "@intentius/chant/release-floors"] },
221
229
  { name: "GITLAB_WAVE_EVIDENCE_RETRY_FLOOR", version: "0.124.89", gates: "The first chant whose `chant run resume` (`resumeGateRun`) on GitLab retries a wave job's `<wave job>-evidence` with the wave job when the evidence job already ran, and whose `ci evidence sign --from-job` waits for a job it reads to finish, so a resumed wave's evidence job signs from the new try (#4978).", issue: "#4978", file: "release-floors.ts", modules: ["@intentius/chant/ci-evidence-jobs", "@intentius/chant/release-floors"] },
230
+ { name: "TERRAFORM_COMMAND_TRACE_FLOOR", version: "0.124.91", gates: "The first chant whose terraform lexicon's engine runs carry what a product's own command tracing read: `runBinary` and the engine runner's `exec` and `execSync` answer stderr apart (`Ran.stderr`) and a spawn failure's message (`Ran.error`), a hook's `after` gets a binary that could not be started as a null code with `error`, `commandTrace` ends that span with the message, and `composeCommandHooks` runs a product's own hook and `commandTrace` as one `onCommand` (#5007).", issue: "#5007", file: "release-floors.ts", modules: ["@intentius/chant/release-floors"] },
222
231
  { name: "RUN_EVENT_FLOOR", version: "0.124.28", gates: "The first chant that writes contract version 1 of the run-event stream.", file: "run-event.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/run-event"] },
223
232
  { name: "RUN_EVENT_FAILURE_FLOOR", version: "0.124.30", gates: "The first chant that writes `failure` on `run-settle` (#4094).", issue: "#4094", file: "run-event.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/run-event"] },
224
233
  { name: "RUN_EVENT_COMPONENT_SKIP_FLOOR", version: "0.124.29", gates: "The first chant that writes `blocked`, `already-applied` and `blockedBy` on `component-settle` (#4007).", issue: "#4007", file: "run-event.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/run-event"] },
@@ -122,6 +122,8 @@ export declare function lexiconPackagesToInstall(names: readonly string[], paths
122
122
  * path, which is not a package.
123
123
  */
124
124
  export declare function packageNameOf(spec: string): string | undefined;
125
+ /** True when `err` says the package `pkg` itself could not be found, not something it imports. */
126
+ export declare function isPackageNotFound(err: unknown, pkg: string): boolean;
125
127
  /**
126
128
  * chant#2845 — resolve `spec` (a lexicon package or one of its subpaths) from
127
129
  * `fromDir` instead of from chant's own install, or `undefined` when the
@@ -1 +1 @@
1
- {"version":3,"file":"lexicon-module.d.ts","sourceRoot":"","sources":["../src/lexicon-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AASH;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1F,mEAAmE;AACnE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAExE;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,EAAE,CAAC;AAC/E,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAiBvG;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACxC,OAAO,EAAE,MAAM,EACf,SAAS,SAAM,GACd;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAgBrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,SAAS,EAClD,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBxB;AAMD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAM3G;AAED,2DAA2D;AAC3D,wBAAgB,sBAAsB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5D;AAED,sGAAsG;AACtG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAElE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAElE;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GACrC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAa9C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,MAAsB,EAC/B,KAAK,GAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAe,GAC/C,MAAM,CAKR;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,KAAK,GAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAe,GAC/C,MAAM,EAAE,CAEV;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI9D;AAUD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAsB,GAAG,MAAM,GAAG,SAAS,CAMpG;AAcD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAqB1H"}
1
+ {"version":3,"file":"lexicon-module.d.ts","sourceRoot":"","sources":["../src/lexicon-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AASH;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1F,mEAAmE;AACnE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAExE;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,EAAE,CAAC;AAC/E,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAiBvG;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACxC,OAAO,EAAE,MAAM,EACf,SAAS,SAAM,GACd;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAgBrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,SAAS,EAClD,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBxB;AAMD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAM3G;AAED,2DAA2D;AAC3D,wBAAgB,sBAAsB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5D;AAED,sGAAsG;AACtG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAElE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAElE;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GACrC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAa9C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,MAAsB,EAC/B,KAAK,GAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAe,GAC/C,MAAM,CAKR;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,KAAK,GAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAe,GAC/C,MAAM,EAAE,CAEV;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI9D;AAED,kGAAkG;AAClG,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CASpE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAsB,GAAG,MAAM,GAAG,SAAS,CAMpG;AAcD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAqB1H"}
@@ -206,12 +206,16 @@ export function packageNameOf(spec) {
206
206
  return spec.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
207
207
  }
208
208
  /** True when `err` says the package `pkg` itself could not be found, not something it imports. */
209
- function isPackageNotFound(err, pkg) {
209
+ export function isPackageNotFound(err, pkg) {
210
210
  const code = err?.code;
211
211
  if (code !== "ERR_MODULE_NOT_FOUND" && code !== "MODULE_NOT_FOUND")
212
212
  return false;
213
213
  const message = err instanceof Error ? err.message : String(err);
214
- return message.includes(`'${pkg}'`) || message.includes(`"${pkg}"`) || message.includes(`${pkg}/`);
214
+ // The specifier itself is quoted: `'pkg'`, or `'pkg/sub'` for a subpath.
215
+ // chant#4881 — a file missing inside an installed package is named by its
216
+ // path (`'/…/node_modules/pkg/generated/index.js'`), which is not quoted at
217
+ // the package name, so it doesn't count as the package being missing.
218
+ return [`'${pkg}'`, `"${pkg}"`, `'${pkg}/`, `"${pkg}/`].some((quoted) => message.includes(quoted));
215
219
  }
216
220
  /**
217
221
  * chant#2845 — resolve `spec` (a lexicon package or one of its subpaths) from
package/dist/lexicon.d.ts CHANGED
@@ -1083,6 +1083,46 @@ export interface OpWavesPipelineOptions extends Pick<ComponentPipelineOptions, "
1083
1083
  command: string;
1084
1084
  env: Record<string, string>;
1085
1085
  };
1086
+ /**
1087
+ * A product's job names (#5022, `@intentius/chant/op/op-waves-names`): a
1088
+ * function that gives each job the generator writes (a wave's job, its
1089
+ * deciding, share and job group jobs, a split wave's plan, gate, apply
1090
+ * and record jobs, the policy and evidence jobs, the apply status, stale,
1091
+ * before-merge done and control jobs) the product's name, or undefined
1092
+ * for chant's. Every `needs:`, `if:`, `{job}` and `--from-job` follows
1093
+ * it. A name the forge cannot take, and two jobs that share one, are
1094
+ * refused. Absent: chant's names.
1095
+ */
1096
+ jobNames?: import("./op/op-waves-names.js").OpWavesJobNames;
1097
+ /** GitLab (#5022): a product's stage names, as {@link jobNames}. Two stages may share one, such as terragucci's `apply`. Absent: chant's. */
1098
+ stageNames?: import("./op/op-waves-names.js").OpWavesStageNames;
1099
+ /** GitHub and Forgejo (#5022): the outcome, decision, saved plan and check claims artifacts' names, and the pattern a wave job downloads the earlier outcomes with. Absent: chant's. */
1100
+ artifactNames?: import("./op/op-waves-names.js").OpWavesArtifactNames;
1101
+ /**
1102
+ * GitHub and Forgejo (#5022): the workflow file the jobs go in, such as
1103
+ * `terragucci.yml`: the generator's file, and the one a rest wave's
1104
+ * record job dispatches. GitLab takes `opsFileName`. Absent: `<spec>.yml`.
1105
+ */
1106
+ workflowFile?: string;
1107
+ /**
1108
+ * The jobs go in a product's own workflow or pipeline beside its other
1109
+ * jobs (#5022). GitHub and Forgejo: an expression (without `${{ }}`)
1110
+ * for the push the waves run on, such as `github.ref ==
1111
+ * format('refs/heads/{0}', github.event.repository.default_branch)`;
1112
+ * each job runs only on such a push, or a before-merge or follow-on
1113
+ * dispatch of its own inputs, and carries its permissions itself. GitLab:
1114
+ * a condition joined with `&&` to every rule of every job. Absent: the
1115
+ * jobs are the workflow's own, as before.
1116
+ */
1117
+ runIf?: string;
1118
+ /**
1119
+ * GitHub and Forgejo (#5022): the names of the `workflow_dispatch`
1120
+ * inputs `pr`, `head`, `digest` (before merge) and `wave`, `commit` (a
1121
+ * rest wave's follow-on), so they never meet the product's own, such as
1122
+ * a re-plan's `pr`. The comment job dispatches them by the same names
1123
+ * (`wavesBeforeMerge.dispatchInputs`). Absent: chant's.
1124
+ */
1125
+ dispatchInputs?: Partial<Record<import("./op/op-waves-names.js").OpWavesDispatchInput, string>>;
1086
1126
  }
1087
1127
  /** A run step a product adds to a generated job (#4791): its name, and its shell lines in order. */
1088
1128
  export interface OpWaveRunStep {
@@ -1114,7 +1154,8 @@ export interface OpWaveJobInputs {
1114
1154
  report?: OpWaveRunStep;
1115
1155
  /**
1116
1156
  * Files the job keeps as an artifact whatever its exit. `{job}` in
1117
- * `name` is the job's name, so a wide wave's jobs keep one each. GitHub
1157
+ * `name` is the job's name (#5022: the product's, under `jobNames`), so
1158
+ * a wide wave's jobs keep one each. GitHub
1118
1159
  * and Forgejo: an upload step named `step` after the report. GitLab: the
1119
1160
  * path joins the job's `artifacts:`, which keep the outcome files too,
1120
1161
  * under `name`.