@intentius/chant 0.124.70 → 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-agent.d.ts +12 -1
- package/dist/ci-agent.d.ts.map +1 -1
- package/dist/ci-agent.js +13 -8
- package/dist/ci-commit.d.ts +326 -0
- package/dist/ci-commit.d.ts.map +1 -0
- package/dist/ci-commit.js +725 -0
- 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-words.d.ts +6 -1
- package/dist/ci-product-words.d.ts.map +1 -1
- package/dist/ci-product-words.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/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +7 -2
- package/dist/cli/handlers/commit.d.ts +26 -0
- package/dist/cli/handlers/commit.d.ts.map +1 -0
- package/dist/cli/handlers/commit.js +145 -0
- package/dist/cli/handlers/notify-relay.d.ts.map +1 -1
- package/dist/cli/handlers/notify-relay.js +22 -2
- package/dist/cli/handlers/pr.d.ts +6 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +16 -7
- package/dist/cli/handlers/release.d.ts +9 -0
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +114 -5
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +17 -0
- package/dist/components/product-pipeline.d.ts +33 -0
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +34 -1
- package/dist/components/release-compile.d.ts +2 -0
- package/dist/components/release-compile.d.ts.map +1 -1
- package/dist/components/release-compile.js +8 -4
- package/dist/config.d.ts +60 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +16 -0
- package/dist/lexicon.d.ts +54 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lexicon.js +28 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +4 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts.map +1 -1
- package/dist/lifecycle/__fixtures__/publish-fakes.js +6 -2
- package/dist/lifecycle/gated-request.d.ts +3 -1
- package/dist/lifecycle/gated-request.d.ts.map +1 -1
- package/dist/lifecycle/gated-request.js +5 -2
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +57 -0
- package/dist/lifecycle/publish-declaration.d.ts +16 -0
- package/dist/lifecycle/publish-declaration.d.ts.map +1 -1
- package/dist/lifecycle/publish-declaration.js +35 -3
- package/dist/lifecycle/publish-forge.d.ts +12 -0
- package/dist/lifecycle/publish-forge.d.ts.map +1 -1
- package/dist/lifecycle/publish-forge.js +102 -19
- package/dist/lifecycle/publish-npm.d.ts +15 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -1
- package/dist/lifecycle/publish-npm.js +28 -1
- package/dist/lifecycle/publish-oci.d.ts +2 -0
- package/dist/lifecycle/publish-oci.d.ts.map +1 -1
- package/dist/lifecycle/publish-oci.js +10 -0
- package/dist/lifecycle/release-cut.d.ts +7 -1
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +8 -1
- package/dist/lifecycle/release-images.d.ts +87 -0
- package/dist/lifecycle/release-images.d.ts.map +1 -0
- package/dist/lifecycle/release-images.js +138 -0
- package/dist/lifecycle/release-publish.d.ts +2 -0
- package/dist/lifecycle/release-publish.d.ts.map +1 -1
- 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/review-agent.d.ts.map +1 -1
- package/dist/op/activities/review-agent.js +4 -2
- package/dist/op/gate.d.ts +5 -1
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +7 -2
- package/dist/op/op-waves-notify.d.ts +1 -1
- package/dist/op/op-waves-notify.d.ts.map +1 -1
- package/dist/op/op-waves-notify.js +2 -1
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +12 -8
- package/dist/op/op-waves.d.ts +9 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +11 -0
- package/dist/pr-forge-base.d.ts +18 -0
- package/dist/pr-forge-base.d.ts.map +1 -0
- package/dist/pr-forge-base.js +29 -0
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/wave-runtime.mjs +315 -315
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +1 -2
- package/dist/workspace/release-workflow.d.ts +47 -0
- package/dist/workspace/release-workflow.d.ts.map +1 -1
- package/dist/workspace/release-workflow.js +258 -14
- package/package.json +1 -1
- package/src/ci-agent.ts +13 -8
- package/src/ci-commit.test.ts +415 -0
- package/src/ci-commit.ts +901 -0
- 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-words.ts +6 -2
- package/src/ci-product.ts +1 -0
- package/src/cli/handlers/approve.ts +6 -2
- package/src/cli/handlers/commit.ts +155 -0
- package/src/cli/handlers/notify-relay.ts +21 -2
- package/src/cli/handlers/operator.test.ts +2 -0
- package/src/cli/handlers/pr-wave-approve-lines.test.ts +32 -0
- package/src/cli/handlers/pr.ts +17 -7
- package/src/cli/handlers/release.ts +110 -5
- package/src/cli/main.ts +17 -0
- package/src/components/product-pipeline.test.ts +28 -1
- package/src/components/product-pipeline.ts +54 -1
- package/src/components/release-compile.ts +9 -3
- package/src/config.ts +31 -0
- package/src/lexicon.ts +72 -0
- package/src/lifecycle/__fixtures__/publish-fakes.ts +11 -5
- package/src/lifecycle/gated-request-spend.test.ts +115 -0
- package/src/lifecycle/gated-request.ts +5 -2
- package/src/lifecycle/git.ts +53 -0
- package/src/lifecycle/ledger-two-clones.test.ts +132 -0
- package/src/lifecycle/publish-declaration.ts +35 -3
- package/src/lifecycle/publish-forge-notes.test.ts +193 -0
- package/src/lifecycle/publish-forge.ts +100 -22
- package/src/lifecycle/publish-npm.ts +31 -2
- package/src/lifecycle/publish-oci.ts +10 -0
- package/src/lifecycle/publish-targets.test.ts +2 -1
- package/src/lifecycle/release-cut.ts +17 -1
- package/src/lifecycle/release-images.test.ts +242 -0
- package/src/lifecycle/release-images.ts +174 -0
- package/src/lifecycle/release-publish.ts +2 -0
- package/src/notify-relay.test.ts +55 -1
- package/src/notify-relay.ts +49 -1
- package/src/notify.ts +25 -12
- package/src/op/activities/review-agent.test.ts +20 -1
- package/src/op/activities/review-agent.ts +5 -2
- package/src/op/gate.ts +7 -2
- package/src/op/op-waves-approve-target.test.ts +108 -0
- package/src/op/op-waves-notify.ts +2 -2
- package/src/op/op-waves-run.ts +12 -7
- package/src/op/op-waves.ts +12 -0
- package/src/pr-forge-base.test.ts +37 -0
- package/src/pr-forge-base.ts +36 -0
- package/src/release-floors.ts +1 -1
- package/src/workspace/__fixtures__/release-workflow/forgejo-plain-member.yml +26 -0
- package/src/workspace/__fixtures__/release-workflow/forgejo-plain.yml +23 -0
- package/src/workspace/__fixtures__/release-workflow/forgejo-secure-member.yml +27 -0
- package/src/workspace/__fixtures__/release-workflow/forgejo-secure.yml +24 -0
- package/src/workspace/__fixtures__/release-workflow/github-plain-member.yml +26 -0
- package/src/workspace/__fixtures__/release-workflow/github-plain.yml +23 -0
- package/src/workspace/__fixtures__/release-workflow/github-secure-member.yml +27 -0
- package/src/workspace/__fixtures__/release-workflow/github-secure.yml +24 -0
- package/src/workspace/__fixtures__/release-workflow/gitlab-plain-member.yml +13 -0
- package/src/workspace/__fixtures__/release-workflow/gitlab-plain.yml +12 -0
- package/src/workspace/__fixtures__/release-workflow/gitlab-secure-member.yml +14 -0
- package/src/workspace/__fixtures__/release-workflow/gitlab-secure.yml +13 -0
- package/src/workspace/ci-green.ts +1 -2
- package/src/workspace/release-workflow.test.ts +199 -0
- package/src/workspace/release-workflow.ts +356 -14
|
@@ -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,GA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,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,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,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C,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";
|
|
@@ -31,7 +31,7 @@ export declare const CI_PRODUCT_STAGES: readonly CiProductStage[];
|
|
|
31
31
|
* answers it. `action` (#4653) asks for a day-2 action on one member, which
|
|
32
32
|
* runs under a gated request.
|
|
33
33
|
*/
|
|
34
|
-
export type CiProductCommand = "plan" | "apply" | "lock" | "unlock" | "agent" | "action";
|
|
34
|
+
export type CiProductCommand = "plan" | "apply" | "lock" | "unlock" | "agent" | "action" | "commit";
|
|
35
35
|
export declare const CI_PRODUCT_COMMANDS: readonly CiProductCommand[];
|
|
36
36
|
/**
|
|
37
37
|
* What an approval of a product's waves binds to (ruling B, 2026-10-27).
|
|
@@ -290,6 +290,11 @@ export type ParsedProductComment =
|
|
|
290
290
|
kind: "action";
|
|
291
291
|
member: string;
|
|
292
292
|
address: string;
|
|
293
|
+
}
|
|
294
|
+
/** A commit job's command (#4722), by the word typed: `/terragucci fmt`. Several words may each map onto `commit`. */
|
|
295
|
+
| {
|
|
296
|
+
kind: "commit";
|
|
297
|
+
word: string;
|
|
293
298
|
} | {
|
|
294
299
|
kind: "refused";
|
|
295
300
|
reason: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-product-words.d.ts","sourceRoot":"","sources":["../src/ci-product-words.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,iGAAiG;AACjG,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAE/G,8EAA8E;AA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BAAqB;aAAE,MAAM,EAAE,cAAc;CAAW,CAAC;AAEtI,0HAA0H;AAC1H,eAAO,MAAM,yBAAyB,iBAAiB,CAAC;AAExD,sGAAsG;AACtG,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,GAAG,UAAU,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3J;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,oBAAoB,CAiBzH"}
|
package/dist/ci-product-words.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
/** Every stage slot, in the order {@link assertProductWords} reports them. */
|
|
26
26
|
export const CI_PRODUCT_STAGES = ["plan", "apply", "record", "check", "drift", "lock", "approval", "control"];
|
|
27
|
-
export const CI_PRODUCT_COMMANDS = ["plan", "apply", "lock", "unlock", "agent", "action"];
|
|
27
|
+
export const CI_PRODUCT_COMMANDS = ["plan", "apply", "lock", "unlock", "agent", "action", "commit"];
|
|
28
28
|
export const CI_PRODUCT_APPLY_MODES = ["on-merge", "release", "before-merge"];
|
|
29
29
|
/** chant's own wave label in a notify summary. */
|
|
30
30
|
export const CHANT_NOTIFY_WAVE_TEMPLATE = "wave {k} ({name}) of {spec}";
|
|
@@ -356,6 +356,8 @@ export function parseProductComment(words, body, env = {}) {
|
|
|
356
356
|
case "lock":
|
|
357
357
|
case "unlock":
|
|
358
358
|
return parts.length === 2 ? { kind: command } : { kind: "refused", reason: `${line} takes nothing after it` };
|
|
359
|
+
case "commit":
|
|
360
|
+
return parts.length === 2 ? { kind: "commit", word: typed } : { kind: "refused", reason: `${line} takes nothing after it` };
|
|
359
361
|
case "agent": {
|
|
360
362
|
const ask = text.slice(`${prefix} ${typed}`.length).trim();
|
|
361
363
|
if (ask === "")
|
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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oB,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":"approve.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/approve.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACuE,KAAK,UAAU,EAC5F,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAEuC,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAChG,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAiE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAO3H,OA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G;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6GAA6G;IAC7G,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oGAAoG;IACpG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,MAAM,MAAM,mBAAmB,GAC3B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAC3D;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAAC;AA0ClB;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,mBAAmB,CAAC,CAG9B;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAGlI;AAogBD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,oBAAoB,EAAE,EAC7B,QAAQ,EAAE,iBAAiB,GAAG,SAAS,EACvC,OAAO,GAAE,SAAS,iBAAiB,EAA+B,EAClE,KAAK,GAAE,eAAgC,GACtC,MAAM,EAAE,CAuCV"}
|
|
@@ -14,7 +14,7 @@ import { approverOf, humanQuorumSince, tallyGateApprovals } from "../../op/gate.
|
|
|
14
14
|
import { quorumRuleLine, quorumRules, trustQuorumJudge, UNPROVEN_JUDGE } from "../../op/gate-quorum.js";
|
|
15
15
|
import { FAN_OUT_GATE_OP, OVERRIDE_GATE_OP, RELEASE_GATE_OP, WORKSPACE_EXIT_GATE_OP, WORKSPACE_PROMOTE_GATE_OP, WORKSPACE_UPGRADE_GATE_OP } from "../../op/gate-name.js";
|
|
16
16
|
import { PR_GATE_OP } from "../../pr-loop.js";
|
|
17
|
-
import {
|
|
17
|
+
import { LifecyclePushLostError, pushLifecycleRebasing, requireLifecycleLedger } from "../../lifecycle/git.js";
|
|
18
18
|
import { LIFECYCLE_LOCAL_NOTE, isLifecycleLocalNote } from "../../lifecycle/local-note.js";
|
|
19
19
|
import { ledgerRecordingOff, NO_RECORD_ENV } from "../../lifecycle/no-record.js";
|
|
20
20
|
import { checkGateSignature, gateSealPayload, gateSealVersion, WEBAUTHN_SEAL_KIND } from "../../lifecycle/gate-seal.js";
|
|
@@ -58,7 +58,12 @@ const LIFECYCLE_BRANCH = "chant/lifecycle";
|
|
|
58
58
|
* elsewhere to tell, so that case is a quiet suffix and no warning (#3677).
|
|
59
59
|
*/
|
|
60
60
|
async function reportedPush(consequence) {
|
|
61
|
-
|
|
61
|
+
// #4637: a push another writer beat is replayed onto the remote's tip and tried again; an approval line appends.
|
|
62
|
+
const { pushed, pushWarning } = await pushLifecycleRebasing().catch((err) => {
|
|
63
|
+
if (err instanceof LifecyclePushLostError)
|
|
64
|
+
return { pushed: false, pushWarning: err.message };
|
|
65
|
+
throw err;
|
|
66
|
+
});
|
|
62
67
|
if (pushed)
|
|
63
68
|
return { pushed, suffix: "" };
|
|
64
69
|
if (isLifecycleLocalNote(pushWarning))
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant commit prepare|run|land` (#4722): the three steps of the commit jobs
|
|
3
|
+
* the Op generator writes for a scheduled Op spec's `commit`
|
|
4
|
+
* (../../ci-commit.ts says what each does and which token each holds).
|
|
5
|
+
*
|
|
6
|
+
* ```
|
|
7
|
+
* chant commit prepare --forge <kind> [--output <dir>] the commit job, read token: decide
|
|
8
|
+
* chant commit run --forge <kind> [--output <dir>] the commit job, no forge token: run the command
|
|
9
|
+
* chant commit land --forge <kind> [--output <dir>] the push job, push token: commit, push, reply, record
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* The settings come from the job's `CHANT_COMMIT_*` variables, which the
|
|
13
|
+
* generator wrote into the workflow file of the base branch.
|
|
14
|
+
*/
|
|
15
|
+
import { type HeadApproval } from "../../ci-commit.js";
|
|
16
|
+
import { type CiProductWords } from "../../ci-product-words.js";
|
|
17
|
+
import { type LedgerLocation } from "../../lifecycle/git.js";
|
|
18
|
+
import type { CommandContext } from "../registry.js";
|
|
19
|
+
/**
|
|
20
|
+
* Who approved the plan of pull request `pr` at `sha`, read from the gate
|
|
21
|
+
* ledger: a resolution of the pull request's gates (`pr-<n>`, `pr-<n>-<member>`)
|
|
22
|
+
* or the waves' op, made for that commit. Undefined when there is none.
|
|
23
|
+
*/
|
|
24
|
+
export declare function ledgerHeadApproval(words: CiProductWords, location?: LedgerLocation): HeadApproval;
|
|
25
|
+
export declare function runCommitCommandLine(ctx: CommandContext): Promise<number>;
|
|
26
|
+
//# sourceMappingURL=commit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant commit prepare|run|land` (#4722): the three steps of the commit jobs
|
|
3
|
+
* the Op generator writes for a scheduled Op spec's `commit`
|
|
4
|
+
* (../../ci-commit.ts says what each does and which token each holds).
|
|
5
|
+
*
|
|
6
|
+
* ```
|
|
7
|
+
* chant commit prepare --forge <kind> [--output <dir>] the commit job, read token: decide
|
|
8
|
+
* chant commit run --forge <kind> [--output <dir>] the commit job, no forge token: run the command
|
|
9
|
+
* chant commit land --forge <kind> [--output <dir>] the push job, push token: commit, push, reply, record
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* The settings come from the job's `CHANT_COMMIT_*` variables, which the
|
|
13
|
+
* generator wrote into the workflow file of the base branch.
|
|
14
|
+
*/
|
|
15
|
+
import { execFileSync } from "node:child_process";
|
|
16
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
17
|
+
import { tmpdir } from "node:os";
|
|
18
|
+
import { join, resolve } from "node:path";
|
|
19
|
+
import { AgentError } from "../../ci-agent.js";
|
|
20
|
+
import { COMMIT_DIR, commitSettingsFromEnv, landCommitChange, prepareCommitRun, runCommit, runCommitArgv, COMMIT_PUSHED_FILE, } from "../../ci-commit.js";
|
|
21
|
+
import { activeProductWords } from "../../ci-product-words.js";
|
|
22
|
+
import { CHANT_EXIT } from "../../exit-codes.js";
|
|
23
|
+
import { appendRunRecord, readRunLedger } from "../../lifecycle/run-ledger.js";
|
|
24
|
+
import { listFilesInDir, pushLifecycleRebasing, readBlobFromPath } from "../../lifecycle/git.js";
|
|
25
|
+
import { parseGateLedger } from "../../lifecycle/gate-ledger.js";
|
|
26
|
+
import { resolveCiRun } from "../../lifecycle/release-ledger.js";
|
|
27
|
+
import { FORGE_KINDS, forgeFromEnv } from "../../pr-forge.js";
|
|
28
|
+
import { pullRequestBaseFromEnv } from "../../pr-forge-base.js";
|
|
29
|
+
import { formatError, formatInfo } from "../format.js";
|
|
30
|
+
const USAGE = "chant commit prepare|run|land --forge github|gitlab|forgejo [--output <dir>]";
|
|
31
|
+
function fail(message) {
|
|
32
|
+
console.error(formatError({ message, hint: USAGE }));
|
|
33
|
+
return CHANT_EXIT.failed;
|
|
34
|
+
}
|
|
35
|
+
/** git with hooks and fsmonitor off: nothing here runs code from the repository. */
|
|
36
|
+
const git = (args, opts = {}) => execFileSync("git", ["-c", "core.hooksPath=/dev/null", "-c", "core.fsmonitor=false", ...args], {
|
|
37
|
+
cwd: opts.cwd,
|
|
38
|
+
input: opts.input,
|
|
39
|
+
encoding: "utf8",
|
|
40
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
41
|
+
env: { ...process.env, GIT_TERMINAL_PROMPT: "0" },
|
|
42
|
+
maxBuffer: 64 << 20,
|
|
43
|
+
});
|
|
44
|
+
function eventOf() {
|
|
45
|
+
const file = process.env.GITHUB_EVENT_PATH;
|
|
46
|
+
if (!file)
|
|
47
|
+
return undefined;
|
|
48
|
+
try {
|
|
49
|
+
return JSON.parse(readFileSync(file, "utf8"));
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function workDir(name) {
|
|
56
|
+
return join(process.env.RUNNER_TEMP || process.env.TMPDIR || tmpdir(), name);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Who approved the plan of pull request `pr` at `sha`, read from the gate
|
|
60
|
+
* ledger: a resolution of the pull request's gates (`pr-<n>`, `pr-<n>-<member>`)
|
|
61
|
+
* or the waves' op, made for that commit. Undefined when there is none.
|
|
62
|
+
*/
|
|
63
|
+
export function ledgerHeadApproval(words, location) {
|
|
64
|
+
return async (pr, sha) => {
|
|
65
|
+
const own = new RegExp(`^pr-${pr}(-[a-z0-9][a-z0-9-]*)?\\.jsonl$`);
|
|
66
|
+
const files = (await listFilesInDir("_gates", location)).filter((f) => own.test(f) || (words.op !== undefined && f === `${words.op}.jsonl`));
|
|
67
|
+
for (const f of files) {
|
|
68
|
+
const text = await readBlobFromPath("_gates", f, location);
|
|
69
|
+
if (!text)
|
|
70
|
+
continue;
|
|
71
|
+
const hit = parseGateLedger(text).resolutions.find((r) => r.gitSha === sha);
|
|
72
|
+
if (hit)
|
|
73
|
+
return hit.resolvedBy;
|
|
74
|
+
}
|
|
75
|
+
return undefined;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export async function runCommitCommandLine(ctx) {
|
|
79
|
+
const action = ctx.args.path;
|
|
80
|
+
if (action !== "prepare" && action !== "run" && action !== "land")
|
|
81
|
+
return fail(action ? `commit ${action} is not one of prepare, run or land` : "commit needs an action: prepare, run or land");
|
|
82
|
+
const kind = ctx.args.forge;
|
|
83
|
+
if (!kind || !FORGE_KINDS.includes(kind))
|
|
84
|
+
return fail(`--forge is one of ${FORGE_KINDS.join(", ")}`);
|
|
85
|
+
const words = activeProductWords();
|
|
86
|
+
const dir = resolve(ctx.args.output ?? COMMIT_DIR);
|
|
87
|
+
let settings;
|
|
88
|
+
try {
|
|
89
|
+
settings = commitSettingsFromEnv(process.env, words.product);
|
|
90
|
+
}
|
|
91
|
+
catch (e) {
|
|
92
|
+
return fail(e.message);
|
|
93
|
+
}
|
|
94
|
+
const readRuns = async () => (await readRunLedger(settings.env, settings.name)).records;
|
|
95
|
+
const forge = () => forgeFromEnv(kind);
|
|
96
|
+
const approval = ledgerHeadApproval(words);
|
|
97
|
+
try {
|
|
98
|
+
if (action === "prepare") {
|
|
99
|
+
const base = kind !== "gitlab" ? pullRequestBaseFromEnv(kind) : undefined;
|
|
100
|
+
const d = await prepareCommitRun({ settings, words, dir, env: process.env, event: eventOf(), ...(kind !== "gitlab" ? { forge: forge() } : {}), ...(base ? { pullRequestBase: base } : {}), readRuns, approval, git, now: new Date() });
|
|
101
|
+
console.error(formatInfo(d.go ? `${settings.name}: runs on ${d.sha?.slice(0, 12)} for #${d.pr}` : `${settings.name}: does not run: ${d.reason}`));
|
|
102
|
+
return CHANT_EXIT.done;
|
|
103
|
+
}
|
|
104
|
+
if (action === "run") {
|
|
105
|
+
const r = await runCommit({ settings, dir, checkout: process.cwd(), workDir: workDir("chant-commit-work"), env: process.env, git, runCommand: runCommitArgv });
|
|
106
|
+
console.error(formatInfo(`${settings.name}: exited ${r.rc}${r.changed ? ", with a change" : ", changing nothing"}`));
|
|
107
|
+
// The push job says why on the pull request; this job stays green so it runs.
|
|
108
|
+
return CHANT_EXIT.done;
|
|
109
|
+
}
|
|
110
|
+
const ci = resolveCiRun(process.env);
|
|
111
|
+
const landBase = pullRequestBaseFromEnv(kind);
|
|
112
|
+
const out = await landCommitChange({
|
|
113
|
+
...(landBase ? { pullRequestBase: landBase } : {}),
|
|
114
|
+
settings,
|
|
115
|
+
words,
|
|
116
|
+
dir,
|
|
117
|
+
workDir: workDir("chant-commit-land"),
|
|
118
|
+
env: process.env,
|
|
119
|
+
event: eventOf(),
|
|
120
|
+
forge: forge(),
|
|
121
|
+
git,
|
|
122
|
+
push: ({ cwd, ref }) => {
|
|
123
|
+
git(["push", "-q", "origin", `HEAD:${ref}`], { cwd });
|
|
124
|
+
},
|
|
125
|
+
readRuns,
|
|
126
|
+
approval,
|
|
127
|
+
record: async (input) => {
|
|
128
|
+
await appendRunRecord(input);
|
|
129
|
+
await pushLifecycleRebasing();
|
|
130
|
+
},
|
|
131
|
+
now: () => new Date(),
|
|
132
|
+
...(ci ? { runOrigin: ci.runOrigin } : {}),
|
|
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`);
|
|
137
|
+
console.error(formatInfo(`${settings.name}: ${out.result}: ${out.reason}`));
|
|
138
|
+
return out.code;
|
|
139
|
+
}
|
|
140
|
+
catch (e) {
|
|
141
|
+
if (e instanceof AgentError)
|
|
142
|
+
return fail(e.message);
|
|
143
|
+
return fail(`commit ${action}: ${e.message}`);
|
|
144
|
+
}
|
|
145
|
+
}
|