@intentius/chant 0.124.71 → 0.124.73
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/ci-commit.d.ts +41 -1
- package/dist/ci-commit.d.ts.map +1 -1
- package/dist/ci-commit.js +54 -8
- package/dist/ci-estate/delivery.d.ts +75 -2
- package/dist/ci-estate/delivery.d.ts.map +1 -1
- package/dist/ci-estate/delivery.js +129 -0
- package/dist/ci-estate.d.ts +3 -1
- package/dist/ci-estate.d.ts.map +1 -1
- package/dist/ci-estate.js +3 -1
- package/dist/ci-product.d.ts +1 -1
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +1 -1
- package/dist/cli/handlers/commit.d.ts.map +1 -1
- package/dist/cli/handlers/commit.js +5 -2
- package/dist/cli/handlers/notify-relay.d.ts.map +1 -1
- package/dist/cli/handlers/notify-relay.js +22 -2
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -0
- package/dist/lexicon.d.ts +17 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/publish-forge.d.ts.map +1 -1
- package/dist/lifecycle/publish-forge.js +1 -2
- package/dist/lifecycle/release-images.d.ts.map +1 -1
- package/dist/lifecycle/release-images.js +1 -2
- package/dist/notify-relay.d.ts +41 -1
- package/dist/notify-relay.d.ts.map +1 -1
- package/dist/notify-relay.js +39 -0
- package/dist/notify.d.ts +16 -3
- package/dist/notify.d.ts.map +1 -1
- package/dist/notify.js +16 -10
- package/dist/op/activities/activity-contracts.d.ts +4 -4
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/wave-runtime.mjs +237 -237
- package/dist/workspace/release-workflow.d.ts +24 -0
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +61 -8
- package/package.json +1 -1
- package/src/ci-commit.test.ts +22 -1
- package/src/ci-commit.ts +79 -8
- package/src/ci-estate/__fixtures__/terragucci-dora.json +1305 -0
- package/src/ci-estate/delivery.ts +186 -2
- package/src/ci-estate/records-delivery.test.ts +55 -0
- package/src/ci-estate.ts +9 -0
- package/src/ci-product.ts +1 -0
- package/src/cli/handlers/commit.ts +4 -1
- package/src/cli/handlers/notify-relay.ts +21 -2
- package/src/config.ts +7 -0
- package/src/lexicon.ts +16 -0
- package/src/lifecycle/publish-forge.ts +1 -2
- package/src/lifecycle/release-images.ts +1 -2
- package/src/notify-relay.test.ts +55 -1
- package/src/notify-relay.ts +48 -1
- package/src/notify.ts +25 -12
- package/src/release-floors.ts +1 -1
- package/src/workspace/release-workflow.test.ts +49 -1
- package/src/workspace/release-workflow.ts +91 -7
package/dist/ci-commit.d.ts
CHANGED
|
@@ -31,6 +31,10 @@ import type { RunOrigin } from "./lifecycle/release-ledger.js";
|
|
|
31
31
|
import type { PrForge } from "./pr-forge.js";
|
|
32
32
|
/** The first chant with the commit job and the scheduled Op spec's `commit` (#4722). Products feature-detect on it. */
|
|
33
33
|
export declare const CI_COMMIT_FLOOR = "0.124.71";
|
|
34
|
+
/** The first chant with a commit job after a check that runs on push, `jobToken` and `after` (#4749). Products feature-detect on it. */
|
|
35
|
+
export declare const CI_COMMIT_PUSH_FLOOR = "0.124.72";
|
|
36
|
+
/** The first chant whose commit job takes `allowedFiles` (#4758). */
|
|
37
|
+
export declare const CI_COMMIT_FILES_FLOOR = "0.124.73";
|
|
34
38
|
/** What starts a commit run: a person's comment, or a check job's finding. */
|
|
35
39
|
export type CommitTrigger = "comment" | "check";
|
|
36
40
|
export declare const COMMIT_TRIGGERS: readonly CommitTrigger[];
|
|
@@ -49,6 +53,13 @@ export interface OpCommitSpec {
|
|
|
49
53
|
command: string[];
|
|
50
54
|
/** The only paths the change may touch, from the repository root; a trailing `/` names a directory. */
|
|
51
55
|
allowed: string[];
|
|
56
|
+
/**
|
|
57
|
+
* File names the change may touch in any directory (#4758), matched on the
|
|
58
|
+
* basename: `*.tf` or an exact name such as `terragrunt.hcl`. A path passes
|
|
59
|
+
* when it is in `allowed` or matches one of these; a guarded path is still
|
|
60
|
+
* refused. With these, `allowed` may be empty.
|
|
61
|
+
*/
|
|
62
|
+
allowedFiles?: string[];
|
|
52
63
|
/** For `on: "check"`: the exit codes of the Op's run that name a finding. Default `[2]`, chant's `drift` code. */
|
|
53
64
|
findings?: number[];
|
|
54
65
|
/** The secret (GitHub, Forgejo) or protected variable (GitLab) holding the push token. Required on GitHub and Forgejo; `CHANT_FORGE_TOKEN` by default on GitLab. */
|
|
@@ -70,6 +81,19 @@ export interface OpCommitSpec {
|
|
|
70
81
|
* its parents are the head and the base tip.
|
|
71
82
|
*/
|
|
72
83
|
mergeBase?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* GitHub and Forgejo (#4749): push with the job's own token, so `tokenEnv`
|
|
86
|
+
* may be left out. Such a push starts no workflow run, so the new head gets
|
|
87
|
+
* no plan from it; `after` is where a product does what that run would
|
|
88
|
+
* have done. Refused on GitLab, where a job token cannot push.
|
|
89
|
+
*/
|
|
90
|
+
jobToken?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Shell lines the push job runs once it has pushed a commit (#4749), with
|
|
93
|
+
* `CHANT_COMMIT_SHA` set to it, such as a product taking the plan locks of
|
|
94
|
+
* the new head. Not run when nothing was pushed.
|
|
95
|
+
*/
|
|
96
|
+
after?: string[];
|
|
73
97
|
}
|
|
74
98
|
/** A commit job's settings, every default filled and checked. */
|
|
75
99
|
export interface CommitSettings {
|
|
@@ -78,12 +102,17 @@ export interface CommitSettings {
|
|
|
78
102
|
comment?: string;
|
|
79
103
|
command: string[];
|
|
80
104
|
allowed: string[];
|
|
105
|
+
allowedFiles: string[];
|
|
81
106
|
findings: number[];
|
|
82
107
|
maxRuns: number;
|
|
83
108
|
guarded: string[];
|
|
84
109
|
timeout: number;
|
|
85
110
|
env: string;
|
|
86
111
|
mergeBase: boolean;
|
|
112
|
+
/** Push with the job token (#4749). */
|
|
113
|
+
jobToken: boolean;
|
|
114
|
+
/** Lines the push job runs after a push (#4749). */
|
|
115
|
+
after: string[];
|
|
87
116
|
}
|
|
88
117
|
export declare const COMMIT_MAX_RUNS = 3;
|
|
89
118
|
export declare const COMMIT_TIMEOUT_MINUTES = 10;
|
|
@@ -98,6 +127,7 @@ export declare const COMMIT_ENV: {
|
|
|
98
127
|
readonly comment: "CHANT_COMMIT_COMMENT";
|
|
99
128
|
readonly command: "CHANT_COMMIT_COMMAND";
|
|
100
129
|
readonly allowed: "CHANT_COMMIT_ALLOWED";
|
|
130
|
+
readonly allowedFiles: "CHANT_COMMIT_ALLOWED_FILES";
|
|
101
131
|
readonly findings: "CHANT_COMMIT_FINDINGS";
|
|
102
132
|
readonly maxRuns: "CHANT_COMMIT_MAX_RUNS";
|
|
103
133
|
readonly guarded: "CHANT_COMMIT_GUARDED";
|
|
@@ -117,6 +147,16 @@ export declare const COMMIT_BASE_REF = "refs/chant/commit-base";
|
|
|
117
147
|
export declare const COMMIT_DECISION_FILE = "decision.json";
|
|
118
148
|
export declare const COMMIT_PATCH_FILE = "change.patch";
|
|
119
149
|
export declare const COMMIT_RC_FILE = "rc";
|
|
150
|
+
/** What `chant commit land` leaves when it pushed (#4749): the pushed commit, which the push job's `after` lines read. */
|
|
151
|
+
export declare const COMMIT_PUSHED_FILE = "pushed";
|
|
152
|
+
/**
|
|
153
|
+
* After a check that runs on push (#4749): fetch the pushed commit, by its
|
|
154
|
+
* sha in `shaVar`, into `into` as the head. The pull request is found from
|
|
155
|
+
* the pushed branch (`resolveCommitRequest`).
|
|
156
|
+
*/
|
|
157
|
+
export declare function commitPushedHeadFetchLine(shaVar: string, into?: string): string;
|
|
158
|
+
/** The push job's lines after land (#4749): `after`, run only when a commit was pushed, with \`CHANT_COMMIT_SHA\` set. */
|
|
159
|
+
export declare function commitAfterLines(s: Pick<CommitSettings, "after">, dir?: string): string[];
|
|
120
160
|
/** The commit identity the job's commits carry. */
|
|
121
161
|
export declare const COMMIT_GIT_NAME = "chant commit";
|
|
122
162
|
export declare const COMMIT_GIT_EMAIL = "chant-commit@localhost";
|
|
@@ -127,7 +167,7 @@ export declare function commitSettingsEnv(s: CommitSettings): Record<string, str
|
|
|
127
167
|
/** The settings back from the job's variables, checked as {@link resolveCommitSpec} checks a spec. */
|
|
128
168
|
export declare function commitSettingsFromEnv(env: Record<string, string | undefined>, product?: string): CommitSettings;
|
|
129
169
|
/** The paths of a change the job may not push: outside `allowed`, or on a path no job changes ({@link agentForbiddenPaths}). */
|
|
130
|
-
export declare function commitRefusedPaths(paths: readonly string[], s: Pick<CommitSettings, "allowed" | "guarded">): {
|
|
170
|
+
export declare function commitRefusedPaths(paths: readonly string[], s: Pick<CommitSettings, "allowed" | "guarded"> & Partial<Pick<CommitSettings, "allowedFiles">>): {
|
|
131
171
|
forbidden: string[];
|
|
132
172
|
outside: string[];
|
|
133
173
|
};
|
package/dist/ci-commit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-commit.d.ts","sourceRoot":"","sources":["../src/ci-commit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAMH,OAAO,EAA6E,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtH,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG1C,uHAAuH;AACvH,eAAO,MAAM,eAAe,aAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ci-commit.d.ts","sourceRoot":"","sources":["../src/ci-commit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAMH,OAAO,EAA6E,KAAK,QAAQ,EAAE,MAAM,YAAY,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C,CAAC,CAAC;IACnG,mHAAmH;IACnH,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9D,GAAG,EAAE,QAAQ,CAAC;IACd,uDAAuD;IACvD,IAAI,EAAE,CAAC,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACvC,QAAQ,EAAE,YAAY,CAAC;IACvB,yDAAyD;IACzD,MAAM,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,GAAG,EAAE,MAAM,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAID;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAqJrF;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
|
@@ -32,7 +32,11 @@ import { agentForbiddenPaths, AgentError, branchOk, errText, LOGIN, readSmall, S
|
|
|
32
32
|
import { parseProductComment } from "./ci-product-words.js";
|
|
33
33
|
import { NEXT_RELEASE } from "./release-floors.js";
|
|
34
34
|
/** The first chant with the commit job and the scheduled Op spec's `commit` (#4722). Products feature-detect on it. */
|
|
35
|
-
export const CI_COMMIT_FLOOR =
|
|
35
|
+
export const CI_COMMIT_FLOOR = "0.124.71";
|
|
36
|
+
/** The first chant with a commit job after a check that runs on push, `jobToken` and `after` (#4749). Products feature-detect on it. */
|
|
37
|
+
export const CI_COMMIT_PUSH_FLOOR = "0.124.72";
|
|
38
|
+
/** The first chant whose commit job takes `allowedFiles` (#4758). */
|
|
39
|
+
export const CI_COMMIT_FILES_FLOOR = NEXT_RELEASE;
|
|
36
40
|
export const COMMIT_TRIGGERS = ["comment", "check"];
|
|
37
41
|
export const COMMIT_MAX_RUNS = 3;
|
|
38
42
|
export const COMMIT_TIMEOUT_MINUTES = 10;
|
|
@@ -47,6 +51,7 @@ export const COMMIT_ENV = {
|
|
|
47
51
|
comment: "CHANT_COMMIT_COMMENT",
|
|
48
52
|
command: "CHANT_COMMIT_COMMAND",
|
|
49
53
|
allowed: "CHANT_COMMIT_ALLOWED",
|
|
54
|
+
allowedFiles: "CHANT_COMMIT_ALLOWED_FILES",
|
|
50
55
|
findings: "CHANT_COMMIT_FINDINGS",
|
|
51
56
|
maxRuns: "CHANT_COMMIT_MAX_RUNS",
|
|
52
57
|
guarded: "CHANT_COMMIT_GUARDED",
|
|
@@ -66,6 +71,24 @@ export const COMMIT_BASE_REF = "refs/chant/commit-base";
|
|
|
66
71
|
export const COMMIT_DECISION_FILE = "decision.json";
|
|
67
72
|
export const COMMIT_PATCH_FILE = "change.patch";
|
|
68
73
|
export const COMMIT_RC_FILE = "rc";
|
|
74
|
+
/** What `chant commit land` leaves when it pushed (#4749): the pushed commit, which the push job's `after` lines read. */
|
|
75
|
+
export const COMMIT_PUSHED_FILE = "pushed";
|
|
76
|
+
/**
|
|
77
|
+
* After a check that runs on push (#4749): fetch the pushed commit, by its
|
|
78
|
+
* sha in `shaVar`, into `into` as the head. The pull request is found from
|
|
79
|
+
* the pushed branch (`resolveCommitRequest`).
|
|
80
|
+
*/
|
|
81
|
+
export function commitPushedHeadFetchLine(shaVar, into = COMMIT_HEAD_REF) {
|
|
82
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(shaVar))
|
|
83
|
+
throw new AgentError(`${shaVar} is not a variable name`);
|
|
84
|
+
return `case "$${shaVar}" in *[!0-9a-f]*|'') echo "no pushed commit" >&2; exit 1 ;; esac\ngit -c protocol.version=2 fetch -q --no-tags origin "+$${shaVar}:${into}"`;
|
|
85
|
+
}
|
|
86
|
+
/** The push job's lines after land (#4749): `after`, run only when a commit was pushed, with \`CHANT_COMMIT_SHA\` set. */
|
|
87
|
+
export function commitAfterLines(s, dir = COMMIT_DIR) {
|
|
88
|
+
if (s.after.length === 0)
|
|
89
|
+
return [];
|
|
90
|
+
return [`if [ -s ${dir}/${COMMIT_PUSHED_FILE} ]; then`, ` export CHANT_COMMIT_SHA="$(cat ${dir}/${COMMIT_PUSHED_FILE})"`, ...s.after.map((l) => ` ${l}`), "fi"];
|
|
91
|
+
}
|
|
69
92
|
/** The commit identity the job's commits carry. */
|
|
70
93
|
export const COMMIT_GIT_NAME = "chant commit";
|
|
71
94
|
export const COMMIT_GIT_EMAIL = "chant-commit@localhost";
|
|
@@ -98,8 +121,12 @@ export function resolveCommitSpec(name, spec, product = "chant") {
|
|
|
98
121
|
throw new AgentError(`${where}: command is an argv, a program and its arguments, with no control characters`);
|
|
99
122
|
}
|
|
100
123
|
const allowed = pathsIn(`${where}: allowed`, spec.allowed);
|
|
101
|
-
|
|
102
|
-
|
|
124
|
+
const allowedFiles = spec.allowedFiles ?? [];
|
|
125
|
+
if (!Array.isArray(allowedFiles) || !allowedFiles.every((f) => typeof f === "string" && FILE_PATTERN.test(f))) {
|
|
126
|
+
throw new AgentError(`${where}: allowedFiles are file names, such as "*.tf" or "terragrunt.hcl", with no "/"`);
|
|
127
|
+
}
|
|
128
|
+
if (allowed.length === 0 && allowedFiles.length === 0)
|
|
129
|
+
throw new AgentError(`${where}: allowed or allowedFiles names at least one path the change may touch`);
|
|
103
130
|
const guarded = spec.guarded === undefined ? [] : pathsIn(`${where}: guarded`, spec.guarded);
|
|
104
131
|
if (spec.tokenEnv !== undefined && !VAR.test(spec.tokenEnv))
|
|
105
132
|
throw new AgentError(`${where}: tokenEnv is a variable name`);
|
|
@@ -111,18 +138,28 @@ export function resolveCommitSpec(name, spec, product = "chant") {
|
|
|
111
138
|
const env = spec.env ?? "local";
|
|
112
139
|
if (!NAME.test(env))
|
|
113
140
|
throw new AgentError(`${where}: env is a ledger environment name`);
|
|
141
|
+
if (spec.jobToken !== undefined && typeof spec.jobToken !== "boolean")
|
|
142
|
+
throw new AgentError(`${where}: jobToken is true or false`);
|
|
143
|
+
if (spec.jobToken && spec.tokenEnv !== undefined)
|
|
144
|
+
throw new AgentError(`${where}: jobToken pushes with the job's own token, so leave tokenEnv out`);
|
|
145
|
+
const after = spec.after ?? [];
|
|
146
|
+
if (!Array.isArray(after) || !after.every((l) => typeof l === "string" && l.trim() !== "" && !l.includes("\n")))
|
|
147
|
+
throw new AgentError(`${where}: after is a list of shell lines, one command each`);
|
|
114
148
|
return {
|
|
115
149
|
name,
|
|
116
150
|
on: spec.on,
|
|
117
151
|
...(spec.on === "comment" ? { comment: spec.comment } : {}),
|
|
118
152
|
command: [...spec.command],
|
|
119
153
|
allowed,
|
|
154
|
+
allowedFiles: [...allowedFiles],
|
|
120
155
|
findings: [...findings],
|
|
121
156
|
maxRuns: spec.maxRuns === undefined ? COMMIT_MAX_RUNS : intIn(`${where}: maxRuns`, spec.maxRuns, 1, 100),
|
|
122
157
|
guarded,
|
|
123
158
|
timeout: spec.timeout === undefined ? COMMIT_TIMEOUT_MINUTES : intIn(`${where}: timeout`, spec.timeout, 1, 120),
|
|
124
159
|
env,
|
|
125
160
|
mergeBase: spec.mergeBase === true,
|
|
161
|
+
jobToken: spec.jobToken === true,
|
|
162
|
+
after: [...after],
|
|
126
163
|
};
|
|
127
164
|
}
|
|
128
165
|
/** The settings as the generated jobs' variables. */
|
|
@@ -133,6 +170,7 @@ export function commitSettingsEnv(s) {
|
|
|
133
170
|
...(s.comment ? { [COMMIT_ENV.comment]: s.comment } : {}),
|
|
134
171
|
[COMMIT_ENV.command]: JSON.stringify(s.command),
|
|
135
172
|
[COMMIT_ENV.allowed]: JSON.stringify(s.allowed),
|
|
173
|
+
...(s.allowedFiles.length > 0 ? { [COMMIT_ENV.allowedFiles]: JSON.stringify(s.allowedFiles) } : {}),
|
|
136
174
|
[COMMIT_ENV.findings]: s.findings.join(","),
|
|
137
175
|
[COMMIT_ENV.maxRuns]: String(s.maxRuns),
|
|
138
176
|
...(s.guarded.length > 0 ? { [COMMIT_ENV.guarded]: JSON.stringify(s.guarded) } : {}),
|
|
@@ -179,6 +217,7 @@ export function commitSettingsFromEnv(env, product = "chant") {
|
|
|
179
217
|
...(env[COMMIT_ENV.comment] ? { comment: env[COMMIT_ENV.comment] } : {}),
|
|
180
218
|
command: list(COMMIT_ENV.command) ?? [],
|
|
181
219
|
allowed: list(COMMIT_ENV.allowed) ?? [],
|
|
220
|
+
...(list(COMMIT_ENV.allowedFiles) ? { allowedFiles: list(COMMIT_ENV.allowedFiles) } : {}),
|
|
182
221
|
...(f ? { findings: f.split(",").map(Number) } : {}),
|
|
183
222
|
...(maxRuns !== undefined ? { maxRuns } : {}),
|
|
184
223
|
...(timeout !== undefined ? { timeout } : {}),
|
|
@@ -189,13 +228,20 @@ export function commitSettingsFromEnv(env, product = "chant") {
|
|
|
189
228
|
return resolveCommitSpec(name, spec, product);
|
|
190
229
|
}
|
|
191
230
|
// ── what the change may touch ──────────────────────────────────────────────
|
|
192
|
-
/**
|
|
193
|
-
|
|
194
|
-
|
|
231
|
+
/** An `allowedFiles` entry: `*.<ext>` or an exact file name, never a path. */
|
|
232
|
+
const FILE_PATTERN = /^(\*\.[A-Za-z0-9._-]+|[A-Za-z0-9._-]+)$/;
|
|
233
|
+
/** Whether `path`'s basename matches one of `files` (#4758). */
|
|
234
|
+
function fileAllowed(path, files) {
|
|
235
|
+
const base = path.slice(path.lastIndexOf("/") + 1);
|
|
236
|
+
return files.some((f) => (f.startsWith("*.") ? base.endsWith(f.slice(1)) && base.length > f.length - 1 : base === f));
|
|
237
|
+
}
|
|
238
|
+
/** Whether `path` is inside one of `allowed` (a trailing `/` names a directory), matched as git spells it, or its file name is in `files`. */
|
|
239
|
+
function inAllowed(path, allowed, files = []) {
|
|
240
|
+
return allowed.some((a) => (a.endsWith("/") ? path.startsWith(a) || `${path}/` === a : path === a)) || fileAllowed(path, files);
|
|
195
241
|
}
|
|
196
242
|
/** The paths of a change the job may not push: outside `allowed`, or on a path no job changes ({@link agentForbiddenPaths}). */
|
|
197
243
|
export function commitRefusedPaths(paths, s) {
|
|
198
|
-
return { forbidden: agentForbiddenPaths(paths, s.guarded), outside: paths.filter((p) => !inAllowed(p, s.allowed)) };
|
|
244
|
+
return { forbidden: agentForbiddenPaths(paths, s.guarded), outside: paths.filter((p) => !inAllowed(p, s.allowed, s.allowedFiles ?? [])) };
|
|
199
245
|
}
|
|
200
246
|
/**
|
|
201
247
|
* The request from the run. `comment`: the event's comment on GitHub and
|
|
@@ -660,7 +706,7 @@ export async function landCommitChange(i) {
|
|
|
660
706
|
const { forbidden, outside } = commitRefusedPaths(paths, s);
|
|
661
707
|
if (forbidden.length > 0 || outside.length > 0) {
|
|
662
708
|
const bad = [...new Set([...forbidden, ...outside])];
|
|
663
|
-
return finish({ result: "refused", reason: `the change touches ${bad.join(", ")}`, paths }, `${code(s.command.join(" "))} changed ${bad.map(code).join(", ")}, which ${s.name} may not change (it may change ${s.allowed.map(code).join(", ")}, and never CI, chant's settings and state, code owners, agent instructions or git settings), so nothing was pushed.`);
|
|
709
|
+
return finish({ result: "refused", reason: `the change touches ${bad.join(", ")}`, paths }, `${code(s.command.join(" "))} changed ${bad.map(code).join(", ")}, which ${s.name} may not change (it may change ${[...s.allowed, ...s.allowedFiles].map(code).join(", ")}, and never CI, chant's settings and state, code owners, agent instructions or git settings), so nothing was pushed.`);
|
|
664
710
|
}
|
|
665
711
|
const title = s.on === "comment" ? `${s.comment} asked for by ${user} on ${what} #${pr}` : `${s.name} after the check found something at ${sha.slice(0, 8)}`;
|
|
666
712
|
const ran = baseSha ? `Merged ${decision.base} at ${baseSha.slice(0, 12)} into ${sha.slice(0, 12)}, then ran ${s.command.join(" ")}.` : `Ran ${s.command.join(" ")} on ${sha.slice(0, 12)}.`;
|
|
@@ -73,8 +73,8 @@ export interface Dora {
|
|
|
73
73
|
drift_window_seconds: number;
|
|
74
74
|
/** Whether any apply record was on the ledger. Without one only drift counts. */
|
|
75
75
|
audit: boolean;
|
|
76
|
-
/**
|
|
77
|
-
source
|
|
76
|
+
/** `ledger` from {@link buildDelivery}. Absent from {@link buildRecordDelivery}, whose file is terragucci's shape, which has no such field. */
|
|
77
|
+
source?: "ledger";
|
|
78
78
|
estate: DoraMetrics;
|
|
79
79
|
projects: DoraProject[];
|
|
80
80
|
}
|
|
@@ -133,5 +133,78 @@ export declare function doraMetricNames(words?: Pick<CiProductWords, "product">)
|
|
|
133
133
|
};
|
|
134
134
|
/** The gauges for `dora`, as terragucci's `doraGauges` builds them. */
|
|
135
135
|
export declare function deliveryGauges(dora: Dora, words?: Pick<CiProductWords, "product">): DeliveryGauge[];
|
|
136
|
+
/**
|
|
137
|
+
* One line of a product's audit trail, as terragucci's reports bucket keeps
|
|
138
|
+
* it (`audit.jsonl`). Three kinds are read: `apply` (an applied or failed
|
|
139
|
+
* wave: `detail.commit`, `detail.roots`, `detail.failed`, and the
|
|
140
|
+
* `detail.approval` entry it applied under), `approval-requested` (a wave
|
|
141
|
+
* reaching its gate) and `approval`. `what` is the gate. Other kinds and
|
|
142
|
+
* results are left alone: a waiting wave is not an apply yet, and a refused
|
|
143
|
+
* one is the gate working.
|
|
144
|
+
*/
|
|
145
|
+
export interface DeliveryAuditEntry {
|
|
146
|
+
id: string;
|
|
147
|
+
kind: string;
|
|
148
|
+
project: string;
|
|
149
|
+
at: string;
|
|
150
|
+
what: string;
|
|
151
|
+
digest: string | null;
|
|
152
|
+
result: string;
|
|
153
|
+
detail?: Record<string, unknown>;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* One row of a product's report index. A plan row (`stages.plan`) says when
|
|
157
|
+
* a change was planned, on which pull request, and the set digests its waves
|
|
158
|
+
* bind. A drift row (`stages.drift`) says whether the check found drift and
|
|
159
|
+
* on which roots, when the open drift was first found (`drift_since`), and
|
|
160
|
+
* which drift a clean check cleared (`drift_cleared`).
|
|
161
|
+
*/
|
|
162
|
+
export interface DeliveryIndexRow {
|
|
163
|
+
project: string;
|
|
164
|
+
stage: string;
|
|
165
|
+
finished: string;
|
|
166
|
+
commit?: string;
|
|
167
|
+
pull_request?: string;
|
|
168
|
+
wave_digests?: string[];
|
|
169
|
+
changed?: number;
|
|
170
|
+
drifted_roots?: string[];
|
|
171
|
+
drift_since?: string;
|
|
172
|
+
drift_cleared?: {
|
|
173
|
+
since: string;
|
|
174
|
+
roots: string[];
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
/** One project's index rows. A control repo passes one per project it reads. */
|
|
178
|
+
export interface DeliveryRecordSource {
|
|
179
|
+
project: string;
|
|
180
|
+
rows: readonly DeliveryIndexRow[];
|
|
181
|
+
}
|
|
182
|
+
export interface RecordDeliveryOptions {
|
|
183
|
+
words?: Pick<CiProductWords, "product">;
|
|
184
|
+
now?: Date;
|
|
185
|
+
/** The index's stage names: `tf-plan` and `tf-drift` for terragucci. */
|
|
186
|
+
stages: {
|
|
187
|
+
plan: string;
|
|
188
|
+
drift: string;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* A project's drift incidents from its drift rows, oldest first. A row that
|
|
193
|
+
* found drift opens one at its `drift_since` (or, for a row written before
|
|
194
|
+
* that field, at the open incident or its own time); a clean row names the
|
|
195
|
+
* drift it cleared, since a later check of the same commit replaces the row
|
|
196
|
+
* that found it; a clean row of the old kind closes the open incident.
|
|
197
|
+
*/
|
|
198
|
+
export declare function recordDriftIncidents(drifts: readonly DeliveryIndexRow[]): DriftIncident[];
|
|
199
|
+
/**
|
|
200
|
+
* The metrics of every project and of the estate from a product's own
|
|
201
|
+
* records (#4612): its report index and its audit trail, for a member whose
|
|
202
|
+
* ledger holds no wave records and for a control repo that reads each
|
|
203
|
+
* project's bucket. The same numbers {@link buildDelivery} computes from the
|
|
204
|
+
* ledger, and the same file, `dora.json` in terragucci's shape. `entries`
|
|
205
|
+
* is undefined when there is no audit trail; then no apply counts and only
|
|
206
|
+
* drift does.
|
|
207
|
+
*/
|
|
208
|
+
export declare function buildRecordDelivery(sources: readonly DeliveryRecordSource[], entries: readonly DeliveryAuditEntry[] | undefined, options: RecordDeliveryOptions): Dora;
|
|
136
209
|
export {};
|
|
137
210
|
//# sourceMappingURL=delivery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../src/ci-estate/delivery.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAE5D,kEAAkE;AAClE,eAAO,MAAM,UAAU,IAAI,CAAC;AAE5B,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,QAAY,CAAC;AAE9C,sGAAsG;AACtG,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C,uCAAuC;AACvC,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC,8EAA8E;AAC9E,eAAO,MAAM,UAAU,WAAW,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,KAAiB,MAAoC,CAAC;AAEvH,MAAM,WAAW,YAAY;IAC3B,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,+FAA+F;IAC/F,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,4DAA4D;IAC5D,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,6CAA6C;IAC7C,kBAAkB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CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACpD;AAED,gFAAgF;AAChF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IACxC,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,wEAAwE;IACxE,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACzC;AAuDD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,aAAa,EAAE,CAyBzF;AAkBD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,oBAAoB,EAAE,EAAE,OAAO,EAAE,SAAS,kBAAkB,EAAE,GAAG,SAAS,EAAE,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAetK"}
|
|
@@ -309,3 +309,132 @@ export function deliveryGauges(dora, words = CHANT_WORDS) {
|
|
|
309
309
|
of(p.project, p);
|
|
310
310
|
return out;
|
|
311
311
|
}
|
|
312
|
+
const strings = (v) => (Array.isArray(v) ? v.filter((x) => typeof x === "string") : []);
|
|
313
|
+
function recordApplies(entries) {
|
|
314
|
+
const seen = new Set();
|
|
315
|
+
const out = [];
|
|
316
|
+
for (const e of entries) {
|
|
317
|
+
if (e.kind !== "apply" || (e.result !== "applied" && e.result !== "failed") || seen.has(e.id))
|
|
318
|
+
continue;
|
|
319
|
+
seen.add(e.id);
|
|
320
|
+
const d = e.detail ?? {};
|
|
321
|
+
out.push({
|
|
322
|
+
project: e.project,
|
|
323
|
+
at: at(e.at),
|
|
324
|
+
applied: e.result === "applied",
|
|
325
|
+
spec: e.what,
|
|
326
|
+
gate: e.what,
|
|
327
|
+
...(e.digest !== null ? { digest: e.digest } : {}),
|
|
328
|
+
...(typeof d.commit === "string" ? { commit: d.commit } : {}),
|
|
329
|
+
roots: strings(d.roots),
|
|
330
|
+
failed: strings(d.failed),
|
|
331
|
+
...(typeof d.approval === "string" ? { approval: d.approval } : {}),
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
return out.sort((a, b) => a.at - b.at);
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* The lead time of an applied wave. Its plan is the plan row of the same
|
|
338
|
+
* commit, or the one whose wave digests hold the wave's digest (a pull
|
|
339
|
+
* request's head, planned before the merge commit applied); the change
|
|
340
|
+
* starts at the first plan of that row's pull request.
|
|
341
|
+
*/
|
|
342
|
+
function recordLead(a, plans, requests, approvals) {
|
|
343
|
+
const before = plans.filter((r) => at(r.finished) <= a.at);
|
|
344
|
+
const matched = before
|
|
345
|
+
.filter((r) => (a.commit !== undefined && r.commit === a.commit) || (a.digest !== undefined && (r.wave_digests ?? []).some((d) => samePlanDigest(d, a.digest))))
|
|
346
|
+
.sort((x, y) => at(y.finished) - at(x.finished))[0];
|
|
347
|
+
if (!matched)
|
|
348
|
+
return undefined;
|
|
349
|
+
const pr = matched.pull_request;
|
|
350
|
+
const first = pr ? Math.min(...before.filter((r) => r.pull_request === pr).map((r) => at(r.finished))) : at(matched.finished);
|
|
351
|
+
const asked = requests
|
|
352
|
+
.filter((q) => q.project === a.project && q.what === a.gate && a.digest !== undefined && q.digest !== null && samePlanDigest(q.digest, a.digest) && at(q.at) <= a.at)
|
|
353
|
+
.map((q) => at(q.at))
|
|
354
|
+
.sort((x, y) => x - y)[0];
|
|
355
|
+
const approved = a.approval ? approvals.get(a.approval) : undefined;
|
|
356
|
+
const ok = approved ? Math.min(Math.max(at(approved.at), asked ?? first), a.at) : undefined;
|
|
357
|
+
if (asked === undefined)
|
|
358
|
+
return { project: a.project, at: a.at, total: secs(first, a.at), before: secs(first, a.at), gate: 0, after: 0 };
|
|
359
|
+
const gateEnd = ok ?? asked;
|
|
360
|
+
return { project: a.project, at: a.at, total: secs(first, a.at), before: secs(first, Math.max(first, asked)), gate: secs(asked, gateEnd), after: secs(gateEnd, a.at) };
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* A project's drift incidents from its drift rows, oldest first. A row that
|
|
364
|
+
* found drift opens one at its `drift_since` (or, for a row written before
|
|
365
|
+
* that field, at the open incident or its own time); a clean row names the
|
|
366
|
+
* drift it cleared, since a later check of the same commit replaces the row
|
|
367
|
+
* that found it; a clean row of the old kind closes the open incident.
|
|
368
|
+
*/
|
|
369
|
+
export function recordDriftIncidents(drifts) {
|
|
370
|
+
const incidents = new Map();
|
|
371
|
+
const get = (since) => {
|
|
372
|
+
let i = incidents.get(since);
|
|
373
|
+
if (!i)
|
|
374
|
+
incidents.set(since, (i = { since, roots: new Set() }));
|
|
375
|
+
return i;
|
|
376
|
+
};
|
|
377
|
+
let open;
|
|
378
|
+
for (const r of [...drifts].sort((x, y) => at(x.finished) - at(y.finished))) {
|
|
379
|
+
if ((r.changed ?? 0) > 0) {
|
|
380
|
+
const since = r.drift_since ? at(r.drift_since) : (open ?? at(r.finished));
|
|
381
|
+
for (const x of r.drifted_roots ?? [])
|
|
382
|
+
get(since).roots.add(x);
|
|
383
|
+
open = since;
|
|
384
|
+
}
|
|
385
|
+
else if (r.drift_cleared) {
|
|
386
|
+
const i = get(at(r.drift_cleared.since));
|
|
387
|
+
for (const x of r.drift_cleared.roots)
|
|
388
|
+
i.roots.add(x);
|
|
389
|
+
i.closed = Math.min(i.closed ?? Infinity, at(r.finished));
|
|
390
|
+
if (open === i.since)
|
|
391
|
+
open = undefined;
|
|
392
|
+
}
|
|
393
|
+
else if (open !== undefined) {
|
|
394
|
+
const i = get(open);
|
|
395
|
+
i.closed ?? (i.closed = at(r.finished));
|
|
396
|
+
open = undefined;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
return [...incidents.values()].sort((a, b) => a.since - b.since);
|
|
400
|
+
}
|
|
401
|
+
function recordEventsOf(source, entries, stages) {
|
|
402
|
+
const mine = entries.filter((e) => e.project === source.project);
|
|
403
|
+
const applies = recordApplies(mine);
|
|
404
|
+
const rows = source.rows.filter((r) => r.project === source.project);
|
|
405
|
+
const plans = rows.filter((r) => r.stage === stages.plan);
|
|
406
|
+
const incidents = recordDriftIncidents(rows.filter((r) => r.stage === stages.drift));
|
|
407
|
+
const requests = mine.filter((e) => e.kind === "approval-requested");
|
|
408
|
+
const approvals = new Map(mine.filter((e) => e.kind === "approval").map((e) => [e.id, e]));
|
|
409
|
+
const leads = applies.filter((a) => a.applied).flatMap((a) => recordLead(a, plans, requests, approvals) ?? []);
|
|
410
|
+
const drifted = driftedApplies(applies, incidents);
|
|
411
|
+
const failures = applies.filter((a) => !a.applied || drifted.has(a)).map((a) => ({ project: a.project, at: a.at }));
|
|
412
|
+
const ar = applyRestores(applies);
|
|
413
|
+
const dr = incidents.filter((i) => i.closed !== undefined).map((i) => ({ project: source.project, at: i.closed, seconds: secs(i.since, i.closed), kind: "drift" }));
|
|
414
|
+
return { applies, leads, failures, drifted, restores: [...ar.restored, ...dr], open: ar.open + incidents.filter((i) => i.closed === undefined).length };
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* The metrics of every project and of the estate from a product's own
|
|
418
|
+
* records (#4612): its report index and its audit trail, for a member whose
|
|
419
|
+
* ledger holds no wave records and for a control repo that reads each
|
|
420
|
+
* project's bucket. The same numbers {@link buildDelivery} computes from the
|
|
421
|
+
* ledger, and the same file, `dora.json` in terragucci's shape. `entries`
|
|
422
|
+
* is undefined when there is no audit trail; then no apply counts and only
|
|
423
|
+
* drift does.
|
|
424
|
+
*/
|
|
425
|
+
export function buildRecordDelivery(sources, entries, options) {
|
|
426
|
+
const now = options.now ?? new Date();
|
|
427
|
+
const end = now.getTime();
|
|
428
|
+
const from = weekStart(end) - (DORA_WEEKS - 1) * WEEK_MS;
|
|
429
|
+
const events = sources.map((s) => recordEventsOf(s, entries ?? [], options.stages));
|
|
430
|
+
return {
|
|
431
|
+
schema: doraSchema(options.words),
|
|
432
|
+
generated: now.toISOString(),
|
|
433
|
+
weeks: DORA_WEEKS,
|
|
434
|
+
window: { from: new Date(from).toISOString(), to: now.toISOString() },
|
|
435
|
+
drift_window_seconds: DRIFT_WINDOW_SECONDS,
|
|
436
|
+
audit: entries !== undefined,
|
|
437
|
+
estate: metricsOf(merge(events), from, end),
|
|
438
|
+
projects: sources.map((s, i) => ({ project: s.project, ...metricsOf(events[i], from, end) })),
|
|
439
|
+
};
|
|
440
|
+
}
|
package/dist/ci-estate.d.ts
CHANGED
|
@@ -33,8 +33,10 @@ import { type Estate, type EstateSections } from "./ci-estate/page.js";
|
|
|
33
33
|
import { type EstateRowOptions, type EstateRows, type EstateTables } from "./ci-estate/rows.js";
|
|
34
34
|
/** The first chant with `@intentius/chant/ci-estate` (#4612). */
|
|
35
35
|
export declare const CI_ESTATE_FLOOR = "0.124.55";
|
|
36
|
+
/** The first chant with `buildRecordDelivery`: delivery metrics from a product's report index and audit trail (#4612). Products feature-detect on it. */
|
|
37
|
+
export declare const CI_ESTATE_RECORDS_FLOOR = "0.124.72";
|
|
36
38
|
export { estateRows, type ApprovedApply, type DriftRun, type EstateRowOptions, type EstateRows, type EstateTables, type GateLine, type PrEnvLine, type WaveJob } from "./ci-estate/rows.js";
|
|
37
|
-
export { appliesOf, buildDelivery, deliveryGauges, doraMetricNames, doraSchema, driftIncidents, duration, median, spanLabel, weekStart, DORA_FILE, DORA_MIN_SPAN_SECONDS, DORA_WEEKS, DRIFT_WINDOW_SECONDS, type DeliveryGauge, type DeliveryOptions, type Dora, type DoraLeadTime, type DoraMetrics, type DoraProject, type DoraWeek, type DriftIncident, } from "./ci-estate/delivery.js";
|
|
39
|
+
export { appliesOf, buildDelivery, buildRecordDelivery, recordDriftIncidents, deliveryGauges, doraMetricNames, doraSchema, driftIncidents, duration, median, spanLabel, weekStart, DORA_FILE, DORA_MIN_SPAN_SECONDS, DORA_WEEKS, DRIFT_WINDOW_SECONDS, type DeliveryAuditEntry, type DeliveryGauge, type DeliveryIndexRow, type DeliveryOptions, type DeliveryRecordSource, type RecordDeliveryOptions, type Dora, type DoraLeadTime, type DoraMetrics, type DoraProject, type DoraWeek, type DriftIncident, } from "./ci-estate/delivery.js";
|
|
38
40
|
export { ledgerOverdue, type DriftSchedule, type LedgerOverdue, type LedgerOverdueOptions } from "./ci-estate/overdue.js";
|
|
39
41
|
export { buildEstate, esc, estateSchema, memberState, renderDeliverySection, renderEstateHtml, ESTATE_FILES, RECENT_RUNS, type Estate, type EstateOptions, type EstatePrEnv, type EstateProject, type EstateRun, type EstateSections, type EstateWaiting, } from "./ci-estate/page.js";
|
|
40
42
|
export { otlpMetricsBody, otlpMetricsFromEnv, sendOtlpGauges, type OtlpGauge, type OtlpGaugesSent, type OtlpMetricsConfig } from "./otlp-metrics.js";
|
package/dist/ci-estate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-estate.d.ts","sourceRoot":"","sources":["../src/ci-estate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAiC,KAAK,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAiB,KAAK,aAAa,EAAE,KA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G,MAAM,CAAe,EAAE,QAAQ,GAAE,cAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM1L;AAED,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,GAAG,EAAE,SAAS,CAAC;IACf,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,4EAA4E;IAC5E,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,iHAAiH;AACjH,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,MAAM,CAAC,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAYnI;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAInG"}
|
package/dist/ci-estate.js
CHANGED
|
@@ -30,8 +30,10 @@ import { buildEstate, ESTATE_FILES, renderEstateHtml } from "./ci-estate/page.js
|
|
|
30
30
|
import { estateRows } from "./ci-estate/rows.js";
|
|
31
31
|
/** The first chant with `@intentius/chant/ci-estate` (#4612). */
|
|
32
32
|
export const CI_ESTATE_FLOOR = "0.124.55";
|
|
33
|
+
/** The first chant with `buildRecordDelivery`: delivery metrics from a product's report index and audit trail (#4612). Products feature-detect on it. */
|
|
34
|
+
export const CI_ESTATE_RECORDS_FLOOR = "0.124.72";
|
|
33
35
|
export { estateRows } from "./ci-estate/rows.js";
|
|
34
|
-
export { appliesOf, buildDelivery, deliveryGauges, doraMetricNames, doraSchema, driftIncidents, duration, median, spanLabel, weekStart, DORA_FILE, DORA_MIN_SPAN_SECONDS, DORA_WEEKS, DRIFT_WINDOW_SECONDS, } from "./ci-estate/delivery.js";
|
|
36
|
+
export { appliesOf, buildDelivery, buildRecordDelivery, recordDriftIncidents, deliveryGauges, doraMetricNames, doraSchema, driftIncidents, duration, median, spanLabel, weekStart, DORA_FILE, DORA_MIN_SPAN_SECONDS, DORA_WEEKS, DRIFT_WINDOW_SECONDS, } from "./ci-estate/delivery.js";
|
|
35
37
|
export { ledgerOverdue } from "./ci-estate/overdue.js";
|
|
36
38
|
export { buildEstate, esc, estateSchema, memberState, renderDeliverySection, renderEstateHtml, ESTATE_FILES, RECENT_RUNS, } from "./ci-estate/page.js";
|
|
37
39
|
export { otlpMetricsBody, otlpMetricsFromEnv, sendOtlpGauges } from "./otlp-metrics.js";
|
package/dist/ci-product.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const NOTIFY_RELAY_FLOOR = "0.124.55";
|
|
|
29
29
|
* `prCommentPreviewJob` and this constant together.
|
|
30
30
|
*/
|
|
31
31
|
export declare const PR_PREVIEW_FLOOR = "0.124.55";
|
|
32
|
-
export { decideRelayClick, handleRelayRequest, relayPrincipalFor, RELAY_ENV, slackRelayClick, slackSignature, startRelayServer, teamsRelayClick, teamsSignature, verifySlackRequest, verifyTeamsRequest, type RelayAnswer, type RelayClick, type RelayDeps, type RelayPending, type RelayRequest, type RelayResponse, type RelaySettings, } from "./notify-relay.js";
|
|
32
|
+
export { decideRelayClick, handleRelayRequest, NOTIFY_RELAY_POINTS_FLOOR, relayPrincipalFor, RELAY_ENV, slackRelayClick, slackSignature, startRelayServer, teamsRelayClick, teamsSignature, verifySlackRequest, verifyTeamsRequest, type RelayAnswer, type RelayClick, type RelayDeps, type RelayPending, type RelayRequest, type RelayResponse, type RelaySettings, } from "./notify-relay.js";
|
|
33
33
|
export { componentWaveOutputsFile, componentWaveSteps, componentWavesSpec, productAgentSpec, productCommand, productDriftAgent, productPipelineJobs, productWavesSpec, productWavesSpecFile, PRODUCT_WAVES_SPEC_DIR, type ComponentWaveStepOptions, type ComponentWaveSteps, type ComponentWavesSpecOptions, type ProductAgentOptions, type ProductPipelineJobs, type ProductPipelineOptions, } from "./components/product-pipeline.js";
|
|
34
34
|
export { prActionJob, PR_ACTION_JOB, prApplyComment, prCommentLockJobs, prCommentPreviewJob, prLoopSetup, engineSetupLines, withProductBin, type PrActionJob, type PrActionJobOptions, type PrCommentLockJob, type PrCommentPreviewJob } from "./components/pr-pipeline.js";
|
|
35
35
|
/**
|
package/dist/ci-product.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-product.d.ts","sourceRoot":"","sources":["../src/ci-product.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAE3C,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,WAAW,EACX,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,cAAc,EACd,oBAAoB,EACpB,eAAe,EAC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eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhI;;;;;;GAMG;AACH,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,KAAK,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AACtK,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE1F;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,aAAsB,CAAC;AAC1D,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEjF;;;;;;;;;;GAUG;AACH,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAChG,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EACL,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,YAAY,GAClB,MAAM,QAAQ,CAAC"}
|
package/dist/ci-product.js
CHANGED
|
@@ -27,7 +27,7 @@ export const NOTIFY_RELAY_FLOOR = "0.124.55";
|
|
|
27
27
|
* `prCommentPreviewJob` and this constant together.
|
|
28
28
|
*/
|
|
29
29
|
export const PR_PREVIEW_FLOOR = "0.124.55";
|
|
30
|
-
export { decideRelayClick, handleRelayRequest, relayPrincipalFor, RELAY_ENV, slackRelayClick, slackSignature, startRelayServer, teamsRelayClick, teamsSignature, verifySlackRequest, verifyTeamsRequest, } from "./notify-relay.js";
|
|
30
|
+
export { decideRelayClick, handleRelayRequest, NOTIFY_RELAY_POINTS_FLOOR, relayPrincipalFor, RELAY_ENV, slackRelayClick, slackSignature, startRelayServer, teamsRelayClick, teamsSignature, verifySlackRequest, verifyTeamsRequest, } from "./notify-relay.js";
|
|
31
31
|
export { componentWaveOutputsFile, componentWaveSteps, componentWavesSpec, productAgentSpec, productCommand, productDriftAgent, productPipelineJobs, productWavesSpec, productWavesSpecFile, PRODUCT_WAVES_SPEC_DIR, } from "./components/product-pipeline.js";
|
|
32
32
|
export { prActionJob, PR_ACTION_JOB, prApplyComment, prCommentLockJobs, prCommentPreviewJob, prLoopSetup, engineSetupLines, withProductBin } from "./components/pr-pipeline.js";
|
|
33
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commit.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/commit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,OAAO,EAOL,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"commit.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/commit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,OAAO,EAOL,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGjF,OAAO,EAA2D,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAMnH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkClD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,YAAY,CAYjG;AAED,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8D/E"}
|