@intentius/chant 0.124.51 → 0.124.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +2 -1
- package/dist/components/capability.d.ts +9 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/covered-round.d.ts +173 -0
- package/dist/components/covered-round.d.ts.map +1 -0
- package/dist/components/covered-round.js +200 -0
- package/dist/components/driver.d.ts +8 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +8 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/pr-run.d.ts +21 -3
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +147 -16
- package/dist/components/wave-plan.d.ts +2 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +4 -1
- package/dist/pr-loop.d.ts +36 -2
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +11 -2
- package/dist/wave-runtime.mjs +3 -3
- package/dist/workspace/pr-report.schema.json +25 -1
- package/package.json +1 -1
- package/src/cli/handlers/pr.ts +2 -1
- package/src/components/capability.ts +9 -0
- package/src/components/covered-round.test.ts +166 -0
- package/src/components/covered-round.ts +293 -0
- package/src/components/driver.ts +12 -0
- package/src/components/index.ts +17 -0
- package/src/components/pr-run.test.ts +212 -1
- package/src/components/pr-run.ts +166 -16
- package/src/components/wave-plan.ts +5 -2
- package/src/pr-loop.test.ts +14 -1
- package/src/pr-loop.ts +43 -4
- package/src/workspace/pr-report.schema.json +25 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-run.d.ts","sourceRoot":"","sources":["../../src/components/pr-run.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pr-run.d.ts","sourceRoot":"","sources":["../../src/components/pr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,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,sEAAsE;IACtE,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;CAChC;AAED,iCAAiC;AACjC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ,CAmCvD"}
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
* component in the project and not the selection.
|
|
24
24
|
* - the upstream is in the change and its plan cannot say, or says the value
|
|
25
25
|
* is known only after apply: no value. The dependent's members list the
|
|
26
|
-
* reference under `unknownInputs
|
|
27
|
-
*
|
|
26
|
+
* reference under `unknownInputs`. The apply plans it again once the
|
|
27
|
+
* upstream applied, and the approval covers that round when it matches the
|
|
28
|
+
* preview (see `coveredRound`).
|
|
28
29
|
*
|
|
29
30
|
* `--seed-outputs` wins over both. The apply stage's plan reads the same
|
|
30
31
|
* values, so on the same estate it gets the digest the plan stage showed.
|
|
@@ -70,10 +71,11 @@
|
|
|
70
71
|
import { composeChangeSet, verifyChangeSetDigest } from "../change-set.js";
|
|
71
72
|
import { evaluateGate } from "../op/gate.js";
|
|
72
73
|
import { memberCounts, PR_APPLY_GATE, prRoundGate, PR_REPORT_CONTRACT, PR_REPORT_SCHEMA_ID, } from "../pr-loop.js";
|
|
73
|
-
import { deployContext, movedWiringReferences, unresolvedWiringReferences, } from "./driver.js";
|
|
74
|
+
import { deployContext, movedWiringReferences, unresolvedWiringReferences, wiringReads, } from "./driver.js";
|
|
74
75
|
import { deployUnits } from "./deploy-units.js";
|
|
75
76
|
import { runFanOut } from "./fan-out-run.js";
|
|
76
77
|
import { remainingFanOut } from "./fan-out.js";
|
|
78
|
+
import { coveredRound } from "./covered-round.js";
|
|
77
79
|
import { capabilitySteps, planWaveComponent, readDeployedOutputs } from "./wave-plan.js";
|
|
78
80
|
/** The phase a pull request's planning is, in its run's events. */
|
|
79
81
|
export const PR_PLAN_PHASE = "plan";
|
|
@@ -105,7 +107,9 @@ export async function planPrSet(options) {
|
|
|
105
107
|
const parts = [];
|
|
106
108
|
const componentOf = new Map();
|
|
107
109
|
const unknownOf = new Map();
|
|
110
|
+
const readsBy = new Map();
|
|
108
111
|
const plans = {};
|
|
112
|
+
const shapes = {};
|
|
109
113
|
let failed = false;
|
|
110
114
|
const emit = options.onRunEvent;
|
|
111
115
|
emit?.({ type: "phase-start", component: null, phase: PR_PLAN_PHASE });
|
|
@@ -149,6 +153,9 @@ export async function planPrSet(options) {
|
|
|
149
153
|
const unknown = unknownInputsOf(component, outputs, inChange);
|
|
150
154
|
if (unknown.unknown.length > 0 || unknown.build.length > 0)
|
|
151
155
|
unknownOf.set(p.component, unknown);
|
|
156
|
+
const reads = readsOf(component, outputs);
|
|
157
|
+
if (reads.length > 0)
|
|
158
|
+
readsBy.set(p.component, reads);
|
|
152
159
|
if ("error" in p) {
|
|
153
160
|
failed = true;
|
|
154
161
|
plannedBy.set(p.component, undefined);
|
|
@@ -160,6 +167,7 @@ export async function planPrSet(options) {
|
|
|
160
167
|
}
|
|
161
168
|
plannedBy.set(p.component, p.outputs);
|
|
162
169
|
plans[p.component] = p.plans;
|
|
170
|
+
Object.assign(shapes, p.shapes);
|
|
163
171
|
for (const part of p.parts) {
|
|
164
172
|
parts.push(part);
|
|
165
173
|
componentOf.set(part.member.member, p.component);
|
|
@@ -171,6 +179,7 @@ export async function planPrSet(options) {
|
|
|
171
179
|
const members = doc.members.map((m) => {
|
|
172
180
|
const component = componentOf.get(m.member) ?? m.member;
|
|
173
181
|
const unknown = unknownOf.get(component);
|
|
182
|
+
const reads = readsBy.get(component);
|
|
174
183
|
return {
|
|
175
184
|
member: m.member,
|
|
176
185
|
component,
|
|
@@ -180,6 +189,7 @@ export async function planPrSet(options) {
|
|
|
180
189
|
...(m.error ? { error: m.error } : {}),
|
|
181
190
|
...(unknown?.unknown.length ? { unknownInputs: unknown.unknown } : {}),
|
|
182
191
|
...(unknown?.build.length ? { buildInputs: unknown.build } : {}),
|
|
192
|
+
...(reads ? { reads } : {}),
|
|
183
193
|
};
|
|
184
194
|
});
|
|
185
195
|
const sorted = (r) => Object.fromEntries(Object.entries(r).sort(([a], [b]) => a.localeCompare(b)));
|
|
@@ -191,6 +201,7 @@ export async function planPrSet(options) {
|
|
|
191
201
|
plans,
|
|
192
202
|
outputs,
|
|
193
203
|
failed,
|
|
204
|
+
...(Object.keys(shapes).length > 0 ? { shapes } : {}),
|
|
194
205
|
...(Object.keys(deployedOutputs).length > 0 ? { deployedOutputs } : {}),
|
|
195
206
|
...(Object.keys(plannedOutputs).length > 0 ? { plannedOutputs } : {}),
|
|
196
207
|
};
|
|
@@ -215,6 +226,32 @@ function unknownInputsOf(component, outputs, inChange) {
|
|
|
215
226
|
}
|
|
216
227
|
return { unknown: [...unknown].sort(), build: [...build].sort() };
|
|
217
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Every other component's output `component`'s steps read, one entry per
|
|
231
|
+
* upstream, sorted: what the report's `reads` says. A read whose value
|
|
232
|
+
* `outputs` holds is listed as well as one it lacks (`unknown`), so the
|
|
233
|
+
* report names each read between components whether or not the plan knew
|
|
234
|
+
* its value. A component's reads of its own outputs are left out.
|
|
235
|
+
*/
|
|
236
|
+
function readsOf(component, outputs) {
|
|
237
|
+
const by = new Map();
|
|
238
|
+
for (const step of capabilitySteps(component.deploy)) {
|
|
239
|
+
const { kind: _kind, ...rest } = step;
|
|
240
|
+
for (const r of wiringReads(rest, outputs)) {
|
|
241
|
+
if (r.source === component.name)
|
|
242
|
+
continue;
|
|
243
|
+
const name = r.ref.slice(r.source.length + 1);
|
|
244
|
+
const at = by.get(r.source) ?? { outputs: new Set(), unknown: new Set() };
|
|
245
|
+
by.set(r.source, at);
|
|
246
|
+
at.outputs.add(name);
|
|
247
|
+
if (!r.known)
|
|
248
|
+
at.unknown.add(name);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return [...by.entries()]
|
|
252
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
253
|
+
.map(([upstream, r]) => ({ upstream, outputs: [...r.outputs].sort(), ...(r.unknown.size > 0 ? { unknown: [...r.unknown].sort() } : {}) }));
|
|
254
|
+
}
|
|
218
255
|
/**
|
|
219
256
|
* Why `component` cannot apply the plan that read `read` now that `now`
|
|
220
257
|
* stands (#3999): each reference its steps make that resolves to another
|
|
@@ -289,6 +326,63 @@ export function approversWhoAuthored(approvedBy, authors) {
|
|
|
289
326
|
const wrote = new Set(authors.map(norm));
|
|
290
327
|
return approvedBy.filter((by) => wrote.has(norm(by)));
|
|
291
328
|
}
|
|
329
|
+
/**
|
|
330
|
+
* Whether the first approval covers a round's fresh plan (#4419). The
|
|
331
|
+
* approval binds `options.set.doc.digest`; the round's components and
|
|
332
|
+
* members must be ones that plan previewed, and what differs is only what
|
|
333
|
+
* it marked unknown.
|
|
334
|
+
*/
|
|
335
|
+
function roundCover(options, fresh, plan, now, inChange, byName) {
|
|
336
|
+
if (options.approval?.status !== "approved")
|
|
337
|
+
return { covered: false, reason: "no approval of the first plan stands" };
|
|
338
|
+
// The values the round reads of a component it plans again are the ones
|
|
339
|
+
// that plan says it will expose: it has not applied yet, so the outputs
|
|
340
|
+
// standing say nothing of it. An output the first plan knew and the round's
|
|
341
|
+
// plan knows as the same value is not a changed input, whichever of the
|
|
342
|
+
// two applies first.
|
|
343
|
+
const reads = { ...now };
|
|
344
|
+
for (const name of plan.order)
|
|
345
|
+
if (fresh.outputs[name])
|
|
346
|
+
reads[name] = fresh.outputs[name];
|
|
347
|
+
const changedKnown = {};
|
|
348
|
+
for (const name of plan.order) {
|
|
349
|
+
const component = byName.get(name);
|
|
350
|
+
if (!component)
|
|
351
|
+
continue;
|
|
352
|
+
const refs = new Set();
|
|
353
|
+
for (const step of capabilitySteps(component.deploy)) {
|
|
354
|
+
const { kind: _kind, ...rest } = step;
|
|
355
|
+
for (const r of movedWiringReferences(rest, options.set.outputs, reads))
|
|
356
|
+
if (!(r.publish && inChange.has(r.source)))
|
|
357
|
+
refs.add(r.ref);
|
|
358
|
+
}
|
|
359
|
+
changedKnown[name] = [...refs].sort();
|
|
360
|
+
}
|
|
361
|
+
const approved = { doc: options.set.doc, members: options.set.members, ...(options.set.shapes ? { shapes: options.set.shapes } : {}) };
|
|
362
|
+
return coveredRound({
|
|
363
|
+
approved,
|
|
364
|
+
approvedDigest: options.set.doc.digest,
|
|
365
|
+
fresh: { doc: fresh.doc, members: fresh.members, ...(fresh.shapes ? { shapes: fresh.shapes } : {}) },
|
|
366
|
+
changedKnown,
|
|
367
|
+
attributes: (member) => memberAttributes(options.set.doc, fresh.doc, member, fresh.shapes?.[member] !== undefined),
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* The part of coverage that reads the change set's own attributes, shared by
|
|
372
|
+
* a round, a resume and a wave: a member whose planner describes no changes
|
|
373
|
+
* (and gave no shape) is covered only by the digest it was approved with, and
|
|
374
|
+
* anything else is {@link planCoveredBy}'s.
|
|
375
|
+
*/
|
|
376
|
+
function memberAttributes(approved, fresh, member, hasShape) {
|
|
377
|
+
if (!hasShape) {
|
|
378
|
+
const now = fresh.members.find((m) => m.member === member);
|
|
379
|
+
const was = approved.members.find((m) => m.member === member);
|
|
380
|
+
if (now && was && now.planner === "chant" && now.lexicon === "chant" && now.status === "planned" && now.planDigest !== was.planDigest) {
|
|
381
|
+
return `${member} now plans to ${now.planDigest}, not the approved ${was.planDigest ?? "(none)"}, and its planner describes no changes to compare`;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
return planCoveredBy(approved, fresh, member);
|
|
385
|
+
}
|
|
292
386
|
/** Two runs of one apply as one: `b` ran after `a`, against the outputs `a` left. */
|
|
293
387
|
function joinRuns(a, b) {
|
|
294
388
|
const status = a.status === "fail" || b.status === "fail" ? "fail" : a.status === "gated" || b.status === "gated" ? "gated" : "ok";
|
|
@@ -357,22 +451,36 @@ export async function applyPrSet(options) {
|
|
|
357
451
|
});
|
|
358
452
|
for (const name of plan.order)
|
|
359
453
|
roundOf.set(name, { round, set });
|
|
360
|
-
const
|
|
361
|
-
|
|
454
|
+
const cover = roundCover(options, set, plan, run.componentOutputs, inChange, byName);
|
|
455
|
+
const record = (status, approval, message, covered) => {
|
|
456
|
+
rounds.push({
|
|
457
|
+
round,
|
|
458
|
+
gate,
|
|
459
|
+
digest: set.doc.digest,
|
|
460
|
+
components: plan.order,
|
|
461
|
+
approval,
|
|
462
|
+
status,
|
|
463
|
+
...(message ? { message } : {}),
|
|
464
|
+
...(covered ? { covered } : {}),
|
|
465
|
+
...(!covered && options.approval?.status === "approved" && cover.covered === false ? { notCovered: cover.reason } : {}),
|
|
466
|
+
changeSet: set.doc,
|
|
467
|
+
});
|
|
362
468
|
};
|
|
363
469
|
if (set.failed) {
|
|
364
470
|
record("plan-failed", { status: "pending" });
|
|
365
471
|
stopped = "plan-failed";
|
|
366
472
|
break;
|
|
367
473
|
}
|
|
368
|
-
const decision =
|
|
474
|
+
const decision = cover.covered && options.approval
|
|
475
|
+
? { satisfied: true, approval: options.approval, covered: { digest: cover.digest, filledInputs: cover.filledInputs } }
|
|
476
|
+
: await options.decideRound({ round, gate, set, plan, ...(options.approval?.status === "approved" && !cover.covered ? { notCovered: cover.reason } : {}) });
|
|
369
477
|
if (!decision.satisfied) {
|
|
370
478
|
record("waiting", decision.approval, decision.message);
|
|
371
479
|
stopped = "waiting";
|
|
372
480
|
break;
|
|
373
481
|
}
|
|
374
482
|
const next = await runRound(plan, set.plans, set.outputs, run.componentOutputs);
|
|
375
|
-
record(next.status === "fail" ? "failed" : "applied", decision.approval);
|
|
483
|
+
record(next.status === "fail" ? "failed" : "applied", decision.approval, undefined, decision.covered);
|
|
376
484
|
run = joinRuns(run, next);
|
|
377
485
|
}
|
|
378
486
|
const completed = new Set(run.completed);
|
|
@@ -522,9 +630,8 @@ export async function resumePrSet(options) {
|
|
|
522
630
|
seededOutputs: { ...(options.seededOutputs ?? {}), ...options.record.planOutputs },
|
|
523
631
|
...(options.targets ? { targets: options.targets } : {}),
|
|
524
632
|
});
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
.filter((r) => r !== undefined);
|
|
633
|
+
// #4422: decided as a round decides (`coveredRound`), by the same function a wave uses.
|
|
634
|
+
const reasons = waveNotCovered(options.record.changeSet, fresh.doc, options.record.members);
|
|
528
635
|
if (reasons.length > 0)
|
|
529
636
|
return { ok: false, reasons, fresh };
|
|
530
637
|
return {
|
|
@@ -564,21 +671,45 @@ export function prWavePlan(plan, components, wave, completed = []) {
|
|
|
564
671
|
* returns no change set) is covered only by the digest it was approved
|
|
565
672
|
* with, since with no entries there is nothing to compare a moved plan by.
|
|
566
673
|
*/
|
|
567
|
-
export function waveNotCovered(approved, fresh, approvedMembers = []) {
|
|
674
|
+
export function waveNotCovered(approved, fresh, approvedMembers = [], shapes = {}) {
|
|
568
675
|
// #3999: a member whose approved plan waited only on an artifact a build in
|
|
569
676
|
// the change publishes is covered by that build's provenance, as it is
|
|
570
677
|
// without --wave-gate.
|
|
571
678
|
const byBuild = new Set(approvedMembers.filter((m) => m.buildInputs?.length && !m.unknownInputs?.length).map((m) => m.member));
|
|
679
|
+
const prMember = new Map(approvedMembers.map((m) => [m.member, m]));
|
|
680
|
+
// #4422: the same decision a round makes (`coveredRound`), so a resume, a
|
|
681
|
+
// wave and a round agree for equivalent inputs. A member the document names
|
|
682
|
+
// and the caller does not stands for a component of its own name.
|
|
683
|
+
const approvedSide = {
|
|
684
|
+
doc: approved,
|
|
685
|
+
members: approved.members.map((m) => ({
|
|
686
|
+
member: m.member,
|
|
687
|
+
component: prMember.get(m.member)?.component ?? m.member,
|
|
688
|
+
...(prMember.get(m.member)?.unknownInputs?.length ? { unknownInputs: prMember.get(m.member).unknownInputs } : {}),
|
|
689
|
+
})),
|
|
690
|
+
...(shapes.approved && shapes.fresh ? { shapes: shapes.approved } : {}),
|
|
691
|
+
};
|
|
572
692
|
return fresh.members
|
|
573
693
|
.map((m) => {
|
|
574
694
|
if (byBuild.has(m.member))
|
|
575
695
|
return undefined;
|
|
576
696
|
const was = approved.members.find((a) => a.member === m.member);
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
697
|
+
if (!was)
|
|
698
|
+
return planCoveredBy(approved, fresh, m.member);
|
|
699
|
+
if (was.planDigest !== null && m.planDigest === was.planDigest)
|
|
700
|
+
return undefined;
|
|
701
|
+
const hasShape = shapes.approved !== undefined && shapes.fresh?.[m.member] !== undefined;
|
|
702
|
+
const cover = coveredRound({
|
|
703
|
+
approved: approvedSide,
|
|
704
|
+
approvedDigest: approved.digest,
|
|
705
|
+
fresh: {
|
|
706
|
+
doc: fresh,
|
|
707
|
+
members: [{ member: m.member, component: prMember.get(m.member)?.component ?? m.member }],
|
|
708
|
+
...(hasShape ? { shapes: shapes.fresh } : {}),
|
|
709
|
+
},
|
|
710
|
+
attributes: (member) => memberAttributes(approved, fresh, member, hasShape),
|
|
711
|
+
});
|
|
712
|
+
return cover.covered ? undefined : cover.reason;
|
|
582
713
|
})
|
|
583
714
|
.filter((r) => r !== undefined);
|
|
584
715
|
}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
* plans as `undefined`. Cross-component wiring (`stackOutput()`,
|
|
27
27
|
* `@<component>.publish.*`) resolves.
|
|
28
28
|
*/
|
|
29
|
+
import type { PlanShape } from "./covered-round.js";
|
|
29
30
|
import { type DriverComponent, type DriverPhase, type DriverStep } from "./driver.js";
|
|
30
31
|
import type { CapabilityPlan, CapabilityRegistry, DeployContext, PlannedOutputs } from "./capability.js";
|
|
31
32
|
import type { WaveMember } from "../gated-waves.js";
|
|
@@ -44,6 +45,7 @@ export type WaveComponentPlan = {
|
|
|
44
45
|
plans: Record<string, unknown>;
|
|
45
46
|
parts: ChangeSetPart[];
|
|
46
47
|
outputs?: PlannedOutputs;
|
|
48
|
+
shapes?: Record<string, PlanShape>;
|
|
47
49
|
} | {
|
|
48
50
|
component: string;
|
|
49
51
|
error: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wave-plan.d.ts","sourceRoot":"","sources":["../../src/components/wave-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAoE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAIrJ,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACtG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GACzB;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,KAAK,EAAE,aAAa,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"wave-plan.d.ts","sourceRoot":"","sources":["../../src/components/wave-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAoE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAIrJ,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACtG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;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cAAc,GAAG,cAAc,CAgBrG;AAUD;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,kBAAkB,EAC5B,GAAG,EAAE,aAAa,EAClB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxD,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAU9C;AAED;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,EAChD,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,aAAa,EAC3C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAC/C,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAYnC"}
|
|
@@ -73,6 +73,7 @@ export async function planWaveComponent(component, registry, ctx, componentOutpu
|
|
|
73
73
|
const plans = {};
|
|
74
74
|
const parts = [];
|
|
75
75
|
let outputs;
|
|
76
|
+
const shapes = {};
|
|
76
77
|
assertTargetsAccepted(component, registry, ctx);
|
|
77
78
|
for (const step of capabilitySteps(component.deploy)) {
|
|
78
79
|
const capability = registry.resolve(step.kind);
|
|
@@ -86,6 +87,8 @@ export async function planWaveComponent(component, registry, ctx, componentOutpu
|
|
|
86
87
|
parts.push(planned.changeSet ?? emptyPart(member));
|
|
87
88
|
if (planned.artifact !== undefined)
|
|
88
89
|
plans[planned.member] = planned.artifact;
|
|
90
|
+
if (planned.shape)
|
|
91
|
+
shapes[planned.member] = { ...planned.shape, member: planned.member };
|
|
89
92
|
if (planned.outputs)
|
|
90
93
|
outputs = mergePlannedOutputs(outputs, planned.outputs);
|
|
91
94
|
}
|
|
@@ -117,7 +120,7 @@ export async function planWaveComponent(component, registry, ctx, componentOutpu
|
|
|
117
120
|
parts.push(emptyPart(member, read.unbound));
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
|
-
return { component: component.name, members, plans, parts, ...(outputs ? { outputs } : {}) };
|
|
123
|
+
return { component: component.name, members, plans, parts, ...(outputs ? { outputs } : {}), ...(Object.keys(shapes).length > 0 ? { shapes } : {}) };
|
|
121
124
|
}
|
|
122
125
|
catch (err) {
|
|
123
126
|
return { component: component.name, error: err instanceof Error ? err.message : String(err) };
|
package/dist/pr-loop.d.ts
CHANGED
|
@@ -75,6 +75,8 @@ export declare const PR_REPORT_POLICY_FLOOR = "0.124.41";
|
|
|
75
75
|
export declare const PR_REPORT_BEFORE_MERGE_FLOOR = "0.124.42";
|
|
76
76
|
/** The first chant whose plan report can carry `migrations` (#4407). */
|
|
77
77
|
export declare const PR_REPORT_MIGRATIONS_FLOOR = "0.124.49";
|
|
78
|
+
/** The first chant whose report can carry a member's `reads`, known at plan or not. */
|
|
79
|
+
export declare const PR_REPORT_READS_FLOOR = "0.124.52";
|
|
78
80
|
/** The gate a pull request's apply waits on, unless the pipeline names another. */
|
|
79
81
|
export declare const PR_APPLY_GATE = "pr-apply";
|
|
80
82
|
/**
|
|
@@ -128,6 +130,15 @@ export type PrMemberStatus =
|
|
|
128
130
|
* on an approval of the plan the apply made for it afterwards (`rounds`).
|
|
129
131
|
*/
|
|
130
132
|
| "waiting";
|
|
133
|
+
/** One upstream a member reads outputs of (`PrMember.reads`). */
|
|
134
|
+
export interface PrMemberRead {
|
|
135
|
+
/** The component (or stack) whose outputs it reads. */
|
|
136
|
+
upstream: string;
|
|
137
|
+
/** The output names it reads, sorted. `publish.<field>` for a published artifact. */
|
|
138
|
+
outputs: string[];
|
|
139
|
+
/** The ones its plan had no value for, sorted: known only after the upstream applies. Absent when every one was known. */
|
|
140
|
+
unknown?: string[];
|
|
141
|
+
}
|
|
131
142
|
export interface PrMember {
|
|
132
143
|
/** The member's name in the change set: a root, for a terraform-family step. */
|
|
133
144
|
member: string;
|
|
@@ -148,8 +159,10 @@ export interface PrMember {
|
|
|
148
159
|
/**
|
|
149
160
|
* The upstream outputs its plan read that the change's plans could not
|
|
150
161
|
* say (#3999), as `<component>.<output>`, sorted: known only after that
|
|
151
|
-
* upstream applies. The
|
|
152
|
-
*
|
|
162
|
+
* upstream applies. The apply plans the member again once they are known;
|
|
163
|
+
* the first approval covers that round when it does only what the preview
|
|
164
|
+
* showed with only these inputs filled in, and anything else waits for an
|
|
165
|
+
* approval of its own (`PrRound.covered`, `PrRound.notCovered`).
|
|
153
166
|
*/
|
|
154
167
|
unknownInputs?: string[];
|
|
155
168
|
/**
|
|
@@ -160,6 +173,15 @@ export interface PrMember {
|
|
|
160
173
|
* applies without a later round.
|
|
161
174
|
*/
|
|
162
175
|
buildInputs?: string[];
|
|
176
|
+
/**
|
|
177
|
+
* Every other component's output its steps read, one entry per upstream,
|
|
178
|
+
* by upstream: the output names, sorted, and under `unknown` the ones its
|
|
179
|
+
* plan had no value for. A read whose value the plan knew is here too, so
|
|
180
|
+
* a reader of the report sees each read between components from the plan
|
|
181
|
+
* on, not only the ones `unknownInputs` names. Added within contract 1 by
|
|
182
|
+
* chant {@link PR_REPORT_READS_FLOOR}.
|
|
183
|
+
*/
|
|
184
|
+
reads?: PrMemberRead[];
|
|
163
185
|
/** Apply stage (#3999): the round whose plan it applied or waits on, when not the first. */
|
|
164
186
|
round?: number;
|
|
165
187
|
/** Apply stage (#3999): why the first round's plan did not apply. */
|
|
@@ -182,6 +204,18 @@ export interface PrRound {
|
|
|
182
204
|
status: "applied" | "failed" | "waiting" | "plan-failed";
|
|
183
205
|
/** With `waiting`: why an approval that stands does not count (`--require-review`). */
|
|
184
206
|
message?: string;
|
|
207
|
+
/**
|
|
208
|
+
* The first approval covered this round's plan (#4419): no gate of its own was
|
|
209
|
+
* decided. `digest` is the first approval's, which the coverage is bound
|
|
210
|
+
* to; `filledInputs` are the inputs it previewed as unknown and this plan
|
|
211
|
+
* had a value for, as `<component>.<output>`.
|
|
212
|
+
*/
|
|
213
|
+
covered?: {
|
|
214
|
+
digest: string;
|
|
215
|
+
filledInputs: string[];
|
|
216
|
+
};
|
|
217
|
+
/** Why the first approval did not cover this round, so it asked for its own (#4419). */
|
|
218
|
+
notCovered?: string;
|
|
185
219
|
/** The change-set document the round planned. */
|
|
186
220
|
changeSet: ChangeSetDocument;
|
|
187
221
|
}
|
package/dist/pr-loop.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-loop.d.ts","sourceRoot":"","sources":["../src/pr-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,KAAK,EAAmB,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAG7E,2DAA2D;AAC3D,eAAO,MAAM,mBAAmB,oFAAoF,CAAC;AAErH,oDAAoD;AACpD,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,wEAAwE;AACxE,eAAO,MAAM,gCAAgC,aAAa,CAAC;AAE3D,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAChD;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,aAAa,CAAC;AAE1D,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,aAAa,CAAC;AAEjD,8DAA8D;AAC9D,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,qEAAqE;AACrE,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAElD,mHAAmH;AACnH,eAAO,MAAM,sBAAsB,aAAa,CAAC;AAEjD,2IAA2I;AAC3I,eAAO,MAAM,4BAA4B,aAAa,CAAC;AAEvD,w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AC,EAAE,QAAQ,SAAU,GAAG,MAAM,CAE7G;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC,GAAG,MAAM,CAMzG;AA8ID;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CAoG1G;AAED,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,CA6D5D;AAED,qGAAqG;AACrG,wBAAgB,aAAa,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CASjF"}
|
package/dist/pr-loop.js
CHANGED
|
@@ -74,6 +74,8 @@ export const PR_REPORT_POLICY_FLOOR = "0.124.41";
|
|
|
74
74
|
export const PR_REPORT_BEFORE_MERGE_FLOOR = "0.124.42";
|
|
75
75
|
/** The first chant whose plan report can carry `migrations` (#4407). */
|
|
76
76
|
export const PR_REPORT_MIGRATIONS_FLOOR = "0.124.49";
|
|
77
|
+
/** The first chant whose report can carry a member's `reads`, known at plan or not. */
|
|
78
|
+
export const PR_REPORT_READS_FLOOR = "0.124.52";
|
|
77
79
|
/** The gate a pull request's apply waits on, unless the pipeline names another. */
|
|
78
80
|
export const PR_APPLY_GATE = "pr-apply";
|
|
79
81
|
/**
|
|
@@ -328,8 +330,8 @@ export function renderPrNote(report, options = {}) {
|
|
|
328
330
|
}
|
|
329
331
|
const unknown = [...new Set(report.members.flatMap((m) => (m.unknownInputs ?? []).map((ref) => `${code(m.component)} reads ${code(ref)}`)))];
|
|
330
332
|
if (unknown.length > 0) {
|
|
331
|
-
out.push("", `Known only after apply: ${unknown.join("; ")}.
|
|
332
|
-
"The apply plans
|
|
333
|
+
out.push("", `Known only after apply: ${unknown.join("; ")}. ` +
|
|
334
|
+
"The apply plans those members again once their upstream applied. When that plan does only what this one shows, with only those inputs filled in, this approval covers it; anything else asks for an approval of its own.");
|
|
333
335
|
}
|
|
334
336
|
const fromBuild = [...new Set(report.members.flatMap((m) => (m.buildInputs ?? []).map((ref) => `${code(m.component)} reads ${code(ref)}`)))];
|
|
335
337
|
if (fromBuild.length > 0) {
|
|
@@ -338,6 +340,13 @@ export function renderPrNote(report, options = {}) {
|
|
|
338
340
|
}
|
|
339
341
|
for (const r of report.rounds ?? []) {
|
|
340
342
|
const what = `Round ${r.round} planned ${r.components.map(code).join(", ")} again after their upstream applied, digest ${code(r.digest)}`;
|
|
343
|
+
if (r.covered) {
|
|
344
|
+
const filled = r.covered.filledInputs.length > 0 ? `, with ${r.covered.filledInputs.map(code).join(", ")} filled in` : "";
|
|
345
|
+
out.push("", `${what}: covered by the approval of ${code(r.covered.digest)}${filled}, so it ${r.status === "applied" ? "applied" : "did not apply"} without a new approval${r.status === "failed" ? " (the apply failed)" : ""}.`);
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
if (r.notCovered)
|
|
349
|
+
out.push("", `Round ${r.round}'s plan is not covered by the approval of ${code(report.digest)}: ${r.notCovered}.`);
|
|
341
350
|
if (r.status === "waiting") {
|
|
342
351
|
if (r.message)
|
|
343
352
|
out.push("", `> ${r.message}`);
|