@intentius/chant 0.124.71 → 0.124.72
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 +29 -0
- package/dist/ci-commit.d.ts.map +1 -1
- package/dist/ci-commit.js +30 -1
- 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 +4 -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 +40 -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.ts +45 -1
- 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 +10 -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 +49 -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,8 @@ 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";
|
|
34
36
|
/** What starts a commit run: a person's comment, or a check job's finding. */
|
|
35
37
|
export type CommitTrigger = "comment" | "check";
|
|
36
38
|
export declare const COMMIT_TRIGGERS: readonly CommitTrigger[];
|
|
@@ -70,6 +72,19 @@ export interface OpCommitSpec {
|
|
|
70
72
|
* its parents are the head and the base tip.
|
|
71
73
|
*/
|
|
72
74
|
mergeBase?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* GitHub and Forgejo (#4749): push with the job's own token, so `tokenEnv`
|
|
77
|
+
* may be left out. Such a push starts no workflow run, so the new head gets
|
|
78
|
+
* no plan from it; `after` is where a product does what that run would
|
|
79
|
+
* have done. Refused on GitLab, where a job token cannot push.
|
|
80
|
+
*/
|
|
81
|
+
jobToken?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Shell lines the push job runs once it has pushed a commit (#4749), with
|
|
84
|
+
* `CHANT_COMMIT_SHA` set to it, such as a product taking the plan locks of
|
|
85
|
+
* the new head. Not run when nothing was pushed.
|
|
86
|
+
*/
|
|
87
|
+
after?: string[];
|
|
73
88
|
}
|
|
74
89
|
/** A commit job's settings, every default filled and checked. */
|
|
75
90
|
export interface CommitSettings {
|
|
@@ -84,6 +99,10 @@ export interface CommitSettings {
|
|
|
84
99
|
timeout: number;
|
|
85
100
|
env: string;
|
|
86
101
|
mergeBase: boolean;
|
|
102
|
+
/** Push with the job token (#4749). */
|
|
103
|
+
jobToken: boolean;
|
|
104
|
+
/** Lines the push job runs after a push (#4749). */
|
|
105
|
+
after: string[];
|
|
87
106
|
}
|
|
88
107
|
export declare const COMMIT_MAX_RUNS = 3;
|
|
89
108
|
export declare const COMMIT_TIMEOUT_MINUTES = 10;
|
|
@@ -117,6 +136,16 @@ export declare const COMMIT_BASE_REF = "refs/chant/commit-base";
|
|
|
117
136
|
export declare const COMMIT_DECISION_FILE = "decision.json";
|
|
118
137
|
export declare const COMMIT_PATCH_FILE = "change.patch";
|
|
119
138
|
export declare const COMMIT_RC_FILE = "rc";
|
|
139
|
+
/** What `chant commit land` leaves when it pushed (#4749): the pushed commit, which the push job's `after` lines read. */
|
|
140
|
+
export declare const COMMIT_PUSHED_FILE = "pushed";
|
|
141
|
+
/**
|
|
142
|
+
* After a check that runs on push (#4749): fetch the pushed commit, by its
|
|
143
|
+
* sha in `shaVar`, into `into` as the head. The pull request is found from
|
|
144
|
+
* the pushed branch (`resolveCommitRequest`).
|
|
145
|
+
*/
|
|
146
|
+
export declare function commitPushedHeadFetchLine(shaVar: string, into?: string): string;
|
|
147
|
+
/** The push job's lines after land (#4749): `after`, run only when a commit was pushed, with \`CHANT_COMMIT_SHA\` set. */
|
|
148
|
+
export declare function commitAfterLines(s: Pick<CommitSettings, "after">, dir?: string): string[];
|
|
120
149
|
/** The commit identity the job's commits carry. */
|
|
121
150
|
export declare const COMMIT_GIT_NAME = "chant commit";
|
|
122
151
|
export declare const COMMIT_GIT_EMAIL = "chant-commit@localhost";
|
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,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,aAAa,CAAC;AAE1C,wIAAwI;AACxI,eAAO,MAAM,oBAAoB,aAAe,CAAC;AAEjD,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAChD,eAAO,MAAM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xE,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,9 @@ 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 = NEXT_RELEASE;
|
|
36
38
|
export const COMMIT_TRIGGERS = ["comment", "check"];
|
|
37
39
|
export const COMMIT_MAX_RUNS = 3;
|
|
38
40
|
export const COMMIT_TIMEOUT_MINUTES = 10;
|
|
@@ -66,6 +68,24 @@ export const COMMIT_BASE_REF = "refs/chant/commit-base";
|
|
|
66
68
|
export const COMMIT_DECISION_FILE = "decision.json";
|
|
67
69
|
export const COMMIT_PATCH_FILE = "change.patch";
|
|
68
70
|
export const COMMIT_RC_FILE = "rc";
|
|
71
|
+
/** What `chant commit land` leaves when it pushed (#4749): the pushed commit, which the push job's `after` lines read. */
|
|
72
|
+
export const COMMIT_PUSHED_FILE = "pushed";
|
|
73
|
+
/**
|
|
74
|
+
* After a check that runs on push (#4749): fetch the pushed commit, by its
|
|
75
|
+
* sha in `shaVar`, into `into` as the head. The pull request is found from
|
|
76
|
+
* the pushed branch (`resolveCommitRequest`).
|
|
77
|
+
*/
|
|
78
|
+
export function commitPushedHeadFetchLine(shaVar, into = COMMIT_HEAD_REF) {
|
|
79
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(shaVar))
|
|
80
|
+
throw new AgentError(`${shaVar} is not a variable name`);
|
|
81
|
+
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}"`;
|
|
82
|
+
}
|
|
83
|
+
/** The push job's lines after land (#4749): `after`, run only when a commit was pushed, with \`CHANT_COMMIT_SHA\` set. */
|
|
84
|
+
export function commitAfterLines(s, dir = COMMIT_DIR) {
|
|
85
|
+
if (s.after.length === 0)
|
|
86
|
+
return [];
|
|
87
|
+
return [`if [ -s ${dir}/${COMMIT_PUSHED_FILE} ]; then`, ` export CHANT_COMMIT_SHA="$(cat ${dir}/${COMMIT_PUSHED_FILE})"`, ...s.after.map((l) => ` ${l}`), "fi"];
|
|
88
|
+
}
|
|
69
89
|
/** The commit identity the job's commits carry. */
|
|
70
90
|
export const COMMIT_GIT_NAME = "chant commit";
|
|
71
91
|
export const COMMIT_GIT_EMAIL = "chant-commit@localhost";
|
|
@@ -111,6 +131,13 @@ export function resolveCommitSpec(name, spec, product = "chant") {
|
|
|
111
131
|
const env = spec.env ?? "local";
|
|
112
132
|
if (!NAME.test(env))
|
|
113
133
|
throw new AgentError(`${where}: env is a ledger environment name`);
|
|
134
|
+
if (spec.jobToken !== undefined && typeof spec.jobToken !== "boolean")
|
|
135
|
+
throw new AgentError(`${where}: jobToken is true or false`);
|
|
136
|
+
if (spec.jobToken && spec.tokenEnv !== undefined)
|
|
137
|
+
throw new AgentError(`${where}: jobToken pushes with the job's own token, so leave tokenEnv out`);
|
|
138
|
+
const after = spec.after ?? [];
|
|
139
|
+
if (!Array.isArray(after) || !after.every((l) => typeof l === "string" && l.trim() !== "" && !l.includes("\n")))
|
|
140
|
+
throw new AgentError(`${where}: after is a list of shell lines, one command each`);
|
|
114
141
|
return {
|
|
115
142
|
name,
|
|
116
143
|
on: spec.on,
|
|
@@ -123,6 +150,8 @@ export function resolveCommitSpec(name, spec, product = "chant") {
|
|
|
123
150
|
timeout: spec.timeout === undefined ? COMMIT_TIMEOUT_MINUTES : intIn(`${where}: timeout`, spec.timeout, 1, 120),
|
|
124
151
|
env,
|
|
125
152
|
mergeBase: spec.mergeBase === true,
|
|
153
|
+
jobToken: spec.jobToken === true,
|
|
154
|
+
after: [...after],
|
|
126
155
|
};
|
|
127
156
|
}
|
|
128
157
|
/** The settings as the generated jobs' variables. */
|
|
@@ -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,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AO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,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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C;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
|
@@ -25,13 +25,16 @@
|
|
|
25
25
|
import { CHANT_WORDS } from "./ci-product-words.js";
|
|
26
26
|
import { sendOtlpGauges } from "./otlp-metrics.js";
|
|
27
27
|
import { buildDelivery, deliveryGauges } from "./ci-estate/delivery.js";
|
|
28
|
+
import { NEXT_RELEASE } from "./release-floors.js";
|
|
28
29
|
import { ledgerOverdue } from "./ci-estate/overdue.js";
|
|
29
30
|
import { buildEstate, ESTATE_FILES, renderEstateHtml } from "./ci-estate/page.js";
|
|
30
31
|
import { estateRows } from "./ci-estate/rows.js";
|
|
31
32
|
/** The first chant with `@intentius/chant/ci-estate` (#4612). */
|
|
32
33
|
export const CI_ESTATE_FLOOR = "0.124.55";
|
|
34
|
+
/** The first chant with `buildRecordDelivery`: delivery metrics from a product's report index and audit trail (#4612). Products feature-detect on it. */
|
|
35
|
+
export const CI_ESTATE_RECORDS_FLOOR = NEXT_RELEASE;
|
|
33
36
|
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";
|
|
37
|
+
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
38
|
export { ledgerOverdue } from "./ci-estate/overdue.js";
|
|
36
39
|
export { buildEstate, esc, estateSchema, memberState, renderDeliverySection, renderEstateHtml, ESTATE_FILES, RECENT_RUNS, } from "./ci-estate/page.js";
|
|
37
40
|
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,EACf,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB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AC1D,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"}
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* generator wrote into the workflow file of the base branch.
|
|
14
14
|
*/
|
|
15
15
|
import { execFileSync } from "node:child_process";
|
|
16
|
-
import { readFileSync } from "node:fs";
|
|
16
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
17
17
|
import { tmpdir } from "node:os";
|
|
18
18
|
import { join, resolve } from "node:path";
|
|
19
19
|
import { AgentError } from "../../ci-agent.js";
|
|
20
|
-
import { COMMIT_DIR, commitSettingsFromEnv, landCommitChange, prepareCommitRun, runCommit, runCommitArgv, } from "../../ci-commit.js";
|
|
20
|
+
import { COMMIT_DIR, commitSettingsFromEnv, landCommitChange, prepareCommitRun, runCommit, runCommitArgv, COMMIT_PUSHED_FILE, } from "../../ci-commit.js";
|
|
21
21
|
import { activeProductWords } from "../../ci-product-words.js";
|
|
22
22
|
import { CHANT_EXIT } from "../../exit-codes.js";
|
|
23
23
|
import { appendRunRecord, readRunLedger } from "../../lifecycle/run-ledger.js";
|
|
@@ -131,6 +131,9 @@ export async function runCommitCommandLine(ctx) {
|
|
|
131
131
|
now: () => new Date(),
|
|
132
132
|
...(ci ? { runOrigin: ci.runOrigin } : {}),
|
|
133
133
|
});
|
|
134
|
+
// #4749: what was pushed, for the push job's `after` lines.
|
|
135
|
+
if (out.result === "pushed" && out.commit)
|
|
136
|
+
writeFileSync(join(dir, COMMIT_PUSHED_FILE), `${out.commit}\n`);
|
|
134
137
|
console.error(formatInfo(`${settings.name}: ${out.result}: ${out.reason}`));
|
|
135
138
|
return out.code;
|
|
136
139
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify-relay.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/notify-relay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notify-relay.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/notify-relay.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAuE,KAAK,SAAS,EAAqB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEhK,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG;IAAE,QAAQ,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAkBxI;AAYD,kEAAkE;AAClE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,CAyE3E;AAED,+DAA+D;AAC/D,wBAAsB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAa1E"}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Each click fetches `chant/lifecycle`, reads the signers file at base, and
|
|
17
17
|
* records through `recordGateApproval`, one click at a time, so two clicks
|
|
18
|
-
* never race on the ledger.
|
|
18
|
+
* never race on the ledger. A gate that asks a decision point gets its
|
|
19
|
+
* question answered through `answerPoint` instead (#4611).
|
|
19
20
|
*/
|
|
20
21
|
import { activeProductWords } from "../../ci-product-words.js";
|
|
21
22
|
import { CHANT_EXIT } from "../../exit-codes.js";
|
|
@@ -79,10 +80,29 @@ export function checkoutRelayDeps(cwd, principal) {
|
|
|
79
80
|
if (!digestAsked)
|
|
80
81
|
continue;
|
|
81
82
|
const fact = latestPendingGate((await readGateLedger(p.op, { cwd })).pending.filter((f) => f.environment === p.environment), p.gate);
|
|
82
|
-
|
|
83
|
+
const q = fact?.answer;
|
|
84
|
+
out.push({
|
|
85
|
+
op: p.op,
|
|
86
|
+
gate: p.gate,
|
|
87
|
+
digest: digestAsked,
|
|
88
|
+
...(p.environment !== undefined ? { environment: p.environment } : {}),
|
|
89
|
+
...(fact?.request ? { request: fact.request } : {}),
|
|
90
|
+
...(q ? { question: { point: q.point, id: q.id, ...(q.pass ? { pass: q.pass } : {}) } } : {}),
|
|
91
|
+
});
|
|
83
92
|
}
|
|
84
93
|
return out;
|
|
85
94
|
}),
|
|
95
|
+
answer: (input) => one(async () => {
|
|
96
|
+
const { answerPoint } = await import("../../workspace/decide.js");
|
|
97
|
+
const doc = await answerPoint({ cwd, id: input.id, answer: input.answer, by: [input.by], relayedBy: input.relayedBy });
|
|
98
|
+
if ("error" in doc)
|
|
99
|
+
return { ok: false, error: `${doc.error.code}: ${doc.error.message}` };
|
|
100
|
+
if (doc.question.state !== "answered")
|
|
101
|
+
return { ok: false, error: `the question is ${doc.question.state}: ${input.by}'s answer does not settle it on its own` };
|
|
102
|
+
const { pushLifecycleRebasing } = await import("../../lifecycle/git.js");
|
|
103
|
+
await pushLifecycleRebasing({ cwd }).catch(() => undefined);
|
|
104
|
+
return { ok: true };
|
|
105
|
+
}),
|
|
86
106
|
approve: (input) => one(async () => {
|
|
87
107
|
const { recordGateApproval } = await import("./approve.js");
|
|
88
108
|
// chant approve prints why it refused; the relay sends that line to the thread.
|
package/dist/config.d.ts
CHANGED
|
@@ -170,6 +170,20 @@ export declare const ChantConfigSchema: z.ZodObject<{
|
|
|
170
170
|
build: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
171
171
|
chant: z.ZodOptional<z.ZodString>;
|
|
172
172
|
after: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
173
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
174
|
+
read: "read";
|
|
175
|
+
write: "write";
|
|
176
|
+
}>>>;
|
|
177
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
178
|
+
setup: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
179
|
+
uses: z.ZodString;
|
|
180
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
181
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
182
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
183
|
+
run: z.ZodString;
|
|
184
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
185
|
+
}, z.core.$strict>]>>>;
|
|
186
|
+
file: z.ZodOptional<z.ZodString>;
|
|
173
187
|
}, z.core.$strict>>;
|
|
174
188
|
}, z.core.$strip>>;
|
|
175
189
|
run: z.ZodOptional<z.ZodObject<{
|