@intentius/chant 0.124.41 → 0.124.43
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.
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +3 -0
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +27 -3
- package/dist/cli/handlers/pr.d.ts +3 -1
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +113 -2
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +11 -0
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +8 -2
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +15 -0
- package/dist/cli/registry.d.ts +19 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/capability.d.ts +47 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/capability.js +44 -0
- package/dist/components/cli-support.d.ts +6 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/cli-support.js +8 -1
- package/dist/components/driver.d.ts +10 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +52 -2
- package/dist/components/fan-out-run.d.ts +9 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +17 -1
- package/dist/components/gate-plan.d.ts +2 -0
- package/dist/components/gate-plan.d.ts.map +1 -1
- package/dist/components/gate-plan.js +1 -0
- package/dist/components/pr-pipeline.d.ts +20 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +54 -16
- package/dist/components/pr-run.d.ts +6 -0
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +3 -0
- package/dist/components/wave-plan.d.ts +14 -1
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +34 -2
- package/dist/op/activities/pr-refs.d.ts +10 -0
- package/dist/op/activities/pr-refs.d.ts.map +1 -0
- package/dist/op/activities/pr-refs.js +26 -0
- package/dist/op/activities/predict-behaviour.d.ts +2 -4
- package/dist/op/activities/predict-behaviour.d.ts.map +1 -1
- package/dist/op/activities/predict-behaviour.js +2 -21
- package/dist/op/activities/review-agent.js +1 -1
- package/dist/op/index.d.ts +2 -2
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -1
- package/dist/op/op-waves-run.d.ts +3 -79
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +4 -133
- package/dist/op/stage-hooks.d.ts +152 -0
- package/dist/op/stage-hooks.d.ts.map +1 -0
- package/dist/op/stage-hooks.js +199 -0
- package/dist/pr-forge.d.ts +56 -0
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +320 -45
- package/dist/pr-loop.d.ts +18 -1
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +7 -0
- package/dist/pr-requires.d.ts +47 -0
- package/dist/pr-requires.d.ts.map +1 -0
- package/dist/pr-requires.js +53 -0
- package/dist/wave-runtime.mjs +213 -213
- package/dist/workspace/checks/ci-workflow.d.ts.map +1 -1
- package/dist/workspace/checks/ci-workflow.js +19 -4
- package/dist/workspace/ci-init.d.ts.map +1 -1
- package/dist/workspace/ci-init.js +5 -4
- package/dist/workspace/ci-run.d.ts.map +1 -1
- package/dist/workspace/ci-run.js +2 -1
- package/dist/workspace/ci-workflow-at.d.ts +14 -0
- package/dist/workspace/ci-workflow-at.d.ts.map +1 -0
- package/dist/workspace/ci-workflow-at.js +17 -0
- package/dist/workspace/ci-workflow.d.ts +11 -3
- package/dist/workspace/ci-workflow.d.ts.map +1 -1
- package/dist/workspace/ci-workflow.js +10 -2
- package/dist/workspace/declaration.d.ts +6 -3
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +2 -2
- package/dist/workspace/pr-report.schema.json +23 -3
- package/dist/workspace/reason-codes.d.ts +1 -1
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +1 -1
- package/package.json +1 -1
- package/src/cli/handlers/build.ts +3 -0
- package/src/cli/handlers/fan-out.ts +27 -3
- package/src/cli/handlers/pr-before-merge.test.ts +276 -0
- package/src/cli/handlers/pr.ts +110 -2
- package/src/cli/handlers/run.ts +10 -0
- package/src/cli/main.ts +8 -2
- package/src/cli/parse-args.ts +11 -0
- package/src/cli/registry.ts +19 -0
- package/src/components/capability-targets.test.ts +162 -0
- package/src/components/capability.ts +71 -0
- package/src/components/cli-support.ts +14 -1
- package/src/components/driver.ts +54 -3
- package/src/components/fan-out-run.ts +19 -1
- package/src/components/gate-plan.ts +3 -0
- package/src/components/pr-pipeline.ts +64 -16
- package/src/components/pr-run.ts +9 -0
- package/src/components/wave-plan.ts +38 -3
- package/src/op/activities/pr-refs.ts +28 -0
- package/src/op/activities/predict-behaviour.ts +3 -23
- package/src/op/activities/review-agent.ts +1 -1
- package/src/op/index.ts +4 -0
- package/src/op/op-waves-run.ts +24 -228
- package/src/op/stage-hooks-async.test.ts +79 -0
- package/src/op/stage-hooks.ts +346 -0
- package/src/pr-forge-bundle.test.ts +2 -2
- package/src/pr-forge.ts +334 -36
- package/src/pr-loop-bundle.test.ts +2 -2
- package/src/pr-loop.ts +25 -1
- package/src/pr-requires.test.ts +248 -0
- package/src/pr-requires.ts +93 -0
- package/src/review-agent-bundle.test.ts +35 -0
- package/src/stage-hooks-bundle.test.ts +38 -0
- package/src/workspace/checks/ci-workflow.test.ts +9 -0
- package/src/workspace/checks/ci-workflow.ts +18 -4
- package/src/workspace/ci-init.ts +5 -4
- package/src/workspace/ci-run.ts +2 -1
- package/src/workspace/ci-workflow-at.ts +23 -0
- package/src/workspace/ci-workflow.ts +13 -2
- package/src/workspace/declaration.schema.json +2 -2
- package/src/workspace/declaration.ts +6 -3
- package/src/workspace/pr-report.schema.json +23 -3
- package/src/workspace/reason-codes.ts +1 -1
package/dist/op/op-waves-run.js
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* question is answered, `chant run resume --op <name>` starts the job again
|
|
49
49
|
* (`pointGateResumable`, #3835).
|
|
50
50
|
*/
|
|
51
|
-
import { execFileSync
|
|
51
|
+
import { execFileSync } from "node:child_process";
|
|
52
52
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
53
53
|
import { dirname, isAbsolute, join, posix } from "node:path";
|
|
54
54
|
import { decideWaveGate, runWaveLoop, waveDigestMembers, waveSetDigest, writeWaveRecordFile, } from "../wave-engine.js";
|
|
@@ -58,19 +58,10 @@ import { samePlanDigest } from "../lifecycle/plan-digest.js";
|
|
|
58
58
|
import { isLifecycleLocalNote } from "../lifecycle/local-note.js";
|
|
59
59
|
import { ciRunIdFromEnv } from "./gate-run-locator.js";
|
|
60
60
|
import { quorumProblems, quorumRuleLine, quorumRulesFor, quorumWaiting, ruleNeedsProof, samePrincipal, trustQuorumJudge, } from "./gate-quorum.js";
|
|
61
|
-
import { OP_WAVE_DEFAULT_APPLY, OP_WAVE_GATE_POLICIES, OP_WAVE_HOOK_MOMENTS, GATE_APPROVAL_SOURCES, assertOpWaveHooks, assertOpWavesSpec, opWaveApplyHooksRunBy, opWaveGateName, opWaveHooksAt,
|
|
62
|
-
|
|
63
|
-
export
|
|
64
|
-
"version", "kind", "op", "gate", "timestamp", "expiresAt", "planDigest", "runId", "url", "resume",
|
|
65
|
-
"environment", "origin", "neverOverMcp", "approval", "approvalMode", "answer", "wave", "heldBy",
|
|
66
|
-
];
|
|
61
|
+
import { OP_WAVE_DEFAULT_APPLY, OP_WAVE_GATE_POLICIES, OP_WAVE_HOOK_MOMENTS, GATE_APPROVAL_SOURCES, assertOpWaveHooks, assertOpWavesSpec, opWaveApplyHooksRunBy, opWaveGateName, opWaveHooksAt, opWavePointAt, opWavePointProblems, opWaveRecordPath, opWaveGroupRuns, opWaveGroupsProblem, opWaveShare, } from "./op-waves.js";
|
|
62
|
+
import { OP_WAVE_PENDING_RESERVED, opWaveArgv, pendingFields, readHoldRequest, runHookList, runStageHooks, runStageHooksAsync, spawnExec, spawnExecAsync, } from "./stage-hooks.js";
|
|
63
|
+
export { OP_WAVE_PENDING_RESERVED, opWaveArgv, runStageHooks, runStageHooksAsync, spawnExecAsync };
|
|
67
64
|
export const OP_WAVE_APPLY_OUTCOMES = ["stood-down", "held", "replan"];
|
|
68
|
-
const spawnExec = (argv, cwd, env) => {
|
|
69
|
-
const result = spawnSync(argv[0], argv.slice(1), { cwd, stdio: "inherit", ...(env ? { env: { ...process.env, ...env } } : {}) });
|
|
70
|
-
if (result.error)
|
|
71
|
-
throw result.error;
|
|
72
|
-
return result.status ?? 1;
|
|
73
|
-
};
|
|
74
65
|
const gitShowAtBase = (base, path, cwd) => {
|
|
75
66
|
let sha;
|
|
76
67
|
try {
|
|
@@ -168,18 +159,6 @@ function pointAtBase(spec, name, where) {
|
|
|
168
159
|
return { pointRefused: `the decision point at base cannot be asked (${where}: ${problems.join("; ")})` };
|
|
169
160
|
return { point: opWavePointAt(spec, name) };
|
|
170
161
|
}
|
|
171
|
-
/** Fill one argv template. A placeholder whose value is not given is left as it is. */
|
|
172
|
-
export function opWaveArgv(template, values) {
|
|
173
|
-
const pairs = [
|
|
174
|
-
["{op}", values.op],
|
|
175
|
-
["{target}", values.target],
|
|
176
|
-
["{wave}", values.wave],
|
|
177
|
-
["{plans}", values.plans],
|
|
178
|
-
["{plan}", values.plan],
|
|
179
|
-
["{runs}", values.runs],
|
|
180
|
-
];
|
|
181
|
-
return template.map((part) => pairs.reduce((out, [key, value]) => (value === undefined ? out : out.replaceAll(key, value)), part));
|
|
182
|
-
}
|
|
183
162
|
/** Where a run's plan file goes. */
|
|
184
163
|
export function opWavePlanPath(spec, wave, target) {
|
|
185
164
|
return `.chant/op-waves/${spec.name}/wave-${wave}/${target.replace(/[^A-Za-z0-9._-]/g, "_")}.plan.json`;
|
|
@@ -350,19 +329,6 @@ function extraMembers(value, targets, where) {
|
|
|
350
329
|
}
|
|
351
330
|
return out.length > 0 ? out : undefined;
|
|
352
331
|
}
|
|
353
|
-
/** A plans file's `pending` (#3821): an object whose keys chant does not write itself, `description` aside. Undefined when absent or empty. */
|
|
354
|
-
function pendingFields(value, where) {
|
|
355
|
-
if (value === undefined)
|
|
356
|
-
return undefined;
|
|
357
|
-
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
358
|
-
throw new Error(`${where}: \`pending\` must be an object of fields for the pending fact`);
|
|
359
|
-
const reserved = Object.keys(value).filter((key) => OP_WAVE_PENDING_RESERVED.includes(key));
|
|
360
|
-
if (reserved.length > 0)
|
|
361
|
-
throw new Error(`${where}: \`pending\` sets ${reserved.join(", ")}, which chant writes itself`);
|
|
362
|
-
if ("description" in value && typeof value.description !== "string")
|
|
363
|
-
throw new Error(`${where}: pending.description must be a string`);
|
|
364
|
-
return Object.keys(value).length > 0 ? value : undefined;
|
|
365
|
-
}
|
|
366
332
|
/**
|
|
367
333
|
* A wave's set digest (#3821): {@link waveSetDigest} over its runs' plans,
|
|
368
334
|
* or under `digest.over: "changing"` over the runs whose plan is not empty,
|
|
@@ -372,87 +338,6 @@ function pendingFields(value, where) {
|
|
|
372
338
|
export function opWaveSetDigest(spec, members, extras = []) {
|
|
373
339
|
return waveSetDigest(waveDigestMembers(members, { ...(spec.digest?.over ? { over: spec.digest.over } : {}), extras }));
|
|
374
340
|
}
|
|
375
|
-
/** Read the hold file a hook wrote (#3821), or undefined when it wrote none or one that names no gate and digest. */
|
|
376
|
-
function readHoldRequest(path, log, label) {
|
|
377
|
-
if (!existsSync(path))
|
|
378
|
-
return undefined;
|
|
379
|
-
try {
|
|
380
|
-
const r = JSON.parse(readFileSync(path, "utf-8"));
|
|
381
|
-
if (typeof r.gate !== "string" || r.gate === "" || typeof r.digest !== "string" || r.digest === "")
|
|
382
|
-
throw new Error("it names no gate and digest");
|
|
383
|
-
if (r.op !== undefined && (typeof r.op !== "string" || r.op === ""))
|
|
384
|
-
throw new Error("its op is not a name");
|
|
385
|
-
return { gate: r.gate, digest: r.digest, ...(r.op ? { op: r.op } : {}), ...(typeof r.description === "string" ? { description: r.description } : {}), ...(r.pending ? { pending: pendingFields(r.pending, `the hold ${label} wrote`) ?? {} } : {}) };
|
|
386
|
-
}
|
|
387
|
-
catch (err) {
|
|
388
|
-
log(`${label} wrote a hold file that cannot be read (${err instanceof Error ? err.message : String(err)}), so it holds the wave on its set digest`);
|
|
389
|
-
return undefined;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* Run one moment's hooks, in order: each once for the wave, or once per run
|
|
394
|
-
* for a `perRun` hook. A hook that fails stops the rest, unless its
|
|
395
|
-
* `onFailure` is `approve`: then it holds the wave and the hooks after it run.
|
|
396
|
-
*/
|
|
397
|
-
function runHookList(at, moment, hooks, runs, runsPath, extraEnv = {}) {
|
|
398
|
-
const out = { holds: [], outcomes: [], otherGates: [] };
|
|
399
|
-
if (!hooks || hooks.length === 0)
|
|
400
|
-
return out;
|
|
401
|
-
const { name: specName, op, waveName, k, cwd, exec, log } = at;
|
|
402
|
-
// #3821: a hook that holds the wave on another gate names it in this file.
|
|
403
|
-
const holdPath = at.holdPath ?? `.chant/op-waves/${specName}/wave-${k}/hold.json`;
|
|
404
|
-
const env = { CHANT_OP_WAVES: specName, CHANT_WAVE: waveName, CHANT_WAVE_NUMBER: String(k), CHANT_HOOK: moment, CHANT_RUNS: runsPath, CHANT_HOLD: holdPath, ...extraEnv };
|
|
405
|
-
for (const hook of hooks) {
|
|
406
|
-
const name = hook.name ?? (hook.command.join(" ").length > 60 ? `${hook.command.join(" ").slice(0, 57)}...` : hook.command.join(" "));
|
|
407
|
-
// #4288: a hook with `targets` is for the runs they match. Once for the wave, it runs when one matches or no run is known yet.
|
|
408
|
-
const mine = opWaveHookRuns(hook, runs);
|
|
409
|
-
if (hook.targets && (hook.perRun ? mine.length === 0 : mine.length === 0 && runs.length > 0)) {
|
|
410
|
-
log(`${moment} hook ${name}: no run matches its targets (${hook.targets.join(", ")}), so it did not run`);
|
|
411
|
-
continue;
|
|
412
|
-
}
|
|
413
|
-
const calls = hook.perRun
|
|
414
|
-
? mine.map((run) => ({
|
|
415
|
-
target: run.target,
|
|
416
|
-
argv: opWaveArgv(hook.command, { op: run.op, wave: waveName, target: run.target, runs: runsPath, ...(run.plan ? { plan: run.plan } : {}) }),
|
|
417
|
-
env: { ...env, CHANT_TARGET: run.target, ...(run.plan ? { CHANT_PLAN: run.plan } : {}) },
|
|
418
|
-
}))
|
|
419
|
-
: [{ target: undefined, argv: opWaveArgv(hook.command, { op, wave: waveName, runs: runsPath }), env: env }];
|
|
420
|
-
for (const call of calls) {
|
|
421
|
-
const label = `${moment} hook ${name}${call.target ? ` (${call.target})` : ""}`;
|
|
422
|
-
let code;
|
|
423
|
-
rmSync(join(cwd, holdPath), { force: true });
|
|
424
|
-
try {
|
|
425
|
-
code = exec(call.argv, cwd, call.env);
|
|
426
|
-
}
|
|
427
|
-
catch (err) {
|
|
428
|
-
log(`${label} did not run: ${err instanceof Error ? err.message : String(err)}`);
|
|
429
|
-
code = 127;
|
|
430
|
-
}
|
|
431
|
-
const base = { moment, name, ...(call.target ? { target: call.target } : {}), exit: code };
|
|
432
|
-
if (code === 0) {
|
|
433
|
-
out.outcomes.push({ ...base, outcome: "passed" });
|
|
434
|
-
continue;
|
|
435
|
-
}
|
|
436
|
-
if (hook.onFailure === "approve") {
|
|
437
|
-
out.outcomes.push({ ...base, outcome: "held" });
|
|
438
|
-
const request = readHoldRequest(join(cwd, holdPath), log, label);
|
|
439
|
-
if (request) {
|
|
440
|
-
out.otherGates.push({ label, name, moment, ...(call.target ? { target: call.target } : {}), argv: call.argv, env: call.env, request });
|
|
441
|
-
log(`${label} exited ${code} and holds wave ${k} (${waveName}) on gate ${request.op ?? specName} / ${request.gate}, digest ${request.digest}`);
|
|
442
|
-
continue;
|
|
443
|
-
}
|
|
444
|
-
out.holds.push(label);
|
|
445
|
-
log(`${label} exited ${code}, so wave ${k} (${waveName}) waits for an approval of its set digest`);
|
|
446
|
-
continue;
|
|
447
|
-
}
|
|
448
|
-
out.outcomes.push({ ...base, outcome: "failed" });
|
|
449
|
-
out.failed = `${label} exited ${code}`;
|
|
450
|
-
log(out.failed);
|
|
451
|
-
return out;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
return out;
|
|
455
|
-
}
|
|
456
341
|
const placeOf = (ctx) => ({ name: ctx.spec.name, op: ctx.spec.op, waveName: ctx.wave.name, k: ctx.k, cwd: ctx.cwd, exec: ctx.exec, log: ctx.log });
|
|
457
342
|
const hookRuns = (spec, k, runs, members) => runs.map((run) => ({ target: run.target, op: run.op ?? spec.op, ...(members?.has(run.target) ? { plan: opWavePlanPath(spec, k, run.target) } : {}) }));
|
|
458
343
|
/**
|
|
@@ -529,20 +414,6 @@ async function runHooks(ctx, moment, hooks, runs, members, digest, extraEnv = {}
|
|
|
529
414
|
}
|
|
530
415
|
return back;
|
|
531
416
|
}
|
|
532
|
-
/**
|
|
533
|
-
* Run one moment's hooks outside an Op waves job (#4288): the pull-request
|
|
534
|
-
* jobs, or a product's own stage, with the same `targets`, `perRun`,
|
|
535
|
-
* `onFailure` and argv filling a wave job uses. A hook that holds on another
|
|
536
|
-
* gate (`CHANT_HOLD`) is counted as a plain hold; settling that gate is the
|
|
537
|
-
* caller's.
|
|
538
|
-
*/
|
|
539
|
-
export function runStageHooks(moment, hooks, options) {
|
|
540
|
-
const cwd = options.cwd ?? process.cwd();
|
|
541
|
-
const log = options.log ?? ((line) => console.error(line));
|
|
542
|
-
const place = { name: options.name, op: options.op, waveName: options.wave, k: options.k ?? 0, cwd, exec: options.exec ?? spawnExec, log, holdPath: options.holdFile };
|
|
543
|
-
const out = runHookList(place, moment, hooks, options.runs, options.runsFile, options.env);
|
|
544
|
-
return { outcomes: out.outcomes, ...(out.failed ? { failed: out.failed } : {}), holds: [...out.holds, ...out.otherGates.map((g) => `${g.label} (on ${g.request.op ?? options.name} / ${g.request.gate})`)] };
|
|
545
|
-
}
|
|
546
417
|
/**
|
|
547
418
|
* The hooks that run before a job plans (#4288): `before-observe`, then
|
|
548
419
|
* `before-plan`. A failure or a hold on another gate in the first ends it
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stage-hook runner (#4288): one moment's hooks, with the `targets`,
|
|
3
|
+
* `perRun`, `onFailure` and argv filling a wave job uses. Its own module so
|
|
4
|
+
* a product that runs hooks around its own stages (terragucci) bundles it
|
|
5
|
+
* without the wave loop, the gate or the ledger. `op-waves-run.ts` runs
|
|
6
|
+
* the same hooks inside a wave job.
|
|
7
|
+
*/
|
|
8
|
+
import { type OpWaveHook, type OpWaveHookMoment } from "./op-waves.js";
|
|
9
|
+
/** What one moment's hooks came to, before any hold on another gate is settled. */
|
|
10
|
+
export interface HookListOutcome {
|
|
11
|
+
/** Set when a hook with `onFailure: fail` failed; the hooks after it did not run. */
|
|
12
|
+
failed?: string;
|
|
13
|
+
/** The `onFailure: approve` hooks that failed. */
|
|
14
|
+
holds: string[];
|
|
15
|
+
outcomes: OpWaveHookOutcome[];
|
|
16
|
+
/** The hook calls that held the wave on another gate. */
|
|
17
|
+
otherGates: OtherGateHold[];
|
|
18
|
+
}
|
|
19
|
+
/** Pending-fact keys chant writes itself, which a plans file's `pending` may not set (#3821). */
|
|
20
|
+
export declare const OP_WAVE_PENDING_RESERVED: readonly ["version", "kind", "op", "gate", "timestamp", "expiresAt", "planDigest", "runId", "url", "resume", "environment", "origin", "neverOverMcp", "approval", "approvalMode", "answer", "wave", "heldBy"];
|
|
21
|
+
/** What a hook asks for when it holds a wave on another gate (#3821): it writes this to `CHANT_HOLD` and exits non-zero. */
|
|
22
|
+
export interface OpWaveHoldRequest {
|
|
23
|
+
/** The op the gate is recorded under. Default: the spec's name. */
|
|
24
|
+
op?: string;
|
|
25
|
+
gate: string;
|
|
26
|
+
/** The digest an approval binds. */
|
|
27
|
+
digest: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
/** Fields for the pending fact, as a plans file's `pending`. */
|
|
30
|
+
pending?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
/** One hook's run (#3762). */
|
|
33
|
+
export interface OpWaveHookOutcome {
|
|
34
|
+
moment: OpWaveHookMoment;
|
|
35
|
+
name: string;
|
|
36
|
+
/** The run, for a `perRun` hook. */
|
|
37
|
+
target?: string;
|
|
38
|
+
exit: number;
|
|
39
|
+
outcome: "passed" | "failed" | "held" | "skipped";
|
|
40
|
+
/** Why the moment was skipped, for `skipped` (#3811). */
|
|
41
|
+
reason?: string;
|
|
42
|
+
}
|
|
43
|
+
/** One run as a hook sees it (#3804). */
|
|
44
|
+
export interface OpWaveHookRun {
|
|
45
|
+
target: string;
|
|
46
|
+
op: string;
|
|
47
|
+
/** The run's plan file, once planned. */
|
|
48
|
+
plan?: string;
|
|
49
|
+
}
|
|
50
|
+
/** Runs one argv; returns its exit code. `env` is added to the job's environment. Injected so tests run no processes. */
|
|
51
|
+
export type OpWaveExec = (argv: string[], cwd: string, env?: Record<string, string>) => number;
|
|
52
|
+
export declare const spawnExec: OpWaveExec;
|
|
53
|
+
/** {@link OpWaveExec} for {@link runStageHooksAsync} (#4334): the exit code comes back as a promise, so the event loop runs while a hook does. */
|
|
54
|
+
export type OpWaveAsyncExec = (argv: string[], cwd: string, env?: Record<string, string>) => Promise<number>;
|
|
55
|
+
/** {@link spawnExec} on `spawn`: it rejects when the command cannot start. */
|
|
56
|
+
export declare const spawnExecAsync: OpWaveAsyncExec;
|
|
57
|
+
/** Fill one argv template. A placeholder whose value is not given is left as it is. */
|
|
58
|
+
export declare function opWaveArgv(template: readonly string[], values: {
|
|
59
|
+
op: string;
|
|
60
|
+
wave: string;
|
|
61
|
+
target?: string;
|
|
62
|
+
plan?: string;
|
|
63
|
+
runs?: string;
|
|
64
|
+
plans?: string;
|
|
65
|
+
}): string[];
|
|
66
|
+
/** A plans file's `pending` (#3821): an object whose keys chant does not write itself, `description` aside. Undefined when absent or empty. */
|
|
67
|
+
export declare function pendingFields(value: unknown, where: string): Record<string, unknown> | undefined;
|
|
68
|
+
/** A hook call that held the wave on another gate (#3821), kept so it can run again once that gate is approved. */
|
|
69
|
+
export interface OtherGateHold {
|
|
70
|
+
label: string;
|
|
71
|
+
name: string;
|
|
72
|
+
moment: OpWaveHookMoment;
|
|
73
|
+
target?: string;
|
|
74
|
+
argv: string[];
|
|
75
|
+
env: Record<string, string>;
|
|
76
|
+
request: OpWaveHoldRequest;
|
|
77
|
+
}
|
|
78
|
+
/** Read the hold file a hook wrote (#3821), or undefined when it wrote none or one that names no gate and digest. */
|
|
79
|
+
export declare function readHoldRequest(path: string, log: (line: string) => void, label: string): OpWaveHoldRequest | undefined;
|
|
80
|
+
/** Where hooks run: the wave they belong to and the job's tools. */
|
|
81
|
+
export interface HookPlace {
|
|
82
|
+
/** The spec's name and `op`. */
|
|
83
|
+
name: string;
|
|
84
|
+
op: string;
|
|
85
|
+
waveName: string;
|
|
86
|
+
k: number;
|
|
87
|
+
cwd: string;
|
|
88
|
+
exec: OpWaveExec;
|
|
89
|
+
log: (line: string) => void;
|
|
90
|
+
/** Where a hook writes a hold on another gate (`CHANT_HOLD`). Default: under the wave's directory. */
|
|
91
|
+
holdPath?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Run one moment's hooks, in order: each once for the wave, or once per run
|
|
95
|
+
* for a `perRun` hook. A hook that fails stops the rest, unless its
|
|
96
|
+
* `onFailure` is `approve`: then it holds the wave and the hooks after it run.
|
|
97
|
+
*/
|
|
98
|
+
export declare function runHookList(at: HookPlace, moment: OpWaveHookMoment, hooks: readonly OpWaveHook[] | undefined, runs: readonly OpWaveHookRun[], runsPath: string, extraEnv?: Record<string, string>): HookListOutcome;
|
|
99
|
+
/** {@link runHookList} with an exec that returns a promise (#4334). */
|
|
100
|
+
export declare function runHookListAsync(at: Omit<HookPlace, "exec"> & {
|
|
101
|
+
exec: OpWaveAsyncExec;
|
|
102
|
+
}, moment: OpWaveHookMoment, hooks: readonly OpWaveHook[] | undefined, runs: readonly OpWaveHookRun[], runsPath: string, extraEnv?: Record<string, string>): Promise<HookListOutcome>;
|
|
103
|
+
/** The options of {@link runStageHooks} (#4288). */
|
|
104
|
+
export interface RunStageHooksOptions {
|
|
105
|
+
/** What the hooks belong to: `CHANT_OP_WAVES`, and the `{op}` of a hook that runs once. */
|
|
106
|
+
name: string;
|
|
107
|
+
op: string;
|
|
108
|
+
/** `{wave}` and `CHANT_WAVE`. */
|
|
109
|
+
wave: string;
|
|
110
|
+
/** `CHANT_WAVE_NUMBER`. Default 0. */
|
|
111
|
+
k?: number;
|
|
112
|
+
/** The runs a `perRun` hook runs for and `targets` match against. */
|
|
113
|
+
runs: readonly OpWaveHookRun[];
|
|
114
|
+
/** `{runs}` and `CHANT_RUNS`, relative to `cwd`; the caller writes it. */
|
|
115
|
+
runsFile: string;
|
|
116
|
+
/** `CHANT_HOLD`, relative to `cwd`. */
|
|
117
|
+
holdFile: string;
|
|
118
|
+
/** Added to every hook's environment. */
|
|
119
|
+
env?: Record<string, string>;
|
|
120
|
+
cwd?: string;
|
|
121
|
+
exec?: OpWaveExec;
|
|
122
|
+
log?: (line: string) => void;
|
|
123
|
+
}
|
|
124
|
+
/** What {@link runStageHooks} gave. */
|
|
125
|
+
export interface StageHooksRun {
|
|
126
|
+
outcomes: OpWaveHookOutcome[];
|
|
127
|
+
/** Set when a hook with `onFailure: fail` failed; the hooks after it did not run. */
|
|
128
|
+
failed?: string;
|
|
129
|
+
/** The `onFailure: approve` hooks that failed. A hold on another gate counts as one here. */
|
|
130
|
+
holds: string[];
|
|
131
|
+
}
|
|
132
|
+
/** {@link RunStageHooksOptions} for {@link runStageHooksAsync} (#4334). */
|
|
133
|
+
export interface RunStageHooksAsyncOptions extends Omit<RunStageHooksOptions, "exec"> {
|
|
134
|
+
/** Default: {@link spawnExecAsync}. */
|
|
135
|
+
exec?: OpWaveAsyncExec;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Run one moment's hooks outside an Op waves job (#4288): the pull-request
|
|
139
|
+
* jobs, or a product's own stage, with the same `targets`, `perRun`,
|
|
140
|
+
* `onFailure` and argv filling a wave job uses. A hook that holds on another
|
|
141
|
+
* gate (`CHANT_HOLD`) is counted as a plain hold; settling that gate is the
|
|
142
|
+
* caller's.
|
|
143
|
+
*/
|
|
144
|
+
export declare function runStageHooks(moment: OpWaveHookMoment, hooks: readonly OpWaveHook[] | undefined, options: RunStageHooksOptions): StageHooksRun;
|
|
145
|
+
/**
|
|
146
|
+
* {@link runStageHooks} with an exec that returns a promise (#4334), so a
|
|
147
|
+
* product can run several stages' hooks side by side. The hooks of one call
|
|
148
|
+
* still run one after another. Give each concurrent call its own `holdFile`
|
|
149
|
+
* and `runsFile`.
|
|
150
|
+
*/
|
|
151
|
+
export declare function runStageHooksAsync(moment: OpWaveHookMoment, hooks: readonly OpWaveHook[] | undefined, options: RunStageHooksAsyncOptions): Promise<StageHooksRun>;
|
|
152
|
+
//# sourceMappingURL=stage-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage-hooks.d.ts","sourceRoot":"","sources":["../../src/op/stage-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEpF,mFAAmF;AACnF,MAAM,WAAW,eAAe;IAC9B,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,yDAAyD;IACzD,UAAU,EAAE,aAAa,EAAE,CAAC;CAC7B;AAED,iGAAiG;AACjG,eAAO,MAAM,wBAAwB,YACnC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAA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C,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED,uCAAuC;AACvC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,2EAA2E;AAC3E,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACnF,uCAAuC;IACvC,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAYD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAG9I;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC,CAGvK"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stage-hook runner (#4288): one moment's hooks, with the `targets`,
|
|
3
|
+
* `perRun`, `onFailure` and argv filling a wave job uses. Its own module so
|
|
4
|
+
* a product that runs hooks around its own stages (terragucci) bundles it
|
|
5
|
+
* without the wave loop, the gate or the ledger. `op-waves-run.ts` runs
|
|
6
|
+
* the same hooks inside a wave job.
|
|
7
|
+
*/
|
|
8
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
9
|
+
import { existsSync, readFileSync, rmSync } from "node:fs";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
import { opWaveHookRuns } from "./op-waves.js";
|
|
12
|
+
/** Pending-fact keys chant writes itself, which a plans file's `pending` may not set (#3821). */
|
|
13
|
+
export const OP_WAVE_PENDING_RESERVED = [
|
|
14
|
+
"version", "kind", "op", "gate", "timestamp", "expiresAt", "planDigest", "runId", "url", "resume",
|
|
15
|
+
"environment", "origin", "neverOverMcp", "approval", "approvalMode", "answer", "wave", "heldBy",
|
|
16
|
+
];
|
|
17
|
+
export const spawnExec = (argv, cwd, env) => {
|
|
18
|
+
const result = spawnSync(argv[0], argv.slice(1), { cwd, stdio: "inherit", ...(env ? { env: { ...process.env, ...env } } : {}) });
|
|
19
|
+
if (result.error)
|
|
20
|
+
throw result.error;
|
|
21
|
+
return result.status ?? 1;
|
|
22
|
+
};
|
|
23
|
+
/** {@link spawnExec} on `spawn`: it rejects when the command cannot start. */
|
|
24
|
+
export const spawnExecAsync = (argv, cwd, env) => new Promise((resolve, reject) => {
|
|
25
|
+
const child = spawn(argv[0], argv.slice(1), { cwd, stdio: "inherit", ...(env ? { env: { ...process.env, ...env } } : {}) });
|
|
26
|
+
child.once("error", reject);
|
|
27
|
+
child.once("close", (code) => resolve(code ?? 1));
|
|
28
|
+
});
|
|
29
|
+
/** Fill one argv template. A placeholder whose value is not given is left as it is. */
|
|
30
|
+
export function opWaveArgv(template, values) {
|
|
31
|
+
const pairs = [
|
|
32
|
+
["{op}", values.op],
|
|
33
|
+
["{target}", values.target],
|
|
34
|
+
["{wave}", values.wave],
|
|
35
|
+
["{plans}", values.plans],
|
|
36
|
+
["{plan}", values.plan],
|
|
37
|
+
["{runs}", values.runs],
|
|
38
|
+
];
|
|
39
|
+
return template.map((part) => pairs.reduce((out, [key, value]) => (value === undefined ? out : out.replaceAll(key, value)), part));
|
|
40
|
+
}
|
|
41
|
+
/** A plans file's `pending` (#3821): an object whose keys chant does not write itself, `description` aside. Undefined when absent or empty. */
|
|
42
|
+
export function pendingFields(value, where) {
|
|
43
|
+
if (value === undefined)
|
|
44
|
+
return undefined;
|
|
45
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
46
|
+
throw new Error(`${where}: \`pending\` must be an object of fields for the pending fact`);
|
|
47
|
+
const reserved = Object.keys(value).filter((key) => OP_WAVE_PENDING_RESERVED.includes(key));
|
|
48
|
+
if (reserved.length > 0)
|
|
49
|
+
throw new Error(`${where}: \`pending\` sets ${reserved.join(", ")}, which chant writes itself`);
|
|
50
|
+
if ("description" in value && typeof value.description !== "string")
|
|
51
|
+
throw new Error(`${where}: pending.description must be a string`);
|
|
52
|
+
return Object.keys(value).length > 0 ? value : undefined;
|
|
53
|
+
}
|
|
54
|
+
/** Read the hold file a hook wrote (#3821), or undefined when it wrote none or one that names no gate and digest. */
|
|
55
|
+
export function readHoldRequest(path, log, label) {
|
|
56
|
+
if (!existsSync(path))
|
|
57
|
+
return undefined;
|
|
58
|
+
try {
|
|
59
|
+
const r = JSON.parse(readFileSync(path, "utf-8"));
|
|
60
|
+
if (typeof r.gate !== "string" || r.gate === "" || typeof r.digest !== "string" || r.digest === "")
|
|
61
|
+
throw new Error("it names no gate and digest");
|
|
62
|
+
if (r.op !== undefined && (typeof r.op !== "string" || r.op === ""))
|
|
63
|
+
throw new Error("its op is not a name");
|
|
64
|
+
return { gate: r.gate, digest: r.digest, ...(r.op ? { op: r.op } : {}), ...(typeof r.description === "string" ? { description: r.description } : {}), ...(r.pending ? { pending: pendingFields(r.pending, `the hold ${label} wrote`) ?? {} } : {}) };
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
log(`${label} wrote a hold file that cannot be read (${err instanceof Error ? err.message : String(err)}), so it holds the wave on its set digest`);
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The hook list as steps (#4334): it yields each call and takes its exit
|
|
73
|
+
* code back, so the sync and async runners share the targets, hold, outcome
|
|
74
|
+
* and other-gate handling and differ only in how they wait for a call.
|
|
75
|
+
*/
|
|
76
|
+
function* hookListSteps(at, moment, hooks, runs, runsPath, extraEnv) {
|
|
77
|
+
const out = { holds: [], outcomes: [], otherGates: [] };
|
|
78
|
+
if (!hooks || hooks.length === 0)
|
|
79
|
+
return out;
|
|
80
|
+
const { name: specName, op, waveName, k, cwd, log } = at;
|
|
81
|
+
// #3821: a hook that holds the wave on another gate names it in this file.
|
|
82
|
+
const holdPath = at.holdPath ?? `.chant/op-waves/${specName}/wave-${k}/hold.json`;
|
|
83
|
+
const env = { CHANT_OP_WAVES: specName, CHANT_WAVE: waveName, CHANT_WAVE_NUMBER: String(k), CHANT_HOOK: moment, CHANT_RUNS: runsPath, CHANT_HOLD: holdPath, ...extraEnv };
|
|
84
|
+
for (const hook of hooks) {
|
|
85
|
+
const name = hook.name ?? (hook.command.join(" ").length > 60 ? `${hook.command.join(" ").slice(0, 57)}...` : hook.command.join(" "));
|
|
86
|
+
// #4288: a hook with `targets` is for the runs they match. Once for the wave, it runs when one matches or no run is known yet.
|
|
87
|
+
const mine = opWaveHookRuns(hook, runs);
|
|
88
|
+
if (hook.targets && (hook.perRun ? mine.length === 0 : mine.length === 0 && runs.length > 0)) {
|
|
89
|
+
log(`${moment} hook ${name}: no run matches its targets (${hook.targets.join(", ")}), so it did not run`);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
const calls = hook.perRun
|
|
93
|
+
? mine.map((run) => ({
|
|
94
|
+
target: run.target,
|
|
95
|
+
argv: opWaveArgv(hook.command, { op: run.op, wave: waveName, target: run.target, runs: runsPath, ...(run.plan ? { plan: run.plan } : {}) }),
|
|
96
|
+
env: { ...env, CHANT_TARGET: run.target, ...(run.plan ? { CHANT_PLAN: run.plan } : {}) },
|
|
97
|
+
}))
|
|
98
|
+
: [{ target: undefined, argv: opWaveArgv(hook.command, { op, wave: waveName, runs: runsPath }), env: env }];
|
|
99
|
+
for (const call of calls) {
|
|
100
|
+
const label = `${moment} hook ${name}${call.target ? ` (${call.target})` : ""}`;
|
|
101
|
+
rmSync(join(cwd, holdPath), { force: true });
|
|
102
|
+
const code = yield { label, argv: call.argv, cwd, env: call.env };
|
|
103
|
+
const base = { moment, name, ...(call.target ? { target: call.target } : {}), exit: code };
|
|
104
|
+
if (code === 0) {
|
|
105
|
+
out.outcomes.push({ ...base, outcome: "passed" });
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
if (hook.onFailure === "approve") {
|
|
109
|
+
out.outcomes.push({ ...base, outcome: "held" });
|
|
110
|
+
const request = readHoldRequest(join(cwd, holdPath), log, label);
|
|
111
|
+
if (request) {
|
|
112
|
+
out.otherGates.push({ label, name, moment, ...(call.target ? { target: call.target } : {}), argv: call.argv, env: call.env, request });
|
|
113
|
+
log(`${label} exited ${code} and holds wave ${k} (${waveName}) on gate ${request.op ?? specName} / ${request.gate}, digest ${request.digest}`);
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
out.holds.push(label);
|
|
117
|
+
log(`${label} exited ${code}, so wave ${k} (${waveName}) waits for an approval of its set digest`);
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
out.outcomes.push({ ...base, outcome: "failed" });
|
|
121
|
+
out.failed = `${label} exited ${code}`;
|
|
122
|
+
log(out.failed);
|
|
123
|
+
return out;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return out;
|
|
127
|
+
}
|
|
128
|
+
/** The exit code a call that did not start counts as, after its error is logged. */
|
|
129
|
+
function didNotRun(call, err, log) {
|
|
130
|
+
log(`${call.label} did not run: ${err instanceof Error ? err.message : String(err)}`);
|
|
131
|
+
return 127;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Run one moment's hooks, in order: each once for the wave, or once per run
|
|
135
|
+
* for a `perRun` hook. A hook that fails stops the rest, unless its
|
|
136
|
+
* `onFailure` is `approve`: then it holds the wave and the hooks after it run.
|
|
137
|
+
*/
|
|
138
|
+
export function runHookList(at, moment, hooks, runs, runsPath, extraEnv = {}) {
|
|
139
|
+
const steps = hookListSteps(at, moment, hooks, runs, runsPath, extraEnv);
|
|
140
|
+
let step = steps.next();
|
|
141
|
+
while (!step.done) {
|
|
142
|
+
const call = step.value;
|
|
143
|
+
let code;
|
|
144
|
+
try {
|
|
145
|
+
code = at.exec(call.argv, call.cwd, call.env);
|
|
146
|
+
}
|
|
147
|
+
catch (err) {
|
|
148
|
+
code = didNotRun(call, err, at.log);
|
|
149
|
+
}
|
|
150
|
+
step = steps.next(code);
|
|
151
|
+
}
|
|
152
|
+
return step.value;
|
|
153
|
+
}
|
|
154
|
+
/** {@link runHookList} with an exec that returns a promise (#4334). */
|
|
155
|
+
export async function runHookListAsync(at, moment, hooks, runs, runsPath, extraEnv = {}) {
|
|
156
|
+
const steps = hookListSteps(at, moment, hooks, runs, runsPath, extraEnv);
|
|
157
|
+
let step = steps.next();
|
|
158
|
+
while (!step.done) {
|
|
159
|
+
const call = step.value;
|
|
160
|
+
let code;
|
|
161
|
+
try {
|
|
162
|
+
code = await at.exec(call.argv, call.cwd, call.env);
|
|
163
|
+
}
|
|
164
|
+
catch (err) {
|
|
165
|
+
code = didNotRun(call, err, at.log);
|
|
166
|
+
}
|
|
167
|
+
step = steps.next(code);
|
|
168
|
+
}
|
|
169
|
+
return step.value;
|
|
170
|
+
}
|
|
171
|
+
/** Where a stage runner's hooks run, without the exec. */
|
|
172
|
+
function stagePlace(options) {
|
|
173
|
+
return { name: options.name, op: options.op, waveName: options.wave, k: options.k ?? 0, cwd: options.cwd ?? process.cwd(), log: options.log ?? ((line) => console.error(line)), holdPath: options.holdFile };
|
|
174
|
+
}
|
|
175
|
+
/** A stage run's result: a hold on another gate counts as a plain hold. */
|
|
176
|
+
function stageRun(out, name) {
|
|
177
|
+
return { outcomes: out.outcomes, ...(out.failed ? { failed: out.failed } : {}), holds: [...out.holds, ...out.otherGates.map((g) => `${g.label} (on ${g.request.op ?? name} / ${g.request.gate})`)] };
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Run one moment's hooks outside an Op waves job (#4288): the pull-request
|
|
181
|
+
* jobs, or a product's own stage, with the same `targets`, `perRun`,
|
|
182
|
+
* `onFailure` and argv filling a wave job uses. A hook that holds on another
|
|
183
|
+
* gate (`CHANT_HOLD`) is counted as a plain hold; settling that gate is the
|
|
184
|
+
* caller's.
|
|
185
|
+
*/
|
|
186
|
+
export function runStageHooks(moment, hooks, options) {
|
|
187
|
+
const place = { ...stagePlace(options), exec: options.exec ?? spawnExec };
|
|
188
|
+
return stageRun(runHookList(place, moment, hooks, options.runs, options.runsFile, options.env), options.name);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* {@link runStageHooks} with an exec that returns a promise (#4334), so a
|
|
192
|
+
* product can run several stages' hooks side by side. The hooks of one call
|
|
193
|
+
* still run one after another. Give each concurrent call its own `holdFile`
|
|
194
|
+
* and `runsFile`.
|
|
195
|
+
*/
|
|
196
|
+
export async function runStageHooksAsync(moment, hooks, options) {
|
|
197
|
+
const place = { ...stagePlace(options), exec: options.exec ?? spawnExecAsync };
|
|
198
|
+
return stageRun(await runHookListAsync(place, moment, hooks, options.runs, options.runsFile, options.env), options.name);
|
|
199
|
+
}
|
package/dist/pr-forge.d.ts
CHANGED
|
@@ -361,6 +361,62 @@ export interface PrForge {
|
|
|
361
361
|
* pipelines. Throws a {@link ForgeApiError} when the forge will not say.
|
|
362
362
|
*/
|
|
363
363
|
scheduledRuns?(query: ScheduledRunsQuery): Promise<ScheduledRuns>;
|
|
364
|
+
/**
|
|
365
|
+
* The four checks an apply before merge requires (#4301, ws-106), each
|
|
366
|
+
* about pull request `pr` at `head`, the commit the job checked out. Each
|
|
367
|
+
* fails when the forge's head for `pr` is another commit. `approved`:
|
|
368
|
+
* someone other than the pull request's authors ({@link authors}) approved
|
|
369
|
+
* `head`, and no standing review asks for changes. On GitLab an approval
|
|
370
|
+
* counts when it came after the merge request's latest push, read from its
|
|
371
|
+
* system notes, and never from the token's own user. `approvers` narrows
|
|
372
|
+
* who counts (#4337), and a refusal names each approver left out and why.
|
|
373
|
+
*/
|
|
374
|
+
prApproved?(pr: number, head: string, approvers?: PrApproverFilter): Promise<PrRequireResult>;
|
|
375
|
+
/**
|
|
376
|
+
* The forge says `pr` merges as it stands: no conflicts, and on GitHub no
|
|
377
|
+
* branch protection blocking it. Pending while the forge works it out. On
|
|
378
|
+
* Forgejo, which answers `mergeable: false` while it still checks, a false
|
|
379
|
+
* is pending too, so it counts as conflicts only once the reads run out.
|
|
380
|
+
*/
|
|
381
|
+
prMergeable?(pr: number, head: string): Promise<PrRequireResult>;
|
|
382
|
+
/** `head` contains the tip of the branch `pr` merges into. */
|
|
383
|
+
prUndiverged?(pr: number, head: string): Promise<PrRequireResult>;
|
|
384
|
+
/**
|
|
385
|
+
* Every status and check reported on `head` passed, and at least one did.
|
|
386
|
+
* Statuses named in `ignore` are left out, such as the apply's own.
|
|
387
|
+
* Pending while one still runs or none has reported.
|
|
388
|
+
*/
|
|
389
|
+
prChecksPassed?(pr: number, head: string, ignore?: readonly string[]): Promise<PrRequireResult>;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Who counts as an approver for {@link PrForge.prApproved} (#4337). With
|
|
393
|
+
* none set, any reviewer other than the pull request's authors counts.
|
|
394
|
+
*/
|
|
395
|
+
export interface PrApproverFilter {
|
|
396
|
+
/**
|
|
397
|
+
* The forge's own rule for who may approve. GitHub: write access (admin,
|
|
398
|
+
* maintain or write), read per approver. Forgejo: the review is official,
|
|
399
|
+
* which Forgejo marks for someone with write access. GitLab: an access
|
|
400
|
+
* level of at least `minAccessLevel`, read per approver.
|
|
401
|
+
*/
|
|
402
|
+
forgeRule?: boolean;
|
|
403
|
+
/** GitLab under `forgeRule`: the least access level that counts. Default 30, Developer. */
|
|
404
|
+
minAccessLevel?: number;
|
|
405
|
+
/** Logins whose approval never counts, compared case-insensitively, each with the reason a refusal gives if one is set. */
|
|
406
|
+
exclude?: readonly (string | PrExcludedApprover)[];
|
|
407
|
+
}
|
|
408
|
+
/** A login left out of the approvers, and the reason a refusal gives. */
|
|
409
|
+
export interface PrExcludedApprover {
|
|
410
|
+
login: string;
|
|
411
|
+
reason: string;
|
|
412
|
+
}
|
|
413
|
+
/** What one of the requires checks (#4301) found. */
|
|
414
|
+
export interface PrRequireResult {
|
|
415
|
+
passed: boolean;
|
|
416
|
+
/** Not settled yet: the forge is still working it out, or a check still runs. Asking again may pass. */
|
|
417
|
+
pending?: boolean;
|
|
418
|
+
/** One line for a person. */
|
|
419
|
+
reason: string;
|
|
364
420
|
}
|
|
365
421
|
/** Which scheduled Op job {@link PrForge.scheduledRuns} asks about. */
|
|
366
422
|
export interface ScheduledRunsQuery {
|
package/dist/pr-forge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-forge.d.ts","sourceRoot":"","sources":["../src/pr-forge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExD,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAAoC,CAAC;AAEjF,wDAAwD;AACxD,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KACrE,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC,CAAC;AAEvE,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,KAAK,EAAE,gBAAgB,CAAC;I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