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