@intentius/chant 0.75.0 → 0.76.0

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.
@@ -34,12 +34,13 @@ import type { PredictBehaviourOptions } from "./behaviour.js";
34
34
  /**
35
35
  * What the caller knows and the graph does not.
36
36
  *
37
- * `edgeCoverage` is here rather than derived because this module cannot
38
- * honestly derive it. Whether the edges in hand are the whole graph depends on
37
+ * `from` and `edgeCoverage` are here rather than derived because this module
38
+ * cannot honestly derive either. A graph does not remember whether it was read
39
+ * from an account or built from a file, and this reshapes both the same way. Whether the edges in hand are the whole graph depends on
39
40
  * which anchoring produced them and which lexicons contributed a reference
40
41
  * catalog, and both facts live with the caller.
41
42
  */
42
- export interface BehaviourRequestContext extends Pick<PredictBehaviourOptions, "environment" | "traffic" | "buildOutput" | "edgeCoverage"> {
43
+ export interface BehaviourRequestContext extends Pick<PredictBehaviourOptions, "environment" | "traffic" | "buildOutput" | "edgeCoverage" | "from"> {
43
44
  stack?: string;
44
45
  region?: string;
45
46
  owned?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"behaviour-graph.d.ts","sourceRoot":"","sources":["../src/behaviour-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,cAAc,CAAC;IACjG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,uBAAuB,GAAG,uBAAuB,CAiBzG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAUrF"}
1
+ {"version":3,"file":"behaviour-graph.d.ts","sourceRoot":"","sources":["../src/behaviour-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,cAAc,GAAG,MAAM,CAAC;IAC1G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,uBAAuB,GAAG,uBAAuB,CAkBzG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAUrF"}
@@ -956,6 +956,23 @@ export interface PredictBehaviourOptions {
956
956
  entityType: string;
957
957
  props: Record<string, unknown>;
958
958
  }>;
959
+ /**
960
+ * Which estate the caller is asking about (#2355, #2494).
961
+ *
962
+ * `live` is the account as it stands, drift included. `declared` is the
963
+ * file, and reads no account. The epic's delta is those two differenced, so
964
+ * a lexicon has to be able to tell them apart — and until this field existed
965
+ * it could not: both graph paths handed over identical options, and a
966
+ * lexicon defaulting to one of them answered the wrong question for the
967
+ * other with nothing in the report to say so. A figure about the file,
968
+ * labelled as the account, is precisely what "a prediction is never
969
+ * presented as a bill" exists to prevent.
970
+ *
971
+ * Required, and deliberately not defaulted. A default here is a guess about
972
+ * which estate somebody meant, and getting that wrong is silent: the report
973
+ * that comes back is well-formed and about the wrong thing.
974
+ */
975
+ from: "live" | "declared";
959
976
  /** Deployed stack to predict for, in a multi-stack project (see `stacks` in `ChantConfig`). */
960
977
  stack?: string;
961
978
  /** Region the stack is deployed in, mirroring the deep read (#1267). Omitted keeps the ambient default. */
@@ -1 +1 @@
1
- {"version":3,"file":"behaviour.d.ts","sourceRoot":"","sources":["../src/behaviour.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAShD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,CAAC;AAqBrD,eAAO,MAAM,eAAe,EAAE,SAAS,cAAc,EAEhC,CAAC;AAEtB,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,OAAO,EAAE,M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AAc,EAAE,MAAM,aAAa,CAAC;AAiHlD;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAkDnE"}
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/graph.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,aAAa,CAAC;AAkH9D;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAwCnE"}
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AA0F9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA8WpD;AAocD;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EAmGvC,CAAC;AAqIF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB5E"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";AAMA,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AA0F9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA8WpD;AAqcD;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EAmGvC,CAAC;AAqIF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"predict-behaviour.d.ts","sourceRoot":"","sources":["../../../src/op/activities/predict-behaviour.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAMH,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EAErB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAc,WAAW,EAAwC,MAAM,aAAa,CAAC;AAY5F,MAAM,WAAW,oBAAoB;IACnC,sFAAsF;IACtF,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAQ5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,IAAI,qBAAqB,CAE5D;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC,CA2D/G;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC,CAE3F;AAMD,mFAAmF;AACnF,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE;;;;;OAKG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,mHAAmH;IACnH,IAAI,CAAC,EA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OAAO,CAAC,YAAY,CAAC,CAAC;IACzE,iGAAiG;IACjG,IAAI,CAAC,EAAE,OAAO,WAAW,CAAC;IAC1B,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,sHAAsH;IACtH,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC9C;AAWD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,GAAE,oBAAyB,GAC9B,CAAC,IAAI,EAAE,oBAAoB,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAiEvF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,SA1EnB,oBAAoB,WAAW,WAAW,KAAK,OAAO,CAAC,sBAAsB,CA0E/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.75.0",
3
+ "version": "0.76.0",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -46,6 +46,7 @@ const ctx = {
46
46
  traffic: "100 rps, p50",
47
47
  buildOutput: "",
48
48
  edgeCoverage: { verdict: "unknown" } as const,
49
+ from: "live" as const,
49
50
  };
50
51
 
51
52
  describe("behaviourRequestFromIr", () => {
@@ -36,13 +36,14 @@ import type { PredictBehaviourOptions } from "./behaviour";
36
36
  /**
37
37
  * What the caller knows and the graph does not.
38
38
  *
39
- * `edgeCoverage` is here rather than derived because this module cannot
40
- * honestly derive it. Whether the edges in hand are the whole graph depends on
39
+ * `from` and `edgeCoverage` are here rather than derived because this module
40
+ * cannot honestly derive either. A graph does not remember whether it was read
41
+ * from an account or built from a file, and this reshapes both the same way. Whether the edges in hand are the whole graph depends on
41
42
  * which anchoring produced them and which lexicons contributed a reference
42
43
  * catalog, and both facts live with the caller.
43
44
  */
44
45
  export interface BehaviourRequestContext
45
- extends Pick<PredictBehaviourOptions, "environment" | "traffic" | "buildOutput" | "edgeCoverage"> {
46
+ extends Pick<PredictBehaviourOptions, "environment" | "traffic" | "buildOutput" | "edgeCoverage" | "from"> {
46
47
  stack?: string;
47
48
  region?: string;
48
49
  owned?: boolean;
@@ -69,6 +70,7 @@ export function behaviourRequestFromIr(ir: GraphIR, ctx: BehaviourRequestContext
69
70
  entities,
70
71
  edges: ir.edges,
71
72
  edgeCoverage: ctx.edgeCoverage,
73
+ from: ctx.from,
72
74
  traffic: ctx.traffic,
73
75
  ...(ctx.stack === undefined ? {} : { stack: ctx.stack }),
74
76
  ...(ctx.region === undefined ? {} : { region: ctx.region }),
@@ -123,6 +123,7 @@ const REQUEST: PredictBehaviourOptions = {
123
123
  buildOutput: "/tmp/build",
124
124
  entityNames: [...DECLARED.keys()],
125
125
  entities: DECLARED,
126
+ from: "live",
126
127
  edges: EDGES,
127
128
  edgeCoverage: { verdict: "complete" },
128
129
  region: "us-east-1",
package/src/behaviour.ts CHANGED
@@ -1793,6 +1793,23 @@ export interface PredictBehaviourOptions {
1793
1793
  buildOutput: string;
1794
1794
  entityNames: string[];
1795
1795
  entities: Map<string, { entityType: string; props: Record<string, unknown> }>;
1796
+ /**
1797
+ * Which estate the caller is asking about (#2355, #2494).
1798
+ *
1799
+ * `live` is the account as it stands, drift included. `declared` is the
1800
+ * file, and reads no account. The epic's delta is those two differenced, so
1801
+ * a lexicon has to be able to tell them apart — and until this field existed
1802
+ * it could not: both graph paths handed over identical options, and a
1803
+ * lexicon defaulting to one of them answered the wrong question for the
1804
+ * other with nothing in the report to say so. A figure about the file,
1805
+ * labelled as the account, is precisely what "a prediction is never
1806
+ * presented as a bill" exists to prevent.
1807
+ *
1808
+ * Required, and deliberately not defaulted. A default here is a guess about
1809
+ * which estate somebody meant, and getting that wrong is silent: the report
1810
+ * that comes back is well-formed and about the wrong thing.
1811
+ */
1812
+ from: "live" | "declared";
1796
1813
  /** Deployed stack to predict for, in a multi-stack project (see `stacks` in `ChantConfig`). */
1797
1814
  stack?: string;
1798
1815
  /** Region the stack is deployed in, mirroring the deep read (#1267). Omitted keeps the ambient default. */
@@ -259,6 +259,70 @@ describe("runGraph", () => {
259
259
  expect(ir.nodes.find((n: { id: string }) => n.id === "deploy").attrs.phases).toEqual([]);
260
260
  });
261
261
 
262
+ // #2377 / epic #2355: "the live path predicts the account as it stands,
263
+ // drift included. The declared path predicts the file. The two are shown
264
+ // as a delta." An earlier draft of #2377 required --live, which forbade
265
+ // the declared half and so forbade the delta.
266
+ test("--traffic predicts the declared graph, without --live", async () => {
267
+ lintClean(); discovered();
268
+ const seen: Array<{ traffic: string; environment: string }> = [];
269
+ loadPluginsMock.mockResolvedValue([{
270
+ name: "gcp",
271
+ serializer: {},
272
+ predictBehaviour: (o: { traffic: string; environment: string }) => {
273
+ seen.push({ traffic: o.traffic, environment: o.environment });
274
+ return Promise.resolve(behaviourReport(
275
+ { entityNames: ["vpc"], traffic: o.traffic, edgeCoverage: { verdict: "unknown" } },
276
+ { engine: "fixture", version: "0.0.1", total: predictedRate(1, "USD") },
277
+ { vpc: {
278
+ at: { traffic: o.traffic },
279
+ cost: predictedRate(1, "USD"),
280
+ headroom: { cpu: 0.5 },
281
+ errorRate: 0,
282
+ resilience: { failure: "one zone lost", verdict: "survives" },
283
+ provenance: { engine: "fixture", version: "0.0.1", tolerance: "±20%", basis: "modeled" },
284
+ } },
285
+ {},
286
+ ));
287
+ },
288
+ }]);
289
+ resolveLexMock.mockResolvedValue(["gcp"]);
290
+
291
+ const exit = await runGraph({
292
+ args: makeArgs({ format: "ir", traffic: "100 rps, p50" }),
293
+ plugins: [], serializers: [],
294
+ });
295
+
296
+ expect(exit).toBe(0);
297
+ expect(seen[0]?.traffic).toBe("100 rps, p50");
298
+ const ir = JSON.parse(stdoutBuf.join("\n"));
299
+ expect(ir.meta?._behaviour?.engine).toBe("fixture");
300
+ expect(ir.nodes.find((n: { id: string }) => n.id === "vpc").attrs._behaviour.cost.perHour).toBe(1);
301
+ });
302
+
303
+ test("the declared path says so, and names no environment", async () => {
304
+ lintClean(); discovered();
305
+ const seen: Array<{ environment: string; from: string }> = [];
306
+ loadPluginsMock.mockResolvedValue([{
307
+ name: "gcp",
308
+ serializer: {},
309
+ predictBehaviour: (o: { environment: string; from: string }) => {
310
+ seen.push({ environment: o.environment, from: o.from });
311
+ return Promise.resolve(noBehaviourEngineRefusal("gcp"));
312
+ },
313
+ }]);
314
+ resolveLexMock.mockResolvedValue(["gcp"]);
315
+
316
+ await runGraph({ args: makeArgs({ format: "ir", traffic: "100 rps, p50" }), plugins: [], serializers: [] });
317
+
318
+ // The half of the epic's delta that reads no account (#2355). A lexicon
319
+ // handed the same options as the live path would predict the account
320
+ // and label it the file.
321
+ expect(seen[0]?.from).toBe("declared");
322
+ // Naming an environment would claim the declared estate was deployed there.
323
+ expect(seen[0]?.environment).toBe("");
324
+ });
325
+
262
326
  test("op-discovery errors are warnings, not a refusal", async () => {
263
327
  lintClean(); discovered();
264
328
  discoverOpsMock.mockResolvedValue({ ops: new Map(), errors: ["ops/bad.op.ts: boom"] });
@@ -695,9 +759,9 @@ describe("runGraph", () => {
695
759
 
696
760
  test("the traffic level reaches the engine verbatim, with the graph's own entities", async () => {
697
761
  liveEstate();
698
- const seen: Array<{ traffic: string; entityNames: string[] }> = [];
699
- loadPluginsMock.mockResolvedValue([predictingPlugin((o: { traffic: string; entityNames: string[] }) => {
700
- seen.push({ traffic: o.traffic, entityNames: o.entityNames });
762
+ const seen: Array<{ traffic: string; entityNames: string[]; from: string }> = [];
763
+ loadPluginsMock.mockResolvedValue([predictingPlugin((o: { traffic: string; entityNames: string[]; from: string }) => {
764
+ seen.push({ traffic: o.traffic, entityNames: o.entityNames, from: o.from });
701
765
  return Promise.resolve(report());
702
766
  })]);
703
767
 
@@ -708,6 +772,10 @@ describe("runGraph", () => {
708
772
 
709
773
  expect(seen[0]?.traffic).toBe("1000 rps, p99");
710
774
  expect(seen[0]?.entityNames).toContain("web");
775
+ // This graph came off the account, and the lexicon is told so: without
776
+ // it, a lexicon answers about whichever estate it defaults to and the
777
+ // report cannot say which one it described (#2494).
778
+ expect(seen[0]?.from).toBe("live");
711
779
  });
712
780
 
713
781
  test("without --traffic: nothing is asked and neither key appears", async () => {
@@ -790,18 +858,6 @@ describe("runGraph", () => {
790
858
  expect(ir.meta?._behaviour).toBeUndefined();
791
859
  });
792
860
 
793
- test("--traffic without --live is refused rather than silently ignored", async () => {
794
- // Accepted-and-ignored would read as "predicted, and everything came
795
- // back empty", which is the opposite of what happened.
796
- const exit = await runGraph({
797
- args: makeArgs({ format: "ir", traffic: "100 rps, p50" }),
798
- plugins: [], serializers: [],
799
- });
800
-
801
- expect(exit).toBe(1);
802
- expect(stderrBuf.join("\n")).toContain("--traffic needs --live");
803
- });
804
-
805
861
  test("two predicting lexicons is refused rather than attributed to one", async () => {
806
862
  liveEstate();
807
863
  loadPluginsMock.mockResolvedValue([
@@ -22,7 +22,8 @@ import { lintCommand } from "../commands/lint";
22
22
  import { loadPlugins, resolveProjectLexicons, collectBuildRootContributors } from "../plugins";
23
23
  import { readFileSync } from "node:fs";
24
24
  import { formatError, formatWarning, formatBold } from "../format";
25
- import type { CommandContext } from "../registry";
25
+ import type { CommandContext, ParsedArgs } from "../registry";
26
+ import type { LexiconPlugin } from "../../lexicon";
26
27
  import { computeComponentGraph, generateComponentsPipeline } from "../../components/cli-support";
27
28
  import { resolveCliBuildParams, parseParamFlags } from "../build-params-cli";
28
29
  import type { BuildParamProvenance } from "../../provenance";
@@ -160,16 +161,6 @@ export async function runGraph(ctx: CommandContext): Promise<number> {
160
161
  }));
161
162
  return 1;
162
163
  }
163
- // A prediction is about an estate, and only the live path has one. Without
164
- // `--live` the flag would be accepted and do nothing at all, which reads as
165
- // "predicted, and everything came back empty" rather than "never ran".
166
- if (ctx.args.traffic && !ctx.args.live) {
167
- console.error(formatError({
168
- message: "--traffic needs --live: a prediction is made about the observed estate, and there is nothing to predict on the declared graph alone.",
169
- hint: 'chant graph --format ir --live --env <name> --overlay --traffic "100 rps, p50"',
170
- }));
171
- return 1;
172
- }
173
164
  // `--at` graphs a recorded observation instead of reading the estate (#1279).
174
165
  // Two different observations with no rule for which wins, so not both.
175
166
  if (ctx.args.at && ctx.args.live) {
@@ -448,68 +439,18 @@ async function runGraphLive(
448
439
  }
449
440
 
450
441
  // Behaviour overlay (#2377, epic #2355): carry a prediction on the graph.
451
- //
452
- // `--traffic` is the trigger, and it is the trigger because the contract
453
- // forbids defaulting the level (../../behaviour.ts): every figure an engine
454
- // returns is *at* a stated traffic, so inventing one here would silently
455
- // decide what every number on the graph means. No flag: nothing is asked,
456
- // neither key appears, and a consumer reads that absence as "not looked".
457
- //
458
- // Placed after the drift overlay so the prediction lands on the final node
459
- // set — the canvas is settled by here under either anchoring — and before
460
- // the lens below, so a lens filters predicted nodes like any other.
461
- if (args.traffic) {
462
- const predicting = plugins.filter((p) => p.predictBehaviour);
463
- if (predicting.length === 0) {
464
- console.error(formatWarning({
465
- message:
466
- "--traffic: no installed lexicon implements predictBehaviour, so nothing was predicted. The graph is unchanged.",
467
- }));
468
- } else if (predicting.length > 1) {
469
- // Two engines would mean two `meta._behaviour` values and one key. Rather
470
- // than pick, say so: a merged prediction across engines is not defined by
471
- // the contract, and silently taking the first would attribute one
472
- // engine's figures to the other's provenance.
473
- console.error(formatError({
474
- message: `--traffic: ${predicting.length} lexicons implement predictBehaviour (${predicting.map((p) => p.name).join(", ")}) — chant cannot merge two engines' figures onto one graph.`,
475
- hint: "Predict one lexicon at a time, or drop --traffic to graph without a prediction",
476
- }));
477
- return 1;
478
- } else {
479
- // The first output the build produced, or empty. Nothing on this path
480
- // reads it — the mirror is kept so the four observation methods take the
481
- // same shape (../../op/activities/predict-behaviour.ts) — so a build
482
- // result without outputs costs an empty string, never the graph.
483
- const raw = buildResult.outputs ? [...buildResult.outputs.values()][0] : undefined;
484
- const buildOutput = raw === undefined ? "" : typeof raw === "string" ? raw : (raw as SerializerResult).primary;
485
- const request = behaviourRequestFromIr(ir, {
486
- environment: environment ?? "",
487
- traffic: args.traffic,
488
- buildOutput,
489
- // `unknown`, for the reason the declared path claims it
490
- // (../../op/activities/predict-behaviour.ts): reference edges resolved,
491
- // containment absent, and no vocabulary here for "this kind is a
492
- // boundary whose containment is missing". Claiming `complete` would be
493
- // true about references and false about the graph; `partial` has to
494
- // name its gap as `dangling` or `unresolvedKinds`, and this gap is
495
- // neither.
496
- edgeCoverage: { verdict: "unknown" },
497
- ...(args.owned === undefined ? {} : { owned: args.owned }),
498
- });
499
- try {
500
- // A refusal is a value, not a throw: it comes back as a result and
501
- // rides on `meta._behaviour` whole, which is the one shape behold's
502
- // reader branches on (../../behaviour-overlay.ts).
503
- const result = await predicting[0].predictBehaviour!(request);
504
- ir = applyBehaviourOverlay(ir, behaviourOverlay(result));
505
- } catch (err) {
506
- // The estate graph is the thing asked for; a broken engine must not
507
- // take it away. Say what failed and serve the graph without the block.
508
- console.error(formatWarning({
509
- message: `--traffic: ${predicting[0].name}'s predictBehaviour failed (${err instanceof Error ? err.message : String(err)}) — showing the graph without a prediction`,
510
- }));
511
- }
512
- }
442
+ // After the drift overlay so it lands on the final node set beside `_status`,
443
+ // and before the lens so a lens filters a predicted node like any other.
444
+ {
445
+ const raw = buildResult.outputs ? [...buildResult.outputs.values()][0] : undefined;
446
+ const predicted = await predictOntoIr(ir, plugins, args, {
447
+ environment: environment ?? "",
448
+ buildOutput: raw === undefined ? "" : typeof raw === "string" ? raw : (raw as SerializerResult).primary,
449
+ // This graph was read from the account, drift included.
450
+ from: "live",
451
+ });
452
+ if (predicted === REFUSED) return 1;
453
+ ir = predicted;
513
454
  }
514
455
 
515
456
  if (args.lens) {
@@ -732,6 +673,83 @@ async function buildPipelineProjection(
732
673
  * Lint-gated: the IR represents valid infra, so we refuse to emit for source that
733
674
  * does not pass lint. Non-zero on discovery errors or a layout-engine failure.
734
675
  */
676
+ /** Returned instead of a graph when the prediction cannot be attempted honestly. */
677
+ const REFUSED = Symbol("behaviour-refused");
678
+
679
+ /**
680
+ * Carry a prediction on `ir`, if one was asked for (#2377, epic #2355).
681
+ *
682
+ * Shared by both graph paths, because the epic wants both: "the live path
683
+ * predicts the account as it stands, drift included. The declared path
684
+ * predicts the file. The two are shown as a delta" (#2355). A delta between
685
+ * two shapes that reached the engine by different routes is the worst possible
686
+ * input to a delta, so there is one route.
687
+ *
688
+ * `--traffic` is the trigger, and it is the trigger rather than the engine
689
+ * variable because the contract forbids defaulting the level
690
+ * (../../behaviour.ts): every figure an engine returns is *at* a stated
691
+ * traffic, so inventing one would silently decide what every number on the
692
+ * graph means. Without the flag nothing is asked, neither key appears, and a
693
+ * consumer reads that absence as "not looked" rather than as a refusal.
694
+ */
695
+ async function predictOntoIr(
696
+ ir: GraphIR,
697
+ plugins: LexiconPlugin[],
698
+ args: ParsedArgs,
699
+ ctx: { environment: string; buildOutput: string; from: "live" | "declared" },
700
+ ): Promise<GraphIR | typeof REFUSED> {
701
+ if (!args.traffic) return ir;
702
+
703
+ const predicting = plugins.filter((p) => p.predictBehaviour);
704
+ if (predicting.length === 0) {
705
+ console.error(formatWarning({
706
+ message:
707
+ "--traffic: no installed lexicon implements predictBehaviour, so nothing was predicted. The graph is unchanged.",
708
+ }));
709
+ return ir;
710
+ }
711
+ if (predicting.length > 1) {
712
+ // Two engines would mean two `meta._behaviour` values and one key. Rather
713
+ // than pick, say so: a merged prediction across engines is not defined by
714
+ // the contract, and silently taking the first would attribute one engine's
715
+ // figures to the other's provenance.
716
+ console.error(formatError({
717
+ message: `--traffic: ${predicting.length} lexicons implement predictBehaviour (${predicting.map((p) => p.name).join(", ")}) — chant cannot merge two engines' figures onto one graph.`,
718
+ hint: "Predict one lexicon at a time, or drop --traffic to graph without a prediction",
719
+ }));
720
+ return REFUSED;
721
+ }
722
+
723
+ const request = behaviourRequestFromIr(ir, {
724
+ environment: ctx.environment,
725
+ traffic: args.traffic,
726
+ buildOutput: ctx.buildOutput,
727
+ from: ctx.from,
728
+ // `unknown`, for the reason the declared path claims it
729
+ // (../../op/activities/predict-behaviour.ts): reference edges resolved,
730
+ // containment absent, and no vocabulary here for "this kind is a boundary
731
+ // whose containment is missing". Claiming `complete` would be true about
732
+ // references and false about the graph; `partial` has to name its gap as
733
+ // `dangling` or `unresolvedKinds`, and this gap is neither.
734
+ edgeCoverage: { verdict: "unknown" },
735
+ ...(args.owned === undefined ? {} : { owned: args.owned }),
736
+ });
737
+
738
+ try {
739
+ // A refusal is a value, not a throw: it comes back as a result and rides on
740
+ // `meta._behaviour` whole, which is the one shape behold's reader branches
741
+ // on (../../behaviour-overlay.ts).
742
+ return applyBehaviourOverlay(ir, behaviourOverlay(await predicting[0].predictBehaviour!(request)));
743
+ } catch (err) {
744
+ // The estate graph is the thing asked for; a broken engine must not take it
745
+ // away. Say what failed and serve the graph without the block.
746
+ console.error(formatWarning({
747
+ message: `--traffic: ${predicting[0].name}'s predictBehaviour failed (${err instanceof Error ? err.message : String(err)}) — showing the graph without a prediction`,
748
+ }));
749
+ return ir;
750
+ }
751
+ }
752
+
735
753
  async function runGraphView(
736
754
  ctx: CommandContext,
737
755
  format: "ir" | "mermaid" | "dot" | "layout",
@@ -788,6 +806,28 @@ async function runGraphView(
788
806
  // Build the base IR, focus with a lens (declarable-level, most precise), then
789
807
  // apply the detail tier — so e.g. blast:<resource> works before any collapse.
790
808
  let ir: GraphIR = buildGraphIr(result.entities, projectPath);
809
+
810
+ // The declared half of the epic's delta (#2355): this path predicts the
811
+ // file, the live path predicts the account. Same helper, so the two shapes
812
+ // reach the engine by one route and stay comparable.
813
+ {
814
+ const plugins = ctx.plugins.length > 0
815
+ ? ctx.plugins
816
+ : await loadPlugins(await resolveProjectLexicons(projectPath));
817
+ const predicted = await predictOntoIr(ir, plugins as LexiconPlugin[], ctx.args, {
818
+ // No environment on the declared path: the file is not deployed anywhere
819
+ // yet, and naming one would claim it was.
820
+ environment: ctx.args.env ?? "",
821
+ buildOutput: "",
822
+ // And this graph was built from the file, so say so. Without it a
823
+ // lexicon cannot tell the two paths apart and answers about whichever
824
+ // estate it defaults to, with nothing in the report to say which.
825
+ from: "declared",
826
+ });
827
+ if (predicted === REFUSED) return 1;
828
+ ir = predicted;
829
+ }
830
+
791
831
  if (ctx.args.lens) {
792
832
  try {
793
833
  ir = applyLens(ir, parseLens(ctx.args.lens, { up: ctx.args.up, down: ctx.args.down }));
package/src/cli/main.ts CHANGED
@@ -599,11 +599,12 @@ Ops:
599
599
  add the CI/pipeline projection (stages/jobs/needs) to
600
600
  the component-graph IR, from the same generator
601
601
  'build --components --generate' uses (#989)
602
- --live --overlay --traffic "<level>": ask the project's
603
- predicting lexicon what the overlaid estate does at that
604
- traffic level, and carry each entity's prediction on the
605
- IR. The level is passed to the engine verbatim; without
606
- the flag nothing is asked and nothing is carried (#2377)
602
+ --traffic "<level>": ask the project's predicting
603
+ lexicon what the estate does at that traffic level, and
604
+ carry each entity's prediction on the IR. On the
605
+ declared graph it predicts the file; with --live it
606
+ predicts the account. The level reaches the engine
607
+ verbatim; without the flag nothing is asked (#2377)
607
608
 
608
609
  Lifecycle (alias: lc):
609
610
  lifecycle snapshot <env> Query API, save metadata to orphan branch
@@ -205,6 +205,9 @@ export async function predictDeclared(projectPath: string, args: PredictBehaviou
205
205
  traffic: args.traffic,
206
206
  edges,
207
207
  edgeCoverage: declaredEdgeCoverage(),
208
+ // This activity builds from `discover` + `build`, never from an account —
209
+ // it is the declared estate by construction, on whichever checkout it runs.
210
+ from: "declared",
208
211
  };
209
212
  const answer = await createBehaviourPredict({ kinds })(options);
210
213
  // On arrival, with the names that were asked — `behaviourReport` checks the