@intentius/chant 0.124.97 → 0.124.98

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 (223) hide show
  1. package/dist/audit/core.d.ts +29 -0
  2. package/dist/audit/core.d.ts.map +1 -1
  3. package/dist/audit/core.js +48 -11
  4. package/dist/audit/identity.d.ts +27 -0
  5. package/dist/audit/identity.d.ts.map +1 -0
  6. package/dist/audit/identity.js +36 -0
  7. package/dist/audit/report-html.d.ts +3 -1
  8. package/dist/audit/report-html.d.ts.map +1 -1
  9. package/dist/audit/report-html.js +1 -1
  10. package/dist/audit/report-model.d.ts +16 -0
  11. package/dist/audit/report-model.d.ts.map +1 -1
  12. package/dist/audit/report-model.js +5 -1
  13. package/dist/ci-agent.d.ts +17 -0
  14. package/dist/ci-agent.d.ts.map +1 -1
  15. package/dist/ci-agent.js +32 -0
  16. package/dist/ci-comment-allow.d.ts +88 -0
  17. package/dist/ci-comment-allow.d.ts.map +1 -0
  18. package/dist/ci-comment-allow.js +178 -0
  19. package/dist/ci-comment-commands.d.ts +12 -0
  20. package/dist/ci-comment-commands.d.ts.map +1 -1
  21. package/dist/ci-comment-commands.js +22 -0
  22. package/dist/ci-control.d.ts +6 -1
  23. package/dist/ci-control.d.ts.map +1 -1
  24. package/dist/ci-control.js +6 -1
  25. package/dist/ci-product.d.ts +3 -0
  26. package/dist/ci-product.d.ts.map +1 -1
  27. package/dist/ci-product.js +3 -0
  28. package/dist/cli/commands/audit.d.ts +3 -1
  29. package/dist/cli/commands/audit.d.ts.map +1 -1
  30. package/dist/cli/commands/audit.js +23 -6
  31. package/dist/cli/commands/import.d.ts +8 -1
  32. package/dist/cli/commands/import.d.ts.map +1 -1
  33. package/dist/cli/commands/import.js +31 -6
  34. package/dist/cli/handlers/agent.d.ts.map +1 -1
  35. package/dist/cli/handlers/agent.js +12 -2
  36. package/dist/cli/handlers/pr-comment.d.ts +6 -0
  37. package/dist/cli/handlers/pr-comment.d.ts.map +1 -1
  38. package/dist/cli/handlers/pr-comment.js +12 -0
  39. package/dist/cli/handlers/promote.d.ts.map +1 -1
  40. package/dist/cli/handlers/promote.js +53 -6
  41. package/dist/cli/main.d.ts.map +1 -1
  42. package/dist/cli/main.js +29 -6
  43. package/dist/cli/parse-args.d.ts.map +1 -1
  44. package/dist/cli/parse-args.js +23 -0
  45. package/dist/cli/registry.d.ts +8 -0
  46. package/dist/cli/registry.d.ts.map +1 -1
  47. package/dist/cloud-lister/mask.d.ts +30 -1
  48. package/dist/cloud-lister/mask.d.ts.map +1 -1
  49. package/dist/cloud-lister/mask.js +66 -3
  50. package/dist/components/driver.d.ts +8 -1
  51. package/dist/components/driver.d.ts.map +1 -1
  52. package/dist/components/driver.js +1 -0
  53. package/dist/components/product-pipeline.d.ts +23 -1
  54. package/dist/components/product-pipeline.d.ts.map +1 -1
  55. package/dist/components/product-pipeline.js +40 -7
  56. package/dist/components/product-plan.d.ts +20 -0
  57. package/dist/components/product-plan.d.ts.map +1 -1
  58. package/dist/components/product-plan.js +11 -1
  59. package/dist/control/applied.d.ts +8 -1
  60. package/dist/control/applied.d.ts.map +1 -1
  61. package/dist/control/applied.js +18 -2
  62. package/dist/control/dispatch.d.ts +52 -0
  63. package/dist/control/dispatch.d.ts.map +1 -1
  64. package/dist/control/dispatch.js +140 -4
  65. package/dist/control/train.d.ts +198 -0
  66. package/dist/control/train.d.ts.map +1 -0
  67. package/dist/control/train.js +294 -0
  68. package/dist/deep-observation.js +2 -2
  69. package/dist/floor-table.data.d.ts.map +1 -1
  70. package/dist/floor-table.data.js +11 -0
  71. package/dist/graph-detail.d.ts +9 -0
  72. package/dist/graph-detail.d.ts.map +1 -1
  73. package/dist/graph-detail.js +38 -13
  74. package/dist/graph-refs.d.ts +233 -3
  75. package/dist/graph-refs.d.ts.map +1 -1
  76. package/dist/graph-refs.js +106 -15
  77. package/dist/lint/post-synth.d.ts +22 -0
  78. package/dist/lint/post-synth.d.ts.map +1 -1
  79. package/dist/lint/rules/declarable-naming-convention.d.ts +12 -0
  80. package/dist/lint/rules/declarable-naming-convention.d.ts.map +1 -1
  81. package/dist/lint/rules/declarable-naming-convention.js +38 -8
  82. package/dist/lint/rules/imported-source.d.ts +20 -0
  83. package/dist/lint/rules/imported-source.d.ts.map +1 -0
  84. package/dist/lint/rules/imported-source.js +27 -0
  85. package/dist/lint/rules/no-unused-declarable.d.ts.map +1 -1
  86. package/dist/lint/rules/no-unused-declarable.js +3 -0
  87. package/dist/op/gate.d.ts +2 -0
  88. package/dist/op/gate.d.ts.map +1 -1
  89. package/dist/op/gate.js +8 -1
  90. package/dist/pr-forge-reads.d.ts +17 -0
  91. package/dist/pr-forge-reads.d.ts.map +1 -1
  92. package/dist/pr-forge-reads.js +55 -0
  93. package/dist/release-floors.d.ts +9 -1
  94. package/dist/release-floors.d.ts.map +1 -1
  95. package/dist/release-floors.js +9 -1
  96. package/dist/repo-path.d.ts +29 -0
  97. package/dist/repo-path.d.ts.map +1 -0
  98. package/dist/repo-path.js +81 -0
  99. package/dist/sensitive-key.d.ts +23 -0
  100. package/dist/sensitive-key.d.ts.map +1 -1
  101. package/dist/sensitive-key.js +37 -0
  102. package/dist/terraform/hcl2json.d.ts +7 -0
  103. package/dist/terraform/hcl2json.d.ts.map +1 -1
  104. package/dist/terraform/hcl2json.js +7 -0
  105. package/dist/wave-runtime.mjs +352 -345
  106. package/dist/workspace/catalog-edges.d.ts +147 -0
  107. package/dist/workspace/catalog-edges.d.ts.map +1 -0
  108. package/dist/workspace/catalog-edges.js +461 -0
  109. package/dist/workspace/compose-graph.d.ts +73 -3
  110. package/dist/workspace/compose-graph.d.ts.map +1 -1
  111. package/dist/workspace/declaration.d.ts +2 -0
  112. package/dist/workspace/declaration.d.ts.map +1 -1
  113. package/dist/workspace/declaration.js +1 -0
  114. package/dist/workspace/declaration.schema.json +6 -0
  115. package/dist/workspace/discover.d.ts +134 -0
  116. package/dist/workspace/discover.d.ts.map +1 -0
  117. package/dist/workspace/discover.js +372 -0
  118. package/dist/workspace/graph-cli.d.ts +20 -0
  119. package/dist/workspace/graph-cli.d.ts.map +1 -1
  120. package/dist/workspace/graph-cli.js +178 -20
  121. package/dist/workspace/graph.schema.json +195 -2
  122. package/dist/workspace/release-train.d.ts +214 -3
  123. package/dist/workspace/release-train.d.ts.map +1 -1
  124. package/dist/workspace/release-train.js +552 -16
  125. package/dist/workspace/repo-ref.d.ts +14 -0
  126. package/dist/workspace/repo-ref.d.ts.map +1 -1
  127. package/dist/workspace/repo-ref.js +26 -1
  128. package/dist/workspace/workspace-gates.d.ts +24 -0
  129. package/dist/workspace/workspace-gates.d.ts.map +1 -1
  130. package/dist/workspace/workspace-gates.js +29 -5
  131. package/dist/workspace/workspace-ledger.d.ts +31 -5
  132. package/dist/workspace/workspace-ledger.d.ts.map +1 -1
  133. package/dist/workspace/workspace-ledger.js +2 -1
  134. package/dist/workspace/workspace-run.d.ts +14 -0
  135. package/dist/workspace/workspace-run.d.ts.map +1 -1
  136. package/dist/workspace/workspace-run.js +2 -2
  137. package/dist/yaml.d.ts.map +1 -1
  138. package/dist/yaml.js +33 -8
  139. package/package.json +1 -1
  140. package/src/audit/core.test.ts +64 -1
  141. package/src/audit/core.ts +75 -10
  142. package/src/audit/identity.test.ts +31 -0
  143. package/src/audit/identity.ts +43 -0
  144. package/src/audit/report-html.ts +4 -2
  145. package/src/audit/report-model.ts +21 -1
  146. package/src/ci-agent.test.ts +32 -0
  147. package/src/ci-agent.ts +42 -0
  148. package/src/ci-comment-allow.test.ts +380 -0
  149. package/src/ci-comment-allow.ts +184 -0
  150. package/src/ci-comment-commands.ts +25 -0
  151. package/src/ci-control.ts +42 -0
  152. package/src/ci-product.ts +3 -0
  153. package/src/cli/commands/audit-parser-notice.test.ts +74 -0
  154. package/src/cli/commands/audit.test.ts +12 -0
  155. package/src/cli/commands/audit.ts +25 -7
  156. package/src/cli/commands/import-layout.test.ts +2 -1
  157. package/src/cli/commands/import.ts +29 -6
  158. package/src/cli/handlers/agent.ts +13 -2
  159. package/src/cli/handlers/pr-comment.ts +12 -0
  160. package/src/cli/handlers/promote.test.ts +68 -0
  161. package/src/cli/handlers/promote.ts +52 -6
  162. package/src/cli/main.test.ts +5 -0
  163. package/src/cli/main.ts +29 -6
  164. package/src/cli/parse-args.ts +18 -0
  165. package/src/cli/registry.ts +8 -0
  166. package/src/cloud-lister/kubernetes.k3d.e2e.test.ts +104 -0
  167. package/src/cloud-lister/mask-references.test.ts +132 -0
  168. package/src/cloud-lister/mask.ts +68 -3
  169. package/src/components/driver.ts +9 -1
  170. package/src/components/product-pipeline.ts +57 -7
  171. package/src/components/product-plan.ts +27 -2
  172. package/src/control/applied.ts +33 -3
  173. package/src/control/dispatch.ts +156 -5
  174. package/src/control/train.test.ts +215 -0
  175. package/src/control/train.ts +413 -0
  176. package/src/deep-observation.ts +2 -2
  177. package/src/floor-table.data.ts +6 -0
  178. package/src/graph-detail.ts +37 -12
  179. package/src/graph-refs.test.ts +45 -1
  180. package/src/graph-refs.ts +321 -14
  181. package/src/lint/post-synth.ts +20 -0
  182. package/src/lint/rules/declarable-naming-convention.test.ts +35 -1
  183. package/src/lint/rules/declarable-naming-convention.ts +35 -8
  184. package/src/lint/rules/imported-source.test.ts +22 -0
  185. package/src/lint/rules/imported-source.ts +31 -0
  186. package/src/lint/rules/no-unused-declarable.test.ts +16 -0
  187. package/src/lint/rules/no-unused-declarable.ts +7 -0
  188. package/src/op/gate.ts +10 -2
  189. package/src/pr-forge-reads.ts +62 -0
  190. package/src/release-floors.ts +13 -1
  191. package/src/repo-path.test.ts +72 -0
  192. package/src/repo-path.ts +103 -0
  193. package/src/sensitive-key.ts +38 -0
  194. package/src/terraform/hcl2json.ts +8 -0
  195. package/src/workspace/application-set.e2e.test.ts +405 -0
  196. package/src/workspace/catalog-edges.ts +507 -0
  197. package/src/workspace/ci-green-workflow.test.ts +2 -2
  198. package/src/workspace/cluster-join.e2e.test.ts +150 -0
  199. package/src/workspace/compose-graph.ts +74 -5
  200. package/src/workspace/declaration.schema.json +6 -0
  201. package/src/workspace/declaration.ts +3 -0
  202. package/src/workspace/discover.e2e.test.ts +122 -0
  203. package/src/workspace/discover.test.ts +225 -0
  204. package/src/workspace/discover.ts +406 -0
  205. package/src/workspace/external-secret-catalog.e2e.test.ts +98 -0
  206. package/src/workspace/external-secret-catalog.test.ts +142 -0
  207. package/src/workspace/graph-cli.ts +207 -21
  208. package/src/workspace/graph-contract.test.ts +92 -0
  209. package/src/workspace/graph.schema.json +195 -2
  210. package/src/workspace/helm-references.e2e.test.ts +135 -0
  211. package/src/workspace/identity-annotation-catalog.e2e.test.ts +91 -0
  212. package/src/workspace/identity-annotation-catalog.test.ts +139 -0
  213. package/src/workspace/release-train-repos.test.ts +304 -0
  214. package/src/workspace/release-train.test.ts +296 -0
  215. package/src/workspace/release-train.ts +631 -16
  216. package/src/workspace/repo-ref.ts +26 -1
  217. package/src/workspace/runs-on.test.ts +45 -0
  218. package/src/workspace/workspace-gates.ts +48 -5
  219. package/src/workspace/workspace-ledger.ts +28 -5
  220. package/src/workspace/workspace-run.test.ts +1 -1
  221. package/src/workspace/workspace-run.ts +2 -2
  222. package/src/yaml.test.ts +96 -8
  223. package/src/yaml.ts +36 -8
@@ -83,6 +83,12 @@ function toStacks(ir) {
83
83
  }
84
84
  return { nodes, edges: sortEdges([...seen.values()]), groups: {} };
85
85
  }
86
+ /** A node's attrs as a tier prints them: all of them at T3, the resource view at T2, overlay paint below. */
87
+ export function nodeAttrsAt(attrs, level) {
88
+ if (level === 3)
89
+ return attrs;
90
+ return level === 2 ? resourceAttrs(attrs) : paintAttrs(attrs);
91
+ }
86
92
  /** T2 — every resource, each carrying the resource view of its attrs (the
87
93
  * scalar/reference projection; the full property tree is T3's addition). */
88
94
  function toDeclarables(ir) {
@@ -117,26 +123,25 @@ function rollupStatus(members) {
117
123
  ids.sort();
118
124
  return { _status: worst, ...(Object.keys(notGood).length > 0 ? { _memberStatus: notGood } : {}) };
119
125
  }
120
- /** T1 — collapse each composite instance to one node; internal edges disappear.
121
- * Topology view: surviving plain nodes keep only overlay paint, not properties. */
122
- function toComposites(ir) {
126
+ /**
127
+ * The composite instances of a graph, and the node each node is drawn as at
128
+ * T1: a member of an instance is drawn as the instance, any other node as
129
+ * itself.
130
+ */
131
+ function compositeCollapse(ir) {
123
132
  // A composite instance is its export name plus the composite that made it:
124
133
  // an AWS FargateAlb and a GCP CloudRunServiceComposite both exported as
125
134
  // `web` are two instances (#4178). One composite whose members span
126
135
  // lexicons stays one instance.
127
136
  const instanceKey = (n) => `${n.compositeInstance}\0${n.compositeParent ?? ""}`;
128
137
  const instances = new Map();
129
- const plain = [];
130
138
  for (const n of ir.nodes) {
131
- if (n.compositeInstance) {
132
- const key = instanceKey(n);
133
- const arr = instances.get(key) ?? [];
134
- arr.push(n);
135
- instances.set(key, arr);
136
- }
137
- else {
138
- plain.push({ ...n, attrs: paintAttrs(n.attrs) });
139
- }
139
+ if (!n.compositeInstance)
140
+ continue;
141
+ const key = instanceKey(n);
142
+ const arr = instances.get(key) ?? [];
143
+ arr.push(n);
144
+ instances.set(key, arr);
140
145
  }
141
146
  // The collapsed id is the instance name, or `<instance>@<composite>` when
142
147
  // two composites share the name.
@@ -153,6 +158,26 @@ function toComposites(ir) {
153
158
  const idMap = new Map();
154
159
  for (const n of ir.nodes)
155
160
  idMap.set(n.id, n.compositeInstance ? collapsedId.get(instanceKey(n)) : n.id);
161
+ return { instances, collapsedId, idMap };
162
+ }
163
+ /**
164
+ * The node each node of the base IR is drawn as at a detail tier (#5097): at
165
+ * T0 its lexicon's stack node, at T1 the composite instance it belongs to,
166
+ * and itself at T2 and T3. A reader that derives edges from the base IR maps
167
+ * them through this to put them on the tier's nodes.
168
+ */
169
+ export function detailIdMap(ir, level) {
170
+ if (level === 0)
171
+ return new Map(ir.nodes.map((n) => [n.id, n.lexicon]));
172
+ if (level === 1)
173
+ return compositeCollapse(ir).idMap;
174
+ return new Map(ir.nodes.map((n) => [n.id, n.id]));
175
+ }
176
+ /** T1 — collapse each composite instance to one node; internal edges disappear.
177
+ * Topology view: surviving plain nodes keep only overlay paint, not properties. */
178
+ function toComposites(ir) {
179
+ const { instances, collapsedId, idMap } = compositeCollapse(ir);
180
+ const plain = ir.nodes.filter((n) => !n.compositeInstance).map((n) => ({ ...n, attrs: paintAttrs(n.attrs) }));
156
181
  const nodes = [...plain];
157
182
  for (const [key, members] of instances) {
158
183
  const types = new Set(members.map((m) => m.compositeParent).filter(Boolean));
@@ -75,6 +75,41 @@ export interface RefRule {
75
75
  * reference and drawing the line twice.
76
76
  */
77
77
  viaAttr?: string;
78
+ /**
79
+ * Reads the references itself, for a rule whose value does not name its
80
+ * target by one identifier (#5098): an ExternalSecret's key names a cloud
81
+ * secret only inside the project of the store it reads through, so the
82
+ * match spans the holder, a second node and the target. `path` and
83
+ * `targetKind` still name the rule (its id, its entry in a document's
84
+ * `catalog.rules`, the kind a dangling entry looks for), but the pass does
85
+ * not read `path` itself: it calls `join` with the holder and `find`, which
86
+ * returns the nodes a value names from the holder's scope, the way the
87
+ * pass's own lookup would. Each {@link JoinedRef} it returns is then
88
+ * resolved like a value read from `path`: no target is dangling (unless
89
+ * `optional`), two are ambiguous, one is an edge. Only the catalog pass
90
+ * over indexed nodes and declared graphs calls it. Pure.
91
+ */
92
+ join?(holder: IRNode, find: FindNodes): JoinedRef[];
93
+ }
94
+ /**
95
+ * What a {@link RefRule.join} looks nodes up with. `find(value)` returns the
96
+ * nodes `value` names from the holder's own scope. `find(value, scope)`
97
+ * returns those named inside the scope called `scope` (a Kubernetes
98
+ * namespace), whatever scope the holder sits in, for a holder that names its
99
+ * target's namespace itself (#5099): a cloud IAM binding naming
100
+ * `<ns>/<name>`.
101
+ */
102
+ export type FindNodes = (value: string, scope?: string) => readonly IRNode[];
103
+ /** One reference a {@link RefRule.join} found on a holder. */
104
+ export interface JoinedRef {
105
+ /** What the holder wrote, as a dangling or ambiguous entry reports it. */
106
+ value: string;
107
+ /** The nodes it names, from `find`; none is dangling. */
108
+ targets: readonly IRNode[];
109
+ /** The edge's `viaAttr`, when the first step of the rule's path does not say enough. */
110
+ via?: string;
111
+ /** A node the value was read through, named on a dangling entry (the store a key is read from). */
112
+ through?: IRNode;
78
113
  }
79
114
  /**
80
115
  * A typed tag rule (#4522, ruled on INTENTIUS/behold#1023 Q5): a tag whose
@@ -92,12 +127,181 @@ export interface TagRefRule {
92
127
  targetKind: string;
93
128
  label?: string;
94
129
  }
130
+ /**
131
+ * A kind whose names are unique only inside a scope the node names itself
132
+ * (#5097): a namespaced Kubernetes kind, whose scope is the value at
133
+ * `metadata.namespace`. Read on a declared graph, where nothing else says
134
+ * where a node sits. Over an index the node's location says it instead.
135
+ */
136
+ export interface ScopeRule {
137
+ kind: string;
138
+ /**
139
+ * The attr path whose value names the scope. With none (#5100), the kind's
140
+ * names are unique inside the member that holds the node, which is what a
141
+ * namespaced kind with no namespace on the node gets.
142
+ */
143
+ path?: string;
144
+ }
145
+ /**
146
+ * What the catalog pass on a declared graph reads for one node, when the
147
+ * node as printed is not what the rules are written against (#5097). A
148
+ * declared terraform block is `Terraform::Resource` with its arguments under
149
+ * `body`; its view has the provider type as `kind` and the literal arguments
150
+ * as `attrs`.
151
+ */
152
+ export interface DeclaredCatalogNode {
153
+ kind: string;
154
+ attrs: Record<string, unknown>;
155
+ /** Arguments left out of `attrs` because their value is not literal (an interpolation, a reference). */
156
+ nonLiteral: number;
157
+ }
158
+ /**
159
+ * A node a lexicon adds to a declared workspace graph because several members
160
+ * name the same thing (#5100): one Helm chart that a kustomization, an Argo CD
161
+ * Application and a Terraform `helm_release` all name is one node, owned by
162
+ * none of them. The catalog pass draws an edge to it from each holder.
163
+ */
164
+ export interface SharedCatalogNode {
165
+ /** The node's own id; the pass places it as `<member>/<id>`, in the member of its first holder. */
166
+ id: string;
167
+ kind: string;
168
+ attrs: Record<string, unknown>;
169
+ /** The nodes that name it, by the id the pass read them under, with the attribute each reads it through. */
170
+ holders: Array<{
171
+ from: string;
172
+ via: string;
173
+ label?: string;
174
+ }>;
175
+ }
95
176
  /** A lexicon's reference knowledge — its identity map and reference rules. */
96
177
  export interface ReferenceCatalog {
97
178
  identities: IdentityRule[];
98
179
  refs: RefRule[];
99
180
  /** Typed tag rules, used over indexed nodes only (#4522). */
100
181
  tagRefs?: TagRefRule[];
182
+ /** Kinds whose names are scoped by a value on the node, on a declared graph (#5097). */
183
+ scopes?: ScopeRule[];
184
+ /**
185
+ * The node the catalog reads for a declared node of this lexicon, or
186
+ * undefined to read the node as it is (#5097). An instance node
187
+ * (`instanceOf`) carries no attrs of its own, so it is handed its block
188
+ * node as `block` (#5117). Pure.
189
+ */
190
+ declaredNode?(node: IRNode, block?: IRNode): DeclaredCatalogNode | undefined;
191
+ /**
192
+ * True for a node of this lexicon that registers a cluster, the one a
193
+ * workspace member runs on (an Argo CD cluster Secret, #5101). A member's
194
+ * `runsOn` draws a declared edge from each such node to the cluster
195
+ * resource it names. Reads the node as the document holds it. Pure.
196
+ */
197
+ registersCluster?(node: IRNode): boolean;
198
+ /**
199
+ * Nodes of this catalog's lexicon that the declared graph has none of until
200
+ * every member is read (#5100), each with the nodes that name it. Called with
201
+ * every node the pass reads, after `declaredNode`. Pure. An edge from a holder
202
+ * carries the rule id `<lexicon>:<holder kind>:<via>`.
203
+ */
204
+ sharedNodes?(nodes: readonly IRNode[]): SharedCatalogNode[];
205
+ /** Nodes a node of this lexicon makes, on a declared graph (#5102): the Applications an ApplicationSet generates. */
206
+ generates?: GenerateRule[];
207
+ /** Paths in the repository a node of this lexicon names, on a declared graph (#5102): an Application's source path. */
208
+ pathRefs?: PathRule[];
209
+ }
210
+ /**
211
+ * A node that stands for several the system it declares will make (#5102):
212
+ * an Argo CD ApplicationSet, whose generators yield parameter sets that its
213
+ * template turns into Applications. `from`, `path`, `targetKind` and `label`
214
+ * name the rule as a {@link RefRule}'s do, and the edge from the holder to
215
+ * each node it makes carries its id. `generate` is handed the holder and
216
+ * every node the pass reads (as `declaredNode` gives them), so a generator
217
+ * can select from nodes of any member. Only the catalog pass over a declared
218
+ * graph calls it. Pure.
219
+ */
220
+ export interface GenerateRule {
221
+ from: string;
222
+ path: string;
223
+ targetKind: string;
224
+ label?: string;
225
+ generate(holder: IRNode, nodes: readonly IRNode[]): Generated;
226
+ /**
227
+ * The rule of the edge from a generated node to the cluster registration
228
+ * its generator selected it for ({@link GeneratedNode.cluster}): its id is
229
+ * `<lexicon>:<from>:<path>`. The selection names the registration, so the
230
+ * edge is drawn whatever the node's own references say, and an edge another
231
+ * rule draws for the same pair is left out.
232
+ */
233
+ cluster?: {
234
+ path: string;
235
+ targetKind: string;
236
+ label?: string;
237
+ };
238
+ /**
239
+ * The nodes the files a generated node names make (#5094): a generated
240
+ * Application's Helm values file and the objects under its `extraObjects`,
241
+ * as the reader makes them for one written by hand. `readFile` returns a
242
+ * workspace-relative file's text, or undefined when it is not in the
243
+ * workspace's repository; `nodes` are every node the pass reads, so a file
244
+ * a node already holds is not read twice. The pass gives each the id
245
+ * `<holder id>/<key>`, so one file named by several of a holder's
246
+ * generated nodes is one node. Only the catalog pass over a declared graph
247
+ * calls it, and only when its caller can read the repository.
248
+ */
249
+ files?(node: IRNode, readFile: (path: string) => string | undefined, nodes: readonly IRNode[]): FileNode[];
250
+ }
251
+ /** One node a {@link GenerateRule.files} read from a file. */
252
+ export interface FileNode {
253
+ /** Unique among the holder's file nodes: `values/<path>`, and `values/<path>/<object>` for an object in it. */
254
+ key: string;
255
+ kind: string;
256
+ /** The lexicon whose node it is: a values file is the helm lexicon's, the objects in it the holder's. */
257
+ lexicon: string;
258
+ attrs: Record<string, unknown>;
259
+ }
260
+ /** What a {@link GenerateRule} made of one holder. */
261
+ export interface Generated {
262
+ nodes: GeneratedNode[];
263
+ /** What the rule left unexpanded and why, one line each: a generator it does not read, a template function it does not know. */
264
+ notExpanded: string[];
265
+ }
266
+ /**
267
+ * One node a {@link GenerateRule} made. The pass gives it the id
268
+ * `<holder id>/<key>`, the holder's lexicon and member, and reads it with the
269
+ * other nodes, so the catalog's rules join it as they join a declared node
270
+ * of its kind.
271
+ */
272
+ export interface GeneratedNode {
273
+ /** Unique among the holder's nodes: a generated Application's name. */
274
+ key: string;
275
+ kind: string;
276
+ attrs: Record<string, unknown>;
277
+ /** The generator that yielded it, such as `clusters` or `list`. */
278
+ generator: string;
279
+ /** The parameters it was made with, flattened to `a.b.c` keys. */
280
+ params: Record<string, string>;
281
+ /** With a generator that reads cluster registrations: the node it was made for, when there is one. */
282
+ cluster?: IRNode;
283
+ }
284
+ /**
285
+ * A path in a repository that a node names (#5102): an Argo CD Application's
286
+ * `spec.source.path`, a values file. `from` and `path` name the rule as a
287
+ * {@link RefRule}'s do. `read` returns each path the holder names; the pass
288
+ * looks for it in the workspace's repository and reports one that is not
289
+ * there as dangling. Pure.
290
+ */
291
+ export interface PathRule {
292
+ from: string;
293
+ path: string;
294
+ label?: string;
295
+ read(holder: IRNode): RepoPathRef[];
296
+ }
297
+ /** One path a {@link PathRule} read. */
298
+ export interface RepoPathRef {
299
+ /** The path from the repository's root, as the holder resolves it. */
300
+ value: string;
301
+ /** The repository the path is in, as the holder writes it (`repoURL`). */
302
+ repo: string;
303
+ /** Whether the path names a directory or a file. */
304
+ type: "dir" | "file";
101
305
  }
102
306
  /** `child` is contained by `parent` (subnet ∈ VPC). For #779's boundary boxes. */
103
307
  export interface ContainmentPair {
@@ -112,6 +316,8 @@ export interface DanglingRef {
112
316
  path: string;
113
317
  value: string;
114
318
  targetKind?: string;
319
+ /** The id of the node the value was read through (#5098): the store whose cloud secret a key names. */
320
+ through?: string;
115
321
  }
116
322
  export interface ReconstructedEdges {
117
323
  edges: IREdge[];
@@ -142,10 +348,25 @@ export interface ReconstructedEdges {
142
348
  containmentEdges: IREdge[];
143
349
  dangling: DanglingRef[];
144
350
  }
351
+ /** One step of an attr path: a key, and whether the value under it fans out as an array. */
352
+ export interface PathStep {
353
+ key: string;
354
+ fanOut: boolean;
355
+ }
145
356
  /**
146
- * Read all scalar values at an attr path. Supports nested keys (`a.b`) and array
147
- * fan-out (`arr[]`, `arr[].id`). Returns every scalar found — a path through an
148
- * array yields one value per element.
357
+ * Split an attr path into its steps. A bare step runs to the next `.`, `[]`
358
+ * or quoted step; `[]` after a step fans it out over an array. A quoted step,
359
+ * `["iam.gke.io/gcp-service-account"]`, is one key whatever it holds (#5097):
360
+ * a JSON string in brackets, so `\"` and `\\` escape as they do in JSON. It
361
+ * follows the step before it with no `.`, and can fan out too (`["a.b"][]`).
362
+ */
363
+ export declare function parsePath(path: string): PathStep[];
364
+ /**
365
+ * Read all scalar values at an attr path. Supports nested keys (`a.b`), array
366
+ * fan-out (`arr[]`, `arr[].id`) and quoted keys for a key that holds dots or
367
+ * slashes (`metadata.annotations["eks.amazonaws.com/role-arn"]`, #5097).
368
+ * Returns every scalar found: a path through an array yields one value per
369
+ * element.
149
370
  */
150
371
  export declare function readPath(obj: unknown, path: string): string[];
151
372
  /** Merge several lexicons' catalogs into one (concatenate identities + refs). */
@@ -181,7 +402,16 @@ export interface IndexedNodeScope {
181
402
  account: string;
182
403
  /** The region or location; undefined for a global type. */
183
404
  region?: string;
405
+ /**
406
+ * The member that holds the node, on a declared graph (#5100). A holder also
407
+ * looks in {@link memberRegion} of its own member, whatever its own region, so
408
+ * a node that names no scope but its member (a values file) is reached by a
409
+ * holder scoped by namespace.
410
+ */
411
+ member?: string;
184
412
  }
413
+ /** The region of a node held by one member (a `ScopeRule` with no `path`). */
414
+ export declare const memberRegion: (member: string) => string;
185
415
  /** A reference whose value matched several nodes: no edge is drawn (behold#1023 Q3). */
186
416
  export interface AmbiguousRef {
187
417
  from: string;
@@ -1 +1 @@
1
- {"version":3,"file":"graph-refs.d.ts","sourceRoot":"","sources":["../src/graph-refs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEjD,kFAAkF;AAClF,MAAM,WAAW,YAAY;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,SAAS,MAAM,EAAO,GAC/B,aAAa,CAwDf"}
@@ -5,22 +5,88 @@ function toStr(v) {
5
5
  return String(v);
6
6
  return undefined;
7
7
  }
8
+ /** Catalog paths, parsed once: a catalog is a fixed list, so this stays small. */
9
+ const parsedPaths = new Map();
10
+ /** The index of the closing quote of the quoted key opened at `i`, when `"]` closes it and it parses as JSON. */
11
+ function quotedEnd(path, i) {
12
+ let j = i + 2;
13
+ while (j < path.length && path[j] !== '"')
14
+ j += path[j] === "\\" ? 2 : 1;
15
+ if (path[j] !== '"' || path[j + 1] !== "]")
16
+ return undefined;
17
+ try {
18
+ return typeof JSON.parse(path.slice(i + 1, j + 1)) === "string" ? j : undefined;
19
+ }
20
+ catch {
21
+ return undefined;
22
+ }
23
+ }
8
24
  /**
9
- * Read all scalar values at an attr path. Supports nested keys (`a.b`) and array
10
- * fan-out (`arr[]`, `arr[].id`). Returns every scalar found — a path through an
11
- * array yields one value per element.
25
+ * Split an attr path into its steps. A bare step runs to the next `.`, `[]`
26
+ * or quoted step; `[]` after a step fans it out over an array. A quoted step,
27
+ * `["iam.gke.io/gcp-service-account"]`, is one key whatever it holds (#5097):
28
+ * a JSON string in brackets, so `\"` and `\\` escape as they do in JSON. It
29
+ * follows the step before it with no `.`, and can fan out too (`["a.b"][]`).
30
+ */
31
+ export function parsePath(path) {
32
+ const steps = [];
33
+ let bare = "";
34
+ let inBare = false;
35
+ const endBare = () => {
36
+ if (inBare)
37
+ steps.push({ key: bare, fanOut: false });
38
+ bare = "";
39
+ inBare = false;
40
+ };
41
+ let i = 0;
42
+ while (i < path.length) {
43
+ const c = path[i];
44
+ if (c === ".") {
45
+ endBare();
46
+ i++;
47
+ }
48
+ else if (c === "[" && path[i + 1] === "]") {
49
+ endBare();
50
+ if (steps.length > 0)
51
+ steps[steps.length - 1].fanOut = true;
52
+ else
53
+ steps.push({ key: "", fanOut: true });
54
+ i += 2;
55
+ }
56
+ else if (c === "[" && path[i + 1] === '"' && quotedEnd(path, i) !== undefined) {
57
+ endBare();
58
+ const j = quotedEnd(path, i);
59
+ steps.push({ key: JSON.parse(path.slice(i + 1, j + 1)), fanOut: false });
60
+ i = j + 2;
61
+ }
62
+ else {
63
+ bare += c;
64
+ inBare = true;
65
+ i++;
66
+ }
67
+ }
68
+ endBare();
69
+ return steps;
70
+ }
71
+ /**
72
+ * Read all scalar values at an attr path. Supports nested keys (`a.b`), array
73
+ * fan-out (`arr[]`, `arr[].id`) and quoted keys for a key that holds dots or
74
+ * slashes (`metadata.annotations["eks.amazonaws.com/role-arn"]`, #5097).
75
+ * Returns every scalar found: a path through an array yields one value per
76
+ * element.
12
77
  */
13
78
  export function readPath(obj, path) {
79
+ let steps = parsedPaths.get(path);
80
+ if (!steps)
81
+ parsedPaths.set(path, (steps = parsePath(path)));
14
82
  let cur = [obj];
15
- for (const part of path.split(".")) {
16
- const isArr = part.endsWith("[]");
17
- const key = isArr ? part.slice(0, -2) : part;
83
+ for (const { key, fanOut } of steps) {
18
84
  const next = [];
19
85
  for (const c of cur) {
20
86
  if (c == null || typeof c !== "object")
21
87
  continue;
22
88
  const val = c[key];
23
- if (isArr) {
89
+ if (fanOut) {
24
90
  if (Array.isArray(val))
25
91
  next.push(...val);
26
92
  }
@@ -80,7 +146,7 @@ export function reconstructEdges(nodes, catalog) {
80
146
  const seenCont = new Set();
81
147
  for (const node of nodes) {
82
148
  for (const rule of catalog.refs) {
83
- if (rule.from !== node.kind)
149
+ if (rule.from !== node.kind || rule.join)
84
150
  continue;
85
151
  for (const value of readPath(node.attrs, rule.path)) {
86
152
  const candidates = index.get(value) ?? [];
@@ -159,12 +225,13 @@ export function containmentGroups(pairs) {
159
225
  out[parent] = [...byParent.get(parent)].sort();
160
226
  return out;
161
227
  }
228
+ /** The region of a node held by one member (a `ScopeRule` with no `path`). */
229
+ export const memberRegion = (member) => `member:${member}`;
162
230
  /** Values a masking or normalization pass wrote: never an identifier. */
163
231
  const PLACEHOLDER_VALUES = new Set(["[REDACTED]", "<chant:unresolved>", "<masked>"]);
164
232
  /** The attribute a rule reads through, as a declared graph's `viaAttr` names it: `SecurityGroupIds[]` is `SecurityGroupIds`. */
165
233
  function topAttr(path) {
166
- const first = path.split(".")[0];
167
- return first.endsWith("[]") ? first.slice(0, -2) : first;
234
+ return parsePath(path)[0]?.key ?? path;
168
235
  }
169
236
  /** `<lexicon>:<from kind>:<path>`, the id a derived edge carries. */
170
237
  export function refRuleId(lexicon, from, path) {
@@ -192,11 +259,19 @@ export function reconstructIndexedEdges(nodes, catalogs, scopeOf) {
192
259
  const sorted = [...nodes].sort((a, b) => byString(a.id, b.id));
193
260
  const keyOf = (scope, value) => `${scope.account}\u0000${scope.region ?? ""}\u0000${value}`;
194
261
  const index = new Map();
262
+ // The same nodes by the name of the scope they sit in (the text after the
263
+ // first `:` of a region), for a join that names a scope itself.
264
+ const named = new Map();
195
265
  const add = (scope, value, node) => {
196
266
  if (value === undefined || value === "" || PLACEHOLDER_VALUES.has(value))
197
267
  return;
198
268
  const k = keyOf(scope, value);
199
269
  (index.get(k) ?? index.set(k, new Map()).get(k)).set(node.id, node.kind);
270
+ const colon = scope.region?.indexOf(":") ?? -1;
271
+ if (scope.region !== undefined && colon > 0) {
272
+ const nk = `${scope.region.slice(colon + 1)}\u0000${value}`;
273
+ (named.get(nk) ?? named.set(nk, new Map()).get(nk)).set(node.id, node.kind);
274
+ }
200
275
  };
201
276
  const identities = catalogs.flatMap((c) => c.catalog.identities);
202
277
  for (const node of sorted) {
@@ -214,10 +289,13 @@ export function reconstructIndexedEdges(nodes, catalogs, scopeOf) {
214
289
  add(scope, v, node);
215
290
  }
216
291
  }
292
+ const byId = new Map(sorted.map((n) => [n.id, n]));
217
293
  const lookup = (holder, value) => {
218
294
  const scope = scopeOf(holder);
219
295
  const out = new Map();
220
296
  const keys = scope.region !== undefined ? [keyOf(scope, value), keyOf({ account: scope.account }, value)] : [keyOf(scope, value)];
297
+ if (scope.member !== undefined)
298
+ keys.push(keyOf({ account: scope.account, region: memberRegion(scope.member) }, value));
221
299
  for (const k of keys)
222
300
  for (const [id, kind] of index.get(k) ?? [])
223
301
  out.set(id, kind);
@@ -229,11 +307,17 @@ export function reconstructIndexedEdges(nodes, catalogs, scopeOf) {
229
307
  // and template-shape rules for the same path) report a reference once.
230
308
  const dangling = new Map();
231
309
  const ambiguous = new Map();
232
- const resolve = (holder, value, rule) => {
310
+ // A value some rule of an id found a node for. Rules of one id and different
311
+ // target kinds are alternatives (a cluster Secret's name is a GKE, an EKS or
312
+ // an AKS cluster), so the kinds that found nothing do not report it dangling.
313
+ const found = new Set();
314
+ const resolve = (holder, value, rule, joined) => {
233
315
  if (PLACEHOLDER_VALUES.has(value))
234
316
  return;
235
- const found = lookup(holder, value);
236
- let candidates = [...found.entries()].filter(([, kind]) => rule.targetKind === undefined || kind === rule.targetKind).map(([id]) => id);
317
+ let candidates = joined
318
+ ? joined.targets.map((t) => t.id)
319
+ : [...lookup(holder, value).entries()].filter(([, kind]) => rule.targetKind === undefined || kind === rule.targetKind).map(([id]) => id);
320
+ const through = joined?.through ? { through: joined.through.id } : {};
237
321
  if (candidates.includes(holder.id)) {
238
322
  if (candidates.length === 1)
239
323
  return; // a self-reference (an SG rule to its own group)
@@ -243,9 +327,10 @@ export function reconstructIndexedEdges(nodes, catalogs, scopeOf) {
243
327
  if (candidates.length === 0) {
244
328
  if (rule.optional)
245
329
  return;
246
- dangling.set(`${holder.id}|${rule.id}|${value}`, { from: holder.id, path: rule.path, value, rule: rule.id, ...(rule.targetKind ? { targetKind: rule.targetKind } : {}) });
330
+ dangling.set(`${holder.id}|${rule.id}|${value}|${through.through ?? ""}`, { from: holder.id, path: rule.path, value, rule: rule.id, ...(rule.targetKind ? { targetKind: rule.targetKind } : {}), ...through });
247
331
  return;
248
332
  }
333
+ found.add(`${holder.id}|${rule.id}|${value}`);
249
334
  if (candidates.length > 1) {
250
335
  ambiguous.set(`${holder.id}|${rule.id}|${value}`, { from: holder.id, rule: rule.id, path: rule.path, value, candidates });
251
336
  return;
@@ -292,6 +377,12 @@ export function reconstructIndexedEdges(nodes, catalogs, scopeOf) {
292
377
  ...(rule.label ? { label: rule.label } : {}),
293
378
  ...(rule.optional ? { optional: true } : {}),
294
379
  };
380
+ if (rule.join) {
381
+ const find = (value, scope) => [...(scope === undefined ? lookup(node, value) : named.get(`${scope}\u0000${value}`) ?? new Map()).keys()].map((id) => byId.get(id));
382
+ for (const j of rule.join(node, find))
383
+ resolve(node, j.value, { ...spec, via: j.via ?? spec.via }, j);
384
+ continue;
385
+ }
295
386
  for (const value of new Set(readPath(node.attrs, rule.path)))
296
387
  resolve(node, value, spec);
297
388
  }
@@ -325,7 +416,7 @@ export function reconstructIndexedEdges(nodes, catalogs, scopeOf) {
325
416
  return {
326
417
  edges: [...edges.values()].sort((a, b) => byString(edgeKey(a), edgeKey(b))),
327
418
  containment: [...containment.values()].sort((a, b) => byString(`${a.child}|${a.parent}`, `${b.child}|${b.parent}`)),
328
- dangling: [...dangling.values()].sort((a, b) => byString(`${a.from}|${a.rule}|${a.value}`, `${b.from}|${b.rule}|${b.value}`)),
419
+ dangling: [...dangling.values()].filter((d) => !found.has(`${d.from}|${d.rule}|${d.value}`)).sort((a, b) => byString(`${a.from}|${a.rule}|${a.value}|${a.through ?? ""}`, `${b.from}|${b.rule}|${b.value}|${b.through ?? ""}`)),
329
420
  ambiguous: [...ambiguous.values()].sort((a, b) => byString(`${a.from}|${a.rule}|${a.value}`, `${b.from}|${b.rule}|${b.value}`)),
330
421
  };
331
422
  }
@@ -69,6 +69,18 @@ export interface PostSynthContext {
69
69
  * where a check that reads the disk stays silent.
70
70
  */
71
71
  readonly projectDir?: string;
72
+ /**
73
+ * Set when the checks run under `chant audit` (#5109), which reads a tree
74
+ * rather than building a project. `root` is the directory the audit walked,
75
+ * and is absent when the tree is a remote fetch with nothing on disk. A
76
+ * check that reads the disk looks there, never in the working directory the
77
+ * command happened to start from, and stays silent when there is no `root`.
78
+ * Absent from `chant build` and `chant lint` (which set `projectDir`) and
79
+ * from a hand-built context.
80
+ */
81
+ readonly audit?: {
82
+ root?: string;
83
+ };
72
84
  /**
73
85
  * The project config the build loaded (#3751), as source lint rules get it
74
86
  * in `LintContext.projectConfig`. A check that renders output again, as the
@@ -175,6 +187,16 @@ export interface PostSynthDiagnostic {
175
187
  /** Where it is missing from (e.g. a root module name). */
176
188
  scope: string;
177
189
  };
190
+ /**
191
+ * Where in the entity the finding sits, as a path that does not depend on
192
+ * any display name: `Deployment/containers[1]`, `resource.rules[0]`. The
193
+ * audit builds a finding's `identity` from the check id, the file, `entity`
194
+ * and this locator, never from `message`. A check that reports several
195
+ * findings against one entity, and whose message names a part of it (a
196
+ * container, a port), sets this so renaming that part, or fixing an earlier
197
+ * one, leaves the identity of the rest alone. Optional.
198
+ */
199
+ locator?: string;
178
200
  /**
179
201
  * The build root the finding is about, set by a {@link CrossRootCheck}
180
202
  * (chant #1939). Absent from a per-build finding.
@@ -1 +1 @@
1
- {"version":3,"file":"post-synth.d.ts","sourceRoot":"","sources":["../../src/lint/post-synth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;IAChD,8CAA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