@intentius/chant 0.124.24 → 0.124.26
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/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +4 -2
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +4 -2
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +39 -4
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +21 -7
- package/dist/cli/mcp/workspace-tools.d.ts +3 -3
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/mcp/workspace-tools.js +27 -4
- package/dist/effect-receipt.d.ts +13 -0
- package/dist/effect-receipt.d.ts.map +1 -1
- package/dist/effect-receipt.js +19 -0
- package/dist/gate-decision.d.ts +1 -1
- package/dist/gate-decision.d.ts.map +1 -1
- package/dist/gate-decision.js +1 -1
- package/dist/lexicon-module.d.ts +7 -1
- package/dist/lexicon-module.d.ts.map +1 -1
- package/dist/lexicon-module.js +7 -2
- package/dist/lifecycle/gate-audit.d.ts +7 -1
- package/dist/lifecycle/gate-audit.d.ts.map +1 -1
- package/dist/lifecycle/gate-audit.js +40 -3
- package/dist/lifecycle/gate-checkpoint.d.ts +78 -0
- package/dist/lifecycle/gate-checkpoint.d.ts.map +1 -0
- package/dist/lifecycle/gate-checkpoint.js +103 -0
- package/dist/lifecycle/gate-ledger.d.ts +41 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.js +18 -0
- package/dist/lifecycle/receipt-plan.d.ts.map +1 -1
- package/dist/lifecycle/receipt-plan.js +4 -2
- package/dist/lifecycle/run-ledger.d.ts +2 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.js +2 -0
- package/dist/lint/rules/op/index.d.ts +6 -2
- package/dist/lint/rules/op/index.d.ts.map +1 -1
- package/dist/lint/rules/op/index.js +7 -3
- package/dist/lint/rules/op/ops016-gate-resume.d.ts +14 -0
- package/dist/lint/rules/op/ops016-gate-resume.d.ts.map +1 -0
- package/dist/lint/rules/op/ops016-gate-resume.js +31 -0
- package/dist/lint/rules/op/ops017-gate-alias.d.ts +30 -0
- package/dist/lint/rules/op/ops017-gate-alias.d.ts.map +1 -0
- package/dist/lint/rules/op/ops017-gate-alias.js +67 -0
- package/dist/op/activity-contract.d.ts +14 -0
- package/dist/op/activity-contract.d.ts.map +1 -1
- package/dist/op/activity-contract.js +16 -0
- package/dist/op/builders.d.ts +7 -0
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/builders.js +13 -0
- package/dist/op/gate-alias.d.ts +57 -0
- package/dist/op/gate-alias.d.ts.map +1 -0
- package/dist/op/gate-alias.js +127 -0
- package/dist/op/gate-checkpoint.d.ts +123 -0
- package/dist/op/gate-checkpoint.d.ts.map +1 -0
- package/dist/op/gate-checkpoint.js +280 -0
- package/dist/op/gate.d.ts +54 -2
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +142 -1
- package/dist/op/index.d.ts +4 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +2 -1
- package/dist/op/local-executor.d.ts +57 -2
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-executor.js +200 -11
- package/dist/op/local-output.d.ts.map +1 -1
- package/dist/op/local-output.js +20 -2
- package/dist/op/op-ir.d.ts +4 -0
- package/dist/op/op-ir.d.ts.map +1 -1
- package/dist/op/op-ir.js +4 -0
- package/dist/op/receipt-store.d.ts +5 -0
- package/dist/op/receipt-store.d.ts.map +1 -1
- package/dist/op/receipt-store.js +4 -3
- package/dist/op/runtime.d.ts +15 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtimes/local.d.ts.map +1 -1
- package/dist/op/runtimes/local.js +5 -0
- package/dist/op/step-output-ref.d.ts +26 -18
- package/dist/op/step-output-ref.d.ts.map +1 -1
- package/dist/op/step-output-ref.js +86 -63
- package/dist/op/types.d.ts +31 -0
- package/dist/op/types.d.ts.map +1 -1
- package/dist/wave-runtime.mjs +223 -221
- package/dist/workspace/agent-cli.d.ts.map +1 -1
- package/dist/workspace/agent-cli.js +3 -0
- package/dist/workspace/conformance/__writer_fixture__/answers/answer.schema.json +16 -1
- package/dist/workspace/conformance/writer.js +1 -1
- package/dist/workspace/decide.d.ts +51 -9
- package/dist/workspace/decide.d.ts.map +1 -1
- package/dist/workspace/decide.js +125 -14
- package/dist/workspace/lineage-upgrade.d.ts.map +1 -1
- package/dist/workspace/lineage-upgrade.js +20 -11
- package/dist/workspace/point-answer.schema.json +16 -1
- package/dist/workspace/points-cli.d.ts +5 -3
- package/dist/workspace/points-cli.d.ts.map +1 -1
- package/dist/workspace/points-cli.js +16 -7
- package/dist/workspace/points-write.schema.json +39 -4
- package/dist/workspace/points.schema.json +42 -3
- package/dist/workspace/reason-codes.d.ts +2 -1
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +2 -1
- package/dist/workspace/records-cli.d.ts +12 -2
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-cli.js +27 -7
- package/dist/workspace/records-write.d.ts.map +1 -1
- package/dist/workspace/records-write.js +2 -3
- package/dist/workspace/records.d.ts +10 -4
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/records.js +16 -3
- package/dist/workspace/records.schema.json +2 -1
- package/dist/workspace/trust/gate-seal.d.ts +32 -1
- package/dist/workspace/trust/gate-seal.d.ts.map +1 -1
- package/dist/workspace/trust/gate-seal.js +41 -2
- package/dist/workspace/trust/seal.d.ts +1 -1
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/seal.js +1 -1
- package/dist/workspace/trust/verify-cli.d.ts.map +1 -1
- package/dist/workspace/trust/verify-cli.js +2 -1
- package/dist/workspace/trust/verify.d.ts +22 -0
- package/dist/workspace/trust/verify.d.ts.map +1 -1
- package/dist/workspace/trust/verify.js +94 -14
- package/dist/workspace/write-scope.d.ts +3 -1
- package/dist/workspace/write-scope.d.ts.map +1 -1
- package/dist/workspace/write-scope.js +11 -4
- package/package.json +1 -1
- package/src/cli/commands/build.ts +9 -2
- package/src/cli/commands/lint.ts +4 -2
- package/src/cli/compiled-cli.e2e.test.ts +45 -1
- package/src/cli/handlers/approve.ts +46 -4
- package/src/cli/handlers/operator.test.ts +91 -0
- package/src/cli/main.test.ts +10 -0
- package/src/cli/main.ts +21 -7
- package/src/cli/mcp/workspace-tools.e2e.test.ts +1 -1
- package/src/cli/mcp/workspace-tools.ts +27 -4
- package/src/effect-receipt.ts +22 -0
- package/src/gate-decision.ts +2 -0
- package/src/lexicon-module.ts +9 -2
- package/src/lifecycle/gate-audit.ts +41 -4
- package/src/lifecycle/gate-checkpoint.test.ts +128 -0
- package/src/lifecycle/gate-checkpoint.ts +133 -0
- package/src/lifecycle/gate-ledger.ts +61 -0
- package/src/lifecycle/receipt-plan.test.ts +9 -0
- package/src/lifecycle/receipt-plan.ts +4 -1
- package/src/lifecycle/run-ledger.ts +4 -0
- package/src/lint/rules/op/index.ts +9 -3
- package/src/lint/rules/op/ops016-gate-resume.test.ts +53 -0
- package/src/lint/rules/op/ops016-gate-resume.ts +48 -0
- package/src/lint/rules/op/ops017-gate-alias.test.ts +85 -0
- package/src/lint/rules/op/ops017-gate-alias.ts +89 -0
- package/src/op/activity-contract.ts +22 -1
- package/src/op/builders.ts +21 -1
- package/src/op/effect-step.test.ts +95 -1
- package/src/op/gate-alias.e2e.test.ts +78 -0
- package/src/op/gate-alias.test.ts +350 -0
- package/src/op/gate-alias.ts +137 -0
- package/src/op/gate-checkpoint.test.ts +284 -0
- package/src/op/gate-checkpoint.ts +322 -0
- package/src/op/gate.ts +198 -4
- package/src/op/index.ts +4 -1
- package/src/op/local-executor.test.ts +65 -0
- package/src/op/local-executor.ts +248 -12
- package/src/op/local-output.ts +18 -2
- package/src/op/op-ir.test.ts +25 -0
- package/src/op/op-ir.ts +8 -0
- package/src/op/receipt-store.ts +13 -3
- package/src/op/runtime.ts +8 -0
- package/src/op/runtimes/local.ts +5 -0
- package/src/op/step-output-ref.test.ts +68 -24
- package/src/op/step-output-ref.ts +85 -65
- package/src/op/types.ts +32 -0
- package/src/workspace/agent-cli.ts +2 -0
- package/src/workspace/conformance/__writer_fixture__/answers/answer.schema.json +16 -1
- package/src/workspace/conformance/writer.ts +1 -1
- package/src/workspace/decide.test.ts +87 -3
- package/src/workspace/decide.ts +142 -17
- package/src/workspace/lineage-upgrade.test.ts +21 -0
- package/src/workspace/lineage-upgrade.ts +19 -11
- package/src/workspace/point-answer.schema.json +16 -1
- package/src/workspace/points-cli.ts +16 -8
- package/src/workspace/points-write.schema.json +39 -4
- package/src/workspace/points.schema.json +42 -3
- package/src/workspace/reason-codes.ts +2 -1
- package/src/workspace/record-assets.test.ts +14 -0
- package/src/workspace/records-cli.ts +28 -7
- package/src/workspace/records-write-commands.e2e.test.ts +32 -0
- package/src/workspace/records-write.ts +2 -3
- package/src/workspace/records.schema.json +2 -1
- package/src/workspace/records.ts +17 -4
- package/src/workspace/trust/gate-seal.test.ts +29 -2
- package/src/workspace/trust/gate-seal.ts +46 -2
- package/src/workspace/trust/seal.ts +1 -1
- package/src/workspace/trust/trust.test.ts +105 -0
- package/src/workspace/trust/verify-cli.ts +2 -1
- package/src/workspace/trust/verify.ts +106 -13
- package/src/workspace/write-scope.test.ts +18 -0
- package/src/workspace/write-scope.ts +16 -5
package/dist/op/op-ir.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op-ir.d.ts","sourceRoot":"","sources":["../../src/op/op-ir.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AAGH,OAAO,KAAK,EACV,gBAAgB,EAChB,QAAQ,EACR,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AE,SAAS,EAAE,CAAC;IACpB,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,0JAA0J;IAC1J,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAClD;;;;OAIG;IACH,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CACzD;AAyGD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,QAAQ,EAChB,gBAAgB,GAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAgB,EACtE,eAAe,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAqB,GAC7E,IAAI,CA+CN;AAED,sLAAsL;AACtL,wBAAgB,aAAa,CAC3B,MAAM,EAAE,QAAQ,EAChB,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACxD,eAAe,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAC1D,MAAM,CAER;AAoDD,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,EAAE,EAAE,IAAI,GAAG,QAAQ,CAoBjD"}
|
package/dist/op/op-ir.js
CHANGED
|
@@ -137,6 +137,8 @@ function irGateStep(step) {
|
|
|
137
137
|
...(step.plan !== undefined ? { plan: step.plan } : {}),
|
|
138
138
|
...(step.approval !== undefined ? { approval: step.approval } : {}),
|
|
139
139
|
...(step.point !== undefined ? { point: step.point } : {}),
|
|
140
|
+
...(step.resume ? { resume: true } : {}),
|
|
141
|
+
...(step.aliases !== undefined && step.aliases.length > 0 ? { aliases: step.aliases } : {}),
|
|
140
142
|
};
|
|
141
143
|
}
|
|
142
144
|
function irEffectStep(step, contracts) {
|
|
@@ -278,6 +280,8 @@ function opStepFromIR(step) {
|
|
|
278
280
|
...(step.plan !== undefined ? { plan: step.plan } : {}),
|
|
279
281
|
...(step.approval !== undefined ? { approval: step.approval } : {}),
|
|
280
282
|
...(step.point !== undefined ? { point: step.point } : {}),
|
|
283
|
+
...(step.resume ? { resume: true } : {}),
|
|
284
|
+
...(step.aliases !== undefined && step.aliases.length > 0 ? { aliases: step.aliases } : {}),
|
|
281
285
|
};
|
|
282
286
|
}
|
|
283
287
|
return {
|
|
@@ -71,6 +71,11 @@ export interface ReceiptCheckInput {
|
|
|
71
71
|
export declare function receiptCheckInput(receipt: EffectReceiptDeclaration): ReceiptCheckInput;
|
|
72
72
|
/** Args of the `receiptRead` activity, as the effect step's codegen emits them. */
|
|
73
73
|
export interface ReceiptReadArgs extends ReceiptCheckInput {
|
|
74
|
+
/**
|
|
75
|
+
* The digest of the step outputs the effect's nested steps read (#3948),
|
|
76
|
+
* when they read any. Folded into the expectation by {@link withStepOutputs}.
|
|
77
|
+
*/
|
|
78
|
+
outputs?: string;
|
|
74
79
|
}
|
|
75
80
|
/** Result of the `receiptRead` activity. `current` is `null` (not `undefined`)
|
|
76
81
|
* for an absent receipt so the value survives JSON transport. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receipt-store.d.ts","sourceRoot":"","sources":["../../src/op/receipt-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"receipt-store.d.ts","sourceRoot":"","sources":["../../src/op/receipt-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EAGzB,MAAM,mBAAmB,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,MAAM,EAAE,mBAAmB,CAAC;IAC5B,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ChC,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,iDAAiD;AACjD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAED,6CAA6C;AAC7C,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAC9E;AAED,wDAAwD;AACxD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACzF,YAAY,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,IAAI,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5G,gBAAgB,EAAE,CAAC,IAAI,EAAE,oBAAoB,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACzG;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,sBAAsB,GAAG,iBAAiB,CAwCvG"}
|
package/dist/op/receipt-store.js
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* {@link ReceiptActivityOptions.resolveExpectation} hook — never by hashing
|
|
27
27
|
* placeholders.
|
|
28
28
|
*/
|
|
29
|
-
import { EXISTENCE_EXPECTATION, isEffectReceipt, receiptExpectation, referenceInputPaths, } from "../effect-receipt.js";
|
|
29
|
+
import { EXISTENCE_EXPECTATION, isEffectReceipt, receiptExpectation, referenceInputPaths, declaredExpectation, withStepOutputs, } from "../effect-receipt.js";
|
|
30
30
|
/**
|
|
31
31
|
* Snapshot a typed receipt declaration into check-input data: the
|
|
32
32
|
* {@link EffectReceiptRef} plus the synthesis-time expectation when the
|
|
@@ -67,7 +67,8 @@ export function receiptActivities(store, opts) {
|
|
|
67
67
|
};
|
|
68
68
|
return {
|
|
69
69
|
async receiptRead(args) {
|
|
70
|
-
const
|
|
70
|
+
const declared = await expectationOf(args);
|
|
71
|
+
const expectation = args.outputs !== undefined ? withStepOutputs(declared, args.outputs) : declared;
|
|
71
72
|
const current = await store.read(args.receipt);
|
|
72
73
|
return { current: current ?? null, expectation, applied: current === expectation };
|
|
73
74
|
},
|
|
@@ -84,7 +85,7 @@ export function receiptActivities(store, opts) {
|
|
|
84
85
|
if (current === undefined) {
|
|
85
86
|
findings.push({ receipt: input.receipt.name, effect: input.receipt.effect, kind: "absent", expected });
|
|
86
87
|
}
|
|
87
|
-
else if (current !== expected) {
|
|
88
|
+
else if (declaredExpectation(current) !== expected) {
|
|
88
89
|
findings.push({ receipt: input.receipt.name, effect: input.receipt.effect, kind: "differs", expected, current });
|
|
89
90
|
}
|
|
90
91
|
}
|
package/dist/op/runtime.d.ts
CHANGED
|
@@ -64,6 +64,11 @@ export interface OpRunStepRecord {
|
|
|
64
64
|
op: string;
|
|
65
65
|
gate: string;
|
|
66
66
|
};
|
|
67
|
+
/** The run whose checkpoint supplied this step's output, for a step a resumed run skipped (#3947). */
|
|
68
|
+
resumed?: {
|
|
69
|
+
run: string;
|
|
70
|
+
gate: string;
|
|
71
|
+
};
|
|
67
72
|
}
|
|
68
73
|
/** One phase's steps and the verdict they add up to. */
|
|
69
74
|
export interface OpRunPhaseRecord {
|
|
@@ -165,6 +170,16 @@ export interface OpRunRecord {
|
|
|
165
170
|
};
|
|
166
171
|
/** The steward whose turn the run was, when a steward ran it (#2749). */
|
|
167
172
|
steward?: string;
|
|
173
|
+
/**
|
|
174
|
+
* The gate this run resumed at (#3947), the run whose checkpoint it carried
|
|
175
|
+
* on from, and the checkpoint's digest. Absent on a run that started at the
|
|
176
|
+
* first phase.
|
|
177
|
+
*/
|
|
178
|
+
resumed?: {
|
|
179
|
+
gate: string;
|
|
180
|
+
run: string;
|
|
181
|
+
checkpoint: string;
|
|
182
|
+
};
|
|
168
183
|
}
|
|
169
184
|
/** An {@link OpRunRecord} before the ledger stamps its version and mints an id. */
|
|
170
185
|
export type OpRunRecordInput = Omit<OpRunRecord, "version" | "id"> & {
|
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,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE3F;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AAEhG,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,UAAU,CAEpE;AAED,gHAAgH;AAChH,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE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W,CAAC,EAAE,OAAO,CAAC;IAE/B,oEAAoE;IACpE,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAEnE,kFAAkF;IAClF,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IAErD,iEAAiE;IACjE,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAEnE,wDAAwD;IACxD,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC;IAErE,iFAAiF;IACjF,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5D;;;;;OAKG;IACH,WAAW,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErH;;;OAGG;IACH,aAAa,CAAC,CACZ,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../../src/op/runtimes/local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../../src/op/runtimes/local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAaH,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,YAAY,CAAC;AA0CpB;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,iBAAiB,CA8J3F"}
|
|
@@ -21,6 +21,8 @@ import { lexiconNames } from "../../lexicon-module.js";
|
|
|
21
21
|
import { loadChantConfig } from "../../config.js";
|
|
22
22
|
import { loadActivities, loadProfiles } from "../activity-registry.js";
|
|
23
23
|
import { runOpLocally, OpRunFailure } from "../local-executor.js";
|
|
24
|
+
import { loadActivityContracts } from "../activity-contract-registry.js";
|
|
25
|
+
import { resumeGatesOf } from "../gate-checkpoint.js";
|
|
24
26
|
import { stepHeartbeatMs } from "../step-console.js";
|
|
25
27
|
import { runComponents } from "../../components/cli-support.js";
|
|
26
28
|
import { discoverOps } from "../discover.js";
|
|
@@ -119,6 +121,8 @@ export function createLocalOpRuntime(opts = {}) {
|
|
|
119
121
|
// No/invalid chant.config — base activities only.
|
|
120
122
|
}
|
|
121
123
|
const [activities, profiles] = await Promise.all([loadActivities(lexicons), loadProfiles()]);
|
|
124
|
+
// #3947: a gate that resumes stores no output a contract marks secret.
|
|
125
|
+
const contracts = resumeGatesOf(op).length > 0 ? await loadActivityContracts(lexicons) : undefined;
|
|
122
126
|
// A caller that names the run (#3539: `chant acp` on fountain passes the
|
|
123
127
|
// conversation id) gets its id on the record; otherwise one is minted.
|
|
124
128
|
const runId = startOpts.runId ?? `local-${Date.now()}`;
|
|
@@ -149,6 +153,7 @@ export function createLocalOpRuntime(opts = {}) {
|
|
|
149
153
|
stepOutput: (line) => process.stderr.write(`${line}\n`),
|
|
150
154
|
stepHeartbeatMs: stepHeartbeatMs(process.env, (message) => process.stderr.write(`warning: ${message}\n`)),
|
|
151
155
|
...(startOpts.work ? { work: startOpts.work } : {}),
|
|
156
|
+
...(contracts ? { contracts } : {}),
|
|
152
157
|
onWorkLeaseWarning: (message) => process.stderr.write(`warning: "${op.name}" could not renew its work lease, retrying at the next beat: ${message}\n`),
|
|
153
158
|
});
|
|
154
159
|
const status = statusFrom(op.name, runId, startedAt, result);
|
|
@@ -23,15 +23,20 @@
|
|
|
23
23
|
* Scope, kept deliberately tight (see the issue's "Open questions"):
|
|
24
24
|
* - same-Op only — no cross-Op plumbing (that needs a durable place to put
|
|
25
25
|
* the value, which #1290 explicitly defers).
|
|
26
|
-
* -
|
|
27
|
-
* `
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
26
|
+
* - producers are the top-level activity steps of the main `phases`. A step
|
|
27
|
+
* in `onFailure` or nested inside an `EffectStep` produces nothing another
|
|
28
|
+
* step may reference: an effect's nested steps run only when the receipt
|
|
29
|
+
* comparison mismatches, so a value one of them returns isn't reliably
|
|
30
|
+
* there for anything else (#3948 decision A7, "for now").
|
|
31
|
+
* - consumers are those producers, plus (#3948) every activity step in
|
|
32
|
+
* `onFailure` and every activity step nested inside an effect. An
|
|
33
|
+
* `onFailure` step may reference any main-phase producer. Compensation
|
|
34
|
+
* runs after a failure, so its producer may never have completed; the
|
|
35
|
+
* executor then skips the compensation step and records why (decision
|
|
36
|
+
* A6), rather than calling it with an `undefined` in place of the value.
|
|
37
|
+
* A step nested inside an effect may reference a producer that runs
|
|
38
|
+
* before the effect, and the executor folds the resolved values into the
|
|
39
|
+
* effect's expectation, so a changed value re-fires the effect.
|
|
35
40
|
* - producer must run to completion before the consumer starts: an earlier
|
|
36
41
|
* phase, or an earlier step within the same non-parallel phase. Two
|
|
37
42
|
* steps in the same parallel phase run concurrently (`Promise.all`) with
|
|
@@ -176,22 +181,25 @@ export declare function collectStepOutputRefs(value: unknown): StepOutputRef[];
|
|
|
176
181
|
* a public export a caller can invoke directly, bypassing that lint pass —
|
|
177
182
|
* this is its own defense-in-depth.
|
|
178
183
|
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* explicitly here rather than left to fall
|
|
184
|
+
* Consumers are the main-phase activity steps, the steps nested inside an
|
|
185
|
+
* effect, and every `onFailure` activity step (#3948). Flags:
|
|
186
|
+
* - a reference to a step nested inside an effect step, from anywhere
|
|
187
|
+
* (#3948 decision A7) — flagged explicitly here rather than left to fall
|
|
188
|
+
* through as "unknown producer",
|
|
183
189
|
* - a reference to an unregistered step id (no step in scope declares it),
|
|
184
190
|
* - a duplicate step id (ambiguous producer),
|
|
185
191
|
* - a reference to a step that does not precede the referencing step
|
|
186
192
|
* (a later phase, a later step in the same phase, itself, or a step in
|
|
187
|
-
* the same parallel phase).
|
|
193
|
+
* the same parallel phase). A step nested inside an effect takes the
|
|
194
|
+
* effect's position, so it may reference only a step that runs before
|
|
195
|
+
* the effect. An `onFailure` step comes after every main phase.
|
|
188
196
|
*/
|
|
189
197
|
export declare function validateStepOutputRefScope(config: Pick<OpConfig, "name" | "phases" | "onFailure"> & Partial<Pick<OpConfig, "workLease">>): ActivityContractIssue[];
|
|
190
198
|
/**
|
|
191
|
-
* Validate every step-output reference in an Op
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
199
|
+
* Validate every step-output reference in an Op against a contract map and
|
|
200
|
+
* the Op's own step ordering, over the consumers {@link
|
|
201
|
+
* validateStepOutputRefScope} covers (see the module doc). Layers
|
|
202
|
+
* contract-based checks on top of {@link
|
|
195
203
|
* validateStepOutputRefScope}'s scope/ordering checks.
|
|
196
204
|
*
|
|
197
205
|
* Flags everything {@link validateStepOutputRefScope} does, plus:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-output-ref.d.ts","sourceRoot":"","sources":["../../src/op/step-output-ref.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"step-output-ref.d.ts","sourceRoot":"","sources":["../../src/op/step-output-ref.ts"],"names":[],"mappings":"AAAA;;;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,CAEtE;AAqBD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,aAAa,CAQhG;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAU1E;AAED,8GAA8G;AAC9G,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,EAAE,CAKrE;AAoGD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,GAC7F,qBAAqB,EAAE,CAqDzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,EAC9F,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAC/C,qBAAqB,EAAE,CA0EzB"}
|
|
@@ -23,15 +23,20 @@
|
|
|
23
23
|
* Scope, kept deliberately tight (see the issue's "Open questions"):
|
|
24
24
|
* - same-Op only — no cross-Op plumbing (that needs a durable place to put
|
|
25
25
|
* the value, which #1290 explicitly defers).
|
|
26
|
-
* -
|
|
27
|
-
* `
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
26
|
+
* - producers are the top-level activity steps of the main `phases`. A step
|
|
27
|
+
* in `onFailure` or nested inside an `EffectStep` produces nothing another
|
|
28
|
+
* step may reference: an effect's nested steps run only when the receipt
|
|
29
|
+
* comparison mismatches, so a value one of them returns isn't reliably
|
|
30
|
+
* there for anything else (#3948 decision A7, "for now").
|
|
31
|
+
* - consumers are those producers, plus (#3948) every activity step in
|
|
32
|
+
* `onFailure` and every activity step nested inside an effect. An
|
|
33
|
+
* `onFailure` step may reference any main-phase producer. Compensation
|
|
34
|
+
* runs after a failure, so its producer may never have completed; the
|
|
35
|
+
* executor then skips the compensation step and records why (decision
|
|
36
|
+
* A6), rather than calling it with an `undefined` in place of the value.
|
|
37
|
+
* A step nested inside an effect may reference a producer that runs
|
|
38
|
+
* before the effect, and the executor folds the resolved values into the
|
|
39
|
+
* effect's expectation, so a changed value re-fires the effect.
|
|
35
40
|
* - producer must run to completion before the consumer starts: an earlier
|
|
36
41
|
* phase, or an earlier step within the same non-parallel phase. Two
|
|
37
42
|
* steps in the same parallel phase run concurrently (`Promise.all`) with
|
|
@@ -179,20 +184,58 @@ function locateStepOutputRefPath(value, target, path = []) {
|
|
|
179
184
|
}
|
|
180
185
|
return undefined;
|
|
181
186
|
}
|
|
182
|
-
/** Top-level `ActivityStep`s of `phases`, in authored (phase, then step) order
|
|
187
|
+
/** Top-level `ActivityStep`s of `phases`, in authored (phase, then step) order: the producers (see the module doc's scope note). */
|
|
183
188
|
function locateActivitySteps(phases) {
|
|
184
189
|
const locations = [];
|
|
185
190
|
phases.forEach((phase, phaseIndex) => {
|
|
186
|
-
|
|
187
|
-
for (const step of phase.steps) {
|
|
191
|
+
phase.steps.forEach((step, stepIndex) => {
|
|
188
192
|
if (step.kind !== "activity")
|
|
189
|
-
|
|
190
|
-
locations.push({ phaseIndex, stepIndex, parallel: phase.parallel === true, step });
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
+
return;
|
|
194
|
+
locations.push({ phaseIndex, stepIndex, parallel: phase.parallel === true, step, phaseName: phase.name });
|
|
195
|
+
});
|
|
193
196
|
});
|
|
194
197
|
return locations;
|
|
195
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* Every activity step that may hold a reference (#3948): the producers, each
|
|
201
|
+
* step nested inside an effect of a main phase, and every activity step of
|
|
202
|
+
* `onFailure`, effect-nested ones included. An `onFailure` step is placed after
|
|
203
|
+
* every main phase, so any main-phase producer precedes it.
|
|
204
|
+
*/
|
|
205
|
+
function locateConsumers(config) {
|
|
206
|
+
const consumers = [];
|
|
207
|
+
const visit = (phases, offset) => {
|
|
208
|
+
phases.forEach((phase, i) => {
|
|
209
|
+
const at = { phaseIndex: offset + i, parallel: phase.parallel === true, phaseName: phase.name };
|
|
210
|
+
phase.steps.forEach((step, stepIndex) => {
|
|
211
|
+
if (step.kind === "activity")
|
|
212
|
+
consumers.push({ ...at, stepIndex, step });
|
|
213
|
+
if (step.kind === "effect") {
|
|
214
|
+
for (const nested of step.steps)
|
|
215
|
+
if (nested.kind === "activity")
|
|
216
|
+
consumers.push({ ...at, stepIndex, step: nested });
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
visit(config.phases, 0);
|
|
222
|
+
visit(config.onFailure ?? [], config.phases.length);
|
|
223
|
+
return consumers;
|
|
224
|
+
}
|
|
225
|
+
/** Ids of the activity steps nested inside an effect, in any phase. Nothing may reference them (#3948 decision A7). */
|
|
226
|
+
function effectNestedIds(config) {
|
|
227
|
+
const ids = new Set();
|
|
228
|
+
for (const phase of [...config.phases, ...(config.onFailure ?? [])]) {
|
|
229
|
+
for (const step of phase.steps) {
|
|
230
|
+
if (step.kind !== "effect")
|
|
231
|
+
continue;
|
|
232
|
+
for (const nested of step.steps)
|
|
233
|
+
if (nested.kind === "activity" && nested.id)
|
|
234
|
+
ids.add(nested.id);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return ids;
|
|
238
|
+
}
|
|
196
239
|
/** True when `producer` is guaranteed to have completed before `consumer` starts. */
|
|
197
240
|
function producerPrecedes(producer, consumer) {
|
|
198
241
|
if (producer.phaseIndex !== consumer.phaseIndex)
|
|
@@ -201,9 +244,6 @@ function producerPrecedes(producer, consumer) {
|
|
|
201
244
|
return false; // same parallel phase — Promise.all, no ordering guarantee
|
|
202
245
|
return producer.stepIndex < consumer.stepIndex;
|
|
203
246
|
}
|
|
204
|
-
function effectNestedActivitySteps(phase) {
|
|
205
|
-
return phase.steps.flatMap((s) => (s.kind === "effect" ? s.steps.filter((n) => n.kind === "activity") : []));
|
|
206
|
-
}
|
|
207
247
|
/** `byId`/`duplicateIds` over an Op's top-level main-phase activity steps — shared by {@link validateStepOutputRefScope} and {@link validateStepOutputRefs}. */
|
|
208
248
|
function indexById(locations) {
|
|
209
249
|
const byId = new Map();
|
|
@@ -230,41 +270,24 @@ function indexById(locations) {
|
|
|
230
270
|
* a public export a caller can invoke directly, bypassing that lint pass —
|
|
231
271
|
* this is its own defense-in-depth.
|
|
232
272
|
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
* explicitly here rather than left to fall
|
|
273
|
+
* Consumers are the main-phase activity steps, the steps nested inside an
|
|
274
|
+
* effect, and every `onFailure` activity step (#3948). Flags:
|
|
275
|
+
* - a reference to a step nested inside an effect step, from anywhere
|
|
276
|
+
* (#3948 decision A7) — flagged explicitly here rather than left to fall
|
|
277
|
+
* through as "unknown producer",
|
|
237
278
|
* - a reference to an unregistered step id (no step in scope declares it),
|
|
238
279
|
* - a duplicate step id (ambiguous producer),
|
|
239
280
|
* - a reference to a step that does not precede the referencing step
|
|
240
281
|
* (a later phase, a later step in the same phase, itself, or a step in
|
|
241
|
-
* the same parallel phase).
|
|
282
|
+
* the same parallel phase). A step nested inside an effect takes the
|
|
283
|
+
* effect's position, so it may reference only a step that runs before
|
|
284
|
+
* the effect. An `onFailure` step comes after every main phase.
|
|
242
285
|
*/
|
|
243
286
|
export function validateStepOutputRefScope(config) {
|
|
244
287
|
const issues = [];
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
issues.push({
|
|
249
|
-
opName: config.name,
|
|
250
|
-
phase: phaseName,
|
|
251
|
-
fn: step.fn,
|
|
252
|
-
message: `references step "${ref.step}"'s output, but ${reason}`,
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
for (const phase of config.onFailure ?? []) {
|
|
258
|
-
const steps = phase.steps.filter((s) => s.kind === "activity").concat(effectNestedActivitySteps(phase));
|
|
259
|
-
flagOutOfScope(steps, phase.name, "step-output references are not supported in onFailure compensation phases");
|
|
260
|
-
}
|
|
261
|
-
for (const phase of config.phases) {
|
|
262
|
-
flagOutOfScope(effectNestedActivitySteps(phase), phase.name, "step-output references are not supported for a step nested inside an effect step");
|
|
263
|
-
}
|
|
264
|
-
const locations = locateActivitySteps(config.phases);
|
|
265
|
-
const { byId, duplicateIds } = indexById(locations);
|
|
266
|
-
const phaseNameOf = (loc) => config.phases[loc.phaseIndex].name;
|
|
267
|
-
for (const consumer of locations) {
|
|
288
|
+
const { byId, duplicateIds } = indexById(locateActivitySteps(config.phases));
|
|
289
|
+
const nestedIds = effectNestedIds(config);
|
|
290
|
+
for (const consumer of locateConsumers(config)) {
|
|
268
291
|
const refs = collectStepOutputRefs(consumer.step.args);
|
|
269
292
|
for (const ref of refs) {
|
|
270
293
|
// The run's work lease (#2748) is published under a reserved id once it
|
|
@@ -274,7 +297,7 @@ export function validateStepOutputRefScope(config) {
|
|
|
274
297
|
if (duplicateIds.has(ref.step)) {
|
|
275
298
|
issues.push({
|
|
276
299
|
opName: config.name,
|
|
277
|
-
phase:
|
|
300
|
+
phase: consumer.phaseName,
|
|
278
301
|
fn: consumer.step.fn,
|
|
279
302
|
message: `references step id "${ref.step}", but that id is used by more than one step in this Op — ids must be unique`,
|
|
280
303
|
});
|
|
@@ -284,9 +307,11 @@ export function validateStepOutputRefScope(config) {
|
|
|
284
307
|
if (!producer) {
|
|
285
308
|
issues.push({
|
|
286
309
|
opName: config.name,
|
|
287
|
-
phase:
|
|
310
|
+
phase: consumer.phaseName,
|
|
288
311
|
fn: consumer.step.fn,
|
|
289
|
-
message:
|
|
312
|
+
message: nestedIds.has(ref.step)
|
|
313
|
+
? `references step "${ref.step}", which is nested inside an effect step — a step inside an effect runs only when the effect fires, so no other step can reference its output`
|
|
314
|
+
: `references unknown step id "${ref.step}" — no step in this Op's main phases declares that id`,
|
|
290
315
|
});
|
|
291
316
|
continue;
|
|
292
317
|
}
|
|
@@ -298,7 +323,7 @@ export function validateStepOutputRefScope(config) {
|
|
|
298
323
|
: `step "${ref.step}" does not run before this step`;
|
|
299
324
|
issues.push({
|
|
300
325
|
opName: config.name,
|
|
301
|
-
phase:
|
|
326
|
+
phase: consumer.phaseName,
|
|
302
327
|
fn: consumer.step.fn,
|
|
303
328
|
message: `references ${reason} — a step can only reference an earlier step's output`,
|
|
304
329
|
});
|
|
@@ -308,10 +333,10 @@ export function validateStepOutputRefScope(config) {
|
|
|
308
333
|
return issues;
|
|
309
334
|
}
|
|
310
335
|
/**
|
|
311
|
-
* Validate every step-output reference in an Op
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
336
|
+
* Validate every step-output reference in an Op against a contract map and
|
|
337
|
+
* the Op's own step ordering, over the consumers {@link
|
|
338
|
+
* validateStepOutputRefScope} covers (see the module doc). Layers
|
|
339
|
+
* contract-based checks on top of {@link
|
|
315
340
|
* validateStepOutputRefScope}'s scope/ordering checks.
|
|
316
341
|
*
|
|
317
342
|
* Flags everything {@link validateStepOutputRefScope} does, plus:
|
|
@@ -323,10 +348,8 @@ export function validateStepOutputRefScope(config) {
|
|
|
323
348
|
*/
|
|
324
349
|
export function validateStepOutputRefs(config, contracts) {
|
|
325
350
|
const issues = validateStepOutputRefScope(config);
|
|
326
|
-
const
|
|
327
|
-
const
|
|
328
|
-
const phaseNameOf = (loc) => config.phases[loc.phaseIndex].name;
|
|
329
|
-
for (const consumer of locations) {
|
|
351
|
+
const { byId, duplicateIds } = indexById(locateActivitySteps(config.phases));
|
|
352
|
+
for (const consumer of locateConsumers(config)) {
|
|
330
353
|
const refs = collectStepOutputRefs(consumer.step.args);
|
|
331
354
|
for (const ref of refs) {
|
|
332
355
|
// Already flagged by validateStepOutputRefScope — nothing to validate
|
|
@@ -340,7 +363,7 @@ export function validateStepOutputRefs(config, contracts) {
|
|
|
340
363
|
if (!producerContract) {
|
|
341
364
|
issues.push({
|
|
342
365
|
opName: config.name,
|
|
343
|
-
phase:
|
|
366
|
+
phase: consumer.phaseName,
|
|
344
367
|
fn: consumer.step.fn,
|
|
345
368
|
message: `references step "${ref.step}"'s output, but "${producer.step.fn}" has no registered activity contract to validate the reference against`,
|
|
346
369
|
});
|
|
@@ -349,7 +372,7 @@ export function validateStepOutputRefs(config, contracts) {
|
|
|
349
372
|
if (!producerContract.returns) {
|
|
350
373
|
issues.push({
|
|
351
374
|
opName: config.name,
|
|
352
|
-
phase:
|
|
375
|
+
phase: consumer.phaseName,
|
|
353
376
|
fn: consumer.step.fn,
|
|
354
377
|
message: `references step "${ref.step}"'s output, but "${producer.step.fn}"'s contract declares no return schema`,
|
|
355
378
|
});
|
|
@@ -358,7 +381,7 @@ export function validateStepOutputRefs(config, contracts) {
|
|
|
358
381
|
if (ref.path && !pathExistsInSchema(producerContract.returns, ref.path)) {
|
|
359
382
|
issues.push({
|
|
360
383
|
opName: config.name,
|
|
361
|
-
phase:
|
|
384
|
+
phase: consumer.phaseName,
|
|
362
385
|
fn: consumer.step.fn,
|
|
363
386
|
message: `references step "${ref.step}"'s output path "${ref.path}", which does not exist on "${producer.step.fn}"'s declared return type`,
|
|
364
387
|
});
|
|
@@ -384,7 +407,7 @@ export function validateStepOutputRefs(config, contracts) {
|
|
|
384
407
|
if (consumerKind && producerKind && consumerKind !== producerKind) {
|
|
385
408
|
issues.push({
|
|
386
409
|
opName: config.name,
|
|
387
|
-
phase:
|
|
410
|
+
phase: consumer.phaseName,
|
|
388
411
|
fn: consumer.step.fn,
|
|
389
412
|
message: `references step "${ref.step}"'s output path "${ref.path}" (${producerKind}), but arg "${argPath.join(".")}" on "${consumer.step.fn}" declares ${consumerKind} — type mismatch`,
|
|
390
413
|
});
|
package/dist/op/types.d.ts
CHANGED
|
@@ -283,6 +283,37 @@ export interface GateStepBase {
|
|
|
283
283
|
* `./gate-point.ts`.
|
|
284
284
|
*/
|
|
285
285
|
point?: string | GatePoint;
|
|
286
|
+
/**
|
|
287
|
+
* A run that stops at this gate can be resumed here once it is approved
|
|
288
|
+
* (#3947), rather than starting again at the first phase. The run stores
|
|
289
|
+
* the step outputs a later step references in a checkpoint on
|
|
290
|
+
* `chant/lifecycle`, and the next run after `chant approve` re-runs the
|
|
291
|
+
* step that produced the gate's `plan`, checks the checkpoint, and carries
|
|
292
|
+
* on from the gate. Any check that fails starts the run at the first phase,
|
|
293
|
+
* and the run says why. See `./gate-checkpoint.ts`.
|
|
294
|
+
*
|
|
295
|
+
* Only a gate at the top of a main phase resumes, and not one that asks a
|
|
296
|
+
* decision point or sits in an Op with a `workLease`. OPS016 refuses the
|
|
297
|
+
* rest at build.
|
|
298
|
+
*/
|
|
299
|
+
resume?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* The names this gate had before an Op was restructured (#3949), so the
|
|
302
|
+
* approvals already recorded under them still count. `op` defaults to this
|
|
303
|
+
* Op. An approval recorded under an alias counts toward this gate when it
|
|
304
|
+
* answers that name's standing pending fact, the fact hasn't expired, it
|
|
305
|
+
* is for the plan this run planned and the same environment, it hasn't
|
|
306
|
+
* been spent, it passes this gate's `identity.gates` rule, and a person
|
|
307
|
+
* made it. The run then writes it again under this gate's name, citing
|
|
308
|
+
* the line it came from (`carriedFrom`). Only a gate bound to a `plan`
|
|
309
|
+
* takes aliases, and OPS017 refuses an alias that is still a gate.
|
|
310
|
+
*/
|
|
311
|
+
aliases?: GateAlias[];
|
|
312
|
+
}
|
|
313
|
+
/** A name a gate had before (#3949): a gate of `op`, or of the gate's own Op when `op` is absent. */
|
|
314
|
+
export interface GateAlias {
|
|
315
|
+
op?: string;
|
|
316
|
+
gate: string;
|
|
286
317
|
}
|
|
287
318
|
/**
|
|
288
319
|
* A human approval decided against the gate ledger. The name lives on `gate`;
|
package/dist/op/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/op/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,QAAQ;IACvB,2JAA2J;IAC3J,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,oIAAoI;AACpI,eAAO,MAAM,eAAe,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