@intentius/chant 0.106.1 → 0.106.4
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/change-set.d.ts +30 -8
- package/dist/change-set.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts +11 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/mcp/op-tools.d.ts.map +1 -1
- package/dist/components/pr-pipeline.d.ts +7 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-run.d.ts +3 -1
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/composite.d.ts +5 -1
- package/dist/composite.d.ts.map +1 -1
- package/dist/op/runtime.d.ts +10 -2
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/pr-loop.d.ts +3 -2
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/workspace/member-pipeline.d.ts +3 -2
- package/dist/workspace/member-pipeline.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__fixtures__/change-set/lifecycle.change-set.golden.json +1 -1
- package/src/__fixtures__/change-set/warden.change-set.golden.json +1 -1
- package/src/__fixtures__/pr-loop/pr-apply-applied.note.golden.md +1 -1
- package/src/__fixtures__/pr-loop/pr-apply-refused.note.golden.md +2 -2
- package/src/__fixtures__/pr-loop/pr-plan.golden.json +2 -2
- package/src/__fixtures__/pr-loop/pr-plan.note.golden.md +2 -2
- package/src/build.test.ts +1 -1
- package/src/build.ts +1 -1
- package/src/change-set.test.ts +35 -4
- package/src/change-set.ts +50 -11
- package/src/cli/commands/build.ts +33 -14
- package/src/cli/handlers/build-lexicon-output.test.ts +8 -0
- package/src/cli/handlers/build.ts +3 -0
- package/src/cli/handlers/pr.ts +3 -0
- package/src/cli/handlers/run.test.ts +51 -0
- package/src/cli/handlers/run.ts +14 -4
- package/src/cli/mcp/never-over-mcp.test.ts +46 -0
- package/src/cli/mcp/op-approve-origin.test.ts +1 -1
- package/src/cli/mcp/op-tools.ts +14 -2
- package/src/cli/mcp/server.test.ts +2 -1
- package/src/components/pr-pipeline.ts +8 -1
- package/src/components/pr-run.test.ts +12 -2
- package/src/components/pr-run.ts +3 -1
- package/src/composite.ts +5 -1
- package/src/op/runtime.ts +11 -2
- package/src/pr-loop.ts +3 -2
- package/src/workspace/change-set.schema.json +1 -1
- package/src/workspace/member-pipeline.test.ts +4 -4
- package/src/workspace/member-pipeline.ts +4 -3
package/dist/change-set.d.ts
CHANGED
|
@@ -19,12 +19,19 @@
|
|
|
19
19
|
* Every member carries the plan digest a gate on that member alone binds
|
|
20
20
|
* (#2300): `terraformPlanDigest` for a terraform-family root, and here
|
|
21
21
|
* `computePlanDigest("lifecycle-plan", …)` and `computePlanDigest(
|
|
22
|
-
* "reconcile-plan", …)`.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
22
|
+
* "reconcile-plan", …)`. {@link changeSetDigest} over the sorted `{ member,
|
|
23
|
+
* planDigest }` pairs is the set digest #3049 describes, and a wave's digest
|
|
24
|
+
* is that function over the wave's members.
|
|
25
|
+
*
|
|
26
|
+
* The document's digest is {@link changeSetDocumentDigest}: the set digest,
|
|
27
|
+
* each member's status and holes, the entries and the side effects. An
|
|
28
|
+
* approval of the document binds what it says as well as the plans it came
|
|
29
|
+
* from, so a pull request's apply that resumes from a record (#3464) can
|
|
30
|
+
* check a re-planned member against the record's entries without trusting
|
|
31
|
+
* whoever wrote the record. The summary is computed from the entries and is
|
|
32
|
+
* not hashed. A change to how chant projects a plan into entries moves the
|
|
33
|
+
* document's digest, so an approval given under one chant does not carry to
|
|
34
|
+
* an apply under a chant that projects the same plan differently.
|
|
28
35
|
*
|
|
29
36
|
* ## The import graph
|
|
30
37
|
*
|
|
@@ -177,6 +184,17 @@ export interface ChangeSetDocument {
|
|
|
177
184
|
* not exist yet, so an approval of this digest never covers them.
|
|
178
185
|
*/
|
|
179
186
|
export declare function changeSetDigest(members: ReadonlyArray<Pick<ChangeSetMember, "member" | "planDigest" | "provisional">>): string;
|
|
187
|
+
/**
|
|
188
|
+
* The document's digest: `computePlanDigest("change-set-document", …)` over
|
|
189
|
+
* the set digest ({@link changeSetDigest}), each member's name, status and
|
|
190
|
+
* holes, the entries and the side effects. Members are sorted by name and
|
|
191
|
+
* entries and side effects by the keys {@link composeChangeSet} sorts them by,
|
|
192
|
+
* so order makes no difference.
|
|
193
|
+
*
|
|
194
|
+
* A provisional member is left out, with its entries and side effects, as
|
|
195
|
+
* the set digest leaves it out: no approval of the document covers it.
|
|
196
|
+
*/
|
|
197
|
+
export declare function changeSetDocumentDigest(doc: Pick<ChangeSetDocument, "members" | "entries" | "sideEffects">): string;
|
|
180
198
|
/** The summary of a set of members and entries. */
|
|
181
199
|
export declare function summarizeChangeSet(members: ChangeSetMember[], entries: ChangeSetEntry[]): ChangeSetSummary;
|
|
182
200
|
export interface ComposeChangeSetOptions {
|
|
@@ -190,8 +208,12 @@ export interface ComposeChangeSetOptions {
|
|
|
190
208
|
* other than its part's.
|
|
191
209
|
*/
|
|
192
210
|
export declare function composeChangeSet(parts: ReadonlyArray<ChangeSetPart>, options?: ComposeChangeSetOptions): ChangeSetDocument;
|
|
193
|
-
/**
|
|
194
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Whether a document's digest is the one its members, entries and side
|
|
213
|
+
* effects give ({@link changeSetDocumentDigest}). A document that names a
|
|
214
|
+
* member twice has no digest and is not verified.
|
|
215
|
+
*/
|
|
216
|
+
export declare function verifyChangeSetDigest(doc: Pick<ChangeSetDocument, "digest" | "members" | "entries" | "sideEffects">): boolean;
|
|
195
217
|
export interface LifecyclePlanPartInput {
|
|
196
218
|
member: string;
|
|
197
219
|
/** `chant lifecycle plan <env> --json`, parsed. */
|
package/dist/change-set.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../src/change-set.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../src/change-set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAGH,OAAO,KAAK,EAAE,SAAS,IAAI,kBAAkB,EAAoC,MAAM,wBAAwB,CAAC;AAChH,OAAO,KAAK,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEnE,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,sFAAsF,CAAC;AAExH,sDAAsD;AACtD,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,wHAAwH;AACxH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvG,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAAyE,CAAC;AAEnI,4FAA4F;AAC5F,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAE7F,2CAA2C;AAC3C,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvF,+DAA+D;AAC/D,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,0EAA0E;IAC1E,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,IAAI,CAA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MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,IAAI,EAAE,kBAAkB,CAAC;IACzB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAYD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,aAAa,CAkD9E;AAID,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,IAAI,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,CAAC;IAChD,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAMD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,aAAa,CAyC9E"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { build } from "../../build.js";
|
|
1
2
|
import type { Serializer } from "../../serializer.js";
|
|
2
3
|
import type { LexiconPlugin } from "../../lexicon.js";
|
|
3
4
|
import { type FoldRankResult } from "../../discovery/fold-rank.js";
|
|
@@ -68,6 +69,16 @@ export interface BuildOptions {
|
|
|
68
69
|
* any flame/icicle viewer with no chant-specific tooling.
|
|
69
70
|
*/
|
|
70
71
|
foldRankCollapsedFile?: string;
|
|
72
|
+
/**
|
|
73
|
+
* `--lexicon-output` runs `buildCommand` once per output file. The first call
|
|
74
|
+
* runs the build with `serializers` (every serializer the project lists) and
|
|
75
|
+
* keeps the promise here; the later calls reuse it and each takes only the
|
|
76
|
+
* outputs of its own `serializers`, so the sources are evaluated once.
|
|
77
|
+
*/
|
|
78
|
+
sharedBuild?: {
|
|
79
|
+
serializers: Serializer[];
|
|
80
|
+
result?: ReturnType<typeof build>;
|
|
81
|
+
};
|
|
71
82
|
}
|
|
72
83
|
/**
|
|
73
84
|
* Resolve the output format for `chant build`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/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
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/build.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA+IlD,wBAAsB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/build.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA+IlD,wBAAsB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkJnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/pr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAyCH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD,qDAAqD;AACrD,eAAO,MAAM,aAAa,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"pr.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/pr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAyCH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD,qDAAqD;AACrD,eAAO,MAAM,aAAa,cAAc,CAAC;AA0MzC,8HAA8H;AAC9H,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA0C9E;AAED,oJAAoJ;AACpJ,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkL/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","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,EAAE,OAAO,GAChB,OAAO,CAAC,aAAa,EAAE,CAAC,CA0C1B;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA4I1E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA6KzE;AA0DD,wBAAgB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAMjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op-tools.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/op-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AA8D1D,wBAAgB,gBAAgB,IAAI,gBAAgB,CAsCnD;AAED,wBAAgB,eAAe,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"op-tools.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/op-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AA8D1D,wBAAgB,gBAAgB,IAAI,gBAAgB,CAsCnD;AAED,wBAAgB,eAAe,IAAI,gBAAgB,CA8ClD;AAED,wBAAgB,kBAAkB,IAAI,gBAAgB,CAoCrD;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAqEtD;AAED,wBAAgB,kBAAkB,IAAI,gBAAgB,CAkDrD"}
|
|
@@ -96,6 +96,13 @@ export declare function prLoopJobs(forge: ForgeKind, env: string, options?: PrLo
|
|
|
96
96
|
/**
|
|
97
97
|
* The concurrency group (GitHub, Forgejo) or resource group (GitLab) that
|
|
98
98
|
* keeps one apply at a time per environment, and per member in a workspace.
|
|
99
|
+
*
|
|
100
|
+
* A member's group is `chant-apply.<member>.<env>`. Member names hold only
|
|
101
|
+
* lower-case letters, digits and `-`, so the first `.` ends the member and no
|
|
102
|
+
* two member and environment pairs share a group: member `a` with environment
|
|
103
|
+
* `b-c` is `chant-apply.a.b-c`, and member `a-b` with environment `c` is
|
|
104
|
+
* `chant-apply.a-b.c`. The `.` after `chant-apply` keeps a member's groups
|
|
105
|
+
* apart from a single project's `chant-apply-<env>`.
|
|
99
106
|
*/
|
|
100
107
|
export declare function prApplyGroup(env: string, member?: string): string;
|
|
101
108
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-pipeline.d.ts","sourceRoot":"","sources":["../../src/components/pr-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,eAAe,mCAAmC,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC,8CAA8C;AAC9C,eAAO,MAAM,aAAa,UAEzB,CAAC;AAEF,mHAAmH;AACnH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAEnD;AAED,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oGAAoG;IACpG,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC9B;AAED,8FAA8F;AAC9F,MAAM,WAAW,SAAS;IACxB,yBAAyB;IACzB,OAAO,EAAE,MAAM,GAAG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AA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,4FAA4F;IAC5F,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CA2B3H;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAErF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAU1D"}
|
|
@@ -179,7 +179,9 @@ export type PrResume = {
|
|
|
179
179
|
*
|
|
180
180
|
* The record now travels between CI jobs through a cache (#3543), so its
|
|
181
181
|
* change set has to be the one its digest names: the document's own digest
|
|
182
|
-
* is `record.digest`, and
|
|
182
|
+
* is `record.digest`, and the document gives that digest. The digest binds
|
|
183
|
+
* the entries, holes and side effects {@link planCoveredBy} reads (#3555),
|
|
184
|
+
* so a record cannot widen what a re-planned member may do.
|
|
183
185
|
*/
|
|
184
186
|
export declare function resumePrSet(options: PrResumeOptions): Promise<PrResume>;
|
|
185
187
|
export interface PrReportInput {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-run.d.ts","sourceRoot":"","sources":["../../src/components/pr-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAA2C,KAA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AAiC;AACjC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ,CA6BvD"}
|
package/dist/composite.d.ts
CHANGED
|
@@ -145,7 +145,11 @@ export declare function resource<T extends Declarable, P>(Type: new (props: P, a
|
|
|
145
145
|
*
|
|
146
146
|
* No deep merge — too dangerous with IaC props where nested objects
|
|
147
147
|
* (e.g. policy documents) should be replaced wholesale.
|
|
148
|
+
*
|
|
149
|
+
* `overrides` may be any object type, not only `Partial<T>`: a composite
|
|
150
|
+
* types each member's override against that member's own props, and `T`
|
|
151
|
+
* here is the shape of the literal the composite builds, which is narrower.
|
|
148
152
|
*/
|
|
149
|
-
export declare function mergeDefaults<T extends Record<string, unknown>>(base: T, overrides?: Partial<T>): T;
|
|
153
|
+
export declare function mergeDefaults<T extends Record<string, unknown>>(base: T, overrides?: Partial<T> | object): T;
|
|
150
154
|
export {};
|
|
151
155
|
//# sourceMappingURL=composite.d.ts.map
|
package/dist/composite.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composite.d.ts","sourceRoot":"","sources":["../src/composite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG7D;;GAEG;AACH,eAAO,MAAM,gBAAgB,eAAgC,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uBAAuB,GAE/B,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAO/D,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,uBAAuB,GAAG,gBAAgB;IACrF,QAAQ,CAAC,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC;I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
|
@@ -196,8 +196,10 @@ export interface OpRunStartOptions {
|
|
|
196
196
|
signal?: AbortSignal;
|
|
197
197
|
/**
|
|
198
198
|
* For an Op that declares `workLease` (#2748): the work item this run is
|
|
199
|
-
* for (`--work <id>`) and who holds its lease (`--holder`).
|
|
200
|
-
* runtime takes
|
|
199
|
+
* for (`--work <id>`) and who holds its lease (`--holder`). The local
|
|
200
|
+
* runtime takes the lease itself; a runtime that declares
|
|
201
|
+
* {@link OpRuntimeProvider.carriesWork} hands both to where the run
|
|
202
|
+
* executes, which takes it there.
|
|
201
203
|
*/
|
|
202
204
|
work?: {
|
|
203
205
|
item?: string;
|
|
@@ -232,6 +234,12 @@ export interface OpGateResolveOptions {
|
|
|
232
234
|
export interface OpRuntimeProvider {
|
|
233
235
|
/** How the CLI names this runtime in messages, and what `--on` matches. */
|
|
234
236
|
readonly name: string;
|
|
237
|
+
/**
|
|
238
|
+
* Whether `start` carries `opts.work` to where the run executes (#3555),
|
|
239
|
+
* so `chant run <op> --work <id> --on <name>` is allowed. Omitted, a
|
|
240
|
+
* non-local runtime is refused `--work` and `--holder` by name.
|
|
241
|
+
*/
|
|
242
|
+
readonly carriesWork?: boolean;
|
|
235
243
|
/** Start a run. Rejects with an actionable Error when it cannot. */
|
|
236
244
|
start(op: OpConfig, opts: OpRunStartOptions): Promise<OpRunHandle>;
|
|
237
245
|
/** The latest run's state, or `undefined` when this runtime has none recorded. */
|
package/dist/op/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/op/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OA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EAAE,MAAM,EAChB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC"}
|
package/dist/pr-loop.d.ts
CHANGED
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
*
|
|
17
17
|
* One gate per pull request: op `pr-<number>`, gate `pr-apply` unless the
|
|
18
18
|
* pipeline names another. It binds the digest of the change-set document over
|
|
19
|
-
* every planned member (`
|
|
20
|
-
* wave binds over its members (#3049)
|
|
19
|
+
* every planned member (`changeSetDocumentDigest`, #3181): the set digest a
|
|
20
|
+
* gated wave binds over its members (#3049), and the document's entries, holes
|
|
21
|
+
* and side effects with it (#3555). A reviewer approves it with `chant
|
|
21
22
|
* approve pr-<number> pr-apply --plan <digest>`. The op carries the number so
|
|
22
23
|
* that one pull request's approval never answers another's, and the gate name
|
|
23
24
|
* stays fixed so a workspace can require signed approvals for it under
|
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
|
|
1
|
+
{"version":3,"file":"pr-loop.d.ts","sourceRoot":"","sources":["../src/pr-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KAAK,EAAmB,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGvE,2DAA2D;AAC3D,eAAO,MAAM,mBAAmB,oFAAoF,CAAC;AAErH,oDAAoD;AACpD,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,mFAAmF;AACnF,eAAO,MAAM,aAAa,aAAa,CAAC;AAExC;;;GAGG;AACH,wBAAgB,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,8HAA8H;AAC9H,eAAO,MAAM,UAAU,QAAqC,CAAC;AAE7D,+GAA+G;AAC/G,wBA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A4D;QAC5D,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC;KACnB,CAAC;IACF,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,SAAS,EAAE,iBAAiB,CAAC;CAC9B;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAIpG;AAED,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC,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;AAuDD;;;;;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,CAiC1G;AAED,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,CA6B5D;AAED,qGAAqG;AACrG,wBAAgB,aAAa,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAIjF"}
|
|
@@ -67,8 +67,9 @@ export declare function memberPipelineDir(provider: string): string | undefined;
|
|
|
67
67
|
* The default path of a member's component pipeline for one environment,
|
|
68
68
|
* relative to the repository root: `chant-<member>-<env>.yml` in the forge's
|
|
69
69
|
* workflow directory, or `.gitlab/ci/chant-<member>-<env>.gitlab-ci.yml`.
|
|
70
|
-
* A pull-request pipeline (`kind` `"pr"`, #3465) is `chant-pr
|
|
71
|
-
*
|
|
70
|
+
* A pull-request pipeline (`kind` `"pr"`, #3465) is `chant-pr.<member>.<env>`, with the dots the apply group uses so no
|
|
71
|
+
* two member and environment pairs share one name, and it sits beside the
|
|
72
|
+
* member's deploy pipeline for the same environment.
|
|
72
73
|
*/
|
|
73
74
|
export declare function memberPipelineFile(provider: string, member: string, env: string, kind?: "components" | "pr"): string | undefined;
|
|
74
75
|
/** A repository-relative path for an absolute one. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-pipeline.d.ts","sourceRoot":"","sources":["../../src/workspace/member-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAA+E,KAAK,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAG3I;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,CAAC,CAAC;IACV,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED,0DAA0D;AAC1D,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,4FAA4F;IAC5F,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAqBD;;;;;GAKG;AACH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AAE,EAAE,GAAG,MAAM,EAAE,CAY5G;AAED,oHAAoH;AACpH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAGlD"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://intentius.io/chant/schemas/workspace/change-set/v1/change-set.schema.json",
|
|
3
3
|
"contract": 1,
|
|
4
|
-
"digest": "jcs1-sha256:
|
|
4
|
+
"digest": "jcs1-sha256:a66846faed3900cffc37cfa1c31d2735358875375b7218faa7c605502a17a529",
|
|
5
5
|
"members": [
|
|
6
6
|
{
|
|
7
7
|
"member": "delivery",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://intentius.io/chant/schemas/workspace/change-set/v1/change-set.schema.json",
|
|
3
3
|
"contract": 1,
|
|
4
|
-
"digest": "jcs1-sha256:
|
|
4
|
+
"digest": "jcs1-sha256:266dbcb79b7922940f2b18bae4bebda8418422d4a5539eeeed119759694bd3a3",
|
|
5
5
|
"members": [
|
|
6
6
|
{
|
|
7
7
|
"member": "warden",
|
|
@@ -10,7 +10,7 @@ Applied 2 members. Head `222222222222`, measured from `111111111111`.
|
|
|
10
10
|
|
|
11
11
|
A member whose inputs moved applied the plan it was approved with. The next run plans it against the new values.
|
|
12
12
|
|
|
13
|
-
Plan digest: `jcs1-sha256:
|
|
13
|
+
Plan digest: `jcs1-sha256:7623a8677afb0bf98d77c602521a3abfa96f76cff25675d350a28c2e26a7bad0`
|
|
14
14
|
|
|
15
15
|
Approved by `github:alice` for this digest.
|
|
16
16
|
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
The apply refused. Head `222222222222`, measured from `111111111111`.
|
|
5
5
|
|
|
6
|
-
> The plan changed after review, so nothing was applied. approved: jcs1-sha256:0000000000000000000000000000000000000000000000000000000000000063; planned now: jcs1-sha256:
|
|
6
|
+
> The plan changed after review, so nothing was applied. approved: jcs1-sha256:0000000000000000000000000000000000000000000000000000000000000063; planned now: jcs1-sha256:7623a8677afb0bf98d77c602521a3abfa96f76cff25675d350a28c2e26a7bad0. Read the new plan, and if it is right, approve it: chant approve pr-12 pr-apply --plan jcs1-sha256:7623a8677afb0bf98d77c602521a3abfa96f76cff25675d350a28c2e26a7bad0 --approver <you> --sign; then run the apply again.
|
|
7
7
|
|
|
8
8
|
| Member | Component | Status | Create | Update | Replace | Delete |
|
|
9
9
|
|---|---|---|---:|---:|---:|---:|
|
|
10
10
|
| `a` | a | planned | 0 | 1 | 0 | 0 |
|
|
11
11
|
| `app` | app | planned | 0 | 0 | 0 | 0 |
|
|
12
12
|
|
|
13
|
-
Plan digest: `jcs1-sha256:
|
|
13
|
+
Plan digest: `jcs1-sha256:7623a8677afb0bf98d77c602521a3abfa96f76cff25675d350a28c2e26a7bad0`
|
|
14
14
|
|
|
15
15
|
An approval stands for `jcs1-sha256:0000000000000000000000000000000000000000000000000000000000000063`, not for this digest: the plan changed since it was approved.
|
|
16
16
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"head": "2222222222222222222222222222222222222222",
|
|
9
9
|
"op": "pr-12",
|
|
10
10
|
"gate": "pr-apply",
|
|
11
|
-
"digest": "jcs1-sha256:
|
|
11
|
+
"digest": "jcs1-sha256:7623a8677afb0bf98d77c602521a3abfa96f76cff25675d350a28c2e26a7bad0",
|
|
12
12
|
"status": "planned",
|
|
13
13
|
"approval": {
|
|
14
14
|
"status": "pending"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"changeSet": {
|
|
61
61
|
"$schema": "https://intentius.io/chant/schemas/workspace/change-set/v1/change-set.schema.json",
|
|
62
62
|
"contract": 1,
|
|
63
|
-
"digest": "jcs1-sha256:
|
|
63
|
+
"digest": "jcs1-sha256:7623a8677afb0bf98d77c602521a3abfa96f76cff25675d350a28c2e26a7bad0",
|
|
64
64
|
"members": [
|
|
65
65
|
{
|
|
66
66
|
"member": "a",
|
|
@@ -8,14 +8,14 @@ Planned 2 members. Head `222222222222`, measured from `111111111111`.
|
|
|
8
8
|
| `a` | a | planned | 0 | 1 | 0 | 0 |
|
|
9
9
|
| `app` | app | planned | 0 | 0 | 0 | 0 |
|
|
10
10
|
|
|
11
|
-
Plan digest: `jcs1-sha256:
|
|
11
|
+
Plan digest: `jcs1-sha256:7623a8677afb0bf98d77c602521a3abfa96f76cff25675d350a28c2e26a7bad0`
|
|
12
12
|
|
|
13
13
|
Not approved yet.
|
|
14
14
|
|
|
15
15
|
A reviewer who approved this pull request approves the plan with:
|
|
16
16
|
|
|
17
17
|
```
|
|
18
|
-
chant approve pr-12 pr-apply --plan jcs1-sha256:
|
|
18
|
+
chant approve pr-12 pr-apply --plan jcs1-sha256:7623a8677afb0bf98d77c602521a3abfa96f76cff25675d350a28c2e26a7bad0 --approver github:<your-login> --sign
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
It applies on merge if the plan is still this one. If it moved, the apply refuses and names both digests.
|
package/src/build.test.ts
CHANGED
|
@@ -253,7 +253,7 @@ export const testEntity = {
|
|
|
253
253
|
const result = await build(testDir, []);
|
|
254
254
|
|
|
255
255
|
expect(result.warnings.length).toBeGreaterThan(0);
|
|
256
|
-
expect(result.warnings[0]).toContain('No serializer found for lexicon "unknown"');
|
|
256
|
+
expect(result.warnings[0]).toContain('No serializer found for lexicon "unknown". List the lexicon in chant.config.ts.');
|
|
257
257
|
});
|
|
258
258
|
});
|
|
259
259
|
|
package/src/build.ts
CHANGED
|
@@ -897,7 +897,7 @@ async function buildFromDiscoveryResult(
|
|
|
897
897
|
// designed shape until a lexicon materializes the receipt (#1835), not
|
|
898
898
|
// a missing-serializer problem.
|
|
899
899
|
} else {
|
|
900
|
-
warnings.push(`No serializer found for lexicon "${lexiconName}"
|
|
900
|
+
warnings.push(`No serializer found for lexicon "${lexiconName}". List the lexicon in chant.config.ts.`);
|
|
901
901
|
}
|
|
902
902
|
}
|
|
903
903
|
|
package/src/change-set.test.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { describe, expect, test } from "vitest";
|
|
|
25
25
|
import {
|
|
26
26
|
CHANGE_SET_SCHEMA_ID,
|
|
27
27
|
changeSetDigest,
|
|
28
|
+
changeSetDocumentDigest,
|
|
28
29
|
composeChangeSet,
|
|
29
30
|
lifecyclePlanPart,
|
|
30
31
|
reconcilePlanPart,
|
|
@@ -166,11 +167,20 @@ describe("the digest", () => {
|
|
|
166
167
|
const warden = () => reconcilePlanPart({ member: "warden", plan: wardenPlan() });
|
|
167
168
|
const tofu = () => read(TF_DIR, "tofu.part.golden.json") as ChangeSetPart;
|
|
168
169
|
|
|
169
|
-
test("
|
|
170
|
+
test("binds the set digest over { member, planDigest }, the members' status and holes, the entries and the side effects, whatever order the parts come in", () => {
|
|
170
171
|
const doc = composeChangeSet([lifecycle(), warden(), tofu()]);
|
|
171
172
|
expect(composeChangeSet([tofu(), warden(), lifecycle()])).toEqual(doc);
|
|
172
173
|
const pairs = doc.members.map((m) => ({ member: m.member, planDigest: m.planDigest }));
|
|
173
|
-
expect(doc.
|
|
174
|
+
expect(changeSetDigest(doc.members)).toBe(computePlanDigest("change-set", pairs));
|
|
175
|
+
expect(doc.digest).toBe(
|
|
176
|
+
computePlanDigest("change-set-document", {
|
|
177
|
+
set: computePlanDigest("change-set", pairs),
|
|
178
|
+
members: doc.members.map((m) => ({ member: m.member, status: m.status, holes: m.holes })),
|
|
179
|
+
entries: doc.entries,
|
|
180
|
+
sideEffects: [],
|
|
181
|
+
}),
|
|
182
|
+
);
|
|
183
|
+
expect(doc.digest).toBe(changeSetDocumentDigest({ ...doc, entries: [...doc.entries].reverse() }));
|
|
174
184
|
expect(doc.digest).toMatch(/^jcs1-sha256:[0-9a-f]{64}$/);
|
|
175
185
|
expect(verifyChangeSetDigest(doc)).toBe(true);
|
|
176
186
|
expect(verifyChangeSetDigest({ ...doc, digest: changeSetDigest(doc.members.slice(1)) })).toBe(false);
|
|
@@ -182,8 +192,29 @@ describe("the digest", () => {
|
|
|
182
192
|
const moved = wardenPlan();
|
|
183
193
|
moved.entries[0] = { ...moved.entries[0], after: { privacy: "closed", description: "Release engineers" } };
|
|
184
194
|
expect(composeChangeSet([lifecycle(), reconcilePlanPart({ member: "warden", plan: moved })]).digest).not.toBe(base);
|
|
185
|
-
// A wave is a subset of members: its digest is the
|
|
186
|
-
expect(changeSetDigest([lifecycle().member])).toBe(
|
|
195
|
+
// A wave is a subset of members: its digest is the set digest over them, which the document's digest binds.
|
|
196
|
+
expect(changeSetDigest([lifecycle().member])).toBe(computePlanDigest("change-set", [{ member: "delivery", planDigest: lifecycle().member.planDigest }]));
|
|
197
|
+
expect(changeSetDigest([lifecycle().member])).not.toBe(composeChangeSet([lifecycle()]).digest);
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
test("moves when an entry, a hole, a member's status or a side effect does, so a document with edited entries does not verify (#3555)", () => {
|
|
201
|
+
const doc = composeChangeSet([lifecycle(), warden()]);
|
|
202
|
+
const [first, ...rest] = doc.entries;
|
|
203
|
+
const edited = [
|
|
204
|
+
{ ...doc, entries: rest },
|
|
205
|
+
{ ...doc, entries: [{ ...first, action: first.action === "delete" ? ("create" as const) : ("delete" as const) }, ...rest] },
|
|
206
|
+
{ ...doc, entries: [{ ...first, attributes: [...first.attributes, { path: "planted", after: "x" }] }, ...rest] },
|
|
207
|
+
{ ...doc, entries: [...doc.entries, { ...first, address: `${first.address}-planted` }] },
|
|
208
|
+
{ ...doc, members: doc.members.map((m) => ({ ...m, holes: [...m.holes, { address: "planted", reason: "unobserved" }] })) },
|
|
209
|
+
{ ...doc, members: doc.members.map((m, i) => (i === 0 ? { ...m, status: "failed" as const } : m)) },
|
|
210
|
+
{ ...doc, sideEffects: [{ member: doc.members[0].member, address: "action.aws_lambda_invoke.planted", type: "aws_lambda_invoke" }] },
|
|
211
|
+
];
|
|
212
|
+
expect(verifyChangeSetDigest(doc)).toBe(true);
|
|
213
|
+
for (const e of edited) {
|
|
214
|
+
expect(changeSetDocumentDigest(e)).not.toBe(doc.digest);
|
|
215
|
+
expect(verifyChangeSetDigest(e)).toBe(false);
|
|
216
|
+
}
|
|
217
|
+
expect(verifyChangeSetDigest({ ...doc, members: [...doc.members, doc.members[0]] })).toBe(false);
|
|
187
218
|
});
|
|
188
219
|
|
|
189
220
|
test("leaves provisional members out, so approving the document never covers them", () => {
|
package/src/change-set.ts
CHANGED
|
@@ -19,12 +19,19 @@
|
|
|
19
19
|
* Every member carries the plan digest a gate on that member alone binds
|
|
20
20
|
* (#2300): `terraformPlanDigest` for a terraform-family root, and here
|
|
21
21
|
* `computePlanDigest("lifecycle-plan", …)` and `computePlanDigest(
|
|
22
|
-
* "reconcile-plan", …)`.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
22
|
+
* "reconcile-plan", …)`. {@link changeSetDigest} over the sorted `{ member,
|
|
23
|
+
* planDigest }` pairs is the set digest #3049 describes, and a wave's digest
|
|
24
|
+
* is that function over the wave's members.
|
|
25
|
+
*
|
|
26
|
+
* The document's digest is {@link changeSetDocumentDigest}: the set digest,
|
|
27
|
+
* each member's status and holes, the entries and the side effects. An
|
|
28
|
+
* approval of the document binds what it says as well as the plans it came
|
|
29
|
+
* from, so a pull request's apply that resumes from a record (#3464) can
|
|
30
|
+
* check a re-planned member against the record's entries without trusting
|
|
31
|
+
* whoever wrote the record. The summary is computed from the entries and is
|
|
32
|
+
* not hashed. A change to how chant projects a plan into entries moves the
|
|
33
|
+
* document's digest, so an approval given under one chant does not carry to
|
|
34
|
+
* an apply under a chant that projects the same plan differently.
|
|
28
35
|
*
|
|
29
36
|
* ## The import graph
|
|
30
37
|
*
|
|
@@ -192,6 +199,9 @@ function entryKey(e: ChangeSetEntry): string {
|
|
|
192
199
|
return `${e.member}\u0000${e.address}\u0000${e.deposed ?? ""}\u0000${e.action}`;
|
|
193
200
|
}
|
|
194
201
|
|
|
202
|
+
const bySideEffect = (a: ChangeSetSideEffect, b: ChangeSetSideEffect): number =>
|
|
203
|
+
byString(a.member, b.member) || byString(a.address, b.address) || byString(a.trigger ?? "", b.trigger ?? "");
|
|
204
|
+
|
|
195
205
|
/**
|
|
196
206
|
* The set digest over members' plan digests: `computePlanDigest("change-set",
|
|
197
207
|
* …)` over `{ member, planDigest }` sorted by member. Order-independent,
|
|
@@ -212,6 +222,27 @@ export function changeSetDigest(members: ReadonlyArray<Pick<ChangeSetMember, "me
|
|
|
212
222
|
return computePlanDigest("change-set", pairs);
|
|
213
223
|
}
|
|
214
224
|
|
|
225
|
+
/**
|
|
226
|
+
* The document's digest: `computePlanDigest("change-set-document", …)` over
|
|
227
|
+
* the set digest ({@link changeSetDigest}), each member's name, status and
|
|
228
|
+
* holes, the entries and the side effects. Members are sorted by name and
|
|
229
|
+
* entries and side effects by the keys {@link composeChangeSet} sorts them by,
|
|
230
|
+
* so order makes no difference.
|
|
231
|
+
*
|
|
232
|
+
* A provisional member is left out, with its entries and side effects, as
|
|
233
|
+
* the set digest leaves it out: no approval of the document covers it.
|
|
234
|
+
*/
|
|
235
|
+
export function changeSetDocumentDigest(doc: Pick<ChangeSetDocument, "members" | "entries" | "sideEffects">): string {
|
|
236
|
+
const provisional = new Set(doc.members.filter((m) => m.provisional === true).map((m) => m.member));
|
|
237
|
+
const members = doc.members
|
|
238
|
+
.filter((m) => !provisional.has(m.member))
|
|
239
|
+
.map((m) => ({ member: m.member, status: m.status, holes: m.holes }))
|
|
240
|
+
.sort((a, b) => byString(a.member, b.member));
|
|
241
|
+
const entries = doc.entries.filter((e) => !provisional.has(e.member)).sort((a, b) => byString(entryKey(a), entryKey(b)));
|
|
242
|
+
const sideEffects = (doc.sideEffects ?? []).filter((s) => !provisional.has(s.member)).sort(bySideEffect);
|
|
243
|
+
return computePlanDigest("change-set-document", { set: changeSetDigest(doc.members), members, entries, sideEffects });
|
|
244
|
+
}
|
|
245
|
+
|
|
215
246
|
/** The summary of a set of members and entries. */
|
|
216
247
|
export function summarizeChangeSet(members: ChangeSetMember[], entries: ChangeSetEntry[]): ChangeSetSummary {
|
|
217
248
|
const actions = Object.fromEntries(CHANGE_SET_ACTIONS.map((a) => [a, 0])) as Record<ChangeSetAction, number>;
|
|
@@ -275,8 +306,8 @@ export function composeChangeSet(parts: ReadonlyArray<ChangeSetPart>, options: C
|
|
|
275
306
|
entries.sort((a, b) => byString(entryKey(a), entryKey(b)));
|
|
276
307
|
const sideEffects: ChangeSetSideEffect[] = parts
|
|
277
308
|
.flatMap((p) => (p.sideEffects ?? []).map((s) => ({ member: p.member.member, ...s })))
|
|
278
|
-
.sort(
|
|
279
|
-
const digest =
|
|
309
|
+
.sort(bySideEffect);
|
|
310
|
+
const digest = changeSetDocumentDigest({ members, entries, sideEffects });
|
|
280
311
|
return {
|
|
281
312
|
$schema: CHANGE_SET_SCHEMA_ID,
|
|
282
313
|
contract: CHANGE_SET_CONTRACT,
|
|
@@ -289,9 +320,17 @@ export function composeChangeSet(parts: ReadonlyArray<ChangeSetPart>, options: C
|
|
|
289
320
|
};
|
|
290
321
|
}
|
|
291
322
|
|
|
292
|
-
/**
|
|
293
|
-
|
|
294
|
-
|
|
323
|
+
/**
|
|
324
|
+
* Whether a document's digest is the one its members, entries and side
|
|
325
|
+
* effects give ({@link changeSetDocumentDigest}). A document that names a
|
|
326
|
+
* member twice has no digest and is not verified.
|
|
327
|
+
*/
|
|
328
|
+
export function verifyChangeSetDigest(doc: Pick<ChangeSetDocument, "digest" | "members" | "entries" | "sideEffects">): boolean {
|
|
329
|
+
try {
|
|
330
|
+
return changeSetDocumentDigest(doc) === doc.digest;
|
|
331
|
+
} catch {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
295
334
|
}
|
|
296
335
|
|
|
297
336
|
// ── chant lifecycle plan ───────────────────────────────────────────────────────
|
|
@@ -109,6 +109,14 @@ export interface BuildOptions {
|
|
|
109
109
|
* any flame/icicle viewer with no chant-specific tooling.
|
|
110
110
|
*/
|
|
111
111
|
foldRankCollapsedFile?: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* `--lexicon-output` runs `buildCommand` once per output file. The first call
|
|
115
|
+
* runs the build with `serializers` (every serializer the project lists) and
|
|
116
|
+
* keeps the promise here; the later calls reuse it and each takes only the
|
|
117
|
+
* outputs of its own `serializers`, so the sources are evaluated once.
|
|
118
|
+
*/
|
|
119
|
+
sharedBuild?: { serializers: Serializer[]; result?: ReturnType<typeof build> };
|
|
112
120
|
}
|
|
113
121
|
|
|
114
122
|
/**
|
|
@@ -311,20 +319,31 @@ export async function buildCommand(options: BuildOptions): Promise<BuildResult>
|
|
|
311
319
|
// (../build-options.ts), which `evaluateProjectPolicies` calls too, so the
|
|
312
320
|
// `policyGate` step decides on the same project this command builds.
|
|
313
321
|
const telemetry = await resolveTelemetryAttribution(configDir, config as unknown as Record<string, unknown>, env);
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
322
|
+
const runBuild = (serializers: Serializer[]) =>
|
|
323
|
+
build(
|
|
324
|
+
infraPath,
|
|
325
|
+
serializers,
|
|
326
|
+
undefined,
|
|
327
|
+
resolveProjectBuildOptions({
|
|
328
|
+
config,
|
|
329
|
+
configDir,
|
|
330
|
+
plugins: options.plugins,
|
|
331
|
+
modes,
|
|
332
|
+
ownership,
|
|
333
|
+
buildParams: paramsResolution.provenance,
|
|
334
|
+
telemetry,
|
|
335
|
+
}),
|
|
336
|
+
);
|
|
337
|
+
let result;
|
|
338
|
+
if (options.sharedBuild) {
|
|
339
|
+
const shared = options.sharedBuild;
|
|
340
|
+
shared.result ??= runBuild(shared.serializers);
|
|
341
|
+
const full = await shared.result;
|
|
342
|
+
const own = new Set(options.serializers.map((x) => x.name));
|
|
343
|
+
result = { ...full, outputs: new Map([...full.outputs].filter(([name]) => own.has(name))) };
|
|
344
|
+
} else {
|
|
345
|
+
result = await runBuild(options.serializers);
|
|
346
|
+
}
|
|
328
347
|
|
|
329
348
|
// #1022 — report per-file fold vs run so it's visible what still runs.
|
|
330
349
|
// #1424 — one line by default; the per-file lines and their reasons are
|
|
@@ -51,6 +51,14 @@ describe("runBuild --lexicon-output", () => {
|
|
|
51
51
|
]);
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
+
test("every file shares one build over all the serializers", async () => {
|
|
55
|
+
await runBuild(ctx({ lexiconOutput: ["otel=a.yml", "prometheus=b.yml"] }));
|
|
56
|
+
const shared = buildCommandMock.mock.calls.map(([o]) => o.sharedBuild);
|
|
57
|
+
expect(shared).toHaveLength(2);
|
|
58
|
+
expect(shared[0]).toBe(shared[1]);
|
|
59
|
+
expect(shared[0].serializers.map((s: Serializer) => s.name)).toEqual(["otel", "prometheus", "grafana"]);
|
|
60
|
+
});
|
|
61
|
+
|
|
54
62
|
test("lexicons not named go to --output when given, and are skipped otherwise", async () => {
|
|
55
63
|
await runBuild(ctx({ lexiconOutput: ["otel=a.yml"], output: "rest.json" }));
|
|
56
64
|
expect(buildCommandMock.mock.calls.map(([o]) => [o.serializers.map((s: Serializer) => s.name), o.output])).toEqual([
|
|
@@ -214,6 +214,8 @@ export async function runBuild(ctx: CommandContext): Promise<number> {
|
|
|
214
214
|
|
|
215
215
|
const seenWarnings = new Set<string>();
|
|
216
216
|
let failed = false;
|
|
217
|
+
// One build for every file: each group takes its own lexicons' outputs.
|
|
218
|
+
const sharedBuild = { serializers };
|
|
217
219
|
for (const group of groups) {
|
|
218
220
|
const { format, warning } = resolveBuildFormat(args.format, group.output);
|
|
219
221
|
if (warning) console.error(formatInfo(warning));
|
|
@@ -222,6 +224,7 @@ export async function runBuild(ctx: CommandContext): Promise<number> {
|
|
|
222
224
|
output: group.output,
|
|
223
225
|
format,
|
|
224
226
|
serializers: group.serializers,
|
|
227
|
+
sharedBuild,
|
|
225
228
|
plugins,
|
|
226
229
|
verbose: args.verbose,
|
|
227
230
|
env: args.env,
|
package/src/cli/handlers/pr.ts
CHANGED
|
@@ -253,6 +253,9 @@ async function publish(forge: PrForge | undefined, report: PrReport, note: strin
|
|
|
253
253
|
console.error(formatWarning({ message: `could not set the ${status.context} status: ${err instanceof Error ? err.message : String(err)}` }));
|
|
254
254
|
}
|
|
255
255
|
if (report.pr === null) return;
|
|
256
|
+
// A member the change does not reach has nothing to say: one note per
|
|
257
|
+
// member would put a line on every pull request for each member it skips.
|
|
258
|
+
if (report.member && report.status === "nothing") return;
|
|
256
259
|
try {
|
|
257
260
|
await forge.upsertNote(report.pr, prNoteMarker(report.env, report.member), note);
|
|
258
261
|
} catch (err) {
|
|
@@ -468,6 +468,57 @@ describe("runOp: a steward's turn (#2750)", () => {
|
|
|
468
468
|
expect(acquireStewardTurnMock).not.toHaveBeenCalled();
|
|
469
469
|
});
|
|
470
470
|
|
|
471
|
+
// #3555: a runtime that carries the work item (fountain) is handed what the
|
|
472
|
+
// caller named, and nothing else; one that does not refuses --work by name.
|
|
473
|
+
function leasedOp(name: string) {
|
|
474
|
+
return [name, { config: { name, overview: `${name} overview`, phases: [], workLease: {} } }] as const;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
test("--work on a runtime that carries work: start gets the item and holder the caller named (#3555)", async () => {
|
|
478
|
+
const runtime = {
|
|
479
|
+
name: "fountain",
|
|
480
|
+
carriesWork: true,
|
|
481
|
+
start: vi.fn(async (op: { name: string }, _opts: { work?: { item?: string; holder?: string } }) => ({
|
|
482
|
+
op: op.name,
|
|
483
|
+
runId: "f-1",
|
|
484
|
+
result: async () => ({ op: op.name, runId: "f-1", state: "completed" as const, startedAt: "t", endedAt: "t" }),
|
|
485
|
+
})),
|
|
486
|
+
status: vi.fn(), log: vi.fn(), list: vi.fn(), cancel: vi.fn(),
|
|
487
|
+
};
|
|
488
|
+
discoverOpsMock.mockResolvedValue({ ops: new Map([leasedOp("leased")]), errors: [] });
|
|
489
|
+
discoverStewardsMock.mockResolvedValueOnce(stewardOwning("leased", "box-steward", "fountain"));
|
|
490
|
+
loadChantConfigMock.mockResolvedValue({ config: { lexicons: ["fountain"] } });
|
|
491
|
+
makeStdoutSpy();
|
|
492
|
+
const exit = await runOp({
|
|
493
|
+
args: makeArgs({ path: "leased", on: "fountain", work: "ISSUE-7" }),
|
|
494
|
+
plugins: [{ name: "fountain", opRuntime: runtime } as never], serializers: [],
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
expect(exit).toBe(0);
|
|
498
|
+
expect(runtime.start).toHaveBeenCalledTimes(1);
|
|
499
|
+
expect(runtime.start.mock.calls[0][1].work).toEqual({ item: "ISSUE-7" });
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
test("--work on a runtime that does not carry work: exit 1 naming the runtime, nothing started (#3555)", async () => {
|
|
503
|
+
const runtime = {
|
|
504
|
+
name: "fountain",
|
|
505
|
+
start: vi.fn(),
|
|
506
|
+
status: vi.fn(), log: vi.fn(), list: vi.fn(), cancel: vi.fn(),
|
|
507
|
+
};
|
|
508
|
+
discoverOpsMock.mockResolvedValue({ ops: new Map([leasedOp("leased")]), errors: [] });
|
|
509
|
+
discoverStewardsMock.mockResolvedValueOnce(stewardOwning("leased", "box-steward", "fountain"));
|
|
510
|
+
loadChantConfigMock.mockResolvedValue({ config: { lexicons: ["fountain"] } });
|
|
511
|
+
const stderr = makeStderrSpy();
|
|
512
|
+
const exit = await runOp({
|
|
513
|
+
args: makeArgs({ path: "leased", on: "fountain", work: "ISSUE-7" }),
|
|
514
|
+
plugins: [{ name: "fountain", opRuntime: runtime } as never], serializers: [],
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
expect(exit).toBe(1);
|
|
518
|
+
expect(runtime.start).not.toHaveBeenCalled();
|
|
519
|
+
expect(stderr.join("\n")).toContain('--work and --holder run on the local runtime; "fountain" takes the work lease');
|
|
520
|
+
});
|
|
521
|
+
|
|
471
522
|
test("local form, the turn lease's own acquire throws (a stale .lock): refused as a lease error, not an uncaught exception, and nothing runs", async () => {
|
|
472
523
|
discoverOpsMock.mockResolvedValue({
|
|
473
524
|
ops: new Map([localOp("release", [{ kind: "activity", fn: "shellCmd", args: { cmd: "true" } }])]),
|
package/src/cli/handlers/run.ts
CHANGED
|
@@ -1078,8 +1078,8 @@ export async function runOpOnRuntime(ctx: CommandContext): Promise<number> {
|
|
|
1078
1078
|
|
|
1079
1079
|
// The work lease (#2748). `--work` names the item an Op with a work lease
|
|
1080
1080
|
// runs under; it is taken where the run executes, which for a hosted
|
|
1081
|
-
// runtime is not this process.
|
|
1082
|
-
const work = await resolveRunWork(ctx, config, runtime
|
|
1081
|
+
// runtime that carries it (fountain, #3555) is not this process.
|
|
1082
|
+
const work = await resolveRunWork(ctx, config, runtime);
|
|
1083
1083
|
if (work === null) {
|
|
1084
1084
|
await stewardGate?.release?.();
|
|
1085
1085
|
return 1;
|
|
@@ -1208,12 +1208,17 @@ export async function runOpOnRuntime(ctx: CommandContext): Promise<number> {
|
|
|
1208
1208
|
* `null` after printing why the run is refused. The holder is `--holder`, or,
|
|
1209
1209
|
* for an Op a steward lists, `<steward>/<op>@<process>` so `workspace status`
|
|
1210
1210
|
* shows the lease beside the steward's Ops, or this process's id.
|
|
1211
|
+
*
|
|
1212
|
+
* A non-local runtime takes `--work` only when it declares `carriesWork`
|
|
1213
|
+
* (#3555), and then gets just what the caller named: the holder is chosen
|
|
1214
|
+
* where the run executes, not after this process.
|
|
1211
1215
|
*/
|
|
1212
1216
|
async function resolveRunWork(
|
|
1213
1217
|
ctx: CommandContext,
|
|
1214
1218
|
config: OpConfig,
|
|
1215
|
-
|
|
1219
|
+
provider: Pick<OpRuntimeProvider, "name" | "carriesWork">,
|
|
1216
1220
|
): Promise<{ item?: string; holder?: string } | undefined | null> {
|
|
1221
|
+
const runtime = provider.name;
|
|
1217
1222
|
const item = ctx.args.work;
|
|
1218
1223
|
if (!config.workLease) {
|
|
1219
1224
|
if (item === undefined) return undefined;
|
|
@@ -1223,13 +1228,18 @@ async function resolveRunWork(
|
|
|
1223
1228
|
}));
|
|
1224
1229
|
return null;
|
|
1225
1230
|
}
|
|
1226
|
-
if (runtime !== "local" && (item !== undefined || ctx.args.holder !== undefined)) {
|
|
1231
|
+
if (runtime !== "local" && provider.carriesWork !== true && (item !== undefined || ctx.args.holder !== undefined)) {
|
|
1227
1232
|
console.error(formatError({
|
|
1228
1233
|
message: `--work and --holder run on the local runtime; "${runtime}" takes the work lease where it executes the run`,
|
|
1229
1234
|
hint: "Omit --on, or name the item in the Op's workLease.",
|
|
1230
1235
|
}));
|
|
1231
1236
|
return null;
|
|
1232
1237
|
}
|
|
1238
|
+
if (runtime !== "local" && provider.carriesWork === true) {
|
|
1239
|
+
const holderArg = ctx.args.holder;
|
|
1240
|
+
if (item === undefined && holderArg === undefined) return undefined;
|
|
1241
|
+
return { ...(item !== undefined ? { item } : {}), ...(holderArg !== undefined ? { holder: holderArg } : {}) };
|
|
1242
|
+
}
|
|
1233
1243
|
let holder = ctx.args.holder;
|
|
1234
1244
|
if (holder === undefined) {
|
|
1235
1245
|
try {
|
|
@@ -100,6 +100,52 @@ describe("neverOverMcp (chant#3447)", () => {
|
|
|
100
100
|
await expect(createOpReportTool().handler({ name: "tf-apply" })).resolves.toContain("# tf-apply");
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
+
// chant#3555: op-approve hands the runtime the env it was given, as `chant
|
|
104
|
+
// run approve --env` does, and nothing when it was given none.
|
|
105
|
+
async function repoWithPlainGate(dir: string): Promise<void> {
|
|
106
|
+
git(["init", "-q", "-b", "main"], dir);
|
|
107
|
+
git(["config", "user.email", "t@chant.dev"], dir);
|
|
108
|
+
git(["config", "user.name", "T"], dir);
|
|
109
|
+
writeFileSync(join(dir, "README.md"), "x\n");
|
|
110
|
+
git(["add", "."], dir);
|
|
111
|
+
git(["commit", "-q", "-m", "init"], dir);
|
|
112
|
+
await appendPendingGate(
|
|
113
|
+
{
|
|
114
|
+
op: "plain-op",
|
|
115
|
+
gate: "release",
|
|
116
|
+
timestamp: "2026-01-01T00:00:00.000Z",
|
|
117
|
+
origin: "cli",
|
|
118
|
+
expiresAt: "2999-01-01T00:00:00.000Z",
|
|
119
|
+
planDigest: `sha256:${"d".repeat(64)}`,
|
|
120
|
+
},
|
|
121
|
+
{ cwd: dir },
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
test("op-approve passes env to the runtime's resolveGate (chant#3555)", async () => {
|
|
126
|
+
await withTestDir(async (dir) => {
|
|
127
|
+
await repoWithPlainGate(dir);
|
|
128
|
+
process.chdir(dir);
|
|
129
|
+
const result = (await createOpApproveTool().handler({ name: "plain-op", gate: "release", env: "prod" })) as {
|
|
130
|
+
runtimeNotified: boolean;
|
|
131
|
+
};
|
|
132
|
+
expect(result.runtimeNotified).toBe(true);
|
|
133
|
+
expect(resolveGate).toHaveBeenCalledWith("plain-op", "release", expect.objectContaining({ gate: "release" }), {
|
|
134
|
+
env: "prod",
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
test("op-approve with no env leaves the runtime to keep the gated run's (chant#3555)", async () => {
|
|
140
|
+
await withTestDir(async (dir) => {
|
|
141
|
+
await repoWithPlainGate(dir);
|
|
142
|
+
process.chdir(dir);
|
|
143
|
+
await createOpApproveTool().handler({ name: "plain-op", gate: "release" });
|
|
144
|
+
expect(resolveGate).toHaveBeenCalledTimes(1);
|
|
145
|
+
expect(resolveGate.mock.calls[0]).toHaveLength(3);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
|
|
103
149
|
async function repoWithFanOutGate(dir: string): Promise<void> {
|
|
104
150
|
git(["init", "-q", "-b", "main"], dir);
|
|
105
151
|
git(["config", "user.email", "t@chant.dev"], dir);
|
|
@@ -37,7 +37,7 @@ describe("op-approve on the MCP channel (chant#2384)", () => {
|
|
|
37
37
|
// The rest of the tool is unchanged — this narrows one field, it does not
|
|
38
38
|
// remove the tool. The narrower alternative in the issue was to drop
|
|
39
39
|
// op-approve entirely; this keeps it useful for the cross-channel case.
|
|
40
|
-
expect(Object.keys(schema.properties).sort()).toEqual(["gate", "name", "note", "runtime", "url"]);
|
|
40
|
+
expect(Object.keys(schema.properties).sort()).toEqual(["env", "gate", "name", "note", "runtime", "url"]);
|
|
41
41
|
expect(schema.required.sort()).toEqual(["gate", "name"]);
|
|
42
42
|
});
|
|
43
43
|
|
package/src/cli/mcp/op-tools.ts
CHANGED
|
@@ -136,6 +136,9 @@ export function createOpRunTool(): ToolRegistration {
|
|
|
136
136
|
type: "object",
|
|
137
137
|
properties: {
|
|
138
138
|
name: { type: "string", description: "Op name (e.g. alb-deploy)" },
|
|
139
|
+
// chant#3560 — what `chant run --env` passes: the environment the
|
|
140
|
+
// run targets. Omitted, the runtime uses its own default.
|
|
141
|
+
env: { type: "string", description: "Environment the run targets (defaults to the runtime's own)" },
|
|
139
142
|
runtime: RUNTIME_PARAM,
|
|
140
143
|
},
|
|
141
144
|
required: ["name"],
|
|
@@ -153,7 +156,8 @@ export function createOpRunTool(): ToolRegistration {
|
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
const runtime = await runtimeFor(params.runtime);
|
|
156
|
-
const
|
|
159
|
+
const env = typeof params.env === "string" && params.env !== "" ? params.env : undefined;
|
|
160
|
+
const handle = await runtime.start(ops.get(name)!.config, env !== undefined ? { env } : {});
|
|
157
161
|
const status = await handle.result();
|
|
158
162
|
|
|
159
163
|
return {
|
|
@@ -227,6 +231,10 @@ export function createOpApproveTool(): ToolRegistration {
|
|
|
227
231
|
// the ledger recorded it indistinguishably from a name a person gave.
|
|
228
232
|
note: { type: "string", description: "Free-text context recorded on the resolution" },
|
|
229
233
|
url: { type: "string", description: "Absolute http/https URL this resolution happened at" },
|
|
234
|
+
// chant#3555 — what `chant run approve --env` passes: the
|
|
235
|
+
// environment the woken run runs in. Omitted, the runtime keeps the
|
|
236
|
+
// gated run's.
|
|
237
|
+
env: { type: "string", description: "Environment the woken run runs in (defaults to the gated run's)" },
|
|
230
238
|
runtime: RUNTIME_PARAM,
|
|
231
239
|
},
|
|
232
240
|
required: ["name", "gate"],
|
|
@@ -256,7 +264,11 @@ export function createOpApproveTool(): ToolRegistration {
|
|
|
256
264
|
);
|
|
257
265
|
}
|
|
258
266
|
|
|
259
|
-
if (runtime.resolveGate)
|
|
267
|
+
if (runtime.resolveGate) {
|
|
268
|
+
const env = typeof params.env === "string" && params.env !== "" ? params.env : undefined;
|
|
269
|
+
if (env !== undefined) await runtime.resolveGate(name, gate, outcome.record, { env });
|
|
270
|
+
else await runtime.resolveGate(name, gate, outcome.record);
|
|
271
|
+
}
|
|
260
272
|
|
|
261
273
|
return {
|
|
262
274
|
op: name,
|
|
@@ -499,12 +499,13 @@ describe("McpServer", () => {
|
|
|
499
499
|
expect(props.runtime).toBeDefined();
|
|
500
500
|
});
|
|
501
501
|
|
|
502
|
-
test("op-run has name (required) and runtime", async () => {
|
|
502
|
+
test("op-run has name (required), env and runtime", async () => {
|
|
503
503
|
const response = await server.handleRequest({ jsonrpc: "2.0", id: 1, method: "tools/list" });
|
|
504
504
|
const result = response.result as { tools: Array<{ name: string; inputSchema: Record<string, unknown> }> };
|
|
505
505
|
const tool = result.tools.find((t) => t.name === "op-run")!;
|
|
506
506
|
const props = tool.inputSchema.properties as Record<string, unknown>;
|
|
507
507
|
expect(props.name).toBeDefined();
|
|
508
|
+
expect(props.env).toBeDefined();
|
|
508
509
|
expect(props.runtime).toBeDefined();
|
|
509
510
|
expect(tool.inputSchema.required).toContain("name");
|
|
510
511
|
});
|
|
@@ -138,9 +138,16 @@ export function prLoopJobs(forge: ForgeKind, env: string, options: PrLoopPipelin
|
|
|
138
138
|
/**
|
|
139
139
|
* The concurrency group (GitHub, Forgejo) or resource group (GitLab) that
|
|
140
140
|
* keeps one apply at a time per environment, and per member in a workspace.
|
|
141
|
+
*
|
|
142
|
+
* A member's group is `chant-apply.<member>.<env>`. Member names hold only
|
|
143
|
+
* lower-case letters, digits and `-`, so the first `.` ends the member and no
|
|
144
|
+
* two member and environment pairs share a group: member `a` with environment
|
|
145
|
+
* `b-c` is `chant-apply.a.b-c`, and member `a-b` with environment `c` is
|
|
146
|
+
* `chant-apply.a-b.c`. The `.` after `chant-apply` keeps a member's groups
|
|
147
|
+
* apart from a single project's `chant-apply-<env>`.
|
|
141
148
|
*/
|
|
142
149
|
export function prApplyGroup(env: string, member?: string): string {
|
|
143
|
-
return member ? `chant-apply
|
|
150
|
+
return member ? `chant-apply.${member}.${env}` : `chant-apply-${env}`;
|
|
144
151
|
}
|
|
145
152
|
|
|
146
153
|
/**
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
resumePrSet,
|
|
25
25
|
type PrPlanSet,
|
|
26
26
|
} from "./pr-run";
|
|
27
|
-
import { changeSetDigest, composeChangeSet, type ChangeSetEntry, type ChangeSetPart } from "../change-set";
|
|
27
|
+
import { changeSetDigest, changeSetDocumentDigest, composeChangeSet, type ChangeSetEntry, type ChangeSetPart } from "../change-set";
|
|
28
28
|
import type { PrApplyRecord } from "./fan-out-record";
|
|
29
29
|
import type { FanOutPlan } from "./fan-out";
|
|
30
30
|
import { computePlanDigest } from "../lifecycle/plan-digest";
|
|
@@ -140,7 +140,8 @@ describe("planPrSet", () => {
|
|
|
140
140
|
["a", "planned", 1],
|
|
141
141
|
["app", "planned", 0],
|
|
142
142
|
]);
|
|
143
|
-
expect(set.doc.digest).toBe(
|
|
143
|
+
expect(set.doc.digest).toBe(changeSetDocumentDigest(set.doc));
|
|
144
|
+
expect(set.doc.digest).not.toBe(changeSetDigest(set.members.map((m) => ({ member: m.member, planDigest: m.planDigest }))));
|
|
144
145
|
expect(set.failed).toBe(false);
|
|
145
146
|
});
|
|
146
147
|
|
|
@@ -398,6 +399,15 @@ describe("resuming an apply that failed partway (#3464)", () => {
|
|
|
398
399
|
{ ...record, changeSet: other },
|
|
399
400
|
{ ...record, digest: other.digest, changeSet: other },
|
|
400
401
|
{ ...record, changeSet: { ...set.doc, members: set.doc.members.map((m) => (m.member === "a" ? { ...m, planDigest: "jcs1-sha256:" + "1".repeat(64) } : m)) } },
|
|
402
|
+
// The digest binds the entries (#3555): an entry or a hole planted in the record does not resume.
|
|
403
|
+
{
|
|
404
|
+
...record,
|
|
405
|
+
changeSet: {
|
|
406
|
+
...set.doc,
|
|
407
|
+
entries: [...set.doc.entries, { member: "a", lexicon: "terraform", planner: "tofu" as const, address: "aws_vpc.planted", type: "aws_vpc", action: "create" as const, attributes: [] }],
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
{ ...record, changeSet: { ...set.doc, members: set.doc.members.map((m) => (m.member === "a" ? { ...m, holes: [{ address: "data.planted", reason: "unobserved" }] } : m)) } },
|
|
401
411
|
]) {
|
|
402
412
|
w.planned.length = 0;
|
|
403
413
|
const resumed = await resumePrSet({ components: ESTATE, plan, registry: w.registry, env: "prod", record: forged, completed: first.run.completed });
|
package/src/components/pr-run.ts
CHANGED
|
@@ -382,7 +382,9 @@ export type PrResume =
|
|
|
382
382
|
*
|
|
383
383
|
* The record now travels between CI jobs through a cache (#3543), so its
|
|
384
384
|
* change set has to be the one its digest names: the document's own digest
|
|
385
|
-
* is `record.digest`, and
|
|
385
|
+
* is `record.digest`, and the document gives that digest. The digest binds
|
|
386
|
+
* the entries, holes and side effects {@link planCoveredBy} reads (#3555),
|
|
387
|
+
* so a record cannot widen what a re-planned member may do.
|
|
386
388
|
*/
|
|
387
389
|
export async function resumePrSet(options: PrResumeOptions): Promise<PrResume> {
|
|
388
390
|
const { record } = options;
|
package/src/composite.ts
CHANGED
|
@@ -352,10 +352,14 @@ export function resource<T extends Declarable, P>(
|
|
|
352
352
|
*
|
|
353
353
|
* No deep merge — too dangerous with IaC props where nested objects
|
|
354
354
|
* (e.g. policy documents) should be replaced wholesale.
|
|
355
|
+
*
|
|
356
|
+
* `overrides` may be any object type, not only `Partial<T>`: a composite
|
|
357
|
+
* types each member's override against that member's own props, and `T`
|
|
358
|
+
* here is the shape of the literal the composite builds, which is narrower.
|
|
355
359
|
*/
|
|
356
360
|
export function mergeDefaults<T extends Record<string, unknown>>(
|
|
357
361
|
base: T,
|
|
358
|
-
overrides?: Partial<T
|
|
362
|
+
overrides?: Partial<T> | object,
|
|
359
363
|
): T {
|
|
360
364
|
if (!overrides) return base;
|
|
361
365
|
const result = { ...base };
|
package/src/op/runtime.ts
CHANGED
|
@@ -183,8 +183,10 @@ export interface OpRunStartOptions {
|
|
|
183
183
|
signal?: AbortSignal;
|
|
184
184
|
/**
|
|
185
185
|
* For an Op that declares `workLease` (#2748): the work item this run is
|
|
186
|
-
* for (`--work <id>`) and who holds its lease (`--holder`).
|
|
187
|
-
* runtime takes
|
|
186
|
+
* for (`--work <id>`) and who holds its lease (`--holder`). The local
|
|
187
|
+
* runtime takes the lease itself; a runtime that declares
|
|
188
|
+
* {@link OpRuntimeProvider.carriesWork} hands both to where the run
|
|
189
|
+
* executes, which takes it there.
|
|
188
190
|
*/
|
|
189
191
|
work?: { item?: string; holder?: string };
|
|
190
192
|
/**
|
|
@@ -219,6 +221,13 @@ export interface OpRuntimeProvider {
|
|
|
219
221
|
/** How the CLI names this runtime in messages, and what `--on` matches. */
|
|
220
222
|
readonly name: string;
|
|
221
223
|
|
|
224
|
+
/**
|
|
225
|
+
* Whether `start` carries `opts.work` to where the run executes (#3555),
|
|
226
|
+
* so `chant run <op> --work <id> --on <name>` is allowed. Omitted, a
|
|
227
|
+
* non-local runtime is refused `--work` and `--holder` by name.
|
|
228
|
+
*/
|
|
229
|
+
readonly carriesWork?: boolean;
|
|
230
|
+
|
|
222
231
|
/** Start a run. Rejects with an actionable Error when it cannot. */
|
|
223
232
|
start(op: OpConfig, opts: OpRunStartOptions): Promise<OpRunHandle>;
|
|
224
233
|
|
package/src/pr-loop.ts
CHANGED
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
*
|
|
17
17
|
* One gate per pull request: op `pr-<number>`, gate `pr-apply` unless the
|
|
18
18
|
* pipeline names another. It binds the digest of the change-set document over
|
|
19
|
-
* every planned member (`
|
|
20
|
-
* wave binds over its members (#3049)
|
|
19
|
+
* every planned member (`changeSetDocumentDigest`, #3181): the set digest a
|
|
20
|
+
* gated wave binds over its members (#3049), and the document's entries, holes
|
|
21
|
+
* and side effects with it (#3555). A reviewer approves it with `chant
|
|
21
22
|
* approve pr-<number> pr-apply --plan <digest>`. The op carries the number so
|
|
22
23
|
* that one pull request's approval never answers another's, and the gate name
|
|
23
24
|
* stays fixed so a workspace can require signed approvals for it under
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"digest": {
|
|
27
27
|
"type": "string",
|
|
28
28
|
"pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$",
|
|
29
|
-
"description": "computePlanDigest(\"change-set\", \u2026) over the members' { member, planDigest } pairs sorted by member, provisional members left out. What a gate over the whole run binds."
|
|
29
|
+
"description": "computePlanDigest(\"change-set-document\", \u2026) over the set digest (computePlanDigest(\"change-set\", \u2026) over the members' { member, planDigest } pairs sorted by member), each member's member, status and holes, the entries and the side effects, provisional members and their entries left out. What a gate over the whole run binds."
|
|
30
30
|
},
|
|
31
31
|
"members": {
|
|
32
32
|
"type": "array",
|
|
@@ -80,8 +80,8 @@ describe("the component pipeline's file and command", () => {
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
test("a pull-request pipeline gets its own file and a command that regenerates it (#3465)", () => {
|
|
83
|
-
expect(memberPipelineFile("github", "api", "staging", "pr")).toBe(".github/workflows/chant-pr
|
|
84
|
-
expect(memberPipelineFile("gitlab", "api", "staging", "pr")).toBe(".gitlab/ci/chant-pr
|
|
83
|
+
expect(memberPipelineFile("github", "api", "staging", "pr")).toBe(".github/workflows/chant-pr.api.staging.yml");
|
|
84
|
+
expect(memberPipelineFile("gitlab", "api", "staging", "pr")).toBe(".gitlab/ci/chant-pr.api.staging.gitlab-ci.yml");
|
|
85
85
|
const dir = join(repo, "services/api");
|
|
86
86
|
const plan = planMemberComponentPipeline({
|
|
87
87
|
projectDir: dir,
|
|
@@ -90,8 +90,8 @@ describe("the component pipeline's file and command", () => {
|
|
|
90
90
|
env: "staging",
|
|
91
91
|
prLoop: { gate: "infra-apply", branch: "trunk" },
|
|
92
92
|
})!;
|
|
93
|
-
expect(plan.file).toBe(".github/workflows/chant-pr
|
|
94
|
-
expect(plan.member).toEqual({ name: "api", dir: "services/api", file: ".github/workflows/chant-pr
|
|
93
|
+
expect(plan.file).toBe(".github/workflows/chant-pr.api.staging.yml");
|
|
94
|
+
expect(plan.member).toEqual({ name: "api", dir: "services/api", file: ".github/workflows/chant-pr.api.staging.yml" });
|
|
95
95
|
expect(plan.command).toBe("chant build --components --generate github --env staging --pr-loop --gate infra-apply --branch trunk");
|
|
96
96
|
});
|
|
97
97
|
|
|
@@ -134,13 +134,14 @@ export function memberPipelineDir(provider: string): string | undefined {
|
|
|
134
134
|
* The default path of a member's component pipeline for one environment,
|
|
135
135
|
* relative to the repository root: `chant-<member>-<env>.yml` in the forge's
|
|
136
136
|
* workflow directory, or `.gitlab/ci/chant-<member>-<env>.gitlab-ci.yml`.
|
|
137
|
-
* A pull-request pipeline (`kind` `"pr"`, #3465) is `chant-pr
|
|
138
|
-
*
|
|
137
|
+
* A pull-request pipeline (`kind` `"pr"`, #3465) is `chant-pr.<member>.<env>`, with the dots the apply group uses so no
|
|
138
|
+
* two member and environment pairs share one name, and it sits beside the
|
|
139
|
+
* member's deploy pipeline for the same environment.
|
|
139
140
|
*/
|
|
140
141
|
export function memberPipelineFile(provider: string, member: string, env: string, kind: "components" | "pr" = "components"): string | undefined {
|
|
141
142
|
const dir = PIPELINE_DIRS[provider];
|
|
142
143
|
if (dir === undefined) return undefined;
|
|
143
|
-
const stem = kind === "pr" ? `chant-pr
|
|
144
|
+
const stem = kind === "pr" ? `chant-pr.${member}.${env}` : `chant-${member}-${env}`;
|
|
144
145
|
return `${dir}/${stem}${provider === "gitlab" ? ".gitlab-ci.yml" : ".yml"}`;
|
|
145
146
|
}
|
|
146
147
|
|