@intentius/chant 0.70.0 → 0.71.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.
Files changed (85) hide show
  1. package/dist/cli/handlers/fan-out.d.ts +45 -0
  2. package/dist/cli/handlers/fan-out.d.ts.map +1 -0
  3. package/dist/cli/handlers/lifecycle.d.ts +13 -0
  4. package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
  5. package/dist/cli/handlers/operator.d.ts.map +1 -1
  6. package/dist/cli/handlers/run.d.ts +35 -0
  7. package/dist/cli/handlers/run.d.ts.map +1 -1
  8. package/dist/cli/main.d.ts.map +1 -1
  9. package/dist/cli/registry.d.ts +23 -0
  10. package/dist/cli/registry.d.ts.map +1 -1
  11. package/dist/components/deploy-units.d.ts +12 -2
  12. package/dist/components/deploy-units.d.ts.map +1 -1
  13. package/dist/components/fan-out-output.d.ts +70 -0
  14. package/dist/components/fan-out-output.d.ts.map +1 -0
  15. package/dist/components/fan-out-run.d.ts +80 -0
  16. package/dist/components/fan-out-run.d.ts.map +1 -0
  17. package/dist/components/fan-out-support.d.ts +65 -0
  18. package/dist/components/fan-out-support.d.ts.map +1 -0
  19. package/dist/components/fan-out.d.ts +194 -0
  20. package/dist/components/fan-out.d.ts.map +1 -0
  21. package/dist/components/index.d.ts +4 -0
  22. package/dist/components/index.d.ts.map +1 -1
  23. package/dist/discovery/fold-import.d.ts +96 -1
  24. package/dist/discovery/fold-import.d.ts.map +1 -1
  25. package/dist/discovery/index.d.ts.map +1 -1
  26. package/dist/fold/subset.d.ts +22 -0
  27. package/dist/fold/subset.d.ts.map +1 -1
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/lifecycle/affected.d.ts +26 -0
  31. package/dist/lifecycle/affected.d.ts.map +1 -1
  32. package/dist/op/activities/activity-contracts.d.ts +16 -1
  33. package/dist/op/activities/activity-contracts.d.ts.map +1 -1
  34. package/dist/op/activities/index.d.ts +1 -1
  35. package/dist/op/activities/index.d.ts.map +1 -1
  36. package/dist/op/activities/shell.d.ts +31 -2
  37. package/dist/op/activities/shell.d.ts.map +1 -1
  38. package/dist/op/activity-contract.d.ts +1 -1
  39. package/dist/op/activity-contract.d.ts.map +1 -1
  40. package/dist/op/activity-profiles.d.ts +19 -0
  41. package/dist/op/activity-profiles.d.ts.map +1 -1
  42. package/dist/op/builders.d.ts +21 -3
  43. package/dist/op/builders.d.ts.map +1 -1
  44. package/dist/op/gate-name.d.ts +10 -0
  45. package/dist/op/gate-name.d.ts.map +1 -1
  46. package/dist/op/step-output-ref.d.ts +25 -8
  47. package/dist/op/step-output-ref.d.ts.map +1 -1
  48. package/package.json +1 -1
  49. package/src/cli/handlers/fan-out.test.ts +394 -0
  50. package/src/cli/handlers/fan-out.ts +336 -0
  51. package/src/cli/handlers/lifecycle.test.ts +74 -1
  52. package/src/cli/handlers/lifecycle.ts +29 -1
  53. package/src/cli/handlers/operator.test.ts +22 -0
  54. package/src/cli/handlers/operator.ts +11 -3
  55. package/src/cli/handlers/run.ts +7 -1
  56. package/src/cli/main.ts +25 -3
  57. package/src/cli/registry.ts +23 -0
  58. package/src/components/deploy-units.ts +14 -4
  59. package/src/components/fan-out-output.test.ts +216 -0
  60. package/src/components/fan-out-output.ts +162 -0
  61. package/src/components/fan-out-run.test.ts +194 -0
  62. package/src/components/fan-out-run.ts +221 -0
  63. package/src/components/fan-out-support.test.ts +125 -0
  64. package/src/components/fan-out-support.ts +95 -0
  65. package/src/components/fan-out.test.ts +284 -0
  66. package/src/components/fan-out.ts +421 -0
  67. package/src/components/index.ts +33 -0
  68. package/src/discovery/fold-import.ts +195 -5
  69. package/src/discovery/index.ts +13 -5
  70. package/src/fold/subset-public-export.test.ts +31 -0
  71. package/src/fold/subset.ts +23 -0
  72. package/src/index.ts +18 -0
  73. package/src/lifecycle/affected.test.ts +118 -0
  74. package/src/lifecycle/affected.ts +118 -14
  75. package/src/op/activities/activity-contracts.ts +17 -1
  76. package/src/op/activities/index.ts +1 -1
  77. package/src/op/activities/shell.test.ts +156 -0
  78. package/src/op/activities/shell.ts +84 -9
  79. package/src/op/activity-profiles.test.ts +16 -2
  80. package/src/op/activity-profiles.ts +18 -0
  81. package/src/op/builders.ts +22 -4
  82. package/src/op/gate-name.ts +11 -0
  83. package/src/op/op-ir.test.ts +4 -1
  84. package/src/op/op.test.ts +7 -2
  85. package/src/op/step-output-ref.ts +29 -8
@@ -0,0 +1,45 @@
1
+ /**
2
+ * `chant components fan-out` (#2420) — run a change out across the components
3
+ * downstream of it, in an order chant derives from the source.
4
+ *
5
+ * #2417 built the four pieces this command joins (`componentsForUnits`,
6
+ * `planFanOut`, `remainingFanOut`, `runFanOut`, all in ../../components/) and
7
+ * left them reachable only from their own tests. `chant lifecycle affected`
8
+ * produces the stack-level change signal at one end; `runFanOut` consumes a
9
+ * plan at the other; this is the line between them.
10
+ *
11
+ * ## Why a sibling command rather than a third `--components` selector
12
+ *
13
+ * `chant run --components all` stops the whole run at the first failed
14
+ * component, and it should: there the user asked for everything, so a failure
15
+ * means the estate is in a state nobody described. A fan-out deliberately does
16
+ * the opposite, skipping the failure's own subtree and letting independent
17
+ * branches finish (#2419 added a second runner for exactly that reason). Two
18
+ * opposite failure semantics behind one flag's third value would be a trap. The
19
+ * flags differ too: a fan-out is parameterised by a change signal, which
20
+ * `chant run` has no business growing a `--base` for.
21
+ *
22
+ * ## The loop
23
+ *
24
+ * ```
25
+ * chant components fan-out --base main --env prod --dry-run
26
+ * chant components fan-out --base main --env prod --gate release --resume .chant/fan-out.json
27
+ * chant approve fan-out release --plan sha256:...
28
+ * chant components fan-out --base main --env prod --gate release --resume .chant/fan-out.json
29
+ * ```
30
+ *
31
+ * The last two lines are the same command twice, which is the point: an attempt
32
+ * that stopped is finished by repeating it, not by hand-picking what is left.
33
+ * `--resume` carries the earlier attempt's progress, `remainingFanOut` narrows
34
+ * the plan before the gate is decided, and the digest is carried rather than
35
+ * recomputed, so the approval still stands.
36
+ */
37
+ import type { CommandContext } from "../registry.js";
38
+ /**
39
+ * chant components fan-out --base <ref> | --from-affected <file>
40
+ * [--head <ref>] [--include-dependents] [--env <env>] [--gate <name>]
41
+ * [--dry-run] [--json] [--resume <file>] [--seed-outputs <file>]
42
+ * [--dump-outputs <file>] [--progress-json]
43
+ */
44
+ export declare function runComponentsFanOut(ctx: CommandContext): Promise<number>;
45
+ //# sourceMappingURL=fan-out.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fan-out.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/fan-out.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAiBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqHlD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAgK9E"}
@@ -78,6 +78,19 @@ export declare function runLifecycleUnknown(ctx: CommandContext): Promise<number
78
78
  * Read-only: report which stacks a change affects (directly-changed via artifact
79
79
  * diff, dependents via the cross-stack graph, external-input as indeterminate).
80
80
  * Returns the set; fanning plan/apply over it is an Op the user composes.
81
+ *
82
+ * `config.stacks` is passed through, so on a multi-stack project the answer is
83
+ * keyed by deployed **stack name** — the name a component's `cfn-deploy` step
84
+ * uses — instead of by lexicon partition. That is what lets `chant components
85
+ * fan-out` join a change set to the components that deploy it; an aws-only
86
+ * estate of fifteen stacks used to answer "aws" no matter which one moved. A
87
+ * project with no `stacks` declared is untouched: one build of the source root,
88
+ * one lexicon-keyed answer.
89
+ *
90
+ * The cost of per-stack mode is that `dependents` comes back empty (the build
91
+ * carries cross-lexicon edges, not stack ones), so `--include-dependents` prints
92
+ * a note saying where the downstream relation actually lives rather than showing
93
+ * an empty list as if it meant "nothing downstream".
81
94
  */
82
95
  export declare function runLifecycleAffected(ctx: CommandContext): Promise<number>;
83
96
  //# sourceMappingURL=lifecycle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AO,CAAC,MAAM,CAAC,CAgDzE;AAuDD,wBAAsB,UAAU,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAuErE;AAED,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,mBAAmB,GAC3B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAA;CAAE,GAC1C;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAAC;AAElB;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,mBAAmB,CAAC,CAkG9B"}
@@ -1,4 +1,5 @@
1
1
  import type { CommandContext } from "../registry.js";
2
+ import type { DriverComponentResult } from "../../components/driver.js";
2
3
  /**
3
4
  * The exit code a run that stopped at an unapproved gate uses (#2119).
4
5
  * Deliberately not 1: a gate is a standing fact waiting on a human, and a CI
@@ -31,6 +32,40 @@ export declare function runOpSignalRenamed(ctx: CommandContext): Promise<number>
31
32
  /** `chant run cancel <name>` — asks the resolved runtime (#2121) to stop the Op's active run. */
32
33
  export declare function runOpCancel(ctx: CommandContext): Promise<number>;
33
34
  export declare function runOp(ctx: CommandContext): Promise<number>;
35
+ /**
36
+ * After a successful `chant run --components` (local executor), auto-emit
37
+ * one release record per successfully deployed component that published a
38
+ * digest-bearing artifact — reusing `maybeRecordAutoRelease`
39
+ * (../../components/auto-release.ts), which itself reuses
40
+ * `../../lifecycle/release-ledger.ts`'s `appendReleaseRecord` verbatim. Never
41
+ * called on a failed run: both call sites below only reach this after
42
+ * confirming `result.success`/`componentResult.ok`, so a failed deploy writes
43
+ * nothing, by construction.
44
+ *
45
+ * Also persists the component's accumulated `BuildArchiveManifest`, when its
46
+ * composition produced one, to the durable build-manifest store (#609,
47
+ * ../../components/manifest-persistence.ts, ../../lifecycle/build-ledger-
48
+ * store.ts) — the missing piece that lets `chant components status`'s
49
+ * `componentBom`/`build.reproducibility` resolve to a real manifest instead
50
+ * of always reporting `null`. Same `disabled` opt-out flag as the release
51
+ * record: both are "durably record this successful deploy" side effects, so
52
+ * `--no-release-record`/`release.autoRecord: false` gates persistence too
53
+ * rather than needing a second, easy-to-forget knob (see
54
+ * `ManifestPersistOptions.disabled`'s doc).
55
+ *
56
+ * Best-effort and silent on the happy path: a skip (opted out, no digest/
57
+ * manifest, no actor) is unremarkable and not printed; only an actual write
58
+ * failure (`reason: "error"`) is surfaced, as a warning — never a nonzero
59
+ * exit, since the deploy itself already succeeded and a ledger-write hiccup
60
+ * must not retroactively fail it.
61
+ *
62
+ * Exported for `chant components fan-out` (#2420), which applies components
63
+ * through a different runner and would otherwise leave no trace in the release
64
+ * ledger for work `chant run --components` records. Each result is filtered on
65
+ * its own `ok`, so a fan-out that partly succeeded records exactly the
66
+ * components that did.
67
+ */
68
+ export declare function recordAutoReleasesForRun(results: DriverComponentResult[], env: string, runId: string, disabled: boolean): Promise<void>;
34
69
  /**
35
70
  * `chant run --components <name|all> [--env <env>]` (#585) — the interpret
36
71
  * driver's CLI entrypoint, and since #2116 the only component run path there
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/run.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAOlD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,IAAI,CAAC;AA0JjC,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAGpE;AAuED,w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AC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CA6VpD;AAqbD;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,EAkGvC,CAAC;AAgIF;;;;;;;;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;AAyF9E;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAmWpD;AA8bD;;;;;;;;;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"}
@@ -182,6 +182,29 @@ export interface ParsedArgs {
182
182
  head?: string;
183
183
  /** `chant lifecycle affected --include-dependents` — add downstream consumers */
184
184
  includeDependents?: boolean;
185
+ /**
186
+ * `chant components fan-out --from-affected <file>` (#2420) — read the
187
+ * stack-level change signal from the JSON `chant lifecycle affected --json`
188
+ * wrote, instead of re-deriving it with `--base`. The composable half of the
189
+ * pair: a CI job that already ran the diff has no reason to build twice.
190
+ */
191
+ fromAffected?: string;
192
+ /**
193
+ * `chant components fan-out --gate <name>` (#2420) — the name of the single
194
+ * gate over the whole derived set, answered by `chant approve fan-out <name>
195
+ * --plan <digest>`. One approval covers the fan-out, bound to the plan's
196
+ * digest (#2300's mechanism, #2417's decision); omitted, the fan-out runs
197
+ * ungated. A component's own authored gates are unaffected either way.
198
+ */
199
+ gate?: string;
200
+ /**
201
+ * `chant components fan-out --resume <file>` (#2420) — the attempt record
202
+ * this fan-out reads before it starts and writes when it finishes. Repeating
203
+ * the identical command finishes what an interrupted attempt left, because
204
+ * the plan is narrowed by this file before the gate is decided and the
205
+ * digest is carried rather than recomputed, so the approval still stands.
206
+ */
207
+ resume?: string;
185
208
  /** `chant audit --tier merge-worthy|all` */
186
209
  tier?: string;
187
210
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/cli/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,OAAO,C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,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4VAA4V;IAC5V,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,0CAA0C;IAC1C,OAAO,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,UAAU,CAAC;IAChB,4FAA4F;IAC5F,QAAQ,EAAE,OAAO,CAAC;CACnB;AAWD,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,eAAe,GAAG,IAAI,CAiB/F"}
@@ -14,7 +14,17 @@
14
14
  * The registry is data, not a rule about what steps look like — a kind not
15
15
  * listed here contributes no unit, exactly as before.
16
16
  */
17
- import type { Phase } from "./component.js";
17
+ /**
18
+ * The only shape this walk reads: something with `steps`, whose entries may
19
+ * carry a `kind` and may themselves nest. Both `Phase` (./component.ts) and
20
+ * `DriverPhase` (./driver.ts) satisfy it — they differ on how a gate step is
21
+ * typed, which this module never looks at — so declaring the narrower of the
22
+ * two would force a cast on one caller for no gain in safety, given the walk
23
+ * discriminates structurally anyway.
24
+ */
25
+ export interface UnitBearingPhase {
26
+ steps: readonly unknown[];
27
+ }
18
28
  /** A deploy-family step kind that names a live unit, and who observes it. */
19
29
  export interface DeployUnitRule {
20
30
  /** The step `kind` (the capability's registered name). */
@@ -45,5 +55,5 @@ export interface DeployUnit {
45
55
  * order. A step may itself be a nested `Phase`, so the walk recurses; a
46
56
  * resolved component carries the unit as a concrete string. Pure.
47
57
  */
48
- export declare function deployUnits(deploy: Phase[]): DeployUnit[];
58
+ export declare function deployUnits(deploy: readonly UnitBearingPhase[]): DeployUnit[];
49
59
  //# sourceMappingURL=deploy-units.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-units.d.ts","sourceRoot":"","sources":["../../src/components/deploy-units.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAYtD,CAAC;AAEF,kEAAkE;AAClE,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,CA0BzD"}
1
+ {"version":3,"file":"deploy-units.d.ts","sourceRoot":"","sources":["../../src/components/deploy-units.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,OAAO,EAAE,CAAC;CAC3B;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAYtD,CAAC;AAEF,kEAAkE;AAClE,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAAG,UAAU,EAAE,CA0B7E"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Renderers for a derived fan-out (#2420) — the printed derivation #2417's
3
+ * proof list asks for and nothing produced.
4
+ *
5
+ * `./driver-output.ts` is the precedent and the shape is deliberately the
6
+ * same: a human renderer that logs to stderr, a JSON renderer that owns
7
+ * stdout and writes nothing else, both over the types the model already
8
+ * returns (`./fan-out.ts`'s `FanOutPlan`, `./fan-out-run.ts`'s
9
+ * `FanOutRunResult`). No new fields are computed here. A renderer that had to
10
+ * derive something to print it would be deriving it twice.
11
+ *
12
+ * ## What gets printed, and why each line is not optional
13
+ *
14
+ * A fan-out that applies the right components without saying why it picked
15
+ * them reads exactly like one that fanned out to everything, which is the
16
+ * failure #2417's precision decision exists to prevent. So:
17
+ *
18
+ * - **the waves**, because the claim is that the order was derived from the
19
+ * source rather than declared, and a flat list cannot show that
20
+ * - **every component that is not running, with its reason** — `unaffected`,
21
+ * `indeterminate`, `already-applied`, `blocked` — because "absent from the
22
+ * list" and "deliberately held back" look identical otherwise
23
+ * - **`indeterminate` on its own line**, because it is the third outcome and a
24
+ * two-state render would quietly drop it into one of the other two
25
+ * - **`seeds`**, because those values are being taken on trust from a run that
26
+ * happened earlier and somewhere else
27
+ * - **the `digest`, verbatim and unabbreviated**, because it is the string
28
+ * `chant approve --plan` takes. Truncating it for width would make the line
29
+ * unusable for the one job it has.
30
+ */
31
+ import type { FanOutPlan } from "./fan-out.js";
32
+ import type { FanOutRunResult } from "./fan-out-run.js";
33
+ type Writer = (line: string) => void;
34
+ /** The gate one fan-out is bound to, when the invocation asked for one. */
35
+ export interface FanOutGateRef {
36
+ op: string;
37
+ gate: string;
38
+ }
39
+ export interface FanOutRenderOptions {
40
+ write?: Writer;
41
+ /** Present when a gate covers the set, so the render can print the exact approve line. */
42
+ gate?: FanOutGateRef;
43
+ }
44
+ /**
45
+ * The derivation itself: the waves, what is not running and why, what is
46
+ * seeded, and the digest an approval binds to.
47
+ *
48
+ * This is the whole output of a plan-only invocation and the header of a run,
49
+ * so it is one function rather than two nearly identical ones.
50
+ */
51
+ export declare function renderFanOutPlan(plan: FanOutPlan, options?: FanOutRenderOptions): void;
52
+ /**
53
+ * A dispatched fan-out: the derivation that ran, then what it did.
54
+ *
55
+ * `result.plan` is the plan as dispatched, so on a resume this prints the
56
+ * narrowed one, with everything an earlier attempt finished listed as
57
+ * `already-applied`. That is the point of printing the plan off the result
58
+ * rather than off whatever the caller derived.
59
+ */
60
+ export declare function renderFanOutHuman(result: FanOutRunResult, options?: FanOutRenderOptions): void;
61
+ /**
62
+ * The plan or the run result as JSON on stdout, and nothing else on stdout.
63
+ *
64
+ * One function for both because the run result carries the plan under `plan`,
65
+ * so a consumer discriminates on that key rather than on a flag it was told
66
+ * about out of band.
67
+ */
68
+ export declare function renderFanOutJson(payload: FanOutPlan | FanOutRunResult, write?: Writer): void;
69
+ export {};
70
+ //# sourceMappingURL=fan-out-output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fan-out-output.d.ts","sourceRoot":"","sources":["../../src/components/fan-out-output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAKrC,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAcD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,GAAE,mBAAwB,GAAG,IAAI,CAiD1F;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,GAAE,mBAAwB,GAAG,IAAI,CAqBlG;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,eAAe,EAAE,KAAK,GAAE,MAAe,GAAG,IAAI,CAEpG"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Run a derived fan-out (#2417).
3
+ *
4
+ * `./fan-out.ts` decides who runs and in what order; this dispatches it. The
5
+ * two are separate because the deciding is worth testing without a cloud, and
6
+ * because the same plan is what one approval is bound to.
7
+ *
8
+ * ## Why not `runInterpretDriver`
9
+ *
10
+ * That runner stops the whole run at the first failed component, which is the
11
+ * right default for `chant run --components all`: there, the user asked for
12
+ * everything, and a failure means the estate is in a state nobody described.
13
+ *
14
+ * A fan-out is the case where that default throws away the point. The order was
15
+ * derived from the source, so a branch sharing no edge with the failure is
16
+ * *known* to be independent rather than assumed to be. Stopping it buys nothing
17
+ * and costs a second approval to finish. So this runner skips the failed
18
+ * component's subtree and lets the rest of the wave plan proceed.
19
+ *
20
+ * Neither runner's behaviour changes the other's: `runInterpretDriver` is
21
+ * untouched.
22
+ *
23
+ * ## One approval, not one per component
24
+ *
25
+ * The gate is evaluated once, before the first wave, bound to the plan's digest
26
+ * through the same `planDigest` mechanism #2300 gave gates. Twenty components
27
+ * behind one fan-out is one approval, and re-deriving the same fan-out does not
28
+ * expire it. A component's *own* authored gates still decide per component —
29
+ * this adds a gate over the set, it does not remove the ones inside it.
30
+ */
31
+ import { type DriverComponent, type DriverComponentResult } from "./driver.js";
32
+ import { type FanOutPlan, type FanOutProgress, type FanOutSkip } from "./fan-out.js";
33
+ import { type GateLedgerPort } from "../op/gate.js";
34
+ import type { RunProgressEvent } from "./run-progress.js";
35
+ import type { CapabilityRegistry } from "./capability.js";
36
+ import type { PendingGateRecord } from "../lifecycle/gate-ledger.js";
37
+ /** The single gate over a whole fan-out. Omit it to run without one. */
38
+ export interface FanOutGate {
39
+ /** The name `chant approve <op> <gate>` takes — the fan-out's name, not a component's. */
40
+ op: string;
41
+ gate: string;
42
+ description?: string;
43
+ timeout?: string;
44
+ }
45
+ export interface FanOutRunOptions {
46
+ env: string;
47
+ vars?: Record<string, unknown>;
48
+ /** Outputs of components this run is not running: the ones the plan lists in `seeds`. */
49
+ componentOutputs?: Record<string, Record<string, unknown>>;
50
+ onProgress?: (event: RunProgressEvent) => void;
51
+ gates?: GateLedgerPort;
52
+ now?: string;
53
+ /** One approval over the ordered set, bound to `plan.digest`. */
54
+ gate?: FanOutGate;
55
+ /** What an earlier attempt at this same plan already did. */
56
+ progress?: FanOutProgress;
57
+ }
58
+ export interface FanOutRunResult {
59
+ /** The plan actually dispatched — `plan` narrowed by `options.progress`. */
60
+ plan: FanOutPlan;
61
+ status: "ok" | "fail" | "gated";
62
+ results: DriverComponentResult[];
63
+ /** Reached `ok` this attempt. Feed back as `progress.completed` to resume. */
64
+ completed: string[];
65
+ /** Failed this attempt. Feed back as `progress.failed`. */
66
+ failed: string[];
67
+ /** Never dispatched because something upstream failed, each naming the failure. */
68
+ blocked: FanOutSkip[];
69
+ componentOutputs: Record<string, Record<string, unknown>>;
70
+ /** Present when `status === "gated"`: the pending fact to approve. */
71
+ gate?: PendingGateRecord;
72
+ }
73
+ /**
74
+ * Dispatch a fan-out plan.
75
+ *
76
+ * Resolves rather than throws on a failed component: a fan-out's partial
77
+ * outcome is the interesting one, and the caller needs `completed` to resume.
78
+ */
79
+ export declare function runFanOut(plan: FanOutPlan, components: DriverComponent[], registry: CapabilityRegistry, options: FanOutRunOptions): Promise<FanOutRunResult>;
80
+ //# sourceMappingURL=fan-out-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fan-out-run.d.ts","sourceRoot":"","sources":["../../src/components/fan-out-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAE3B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAqC,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AACrH,OAAO,EAAmC,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,wEAAwE;AACxE,MAAM,WAAW,UAAU;IACzB,0FAA0F;IAC1F,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC/C,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;IAChC,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,8EAA8E;IAC9E,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,2DAA2D;IAC3D,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,mFAAmF;IACnF,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1D,sEAAsE;IACtE,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,eAAe,EAAE,EAC7B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,CA+H1B"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Discovery-to-plan wiring for `chant components fan-out` (#2420).
3
+ *
4
+ * `./cli-support.ts` does this for `chant run --components`: the CLI handler
5
+ * stays a thin dispatcher and the component-specific work lives beside the
6
+ * rest of the component subsystem. This is the same seam for the fan-out, and
7
+ * it exists mostly so the join can be tested against a real discovery result
8
+ * without a CLI, a git repo or a cloud.
9
+ *
10
+ * Nothing here decides anything. `componentsForUnits` joins the stack-level
11
+ * change signal to components, `planFanOut` derives the order, and both live
12
+ * in ./fan-out.ts. This finds the components those two need and hands them
13
+ * over.
14
+ */
15
+ import { type ChangedUnits, type ComponentChangeSignal, type FanOutPlan } from "./fan-out.js";
16
+ import type { CapabilityRegistry } from "./capability.js";
17
+ import type { DriverComponent } from "./driver.js";
18
+ import type { BuildParamProvenance } from "../provenance.js";
19
+ import { type ChantConfig } from "../config.js";
20
+ export interface DeriveFanOutOptions {
21
+ /** Project root to discover `*.component.ts` under. */
22
+ path: string;
23
+ /** The stack-level change signal, from `lifecycle affected` or from a caller who already had one. */
24
+ units: ChangedUnits;
25
+ sandbox?: boolean;
26
+ /** chant #1108 — this invocation's resolved build-time parameters, so a `params.*` reference in a component file resolves. */
27
+ buildParams?: BuildParamProvenance[];
28
+ /** Already-loaded project config, when the caller read it for its own reasons. */
29
+ config?: ChantConfig;
30
+ }
31
+ export interface DerivedFanOut {
32
+ success: boolean;
33
+ /**
34
+ * Every component in the project, config defaults applied. The full set, not
35
+ * the selection: ordering a subset is only possible against the whole graph
36
+ * (./fan-out.ts), and the runner needs the unselected ones to work out what
37
+ * a failure blocks.
38
+ */
39
+ components: DriverComponent[];
40
+ /** What the stack-level signal meant in component terms, `unclaimed` included. */
41
+ signal: ComponentChangeSignal;
42
+ plan: FanOutPlan;
43
+ error?: string;
44
+ }
45
+ /**
46
+ * Discover the project's components and derive the fan-out for `units`.
47
+ *
48
+ * Selection is `"all"`'s, borrowed wholesale from `resolveComponentTargets`, so
49
+ * a component a build parameter turned off (`enabled: false`, chant #1522) sits
50
+ * out of a fan-out exactly as it sits out of `chant run --components all`. Two
51
+ * commands disagreeing about which components exist would be worse than either
52
+ * answer on its own.
53
+ *
54
+ * Resolves with `success: false` and an `error` rather than throwing on a
55
+ * discovery failure; a cycle or an unknown `dependsOn` still throws out of
56
+ * `planFanOut`, which is #2417's "refuse by name, before anything is selected".
57
+ */
58
+ export declare function deriveFanOut(options: DeriveFanOutOptions): Promise<DerivedFanOut>;
59
+ /**
60
+ * The capability registry a fan-out dispatches through — the project's own,
61
+ * built exactly the way `runComponents` builds it, so a fan-out and a
62
+ * `chant run --components` of the same component reach the same leaves.
63
+ */
64
+ export declare function fanOutRegistry(path: string, config?: ChantConfig): Promise<CapabilityRegistry>;
65
+ //# sourceMappingURL=fan-out-support.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fan-out-support.d.ts","sourceRoot":"","sources":["../../src/components/fan-out-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,EAAkC,KAAK,YAAY,EAAE,KAAK,qBAAqB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAC3H,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAE9D,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,qGAAqG;IACrG,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8HAA8H;IAC9H,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,kFAAkF;IAClF,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,kFAAkF;IAClF,MAAM,EAAE,qBAAqB,CAAC;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAKD;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAiBvF;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAGpG"}