@intentius/chant 0.124.44 → 0.124.46

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 (249) hide show
  1. package/dist/capabilities/aws.paths +148 -0
  2. package/dist/capabilities/base-mappings.json +122 -0
  3. package/dist/capabilities/catalog.d.ts +89 -0
  4. package/dist/capabilities/catalog.d.ts.map +1 -0
  5. package/dist/capabilities/catalog.js +204 -0
  6. package/dist/capabilities/language.d.ts +103 -0
  7. package/dist/capabilities/language.d.ts.map +1 -0
  8. package/dist/capabilities/language.js +335 -0
  9. package/dist/capabilities/matcher.d.ts +65 -0
  10. package/dist/capabilities/matcher.d.ts.map +1 -0
  11. package/dist/capabilities/matcher.js +299 -0
  12. package/dist/capabilities/view.d.ts +207 -0
  13. package/dist/capabilities/view.d.ts.map +1 -0
  14. package/dist/capabilities/view.js +484 -0
  15. package/dist/ci-identity.d.ts +183 -12
  16. package/dist/ci-identity.d.ts.map +1 -1
  17. package/dist/ci-identity.js +362 -53
  18. package/dist/cli/commands/lint.d.ts.map +1 -1
  19. package/dist/cli/commands/lint.js +1 -0
  20. package/dist/cli/handlers/build.d.ts.map +1 -1
  21. package/dist/cli/handlers/build.js +17 -1
  22. package/dist/cli/handlers/declared-graph.d.ts +44 -0
  23. package/dist/cli/handlers/declared-graph.d.ts.map +1 -0
  24. package/dist/cli/handlers/declared-graph.js +87 -0
  25. package/dist/cli/handlers/graph.d.ts +25 -0
  26. package/dist/cli/handlers/graph.d.ts.map +1 -1
  27. package/dist/cli/handlers/graph.js +93 -87
  28. package/dist/cli/handlers/pr-env.d.ts +8 -2
  29. package/dist/cli/handlers/pr-env.d.ts.map +1 -1
  30. package/dist/cli/handlers/pr-env.js +127 -225
  31. package/dist/cli/handlers/pr.d.ts +3 -0
  32. package/dist/cli/handlers/pr.d.ts.map +1 -1
  33. package/dist/cli/handlers/pr.js +1 -0
  34. package/dist/cli/handlers/search-count.d.ts +89 -0
  35. package/dist/cli/handlers/search-count.d.ts.map +1 -0
  36. package/dist/cli/handlers/search-count.js +132 -0
  37. package/dist/cli/handlers/search.d.ts +358 -6
  38. package/dist/cli/handlers/search.d.ts.map +1 -1
  39. package/dist/cli/handlers/search.js +1065 -155
  40. package/dist/cli/main.d.ts.map +1 -1
  41. package/dist/cli/main.js +23 -3
  42. package/dist/cli/mcp/server.d.ts.map +1 -1
  43. package/dist/cli/mcp/server.js +3 -0
  44. package/dist/cli/mcp/tools/capabilities.d.ts +7 -0
  45. package/dist/cli/mcp/tools/capabilities.d.ts.map +1 -0
  46. package/dist/cli/mcp/tools/capabilities.js +27 -0
  47. package/dist/cli/mcp/workspace-tools.d.ts +3 -1
  48. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
  49. package/dist/cli/mcp/workspace-tools.js +47 -2
  50. package/dist/cli/parse-args.d.ts.map +1 -1
  51. package/dist/cli/parse-args.js +64 -17
  52. package/dist/cli/registry.d.ts +22 -0
  53. package/dist/cli/registry.d.ts.map +1 -1
  54. package/dist/components/cli-support.d.ts +2 -0
  55. package/dist/components/cli-support.d.ts.map +1 -1
  56. package/dist/components/cli-support.js +4 -2
  57. package/dist/components/fan-out-support.d.ts +3 -0
  58. package/dist/components/fan-out-support.d.ts.map +1 -1
  59. package/dist/components/fan-out-support.js +1 -1
  60. package/dist/components/pr-env-ports.d.ts +29 -0
  61. package/dist/components/pr-env-ports.d.ts.map +1 -0
  62. package/dist/components/pr-env-ports.js +77 -0
  63. package/dist/components/pr-env-run.d.ts +254 -0
  64. package/dist/components/pr-env-run.d.ts.map +1 -0
  65. package/dist/components/pr-env-run.js +376 -0
  66. package/dist/components/pr-environment.d.ts +91 -15
  67. package/dist/components/pr-environment.d.ts.map +1 -1
  68. package/dist/components/pr-environment.js +95 -9
  69. package/dist/components/pr-pipeline.d.ts +10 -1
  70. package/dist/components/pr-pipeline.d.ts.map +1 -1
  71. package/dist/config-environments.d.ts +92 -0
  72. package/dist/config-environments.d.ts.map +1 -0
  73. package/dist/config-environments.js +102 -0
  74. package/dist/config.d.ts +24 -84
  75. package/dist/config.d.ts.map +1 -1
  76. package/dist/config.js +9 -96
  77. package/dist/graph-detail.d.ts.map +1 -1
  78. package/dist/graph-detail.js +15 -3
  79. package/dist/graph-effective.d.ts +33 -2
  80. package/dist/graph-effective.d.ts.map +1 -1
  81. package/dist/graph-effective.js +215 -68
  82. package/dist/graph-ir.d.ts +23 -0
  83. package/dist/graph-ir.d.ts.map +1 -1
  84. package/dist/graph-ir.js +130 -0
  85. package/dist/graph-sub-template.d.ts +11 -0
  86. package/dist/graph-sub-template.d.ts.map +1 -0
  87. package/dist/graph-sub-template.js +19 -0
  88. package/dist/lexicon.d.ts +9 -0
  89. package/dist/lexicon.d.ts.map +1 -1
  90. package/dist/lifecycle/observe.d.ts +28 -0
  91. package/dist/lifecycle/observe.d.ts.map +1 -1
  92. package/dist/lifecycle/observe.js +23 -1
  93. package/dist/lint/rule.d.ts +6 -0
  94. package/dist/lint/rule.d.ts.map +1 -1
  95. package/dist/live-endpoint.d.ts +1 -1
  96. package/dist/live-endpoint.d.ts.map +1 -1
  97. package/dist/live-endpoint.js +1 -1
  98. package/dist/observation.d.ts +48 -1
  99. package/dist/observation.d.ts.map +1 -1
  100. package/dist/observation.js +21 -5
  101. package/dist/op/activities/activity-contracts.d.ts +4 -4
  102. package/dist/op/op-waves.d.ts +17 -0
  103. package/dist/op/op-waves.d.ts.map +1 -1
  104. package/dist/op/op-waves.js +23 -1
  105. package/dist/pr-forge.d.ts +15 -1
  106. package/dist/pr-forge.d.ts.map +1 -1
  107. package/dist/pr-forge.js +28 -16
  108. package/dist/pr-requires.d.ts +5 -1
  109. package/dist/pr-requires.d.ts.map +1 -1
  110. package/dist/wave-runtime.mjs +251 -250
  111. package/dist/workspace/capabilities-contract.d.ts +66 -0
  112. package/dist/workspace/capabilities-contract.d.ts.map +1 -0
  113. package/dist/workspace/capabilities-contract.js +107 -0
  114. package/dist/workspace/capabilities.schema.json +229 -0
  115. package/dist/workspace/ci-cloud-identity.d.ts +3 -1
  116. package/dist/workspace/ci-cloud-identity.d.ts.map +1 -1
  117. package/dist/workspace/ci-cloud-identity.js +16 -1
  118. package/dist/workspace/ci-run.d.ts +35 -8
  119. package/dist/workspace/ci-run.d.ts.map +1 -1
  120. package/dist/workspace/ci-run.js +95 -21
  121. package/dist/workspace/ci-secrets.d.ts.map +1 -1
  122. package/dist/workspace/ci-secrets.js +4 -3
  123. package/dist/workspace/compose-graph.d.ts +9 -0
  124. package/dist/workspace/compose-graph.d.ts.map +1 -1
  125. package/dist/workspace/compose-graph.js +3 -1
  126. package/dist/workspace/conformance/index.d.ts +1 -1
  127. package/dist/workspace/conformance/index.d.ts.map +1 -1
  128. package/dist/workspace/conformance/index.js +39 -2
  129. package/dist/workspace/declaration.d.ts +10 -0
  130. package/dist/workspace/declaration.d.ts.map +1 -1
  131. package/dist/workspace/declaration.js +17 -1
  132. package/dist/workspace/declaration.schema.json +36 -1
  133. package/dist/workspace/graph-cache.d.ts +8 -0
  134. package/dist/workspace/graph-cache.d.ts.map +1 -1
  135. package/dist/workspace/graph-cache.js +27 -3
  136. package/dist/workspace/graph-cli.d.ts +39 -2
  137. package/dist/workspace/graph-cli.d.ts.map +1 -1
  138. package/dist/workspace/graph-cli.js +66 -24
  139. package/dist/workspace/graph.schema.json +148 -0
  140. package/dist/workspace/kind-readers.d.ts +3 -0
  141. package/dist/workspace/kind-readers.d.ts.map +1 -1
  142. package/dist/workspace/kind-readers.js +7 -1
  143. package/dist/workspace/member-commands.d.ts +10 -1
  144. package/dist/workspace/member-commands.d.ts.map +1 -1
  145. package/dist/workspace/member-commands.js +17 -1
  146. package/dist/workspace/nested-graph.d.ts +2 -0
  147. package/dist/workspace/nested-graph.d.ts.map +1 -1
  148. package/dist/workspace/nested-graph.js +32 -1
  149. package/dist/workspace/reason-codes.d.ts +10 -0
  150. package/dist/workspace/reason-codes.d.ts.map +1 -1
  151. package/dist/workspace/reason-codes.js +12 -0
  152. package/dist/workspace/search-cli.d.ts +204 -0
  153. package/dist/workspace/search-cli.d.ts.map +1 -0
  154. package/dist/workspace/search-cli.js +466 -0
  155. package/dist/workspace/search-contract.d.ts +56 -0
  156. package/dist/workspace/search-contract.d.ts.map +1 -0
  157. package/dist/workspace/search-contract.js +70 -0
  158. package/dist/workspace/search.schema.json +822 -0
  159. package/package.json +1 -1
  160. package/src/__snapshots__/okf.test.ts.snap +10 -0
  161. package/src/capabilities/aws.paths +148 -0
  162. package/src/capabilities/base-mappings.json +122 -0
  163. package/src/capabilities/catalog.ts +230 -0
  164. package/src/capabilities/language.test.ts +191 -0
  165. package/src/capabilities/language.ts +373 -0
  166. package/src/capabilities/matcher.ts +315 -0
  167. package/src/capabilities/view-compose.test.ts +76 -0
  168. package/src/capabilities/view.ts +631 -0
  169. package/src/ci-identity-targets.test.ts +275 -0
  170. package/src/ci-identity.ts +394 -61
  171. package/src/cli/commands/lint.ts +1 -0
  172. package/src/cli/handlers/build.ts +15 -1
  173. package/src/cli/handlers/declared-graph.ts +99 -0
  174. package/src/cli/handlers/graph.test.ts +94 -3
  175. package/src/cli/handlers/graph.ts +123 -96
  176. package/src/cli/handlers/pr-env.ts +135 -227
  177. package/src/cli/handlers/pr.ts +4 -0
  178. package/src/cli/handlers/search-build-roots.test.ts +144 -0
  179. package/src/cli/handlers/search-count.test.ts +191 -0
  180. package/src/cli/handlers/search-count.ts +165 -0
  181. package/src/cli/handlers/search-json.test.ts +333 -0
  182. package/src/cli/handlers/search-live.test.ts +387 -0
  183. package/src/cli/handlers/search-paths.test.ts +235 -0
  184. package/src/cli/handlers/search.ts +1312 -166
  185. package/src/cli/main.test.ts +28 -3
  186. package/src/cli/main.ts +23 -3
  187. package/src/cli/mcp/server.test.ts +3 -3
  188. package/src/cli/mcp/server.ts +3 -0
  189. package/src/cli/mcp/tools/capabilities.ts +32 -0
  190. package/src/cli/mcp/workspace-tools.e2e.test.ts +21 -1
  191. package/src/cli/mcp/workspace-tools.ts +47 -2
  192. package/src/cli/parse-args.ts +52 -13
  193. package/src/cli/registry.ts +22 -0
  194. package/src/components/cli-support.ts +6 -1
  195. package/src/components/fan-out-support.ts +4 -1
  196. package/src/components/pr-env-ports.ts +89 -0
  197. package/src/components/pr-env-run-bundle.test.ts +54 -0
  198. package/src/components/pr-env-run.test.ts +290 -0
  199. package/src/components/pr-env-run.ts +563 -0
  200. package/src/components/pr-environment.ts +161 -13
  201. package/src/components/pr-pipeline.ts +10 -1
  202. package/src/config-environments.ts +133 -0
  203. package/src/config.ts +37 -124
  204. package/src/graph-detail.ts +15 -3
  205. package/src/graph-effective.ts +226 -75
  206. package/src/graph-ir.test.ts +163 -0
  207. package/src/graph-ir.ts +147 -0
  208. package/src/graph-sub-template.ts +22 -0
  209. package/src/lexicon.ts +10 -0
  210. package/src/lifecycle/observe.test.ts +27 -1
  211. package/src/lifecycle/observe.ts +43 -1
  212. package/src/lint/rule.ts +6 -0
  213. package/src/live-endpoint.ts +1 -1
  214. package/src/observation.test.ts +25 -0
  215. package/src/observation.ts +69 -5
  216. package/src/op/op-waves.ts +38 -1
  217. package/src/pr-forge-bundle.test.ts +1 -1
  218. package/src/pr-forge.ts +44 -17
  219. package/src/pr-requires.test.ts +43 -6
  220. package/src/pr-requires.ts +5 -1
  221. package/src/workspace/capabilities-contract.test.ts +88 -0
  222. package/src/workspace/capabilities-contract.ts +132 -0
  223. package/src/workspace/capabilities.schema.json +229 -0
  224. package/src/workspace/ci-cloud-identity.test.ts +20 -0
  225. package/src/workspace/ci-cloud-identity.ts +14 -1
  226. package/src/workspace/ci-run.test.ts +74 -1
  227. package/src/workspace/ci-run.ts +122 -29
  228. package/src/workspace/ci-secrets.test.ts +1 -1
  229. package/src/workspace/ci-secrets.ts +4 -3
  230. package/src/workspace/compose-graph.ts +10 -1
  231. package/src/workspace/conformance/conformance.e2e.test.ts +14 -1
  232. package/src/workspace/conformance/index.ts +31 -2
  233. package/src/workspace/declaration.schema.json +36 -1
  234. package/src/workspace/declaration.test.ts +7 -0
  235. package/src/workspace/declaration.ts +24 -2
  236. package/src/workspace/graph-cache.ts +27 -3
  237. package/src/workspace/graph-cli.ts +96 -24
  238. package/src/workspace/graph.schema.json +148 -0
  239. package/src/workspace/kind-readers.e2e.test.ts +28 -0
  240. package/src/workspace/kind-readers.test.ts +1 -1
  241. package/src/workspace/kind-readers.ts +7 -1
  242. package/src/workspace/member-commands.ts +22 -1
  243. package/src/workspace/nested-graph.ts +32 -1
  244. package/src/workspace/reason-codes.test.ts +7 -0
  245. package/src/workspace/reason-codes.ts +12 -0
  246. package/src/workspace/search-cli.e2e.test.ts +305 -0
  247. package/src/workspace/search-cli.ts +591 -0
  248. package/src/workspace/search-contract.ts +95 -0
  249. package/src/workspace/search.schema.json +822 -0
@@ -0,0 +1,376 @@
1
+ /**
2
+ * Running a pull request's environment (#4330): `up`, `down` and `sweep` as
3
+ * functions over an adapter, so a product that plans and applies with a tool
4
+ * chant does not run (terragucci, with Terraform roots under suffixed state
5
+ * keys) keeps its own plan, apply and teardown and takes the rest from chant:
6
+ *
7
+ * - the gate: a non-empty plan applies only once a person's approval of its
8
+ * digest stands under gate `pr-env` (ws-080, ws-104), and an empty one
9
+ * applies at once;
10
+ * - the records on chant/lifecycle (`_pr-envs/records.jsonl`), the TTL and
11
+ * which environments stand ({@link livePrEnvironments});
12
+ * - the ownership check on teardown ({@link teardownRefusal}), and the
13
+ * marker check on every candidate before anything is deleted
14
+ * ({@link tearDownPrEnvironment});
15
+ * - the sweep over expired and closed pull requests;
16
+ * - the report and the note ({@link renderPrEnvNote}).
17
+ *
18
+ * `chant components pr-env` (../cli/handlers/pr-env.ts) runs these with the
19
+ * components adapter and the lexicons' teardown, and the ports over
20
+ * chant/lifecycle and the gate ledger in ./pr-env-ports.ts
21
+ * (`lifecyclePrEnvPorts`). Those ports load the gate and its schema checks,
22
+ * so they live apart: a product that brings its own ports bundles this
23
+ * module without them (pr-env-run-bundle.test.ts).
24
+ */
25
+ import { spawnSync } from "node:child_process";
26
+ import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
27
+ import { tmpdir } from "node:os";
28
+ import { join } from "node:path";
29
+ import { withoutForgeTokens } from "../ci-handover.js";
30
+ import { PR_ENV_EXIT, PR_ENV_GATE, expired, livePrEnvironments, prEnvironmentName, teardownComplete, teardownCounts, tearDownPrEnvironment, ttlMs, } from "./pr-environment.js";
31
+ /** The op a pull request's gate is recorded under, as `prOp` in ../pr-loop.ts names it. */
32
+ export function prEnvOp(pr, member) {
33
+ return member ? `pr-${pr}-${member}` : `pr-${pr}`;
34
+ }
35
+ /** The approve command an adapter's caller prints, the same the note shows. */
36
+ export { prEnvApproveCommand } from "./pr-environment.js";
37
+ const ttlOf = (ttl) => (ttl ? ttlMs(ttl) : undefined) ?? ttlMs("72h");
38
+ /**
39
+ * Plan pull request `pr`'s environment through the adapter and apply it once
40
+ * the plan is empty or an approval of its digest stands under gate `pr-env`.
41
+ * An apply that failed part way is kept as live too, so what applied is torn
42
+ * down with the rest.
43
+ */
44
+ export async function prEnvUp(input) {
45
+ const { pr, ports } = input;
46
+ const env = prEnvironmentName(pr);
47
+ const target = {
48
+ pr,
49
+ env,
50
+ template: input.template,
51
+ marker: { stack: input.stack, env },
52
+ head: input.head,
53
+ ...(input.member ? { member: input.member } : {}),
54
+ op: prEnvOp(pr, input.member),
55
+ ...(input.endpoint ? { endpoint: input.endpoint } : {}),
56
+ };
57
+ const base = {
58
+ stage: "up",
59
+ pr,
60
+ env,
61
+ ...(input.member ? { member: input.member } : {}),
62
+ template: input.template,
63
+ head: input.head,
64
+ op: target.op,
65
+ gate: PR_ENV_GATE,
66
+ digest: "",
67
+ status: "nothing",
68
+ ...(input.endpoint ? { endpoint: input.endpoint } : {}),
69
+ components: [],
70
+ };
71
+ const settle = async (report, exit, record) => {
72
+ await ports.publish?.(report);
73
+ return { exit, report, ...(record ? { record } : {}) };
74
+ };
75
+ let planned;
76
+ try {
77
+ planned = await input.adapter.plan(target);
78
+ }
79
+ catch (err) {
80
+ return settle({ ...base, status: "plan-failed", message: messageOf(err) }, PR_ENV_EXIT.failed);
81
+ }
82
+ if (planned.rows.length === 0) {
83
+ ports.log?.(`pr-env up: nothing this change touches is deployed, so ${env} gets nothing`);
84
+ return settle({ ...base, ...(planned.message ? { message: planned.message } : {}) }, PR_ENV_EXIT.done);
85
+ }
86
+ const digest = planned.digest;
87
+ if (planned.failed) {
88
+ return settle({ ...base, digest, status: "plan-failed", ...(planned.message ? { message: planned.message } : {}), components: planned.rows }, PR_ENV_EXIT.failed);
89
+ }
90
+ // ws-080, ws-104: a non-empty plan applies only under a person's approval of its digest. An empty one passes.
91
+ let approvedBy;
92
+ if (!planned.empty) {
93
+ let approval;
94
+ try {
95
+ approval = await ports.decideGate({ op: target.op, gate: PR_ENV_GATE, digest, description: `${env}: ${planned.rows.map((r) => r.component).join(", ")}` });
96
+ }
97
+ catch (err) {
98
+ return settle({ ...base, digest, status: "failed", message: `could not read the gate ledger, so ${env} does not apply: ${messageOf(err)}`, components: planned.rows }, PR_ENV_EXIT.failed);
99
+ }
100
+ if (approval.status !== "approved") {
101
+ ports.log?.(`pr-env up: ${env} waits for an approval of ${digest}`);
102
+ return settle({ ...base, digest, status: approval.status === "changed" ? "changed" : "waiting", components: planned.rows }, PR_ENV_EXIT.waiting);
103
+ }
104
+ approvedBy = approval.approvedBy ?? [];
105
+ }
106
+ let applied;
107
+ try {
108
+ applied = await input.adapter.apply(target, { planned, ...(approvedBy ? { approvedBy } : {}) });
109
+ }
110
+ catch (err) {
111
+ applied = { status: "failed", rows: planned.rows, message: messageOf(err) };
112
+ }
113
+ if (applied.status === "stopped") {
114
+ return settle({ ...base, digest, status: "failed", components: applied.rows, ...(approvedBy ? { approvedBy } : {}), ...(applied.message ? { message: applied.message } : {}) }, PR_ENV_EXIT.failed);
115
+ }
116
+ const ok = applied.status === "applied";
117
+ const now = (input.now ?? (() => new Date()))();
118
+ const expiresAt = new Date(now.getTime() + ttlOf(input.ttl)).toISOString();
119
+ const record = {
120
+ version: 1,
121
+ kind: "up",
122
+ pr,
123
+ env,
124
+ ...(input.member ? { member: input.member } : {}),
125
+ template: input.template,
126
+ marker: { ...target.marker },
127
+ commit: input.head,
128
+ components: planned.rows.map((r) => r.component),
129
+ ...(applied.locations && Object.keys(applied.locations).length > 0 ? { locations: { ...applied.locations } } : {}),
130
+ planDigest: digest,
131
+ result: ok ? "applied" : "failed",
132
+ by: input.actor ?? "chant",
133
+ timestamp: now.toISOString(),
134
+ expiresAt,
135
+ ...(approvedBy ? { approvedBy } : {}),
136
+ releaseTarget: false,
137
+ ...(input.runUrl ? { runUrl: input.runUrl } : {}),
138
+ };
139
+ // A copy that failed part way is live too: what applied is torn down on close or at expiry like the rest.
140
+ await ports.appendRecord(record);
141
+ const message = ok
142
+ ? applied.afterFailure ?? applied.message
143
+ : applied.message ?? (applied.status === "waiting" ? "A component read an upstream output that moved when it applied; run the job again to plan it against the new value." : "A component failed to apply; what applied stays in the environment and is torn down with it.");
144
+ ports.log?.(`pr-env up: ${env} ${ok ? "applied" : applied.status}; it expires ${expiresAt}`);
145
+ return settle({ ...base, digest, status: ok ? "applied" : "failed", components: applied.rows, ...(approvedBy ? { approvedBy } : {}), expiresAt, ...(message ? { message } : {}) }, ok && !applied.afterFailure ? PR_ENV_EXIT.done : PR_ENV_EXIT.failed, record);
146
+ }
147
+ /**
148
+ * Tear down pull request `pr`'s environment: the ownership check first, then
149
+ * only what carries `{ stack, env: "pr-<n>" }`, through the lexicons and the
150
+ * adapters. No gate holds it: closing the pull request, or the TTL the base
151
+ * set, is the decision. A teardown that left something keeps the
152
+ * environment live for the next sweep.
153
+ */
154
+ export async function prEnvDown(input) {
155
+ const { pr, ports, reason } = input;
156
+ const env = prEnvironmentName(pr);
157
+ const live = input.live ?? livePrEnvironments(await ports.readRecords()).get(env);
158
+ const report = { stage: "down", pr, env, ...(input.member ? { member: input.member } : {}), template: live?.template ?? "", head: "", op: prEnvOp(pr, input.member), gate: PR_ENV_GATE, digest: "", status: "absent", components: [] };
159
+ if (!live) {
160
+ ports.log?.(`pr-env down: ${env} has no live record, so there is nothing to tear down`);
161
+ await ports.publish?.(report);
162
+ return { exit: PR_ENV_EXIT.done, report };
163
+ }
164
+ const torn = await tearDownPrEnvironment({ pr, live, ...(input.config ? { config: input.config } : {}), ...(input.plugins ? { plugins: input.plugins } : {}), ...(input.adapters ? { adapters: input.adapters } : {}), ...(ports.warn ? { warn: ports.warn } : {}) });
165
+ if ("refusal" in torn) {
166
+ const refused = { ...report, template: live.template, status: "refused", message: torn.refusal };
167
+ await ports.publish?.(refused);
168
+ return { exit: PR_ENV_EXIT.failed, report: refused };
169
+ }
170
+ const { report: result, dropped, marker } = torn;
171
+ const counts = teardownCounts(result);
172
+ const complete = teardownComplete(result);
173
+ const now = (input.now ?? (() => new Date()))();
174
+ const record = {
175
+ version: 1,
176
+ kind: "down",
177
+ pr,
178
+ env,
179
+ ...(live.member ? { member: live.member } : {}),
180
+ template: live.template,
181
+ marker,
182
+ commit: input.commit,
183
+ components: [...new Set(result.outcomes.map((o) => o.lexicon))].sort(),
184
+ planDigest: "",
185
+ result: complete ? "destroyed" : "incomplete",
186
+ by: input.actor ?? "chant",
187
+ timestamp: now.toISOString(),
188
+ reason,
189
+ outcomes: counts,
190
+ releaseTarget: false,
191
+ ...(input.runUrl ? { runUrl: input.runUrl } : {}),
192
+ };
193
+ await ports.appendRecord(record);
194
+ const why = [];
195
+ if (dropped > 0)
196
+ why.push(`${dropped} candidate${dropped === 1 ? "" : "s"} whose marker was not ${marker.stack}/${env} left alone`);
197
+ if (result.unimplemented.length > 0)
198
+ why.push(`no teardown execution in ${result.unimplemented.join(", ")}`);
199
+ if (result.plan.holes.length > 0)
200
+ why.push(`${result.plan.holes.length} part${result.plan.holes.length === 1 ? "" : "s"} could not be read`);
201
+ for (const o of result.outcomes.filter((x) => x.outcome === "failed"))
202
+ why.push(`${o.lexicon} ${o.name}: ${o.detail ?? "failed"}`);
203
+ const done = { ...report, template: live.template, status: complete ? "destroyed" : "incomplete", outcomes: counts, ...(why.length > 0 ? { message: why.join("; ") } : {}) };
204
+ ports.log?.(`pr-env down: ${env} ${complete ? "torn down" : "not wholly torn down; it stays live and the sweep tries again"} (${counts.deleted} deleted, ${counts.failed} failed, ${counts.skipped} skipped)`);
205
+ await ports.publish?.(done);
206
+ return { exit: complete ? PR_ENV_EXIT.done : PR_ENV_EXIT.failed, report: done, record };
207
+ }
208
+ /**
209
+ * Tear down each live environment whose TTL passed, or whose pull request
210
+ * the forge says is closed or merged. A state that cannot be read leaves the
211
+ * TTL to decide. Exits 1 when any teardown did not finish.
212
+ */
213
+ export async function prEnvSweep(input) {
214
+ const { ports } = input;
215
+ const live = [...livePrEnvironments(await ports.readRecords()).values()].filter((e) => input.member === undefined || e.member === input.member);
216
+ if (live.length === 0) {
217
+ ports.log?.("pr-env sweep: no pull request environment is live");
218
+ return { exit: PR_ENV_EXIT.done, results: [] };
219
+ }
220
+ const now = (input.now ?? (() => new Date()))();
221
+ let exit = PR_ENV_EXIT.done;
222
+ const results = [];
223
+ for (const e of live) {
224
+ let reason = expired(e, now) ? "expired" : undefined;
225
+ if (!reason && ports.pullRequestState) {
226
+ try {
227
+ if ((await ports.pullRequestState(e.pr)) !== "open")
228
+ reason = "closed";
229
+ }
230
+ catch (err) {
231
+ ports.warn?.(`could not read whether #${e.pr} is open (${messageOf(err)}); its TTL still holds`);
232
+ }
233
+ }
234
+ if (!reason) {
235
+ ports.log?.(`pr-env sweep: ${e.env} stays; it expires ${e.expiresAt}`);
236
+ continue;
237
+ }
238
+ const r = await prEnvDown({ ...input, pr: e.pr, reason, live: e, ...(e.member ? { member: e.member } : {}) });
239
+ results.push(r);
240
+ if (r.exit !== PR_ENV_EXIT.done)
241
+ exit = PR_ENV_EXIT.failed;
242
+ }
243
+ return { exit, results };
244
+ }
245
+ /** The variables a teardown command reads. */
246
+ export const PR_ENV_TEARDOWN_ENV = {
247
+ /** `owned` or `teardown`. */
248
+ stage: "CHANT_PR_ENV_STAGE",
249
+ /** `pr-<n>`. */
250
+ env: "CHANT_PR_ENV",
251
+ pr: "CHANT_PR_NUMBER",
252
+ stack: "CHANT_PR_ENV_STACK",
253
+ template: "CHANT_PR_ENV_TEMPLATE",
254
+ /** The commit last applied to the environment. */
255
+ commit: "CHANT_PR_ENV_COMMIT",
256
+ /** A JSON file: `{ components, locations }` from the records. */
257
+ live: "CHANT_PR_ENV_LIVE",
258
+ /** `teardown` only: a JSON file holding the candidates to delete. */
259
+ candidates: "CHANT_PR_ENV_CANDIDATES",
260
+ /** The JSON file the command writes its answer to. */
261
+ result: "CHANT_PR_ENV_RESULT",
262
+ };
263
+ const spawnTeardown = (argv, cwd, env) => {
264
+ const r = spawnSync(argv[0], argv.slice(1), { cwd, env, stdio: ["ignore", "inherit", "inherit"] });
265
+ if (r.error)
266
+ throw r.error;
267
+ return r.status ?? 1;
268
+ };
269
+ const MARKER_OK = (m) => typeof m === "object" && m !== null && typeof m.stack === "string" && typeof m.env === "string";
270
+ /** The candidates and holes a teardown command wrote, checked as data. Throws when they do not read. */
271
+ export function readTeardownEnumeration(raw) {
272
+ const doc = raw;
273
+ if (typeof doc !== "object" || doc === null || !Array.isArray(doc.candidates))
274
+ throw new Error("the teardown command's owned stage wrote no { candidates: [...] }");
275
+ const candidates = [];
276
+ for (const c of doc.candidates) {
277
+ if (typeof c?.name !== "string" || typeof c.type !== "string" || !MARKER_OK(c.marker))
278
+ throw new Error("each candidate needs a name, a type and the marker { stack, env } read back from it");
279
+ candidates.push({ name: c.name, type: c.type, ...(typeof c.physicalId === "string" ? { physicalId: c.physicalId } : {}), marker: { stack: c.marker.stack, env: c.marker.env } });
280
+ }
281
+ const holes = [];
282
+ for (const h of Array.isArray(doc.holes) ? doc.holes : []) {
283
+ if (typeof h?.name !== "string")
284
+ continue;
285
+ holes.push({ name: h.name, reason: "read-failed", ...(typeof h.type === "string" ? { type: h.type } : {}), ...(typeof h.detail === "string" ? { detail: h.detail } : {}) });
286
+ }
287
+ return { candidates, holes };
288
+ }
289
+ /** The outcomes a teardown command wrote, checked as data. A candidate it leaves out counts as failed in core. */
290
+ export function readTeardownOutcomes(raw) {
291
+ const doc = raw;
292
+ if (typeof doc !== "object" || doc === null || !Array.isArray(doc.outcomes))
293
+ throw new Error("the teardown command's teardown stage wrote no { outcomes: [...] }");
294
+ const kinds = new Set(["deleted", "failed", "not-prunable", "retained"]);
295
+ return doc.outcomes
296
+ .filter((o) => typeof o?.name === "string" && typeof o.outcome === "string" && kinds.has(o.outcome))
297
+ .map((o) => ({ name: o.name, outcome: o.outcome, ...(typeof o.detail === "string" ? { detail: o.detail } : {}) }));
298
+ }
299
+ /**
300
+ * `ci.prEnvironment.teardown` as an adapter (#4330). chant runs the command
301
+ * twice, in `cwd`, with the job's environment less every forge token
302
+ * variable, and these besides ({@link PR_ENV_TEARDOWN_ENV}):
303
+ *
304
+ * - `CHANT_PR_ENV_STAGE=owned`: the command writes `{ candidates, holes }`
305
+ * to `CHANT_PR_ENV_RESULT`, each candidate with the marker it read back.
306
+ * - `CHANT_PR_ENV_STAGE=teardown`: it deletes the candidates in
307
+ * `CHANT_PR_ENV_CANDIDATES`, which chant has checked against the marker,
308
+ * and writes `{ outcomes }` to `CHANT_PR_ENV_RESULT`.
309
+ *
310
+ * A non-zero exit, or an answer that does not read, is a hole (`owned`) or a
311
+ * failure for every candidate (`teardown`), so the environment stays live.
312
+ */
313
+ export function commandTeardownAdapter(hook, opts) {
314
+ const exec = opts.exec ?? spawnTeardown;
315
+ const name = hook.name ?? "teardown";
316
+ const run = (stage, input, candidates) => {
317
+ const dir = mkdtempSync(join(tmpdir(), "chant-pr-env-teardown-"));
318
+ try {
319
+ const result = join(dir, "result.json");
320
+ const liveFile = join(dir, "live.json");
321
+ writeFileSync(liveFile, JSON.stringify({ components: input.live.components, locations: input.live.locations ?? {} }));
322
+ const extra = {
323
+ [PR_ENV_TEARDOWN_ENV.stage]: stage,
324
+ [PR_ENV_TEARDOWN_ENV.env]: input.environment,
325
+ [PR_ENV_TEARDOWN_ENV.pr]: String(input.live.pr),
326
+ [PR_ENV_TEARDOWN_ENV.stack]: input.marker.stack,
327
+ [PR_ENV_TEARDOWN_ENV.template]: input.live.template,
328
+ [PR_ENV_TEARDOWN_ENV.commit]: input.live.commit,
329
+ [PR_ENV_TEARDOWN_ENV.live]: liveFile,
330
+ [PR_ENV_TEARDOWN_ENV.result]: result,
331
+ };
332
+ if (candidates) {
333
+ const file = join(dir, "candidates.json");
334
+ writeFileSync(file, JSON.stringify(candidates));
335
+ extra[PR_ENV_TEARDOWN_ENV.candidates] = file;
336
+ }
337
+ const base = {};
338
+ for (const [k, v] of Object.entries(withoutForgeTokens(opts.env ?? process.env)))
339
+ if (v !== undefined)
340
+ base[k] = v;
341
+ const argv = hook.command.map((a) => a.split("{env}").join(input.environment).split("{pr}").join(String(input.live.pr)).split("{stage}").join(stage));
342
+ const code = exec(argv, opts.cwd, { ...base, ...extra });
343
+ if (code !== 0)
344
+ throw new Error(`${argv.join(" ")} exited ${code} in its ${stage} stage`);
345
+ let text;
346
+ try {
347
+ text = readFileSync(result, "utf-8");
348
+ }
349
+ catch {
350
+ throw new Error(`${argv.join(" ")} wrote nothing to ${PR_ENV_TEARDOWN_ENV.result} in its ${stage} stage`);
351
+ }
352
+ return JSON.parse(text);
353
+ }
354
+ finally {
355
+ rmSync(dir, { recursive: true, force: true });
356
+ }
357
+ };
358
+ return {
359
+ name,
360
+ ...(hook.lexicons ? { lexicons: [...hook.lexicons] } : {}),
361
+ async owned(input) {
362
+ return readTeardownEnumeration(run("owned", input));
363
+ },
364
+ async teardown(input) {
365
+ try {
366
+ return { outcomes: readTeardownOutcomes(run("teardown", input, input.candidates)) };
367
+ }
368
+ catch (err) {
369
+ return { outcomes: input.candidates.map((c) => ({ name: c.name, outcome: "failed", detail: messageOf(err) })) };
370
+ }
371
+ },
372
+ };
373
+ }
374
+ function messageOf(err) {
375
+ return err instanceof Error ? err.message : String(err);
376
+ }
@@ -32,12 +32,18 @@
32
32
  *
33
33
  * terragucci's `ephemeral.ts` gives each copy a suffixed Terraform state key.
34
34
  * That part is Terraform's own and stays there; chant keys ownership on the
35
- * marker its lexicons stamp and read back (`../lifecycle/teardown.ts`).
35
+ * marker its lexicons stamp and read back (`../lifecycle/teardown.ts`). A
36
+ * product supplies the rest as adapters (#4330): its plan and apply
37
+ * (`./pr-env-run.ts`), and a teardown for what no lexicon tears down
38
+ * ({@link PrEnvTeardownAdapter}), which reads the marker back from the copy
39
+ * as a lexicon does.
36
40
  */
37
- import { type ChantConfig, type EnvironmentDeclaration } from "../config.js";
41
+ import type { ChantConfig } from "../config.js";
42
+ import { type EnvironmentDeclaration } from "../config-environments.js";
38
43
  import type { OwnershipMarker } from "../ownership.js";
39
44
  import { type TeardownPlan, type TeardownPlanEntry, type TeardownReport } from "../lifecycle/teardown.js";
40
- import type { ObservationLexicon } from "../lexicon.js";
45
+ import type { ObservationLexicon, TeardownCandidate, TeardownEnumeration, TeardownExecution } from "../lexicon.js";
46
+ import type { ComponentEnvironmentDeclaration } from "./component.js";
41
47
  /** The gate a pull request's environment waits on, under the pull request's op `pr-<n>`. */
42
48
  export declare const PR_ENV_GATE = "pr-env";
43
49
  /** Where the records live on chant/lifecycle, under the member's ledger prefix. */
@@ -97,6 +103,18 @@ export type PrEnvDerivation = {
97
103
  * would not take the name, or does not declare the template.
98
104
  */
99
105
  export declare function derivePrEnvironment(config: ChantConfig, template: string, pr: number): PrEnvDerivation;
106
+ /** The placeholder a template's site URL or domain names the environment with (#4330). */
107
+ export declare const PR_ENV_SITE_PLACEHOLDER = "{env}";
108
+ /**
109
+ * A component's site in `env`, a pull request's environment, carried over
110
+ * from its site in `template` (#4330). An entry the component declares for
111
+ * `env` itself wins. Otherwise the template's runtime and lifecycle remote
112
+ * carry over as they are. Its URL and domain carry over only when they name
113
+ * the environment with `{env}`, which becomes `pr-<n>`: a literal URL or
114
+ * domain is the template's own release, so it is left out rather than
115
+ * pointing pr-<n> at it. Undefined when neither is declared.
116
+ */
117
+ export declare function prEnvironmentSite(declared: readonly ComponentEnvironmentDeclaration[] | undefined, template: string, env: string): ComponentEnvironmentDeclaration | undefined;
100
118
  /** One line of `_pr-envs/records.jsonl`: an apply, or a teardown. */
101
119
  export interface PrEnvRecord {
102
120
  version: 1;
@@ -117,6 +135,12 @@ export interface PrEnvRecord {
117
135
  commit: string;
118
136
  /** The components applied (up) or the lexicons torn down (down). */
119
137
  components: string[];
138
+ /**
139
+ * Up (#4330): where each component's copy lives, by component, as the
140
+ * adapter that applied it says (a Terraform root's suffixed state key).
141
+ * A teardown adapter reads it back from the live environment.
142
+ */
143
+ locations?: Record<string, string>;
120
144
  /** The change-set digest applied; empty for a teardown. */
121
145
  planDigest: string;
122
146
  /** `incomplete`: a teardown that left something, so the environment stays live and the sweep tries again. */
@@ -157,6 +181,8 @@ export interface LivePrEnvironment {
157
181
  commit: string;
158
182
  /** Every component an apply of it ever touched. */
159
183
  components: string[];
184
+ /** Where each component's copy lives, merged over every up (#4330). */
185
+ locations?: Record<string, string>;
160
186
  applied: string;
161
187
  expiresAt: string;
162
188
  /** Its last teardown left something, so the sweep tries again. */
@@ -188,12 +214,51 @@ export declare function ownedEntries(plan: TeardownPlan, marker: OwnershipMarker
188
214
  plan: TeardownPlan;
189
215
  dropped: TeardownPlanEntry[];
190
216
  };
217
+ /**
218
+ * A teardown a product supplies for what no lexicon tears down (#4330), such
219
+ * as a Terraform root's copy under a suffixed state key: chant has no
220
+ * Terraform runner, so terragucci supplies this. It takes part in the same
221
+ * two halves a lexicon's teardown does (`../lifecycle/teardown.ts`): `owned`
222
+ * names what the environment owns, each with the marker read back from it,
223
+ * and `teardown` deletes the candidates chant hands back. Every candidate
224
+ * whose marker is not exactly `{ stack, env: "pr-<n>" }` is dropped before
225
+ * `teardown` sees it, and a candidate it says nothing about counts as failed.
226
+ */
227
+ export interface PrEnvTeardownAdapter {
228
+ /** The name outcomes are attributed to, as a lexicon's are. */
229
+ name: string;
230
+ /**
231
+ * The lexicons this adapter tears down in place of (`terraform`). Their own
232
+ * teardown is left out, so a lexicon with no teardown execution does not
233
+ * leave the environment incomplete when the adapter covers it.
234
+ */
235
+ lexicons?: string[];
236
+ /** What the environment owns: candidates with their read-back markers, and what could not be read. */
237
+ owned(input: PrEnvTeardownAdapterInput): Promise<TeardownEnumeration>;
238
+ /** Delete the candidates: one outcome per candidate, keyed by name. */
239
+ teardown(input: PrEnvTeardownAdapterInput & {
240
+ candidates: TeardownCandidate[];
241
+ }): Promise<TeardownExecution>;
242
+ }
243
+ /** What a {@link PrEnvTeardownAdapter} is told about the environment. */
244
+ export interface PrEnvTeardownAdapterInput {
245
+ /** `pr-<n>`. */
246
+ environment: string;
247
+ /** The marker everything is selected on. */
248
+ marker: OwnershipMarker;
249
+ /** The environment as its records say it stands: the commit last applied, its components and their locations. */
250
+ live: LivePrEnvironment;
251
+ }
191
252
  /** What {@link tearDownPrEnvironment} needs. */
192
253
  export interface PrEnvTeardownInput {
193
254
  pr: number;
194
255
  live: LivePrEnvironment;
195
- config: ChantConfig;
196
- plugins: ObservationLexicon[];
256
+ /** The project's config, for its environments and stacks. Absent: a product with no chant.config.ts, whose adapters do the teardown. */
257
+ config?: ChantConfig;
258
+ /** The lexicons whose teardown runs. Default none. */
259
+ plugins?: ObservationLexicon[];
260
+ /** Teardowns a product supplies (#4330), run after the lexicons'. */
261
+ adapters?: PrEnvTeardownAdapter[];
197
262
  warn?: (message: string) => void;
198
263
  }
199
264
  /**
@@ -201,8 +266,9 @@ export interface PrEnvTeardownInput {
201
266
  * before any read when {@link teardownRefusal} says so; otherwise the live
202
267
  * resources under the record's marker are planned, every entry whose marker
203
268
  * is not exactly `{ stack, env: "pr-<n>" }` is dropped ({@link ownedEntries}),
204
- * and only the rest go to each lexicon's teardown. The endpoint is the one
205
- * the environment was applied at: its own `pr-*` entry's, else the template's.
269
+ * and only the rest go to each lexicon's or adapter's teardown. The endpoint
270
+ * is the one the environment was applied at: its own `pr-*` entry's, else the
271
+ * template's. A lexicon an adapter covers (`lexicons`) is left out.
206
272
  */
207
273
  export declare function tearDownPrEnvironment(input: PrEnvTeardownInput): Promise<{
208
274
  refusal: string;
@@ -263,6 +329,23 @@ export declare function handedPrEnvReport(raw: unknown, check: {
263
329
  } | {
264
330
  refusal: string;
265
331
  };
332
+ /** One component's row in the report and the note. */
333
+ export interface PrEnvReportRow {
334
+ component: string;
335
+ status: string;
336
+ create: number;
337
+ update: number;
338
+ replace: number;
339
+ delete: number;
340
+ /** Where its copy lives, as the adapter says (#4330). */
341
+ location?: string;
342
+ /** Its site in pr-<n>: the runtime, URL and domain carried over from the template's (#4330, {@link prEnvironmentSite}). */
343
+ site?: {
344
+ runtime?: string;
345
+ url?: string;
346
+ domain?: string;
347
+ };
348
+ }
266
349
  /** What one `pr-env up` or `down` run came to, as `pr-env.json` holds it. */
267
350
  export interface PrEnvReport {
268
351
  stage: "up" | "down";
@@ -277,14 +360,7 @@ export interface PrEnvReport {
277
360
  status: "applied" | "nothing" | "waiting" | "changed" | "plan-failed" | "failed" | "refused" | "destroyed" | "incomplete" | "absent";
278
361
  message?: string;
279
362
  endpoint?: string;
280
- components: Array<{
281
- component: string;
282
- status: string;
283
- create: number;
284
- update: number;
285
- replace: number;
286
- delete: number;
287
- }>;
363
+ components: PrEnvReportRow[];
288
364
  approvedBy?: string[];
289
365
  expiresAt?: string;
290
366
  outcomes?: PrEnvRecord["outcomes"];
@@ -1 +1 @@
1
- {"version":3,"file":"pr-environment.d.ts","sourceRoot":"","sources":["../../src/components/pr-environment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAsI,KAAK,WAAW,EAAE,KAAK,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC9M,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAiC,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MA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