@intentius/chant 0.124.31 → 0.124.32

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 (321) hide show
  1. package/bin/chant +7 -2
  2. package/dist/cli/commands/check-lexicon-plugin.d.ts +7 -4
  3. package/dist/cli/commands/check-lexicon-plugin.d.ts.map +1 -1
  4. package/dist/cli/commands/check-lexicon-plugin.js +10 -7
  5. package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
  6. package/dist/cli/commands/check-lexicon.js +18 -12
  7. package/dist/cli/commands/import.d.ts +10 -0
  8. package/dist/cli/commands/import.d.ts.map +1 -1
  9. package/dist/cli/commands/import.js +37 -0
  10. package/dist/cli/commands/init-lexicon/templates/project.d.ts.map +1 -1
  11. package/dist/cli/commands/init-lexicon/templates/project.js +4 -3
  12. package/dist/cli/commands/onboard.d.ts.map +1 -1
  13. package/dist/cli/commands/onboard.js +8 -4
  14. package/dist/cli/commands/update.d.ts.map +1 -1
  15. package/dist/cli/commands/update.js +2 -1
  16. package/dist/cli/dependencies.d.ts +18 -0
  17. package/dist/cli/dependencies.d.ts.map +1 -0
  18. package/dist/cli/dependencies.js +120 -0
  19. package/dist/cli/handlers/build.d.ts.map +1 -1
  20. package/dist/cli/handlers/build.js +23 -4
  21. package/dist/cli/handlers/fan-out.d.ts.map +1 -1
  22. package/dist/cli/handlers/fan-out.js +12 -4
  23. package/dist/cli/handlers/graph.d.ts.map +1 -1
  24. package/dist/cli/handlers/graph.js +16 -6
  25. package/dist/cli/handlers/lint.d.ts.map +1 -1
  26. package/dist/cli/handlers/lint.js +6 -0
  27. package/dist/cli/handlers/operator.d.ts +2 -2
  28. package/dist/cli/handlers/operator.js +3 -3
  29. package/dist/cli/handlers/pr.d.ts +14 -0
  30. package/dist/cli/handlers/pr.d.ts.map +1 -1
  31. package/dist/cli/handlers/pr.js +488 -32
  32. package/dist/cli/handlers/promote.d.ts.map +1 -1
  33. package/dist/cli/handlers/promote.js +3 -1
  34. package/dist/cli/handlers/run.d.ts +13 -1
  35. package/dist/cli/handlers/run.d.ts.map +1 -1
  36. package/dist/cli/handlers/run.js +38 -15
  37. package/dist/cli/main.d.ts.map +1 -1
  38. package/dist/cli/main.js +44 -16
  39. package/dist/cli/parse-args.d.ts.map +1 -1
  40. package/dist/cli/parse-args.js +15 -0
  41. package/dist/cli/registry.d.ts +13 -4
  42. package/dist/cli/registry.d.ts.map +1 -1
  43. package/dist/cli/registry.js +6 -2
  44. package/dist/codegen/generate-post-synth-barrel.js +2 -2
  45. package/dist/codegen/lexicon-regen.d.ts +4 -0
  46. package/dist/codegen/lexicon-regen.d.ts.map +1 -1
  47. package/dist/codegen/lexicon-regen.js +1 -1
  48. package/dist/codegen/pinned-upgrade.js +2 -2
  49. package/dist/components/capability.d.ts +44 -3
  50. package/dist/components/capability.d.ts.map +1 -1
  51. package/dist/components/capability.js +21 -0
  52. package/dist/components/changed-files.d.ts +7 -1
  53. package/dist/components/changed-files.d.ts.map +1 -1
  54. package/dist/components/changed-files.js +9 -1
  55. package/dist/components/driver.d.ts +38 -0
  56. package/dist/components/driver.d.ts.map +1 -1
  57. package/dist/components/driver.js +47 -6
  58. package/dist/components/fan-out-record.d.ts +6 -1
  59. package/dist/components/fan-out-record.d.ts.map +1 -1
  60. package/dist/components/fan-out-record.js +24 -0
  61. package/dist/components/fan-out-run.d.ts +20 -0
  62. package/dist/components/fan-out-run.d.ts.map +1 -1
  63. package/dist/components/fan-out-run.js +21 -1
  64. package/dist/components/pr-pipeline.d.ts +65 -2
  65. package/dist/components/pr-pipeline.d.ts.map +1 -1
  66. package/dist/components/pr-pipeline.js +107 -15
  67. package/dist/components/pr-run.d.ts +127 -29
  68. package/dist/components/pr-run.d.ts.map +1 -1
  69. package/dist/components/pr-run.js +290 -70
  70. package/dist/components/wave-plan.d.ts +5 -2
  71. package/dist/components/wave-plan.d.ts.map +1 -1
  72. package/dist/components/wave-plan.js +12 -1
  73. package/dist/discovery/fold-import.d.ts.map +1 -1
  74. package/dist/discovery/fold-import.js +16 -6
  75. package/dist/discovery/sandbox/bundle.d.ts.map +1 -1
  76. package/dist/discovery/sandbox/bundle.js +6 -0
  77. package/dist/discovery/specifier-resolve.d.ts.map +1 -1
  78. package/dist/discovery/specifier-resolve.js +8 -2
  79. package/dist/fold/fold.d.ts.map +1 -1
  80. package/dist/fold/fold.js +68 -1
  81. package/dist/fold/subset.d.ts +37 -0
  82. package/dist/fold/subset.d.ts.map +1 -1
  83. package/dist/fold/subset.js +88 -0
  84. package/dist/lexicon-module.d.ts +10 -0
  85. package/dist/lexicon-module.d.ts.map +1 -1
  86. package/dist/lexicon-module.js +53 -8
  87. package/dist/lexicon-plugin-helpers.d.ts.map +1 -1
  88. package/dist/lexicon-plugin-helpers.js +6 -4
  89. package/dist/lexicon.d.ts +2 -0
  90. package/dist/lexicon.d.ts.map +1 -1
  91. package/dist/lifecycle/affected.d.ts.map +1 -1
  92. package/dist/lifecycle/affected.js +7 -1
  93. package/dist/lifecycle/release-ledger.d.ts +21 -0
  94. package/dist/lifecycle/release-ledger.d.ts.map +1 -1
  95. package/dist/lifecycle/release-ledger.js +24 -0
  96. package/dist/lifecycle/work-dir.d.ts +45 -0
  97. package/dist/lifecycle/work-dir.d.ts.map +1 -0
  98. package/dist/lifecycle/work-dir.js +78 -0
  99. package/dist/lint/discover.d.ts +17 -9
  100. package/dist/lint/discover.d.ts.map +1 -1
  101. package/dist/lint/discover.js +62 -54
  102. package/dist/module-source.d.ts +57 -0
  103. package/dist/module-source.d.ts.map +1 -0
  104. package/dist/module-source.js +104 -0
  105. package/dist/op/activities/factory.js +1 -1
  106. package/dist/op/discover.d.ts.map +1 -1
  107. package/dist/op/discover.js +13 -3
  108. package/dist/op/gate.d.ts.map +1 -1
  109. package/dist/op/gate.js +3 -0
  110. package/dist/op/op-waves-run.d.ts.map +1 -1
  111. package/dist/op/op-waves-run.js +20 -5
  112. package/dist/op/operator.d.ts +2 -2
  113. package/dist/op/operator.js +2 -2
  114. package/dist/op/steward.d.ts +6 -4
  115. package/dist/op/steward.d.ts.map +1 -1
  116. package/dist/op/steward.js +5 -3
  117. package/dist/op/work-lease-run.d.ts +20 -7
  118. package/dist/op/work-lease-run.d.ts.map +1 -1
  119. package/dist/op/work-lease-run.js +56 -12
  120. package/dist/pr-forge.d.ts +10 -0
  121. package/dist/pr-forge.d.ts.map +1 -1
  122. package/dist/pr-forge.js +39 -0
  123. package/dist/pr-loop.d.ts +141 -4
  124. package/dist/pr-loop.d.ts.map +1 -1
  125. package/dist/pr-loop.js +122 -6
  126. package/dist/pr-report-url.d.ts +2 -2
  127. package/dist/pr-report-url.d.ts.map +1 -1
  128. package/dist/pr-report-url.js +5 -5
  129. package/dist/ts-loader.d.ts +38 -4
  130. package/dist/ts-loader.d.ts.map +1 -1
  131. package/dist/ts-loader.js +190 -16
  132. package/dist/wave-runtime.mjs +208 -208
  133. package/dist/workspace/chant-migrations/fountain-retired-kinds.d.ts +34 -0
  134. package/dist/workspace/chant-migrations/fountain-retired-kinds.d.ts.map +1 -0
  135. package/dist/workspace/chant-migrations/fountain-retired-kinds.js +176 -0
  136. package/dist/workspace/chant-migrations.d.ts.map +1 -1
  137. package/dist/workspace/chant-migrations.js +2 -0
  138. package/dist/workspace/checks/boxes.d.ts +6 -6
  139. package/dist/workspace/checks/boxes.js +9 -9
  140. package/dist/workspace/ci-green-forge.d.ts +6 -4
  141. package/dist/workspace/ci-green-forge.d.ts.map +1 -1
  142. package/dist/workspace/ci-green.d.ts +28 -12
  143. package/dist/workspace/ci-green.d.ts.map +1 -1
  144. package/dist/workspace/ci-green.js +49 -21
  145. package/dist/workspace/ci-list.schema.json +12 -6
  146. package/dist/workspace/ci-report-url.d.ts +18 -0
  147. package/dist/workspace/ci-report-url.d.ts.map +1 -0
  148. package/dist/workspace/ci-report-url.js +33 -0
  149. package/dist/workspace/ci-run-index.d.ts +12 -0
  150. package/dist/workspace/ci-run-index.d.ts.map +1 -1
  151. package/dist/workspace/ci-run-index.js +6 -4
  152. package/dist/workspace/ci-run-index.schema.json +5 -3
  153. package/dist/workspace/ci-run.d.ts +75 -2
  154. package/dist/workspace/ci-run.d.ts.map +1 -1
  155. package/dist/workspace/ci-run.js +195 -53
  156. package/dist/workspace/ci-runner-key.d.ts +16 -3
  157. package/dist/workspace/ci-runner-key.d.ts.map +1 -1
  158. package/dist/workspace/ci-runner-key.js +30 -10
  159. package/dist/workspace/ci-serve.d.ts +54 -4
  160. package/dist/workspace/ci-serve.d.ts.map +1 -1
  161. package/dist/workspace/ci-serve.js +175 -26
  162. package/dist/workspace/declaration.d.ts +8 -0
  163. package/dist/workspace/declaration.d.ts.map +1 -1
  164. package/dist/workspace/declaration.js +11 -2
  165. package/dist/workspace/declaration.schema.json +7 -2
  166. package/dist/workspace/export.d.ts +1 -1
  167. package/dist/workspace/export.d.ts.map +1 -1
  168. package/dist/workspace/export.js +7 -3
  169. package/dist/workspace/ls.d.ts +6 -1
  170. package/dist/workspace/ls.d.ts.map +1 -1
  171. package/dist/workspace/ls.js +1 -0
  172. package/dist/workspace/ls.schema.json +7 -1
  173. package/dist/workspace/pin-integrity.d.ts.map +1 -1
  174. package/dist/workspace/pin-integrity.js +3 -2
  175. package/dist/workspace/pr-report.schema.json +74 -7
  176. package/dist/workspace/reason-codes.d.ts +1 -1
  177. package/dist/workspace/reason-codes.d.ts.map +1 -1
  178. package/dist/workspace/reason-codes.js +2 -2
  179. package/dist/workspace/run-event.schema.json +3 -1
  180. package/dist/workspace/status.schema.json +3 -1
  181. package/dist/workspace/write-scope.d.ts +9 -0
  182. package/dist/workspace/write-scope.d.ts.map +1 -1
  183. package/dist/workspace/write-scope.js +11 -1
  184. package/package.json +1 -1
  185. package/src/__fixtures__/pr-loop/pr-apply-wave-waiting.note.golden.md +48 -0
  186. package/src/cli/commands/__fixtures__/init-lexicon-output/package.json +3 -3
  187. package/src/cli/commands/audit.test.ts +2 -2
  188. package/src/cli/commands/check-lexicon-plugin.test.ts +9 -0
  189. package/src/cli/commands/check-lexicon-plugin.ts +11 -8
  190. package/src/cli/commands/check-lexicon.test.ts +1 -1
  191. package/src/cli/commands/check-lexicon.ts +16 -11
  192. package/src/cli/commands/import.ts +40 -0
  193. package/src/cli/commands/init-lexicon/templates/project.ts +4 -3
  194. package/src/cli/commands/init-lexicon.test.ts +8 -5
  195. package/src/cli/commands/onboard.test.ts +45 -0
  196. package/src/cli/commands/onboard.ts +8 -4
  197. package/src/cli/commands/update.test.ts +6 -0
  198. package/src/cli/commands/update.ts +4 -1
  199. package/src/cli/compiled-cli.e2e.test.ts +76 -11
  200. package/src/cli/dependencies.e2e.test.ts +101 -0
  201. package/src/cli/dependencies.test.ts +93 -0
  202. package/src/cli/dependencies.ts +122 -0
  203. package/src/cli/handlers/build.test.ts +69 -0
  204. package/src/cli/handlers/build.ts +20 -4
  205. package/src/cli/handlers/fan-out.test.ts +73 -0
  206. package/src/cli/handlers/fan-out.ts +11 -4
  207. package/src/cli/handlers/graph.test.ts +76 -0
  208. package/src/cli/handlers/graph.ts +19 -12
  209. package/src/cli/handlers/lint.test.ts +42 -0
  210. package/src/cli/handlers/lint.ts +6 -0
  211. package/src/cli/handlers/operator.ts +3 -3
  212. package/src/cli/handlers/pr-waves.test.ts +449 -0
  213. package/src/cli/handlers/pr.test.ts +134 -0
  214. package/src/cli/handlers/pr.ts +523 -31
  215. package/src/cli/handlers/promote.test.ts +26 -1
  216. package/src/cli/handlers/promote.ts +3 -2
  217. package/src/cli/handlers/run-components-exit.test.ts +99 -0
  218. package/src/cli/handlers/run-signer.test.ts +79 -0
  219. package/src/cli/handlers/run.ts +34 -16
  220. package/src/cli/main.test.ts +18 -0
  221. package/src/cli/main.ts +43 -16
  222. package/src/cli/parse-args.ts +12 -0
  223. package/src/cli/registry.ts +19 -6
  224. package/src/codegen/generate-post-synth-barrel.ts +2 -2
  225. package/src/codegen/lexicon-regen.ts +1 -1
  226. package/src/codegen/pinned-upgrade.ts +2 -2
  227. package/src/codegen/post-synth-barrel-guards.test.ts +6 -11
  228. package/src/components/capability.ts +51 -3
  229. package/src/components/changed-files.test.ts +16 -1
  230. package/src/components/changed-files.ts +9 -1
  231. package/src/components/driver.test.ts +36 -1
  232. package/src/components/driver.ts +76 -4
  233. package/src/components/fan-out-record.ts +29 -1
  234. package/src/components/fan-out-run.test.ts +35 -0
  235. package/src/components/fan-out-run.ts +40 -1
  236. package/src/components/pr-pipeline.test.ts +100 -0
  237. package/src/components/pr-pipeline.ts +132 -17
  238. package/src/components/pr-run.test.ts +323 -18
  239. package/src/components/pr-run.ts +354 -75
  240. package/src/components/wave-plan.ts +16 -4
  241. package/src/discovery/fold-host-method.test.ts +87 -0
  242. package/src/discovery/fold-import.ts +15 -5
  243. package/src/discovery/fold-package-composite.test.ts +27 -0
  244. package/src/discovery/fold-specifiers.test.ts +8 -0
  245. package/src/discovery/sandbox/bundle.ts +6 -0
  246. package/src/discovery/specifier-resolve.ts +8 -2
  247. package/src/fold/fold.test.ts +72 -0
  248. package/src/fold/fold.ts +71 -0
  249. package/src/fold/subset.test.ts +31 -0
  250. package/src/fold/subset.ts +99 -0
  251. package/src/lexicon-dist.e2e.test.ts +254 -0
  252. package/src/lexicon-module.test.ts +47 -0
  253. package/src/lexicon-module.ts +49 -7
  254. package/src/lexicon-plugin-helpers.ts +6 -4
  255. package/src/lexicon.ts +2 -0
  256. package/src/lifecycle/affected.test.ts +7 -0
  257. package/src/lifecycle/affected.ts +6 -1
  258. package/src/lifecycle/release-ledger.ts +34 -0
  259. package/src/lifecycle/work-dir.test.ts +77 -0
  260. package/src/lifecycle/work-dir.ts +82 -0
  261. package/src/lint/discover.test.ts +46 -2
  262. package/src/lint/discover.ts +55 -49
  263. package/src/module-source.test.ts +85 -0
  264. package/src/module-source.ts +112 -0
  265. package/src/op/activities/factory.ts +1 -1
  266. package/src/op/discover-root.test.ts +31 -2
  267. package/src/op/discover.ts +14 -4
  268. package/src/op/gate.test.ts +30 -0
  269. package/src/op/gate.ts +3 -0
  270. package/src/op/op-waves-run.ts +20 -5
  271. package/src/op/op-waves.test.ts +49 -0
  272. package/src/op/operator.ts +2 -2
  273. package/src/op/steward.ts +6 -4
  274. package/src/op/work-lease-run.test.ts +88 -2
  275. package/src/op/work-lease-run.ts +52 -12
  276. package/src/pr-forge-bundle.test.ts +2 -2
  277. package/src/pr-forge.test.ts +42 -0
  278. package/src/pr-forge.ts +40 -0
  279. package/src/pr-loop-bundle.test.ts +2 -1
  280. package/src/pr-loop.test.ts +117 -1
  281. package/src/pr-loop.ts +252 -10
  282. package/src/pr-report-url.ts +5 -5
  283. package/src/terraform/__fixtures__/advise.test.ts +21 -2
  284. package/src/ts-loader.test.ts +89 -1
  285. package/src/ts-loader.ts +180 -13
  286. package/src/workspace/changes.test.ts +1 -1
  287. package/src/workspace/chant-migrations/fountain-retired-kinds.test.ts +33 -0
  288. package/src/workspace/chant-migrations/fountain-retired-kinds.ts +190 -0
  289. package/src/workspace/chant-migrations.e2e.test.ts +5 -0
  290. package/src/workspace/chant-migrations.ts +2 -0
  291. package/src/workspace/checks/boxes.ts +9 -9
  292. package/src/workspace/ci-green-forge.ts +6 -4
  293. package/src/workspace/ci-green-runs.test.ts +53 -11
  294. package/src/workspace/ci-green.test.ts +1 -1
  295. package/src/workspace/ci-green.ts +50 -22
  296. package/src/workspace/ci-list.schema.json +12 -6
  297. package/src/workspace/ci-report-url.test.ts +220 -0
  298. package/src/workspace/ci-report-url.ts +33 -0
  299. package/src/workspace/ci-run-index.schema.json +5 -3
  300. package/src/workspace/ci-run-index.test.ts +42 -3
  301. package/src/workspace/ci-run-index.ts +18 -4
  302. package/src/workspace/ci-run.test.ts +185 -7
  303. package/src/workspace/ci-run.ts +224 -54
  304. package/src/workspace/ci-runner-key.test.ts +55 -17
  305. package/src/workspace/ci-runner-key.ts +36 -11
  306. package/src/workspace/ci-serve.test.ts +150 -6
  307. package/src/workspace/ci-serve.ts +169 -25
  308. package/src/workspace/declaration.schema.json +7 -2
  309. package/src/workspace/declaration.test.ts +23 -0
  310. package/src/workspace/declaration.ts +19 -3
  311. package/src/workspace/export.ts +6 -3
  312. package/src/workspace/ls.schema.json +7 -1
  313. package/src/workspace/ls.ts +7 -2
  314. package/src/workspace/pin-integrity.test.ts +5 -0
  315. package/src/workspace/pin-integrity.ts +3 -2
  316. package/src/workspace/pr-report.schema.json +74 -7
  317. package/src/workspace/reason-codes.ts +2 -2
  318. package/src/workspace/run-event.schema.json +3 -1
  319. package/src/workspace/status.schema.json +3 -1
  320. package/src/workspace/write-scope.test.ts +29 -1
  321. package/src/workspace/write-scope.ts +12 -1
@@ -27,13 +27,14 @@
27
27
  import { createHash } from "node:crypto";
28
28
  import { lstatSync, readdirSync, readFileSync } from "node:fs";
29
29
  import { join } from "node:path";
30
+ import { isWorkDir } from "../lifecycle/work-dir.js";
30
31
  const INTEGRITY = /^(sha(?:256|384|512))-([A-Za-z0-9+/]+={0,2})$/;
31
32
  /** The algorithm and base64 digest of an `integrity` value, or undefined when it is not one. */
32
33
  export function parseIntegrity(value) {
33
34
  const m = INTEGRITY.exec(value);
34
35
  return m ? { algorithm: m[1], digest: m[2] } : undefined;
35
36
  }
36
- /** Directories a plugin hash never looks inside. */
37
+ /** Directories a plugin hash never looks inside, with `.chant/work`, where work worktrees are (#2893). */
37
38
  const SKIPPED_DIRS = new Set(["node_modules", ".git"]);
38
39
  /** Thrown when a path can't be hashed: it is missing, or holds a symbolic link. */
39
40
  export class PinHashError extends Error {
@@ -44,7 +45,7 @@ function walk(dir, prefix, out) {
44
45
  if (entry.isSymbolicLink())
45
46
  throw new PinHashError(`${rel} is a symbolic link, which a pinned plugin may not contain`);
46
47
  if (entry.isDirectory()) {
47
- if (!SKIPPED_DIRS.has(entry.name))
48
+ if (!SKIPPED_DIRS.has(entry.name) && !isWorkDir(rel))
48
49
  walk(join(dir, entry.name), rel, out);
49
50
  }
50
51
  else if (entry.isFile()) {
@@ -33,12 +33,12 @@
33
33
  "description": "The change-set digest of what this stage planned: computePlanDigest(\"change-set\", ...) over every member's { member, planDigest }. What the gate binds."
34
34
  },
35
35
  "status": {
36
- "enum": ["planned", "plan-failed", "nothing", "applied", "failed", "refused"],
37
- "description": "planned: every member planned (plan stage). plan-failed: a member failed to plan, so nothing can apply. nothing: no component deploys what the change touches. applied: every member applied. failed: a member failed to apply and its dependents did not run. refused: nothing applied, see refusal."
36
+ "enum": ["planned", "plan-failed", "nothing", "applied", "failed", "wave-applied", "refused", "waiting"],
37
+ "description": "planned: every member planned (plan stage). plan-failed: a member failed to plan, so nothing can apply. nothing: no component deploys what the change touches. applied: every member applied. failed: a member failed to apply and its dependents did not run. wave-applied (#4003, chant 0.124.32 and newer): with --wave-gate and --wave, the wave applied and a later wave is still to run. refused: nothing applied, see refusal. waiting (#3999): the approved plans applied except members held back after an upstream applied, which wait on an approval of the plan the last of rounds made."
38
38
  },
39
39
  "refusal": {
40
- "enum": ["not-approved", "plan-changed", "not-a-reviewer", "no-pull-request"],
41
- "description": "Why an apply refused. plan-changed: an approval stands for another digest, so the plan changed after review."
40
+ "enum": ["not-approved", "plan-changed", "not-a-reviewer", "author-approved", "no-pull-request", "wave-not-approved", "wave-plan-changed", "earlier-wave"],
41
+ "description": "Why an apply refused. plan-changed: an approval stands for another digest, so the plan changed after review. author-approved (#4000): under --require-review, an approval names the pull request's author or an author or committer of one of its commits. With --wave-gate (#4003, chant 0.124.32 and newer): wave-not-approved, a wave's new plan is not covered by the approved one and no approval of its gate stands for it; wave-plan-changed, an approval of its gate stands for another digest; earlier-wave, an earlier wave has work left or no record says it applied. The waves that applied before a wave refused stay applied; waves says which."
42
42
  },
43
43
  "message": { "type": "string", "description": "The refusal or failure as printed." },
44
44
  "resumed": {
@@ -54,6 +54,61 @@
54
54
  "description": "Added within contract version 1 by #4104, written by chant 0.124.30 and newer. Per dependency a member was planned against, the names of the outputs read from the deployed estate through its capability's outputs, sorted. A dependency outside the change is listed here too, and one whose stack is not deployed yet lists []. Outputs given with --seed-outputs, or carried from an earlier attempt's record, are not listed. Absent when no dependency was read, and on a resumed apply.",
55
55
  "additionalProperties": { "type": "array", "items": { "type": "string" } }
56
56
  },
57
+ "waveGate": {
58
+ "type": "string",
59
+ "description": "Added within contract version 1 by #4003, written by chant 0.124.32 and newer. pr-apply --wave-gate <name>: the apply runs a wave at a time, each planned after the one before it applied, and wave k waits on <name>-wave-<k> under op when its plan moved. Absent without it."
60
+ },
61
+ "waves": {
62
+ "type": "array",
63
+ "description": "With waveGate: each wave reached so far, in order, with the approval it applied or waits under.",
64
+ "items": {
65
+ "type": "object",
66
+ "required": ["wave", "components", "status", "approval", "gate", "digest"],
67
+ "properties": {
68
+ "wave": { "type": "integer", "minimum": 1, "description": "1-based, from selection.waves." },
69
+ "components": { "type": "array", "items": { "type": "string" }, "description": "The components planned in it on the run that reached it." },
70
+ "status": { "enum": ["applied", "failed", "plan-failed", "waiting"] },
71
+ "approval": { "enum": ["pull-request", "wave"], "description": "pull-request: the approved change set covers the wave's plan, and it applies under the pull request's approval (gate and digest are the report's). wave: its plan moved, and it needs an approval of its own gate for its new plan." },
72
+ "gate": { "type": "string", "description": "The gate it applied or waits under: the report's gate, or <waveGate>-wave-<k>." },
73
+ "digest": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "The digest that gate binds: the report's digest, or the change-set digest of the wave's new plan." },
74
+ "approvedBy": { "type": "array", "items": { "type": "string" } },
75
+ "approved": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "Waiting: an approval of the wave's gate stands for this other digest." },
76
+ "moved": { "type": "array", "items": { "type": "string" }, "description": "Why the approved change set does not cover the wave's plan, one line per member." }
77
+ }
78
+ }
79
+ },
80
+ "plannedOutputs": {
81
+ "type": "object",
82
+ "description": "Added within contract version 1 by #3999, written by chant 0.124.32 and newer. Per dependency in the change that a member was planned against, the names of the outputs its plan knows, sorted. An output a member reads that is not listed is known only after apply, and the member lists it under unknownInputs. Absent when no member read one.",
83
+ "additionalProperties": { "type": "array", "items": { "type": "string" } }
84
+ },
85
+ "rounds": {
86
+ "type": "array",
87
+ "description": "Added within contract version 1 by #3999. Apply stage: the rounds planned after an upstream applied, in order. A member whose plan read an upstream output that applied as another value, or was known only after apply, is held back and planned again against the outputs the apply left; each round has its own gate and digest. Absent when nothing was held.",
88
+ "items": {
89
+ "type": "object",
90
+ "required": ["round", "gate", "digest", "components", "approval", "status", "changeSet"],
91
+ "properties": {
92
+ "round": { "type": "integer", "minimum": 2 },
93
+ "gate": { "type": "string", "description": "The gate the round waits on: <gate>-round-<round>." },
94
+ "digest": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$", "description": "The change-set digest of what the round planned. What its gate binds." },
95
+ "components": { "type": "array", "items": { "type": "string" }, "description": "The components planned again, in apply order." },
96
+ "approval": {
97
+ "type": "object",
98
+ "required": ["status"],
99
+ "description": "Where the approval stands for digest, as the top-level approval.",
100
+ "properties": {
101
+ "status": { "enum": ["approved", "changed", "pending"] },
102
+ "approvedBy": { "type": "array", "items": { "type": "string" } },
103
+ "approved": { "type": "string", "pattern": "^(?:jcs1-)?sha256:[0-9a-f]{64}$" }
104
+ }
105
+ },
106
+ "status": { "enum": ["applied", "failed", "waiting", "plan-failed"] },
107
+ "message": { "type": "string", "description": "With waiting: why an approval that stands does not count under --require-review." },
108
+ "changeSet": { "type": "object", "description": "The change-set document the round planned. Its digest equals digest." }
109
+ }
110
+ }
111
+ },
57
112
  "approval": {
58
113
  "type": "object",
59
114
  "required": ["status"],
@@ -85,7 +140,7 @@
85
140
  "member": { "type": "string", "description": "The member's name in the change set: the root, for a terraform-family step." },
86
141
  "component": { "type": "string" },
87
142
  "planDigest": { "type": ["string", "null"], "description": "What a gate on this member alone binds. null when it failed to plan." },
88
- "status": { "enum": ["planned", "plan-failed", "applied", "failed", "blocked"] },
143
+ "status": { "enum": ["planned", "plan-failed", "applied", "failed", "blocked", "waiting"], "description": "waiting (#3999): held back because its plan read an upstream output that applied as another value, or was known only after apply; it waits on an approval of its plan in rounds." },
89
144
  "counts": {
90
145
  "type": "object",
91
146
  "required": ["create", "update", "replace", "delete"],
@@ -100,8 +155,20 @@
100
155
  "inputsMoved": {
101
156
  "type": "array",
102
157
  "items": { "type": "string" },
103
- "description": "Apply stage: components this one depends on whose outputs changed when they applied. It applied the plan it was approved with; the next run plans it against the new values."
104
- }
158
+ "description": "Apply stage: components this one depends on whose outputs changed when they applied. It applied the plan it was approved with; the next run plans it against the new values. Not written by chant 0.124.32 and newer, which holds such a member back instead (held, round)."
159
+ },
160
+ "unknownInputs": {
161
+ "type": "array",
162
+ "items": { "type": "string" },
163
+ "description": "#3999: the upstream outputs its plan read that the change's plans could not say, as <component>.<output>, sorted. Known only after that upstream applies; the approval does not cover what this member does with them."
164
+ },
165
+ "buildInputs": {
166
+ "type": "array",
167
+ "items": { "type": "string" },
168
+ "description": "#3999: the published artifact identities its plan read from a build in the same change, as <component>.publish.<field>, sorted. Known only after the build runs and never approved again: the build's provenance binds them, so the member applies without a later round."
169
+ },
170
+ "round": { "type": "integer", "minimum": 2, "description": "Apply stage (#3999): the round whose plan it applied or waits on, when not the first. planDigest and counts are that round's." },
171
+ "held": { "type": "string", "description": "Apply stage (#3999): why the first round's plan did not apply." }
105
172
  }
106
173
  }
107
174
  },
@@ -193,7 +193,7 @@ export declare const REASONS: {
193
193
  readonly "diagram-render-drift": "A declared diagram records a sourceHash, and the source's bytes now hash to something else: the render is stale for its source.";
194
194
  readonly "box-credential-declared": "A file in a box member's directory carries a literal secret: a credential's shape, or a literal where a credential goes. A variable or secret-manager reference is not one.";
195
195
  readonly "box-capability-unbrokered": "A capability in a member's box block names no broker, so the box would hold its credential.";
196
- readonly "box-fountain-callback-undeclared": "A box member builds a fountain Box, whose persistent sandbox fountain gives a callback token scoped to its owner, and the member's box block does not declare the fountain-callback capability brokered by fountain with scope owner.";
196
+ readonly "box-fountain-callback-undeclared": "A box member builds a fountain Box, whose sandbox fountain gives a callback token scoped to its owner, and the member's box block does not declare the fountain-callback capability brokered by fountain with scope owner.";
197
197
  readonly "box-intent-unknown": "A box block names an intent, and no record of a declared kind named decision has that id.";
198
198
  readonly "box-intent-unconstrained": "The decision record a box names as its intent constrains no member or path of this workspace: no member: entry for a declared member and no path: entry at, above or inside one's directory.";
199
199
  readonly "box-none": "No member's box block declares services, so the workspace has no box for a host to plant.";
@@ -1 +1 @@
1
- {"version":3,"file":"reason-codes.d.ts","sourceRoot":"","sources":["../../src/workspace/reason-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,sHAAsH;AACtH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,uHAAuH;AACvH,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,qFAAqF;AACrF,eAAO,MAAM,OAAO;aAElB,qBAAqB,EAAE,2EAA2E;aAClG,uBAAuB,EAAE,4DAA4D;aACrF,yBAAyB,EAAE,mEAAmE;aAC9F,qBAAqB,EAAE,wFAAwF;aAC/G,mBAAmB,EAAE,kDAAkD;aACvE,gBAAgB,EAAE,iEAAiE;aACnF,qBAAqB,EAAE,sHAAsH;aAE7I,sBAAsB,EAAE,mEAAmE;aAC3F,kBAAkB,EAAE,uBAAuB;aAC3C,kBAAkB,EAAE,wFAAwF;aAE5G,qBAAqB,EAAE,yDAAyD;aAEhF,aAAa,EAAE,wCAAwC;aACvD,cAAc,EAAE,gEAAgE;aAChF,mBAAmB,EAAE,oDAAoD;aACzE,YAAY,EAAE,gEAAgE;aAE9E,cAAc,EAAE,4EAA4E;aAC5F,gBAAgB,EAAE,2KAA2K;aAC7L,mBAAmB,EAAE,2EAA2E;aAChG,wBAAwB,EAAE,sDAAsD;aAEhF,mBAAmB,EAAE,0DAA0D;aAC/E,kBAAkB,EAAE,uEAAuE;aAE3F,iBAAiB,EAAE,iFAAiF;aACpG,sBAAsB,EAAE,gFAAgF;aACxG,yBAAyB,EAAE,gEAAgE;aAE3F,qBAAqB,EAAE,iFAAiF;aACxG,mBAAmB,EAAE,iF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E,8IAA8I;aAEvK,sBAAsB,EAAE,uFAAuF;aAC/G,iBAAiB,EAAE,8HAA8H;aACjJ,sBAAsB,EAAE,wDAAwD;aAChF,kBAAkB,EAAE,yHAAyH;aAC7I,wBAAwB,EAAE,0FAA0F;aACpH,kBAAkB,EAAE,gHAAgH;aACpI,uBAAuB,EAAE,oHAAoH;aAC7I,4BAA4B,EAAE,0GAA0G;aACxI,kCAAkC,EAAE,mHAAmH;aACvJ,4BAA4B,EAAE,0HAA0H;aAExJ,yBAAyB,EAAE,uGAAuG;aAClI,qBAAqB,EAAE,oDAAoD;aAC3E,kBAAkB,EAAE,+GAA+G;aACnI,oBAAoB,EAAE,sFAAsF;aAC5G,uBAAuB,EAAE,kEAAkE;aAC3F,4BAA4B,EAAE,kIAAkI;aAChK,0BAA0B,EAAE,sEAAsE;aAClG,oBAAoB,EAAE,mLAAmL;aACzM,sBAAsB,EAAE,8MAA8M;aACtO,qBAAqB,EAAE,sFAAsF;aAE7G,cAAc,EAAE,iCAAiC;aACjD,kBAAkB,EAAE,sDAAsD;CAClE,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAC;AAE9C,mDAAmD;AACnD,eAAO,MAAM,YAAY,EAA2B,UAAU,EAAE,CAAC;AAEjE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,MAAM,IAAI,MAAM,EAAE,CAAC;AAEtD,eAAO,MAAM,WAAW,QAAkD,CAAC;AAE3E,2HAA2H;AAC3H,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAI/E"}
@@ -229,8 +229,8 @@ export const REASONS = {
229
229
  // A box that holds a credential (check, #2726). Each is also a WSP finding.
230
230
  "box-credential-declared": "A file in a box member's directory carries a literal secret: a credential's shape, or a literal where a credential goes. A variable or secret-manager reference is not one.",
231
231
  "box-capability-unbrokered": "A capability in a member's box block names no broker, so the box would hold its credential.",
232
- // The credential fountain itself hands a persistent box (check, #2780). Also a WSP finding.
233
- "box-fountain-callback-undeclared": "A box member builds a fountain Box, whose persistent sandbox fountain gives a callback token scoped to its owner, and the member's box block does not declare the fountain-callback capability brokered by fountain with scope owner.",
232
+ // The credential fountain itself hands a box (check, #2780). Also a WSP finding.
233
+ "box-fountain-callback-undeclared": "A box member builds a fountain Box, whose sandbox fountain gives a callback token scoped to its owner, and the member's box block does not declare the fountain-callback capability brokered by fountain with scope owner.",
234
234
  // A box's intent, the decision record its box block names (check, #2850). Each is also a WSP finding.
235
235
  "box-intent-unknown": "A box block names an intent, and no record of a declared kind named decision has that id.",
236
236
  "box-intent-unconstrained": "The decision record a box names as its intent constrains no member or path of this workspace: no member: entry for a declared member and no path: entry at, above or inside one's directory.",
@@ -54,7 +54,9 @@
54
54
  "description": "github: a GitHub Actions run, also the spelling Forgejo Actions uses. gitlab: a CI pipeline. op: a steward's run, named by its Op run id. local: a run on the machine that started it, outside CI. chant: a pull-request job the chant runner ran (chant ci run, #4094), named by its Op run id; added within contract version 1 and written by chant 0.124.30 and newer, so a reader that switches on forge keeps a case for a value it does not know."
55
55
  },
56
56
  "repo": { "type": "string", "description": "The repository or project slug on the forge, when the environment named one." },
57
- "url": { "type": "string", "description": "A link to the run, when the environment gave enough to build one." }
57
+ "url": { "type": "string", "description": "A link to the run, when the environment gave enough to build one." },
58
+ "jobId": { "type": "string", "description": "The forge's id for the job within the run: GITHUB_JOB on GitHub and Forgejo, CI_JOB_ID on GitLab. Added within contract 1 by #4156 and written by chant 0.124.32 and newer, only by chant ci run in a forge job." },
59
+ "attempt": { "type": "integer", "minimum": 1, "description": "The run's attempt, GITHUB_RUN_ATTEMPT on GitHub and Forgejo. Added within contract 1 by #4156 and written by chant 0.124.32 and newer, only by chant ci run in a forge job." }
58
60
  }
59
61
  },
60
62
  "settleStatus": {
@@ -451,7 +451,9 @@
451
451
  "properties": {
452
452
  "forge": { "enum": ["github", "gitlab", "op", "local", "chant"], "description": "chant: a pull-request job the chant runner ran (chant ci run, #4094), added within contract 1 and written by chant 0.124.30 and newer." },
453
453
  "repo": { "type": "string" },
454
- "url": { "type": "string" }
454
+ "url": { "type": "string" },
455
+ "jobId": { "type": "string", "description": "The forge's job id within the run. Added within contract 1 by #4156 and written by chant 0.124.32 and newer, only by chant ci run in a forge job." },
456
+ "attempt": { "type": "integer", "minimum": 1, "description": "The run's attempt on GitHub and Forgejo. Added within contract 1 by #4156 and written by chant 0.124.32 and newer, only by chant ci run in a forge job." }
455
457
  }
456
458
  },
457
459
  "failure": {
@@ -144,6 +144,15 @@ export interface PathChange {
144
144
  before(): string | null;
145
145
  after(): string | null;
146
146
  }
147
+ /**
148
+ * The factory Op's check log, `.chant/factory/<item>/check.log` (#3512). The
149
+ * Check step writes it in the worktree (`../op/activities/factory.ts`,
150
+ * `factoryCheck`), attaches it as each criterion's evidence, and Record
151
+ * commits it with the build under the builder's Chant-Agent. It is chant's own
152
+ * output and in no member, so an agent's member scope would flag every build
153
+ * commit. The member check passes over it; a protected entry still covers it.
154
+ */
155
+ export declare const FACTORY_CHECK_LOG: RegExp;
147
156
  /**
148
157
  * Whether `writer` may write the file at `path`, from the workspace root:
149
158
  * the path is in a member the writer may write, and no protected entry of
@@ -1 +1 @@
1
- {"version":3,"file":"write-scope.d.ts","sourceRoot":"","sources":["../../src/workspace/write-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAOH,OAAO,EAEL,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EAIT,UAAU,EAEV,KAAK,aAAa,EACnB,MAAM,qBAAqB,CA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O,CAAC,EAAE,aAAa,CAAC;CACzB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAuE9B"}
@@ -243,6 +243,15 @@ export function onlyKeysChanged(before, after, except) {
243
243
  const b = strip(after);
244
244
  return a !== null && b !== null && isDeepStrictEqual(a, b);
245
245
  }
246
+ /**
247
+ * The factory Op's check log, `.chant/factory/<item>/check.log` (#3512). The
248
+ * Check step writes it in the worktree (`../op/activities/factory.ts`,
249
+ * `factoryCheck`), attaches it as each criterion's evidence, and Record
250
+ * commits it with the build under the builder's Chant-Agent. It is chant's own
251
+ * output and in no member, so an agent's member scope would flag every build
252
+ * commit. The member check passes over it; a protected entry still covers it.
253
+ */
254
+ export const FACTORY_CHECK_LOG = /^\.chant\/factory\/[^/]+\/check\.log$/;
246
255
  /**
247
256
  * Whether `writer` may write the file at `path`, from the workspace root:
248
257
  * the path is in a member the writer may write, and no protected entry of
@@ -255,7 +264,8 @@ export function judgePath(declaration, writer, path, change) {
255
264
  if (scope === null)
256
265
  return OK;
257
266
  const member = memberHolding(path, declaration?.members ?? []);
258
- if (!memberAllowed(writer, scope, member)) {
267
+ const chantOutput = member === null && FACTORY_CHECK_LOG.test(path);
268
+ if (!chantOutput && !memberAllowed(writer, scope, member)) {
259
269
  const where = member === null ? "is in no member" : `is in member ${member}`;
260
270
  return {
261
271
  ok: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.124.31",
3
+ "version": "0.124.32",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -0,0 +1,48 @@
1
+ <!-- chant-pr:prod -->
2
+ ### chant apply for `prod`
3
+
4
+ Wave 2 waits at its gate `release-wave-2`; nothing in it applied. Head `222222222222`, measured from `111111111111`.
5
+
6
+ > Wave 2 was planned after the waves before it applied, and the pull request's approved plan does not cover it.
7
+
8
+ | Member | Component | Status | Create | Update | Replace | Delete |
9
+ |---|---|---|---:|---:|---:|---:|
10
+ | `a` | a | applied | 0 | 1 | 0 | 0 |
11
+ | `app` | app | planned | 0 | 0 | 0 | 0 |
12
+
13
+ | Wave | Components | Status | Approval |
14
+ |---:|---|---|---|
15
+ | 1 | `a` | applied | the pull request's `pr-apply` by `github:alice` |
16
+ | 2 | `app` | waiting | its own `release-wave-2`, not approved yet |
17
+
18
+ Wave 2 was planned after the waves before it applied, and the approved plan does not cover it:
19
+
20
+ - app now writes app.main.cidr to a different value than the approved plan
21
+
22
+ Read wave 2's plan, `jcs1-sha256:0000000000000000000000000000000000000000000000000000000000000007`, and approve it with:
23
+
24
+ ```
25
+ chant approve pr-12 release-wave-2 --plan jcs1-sha256:0000000000000000000000000000000000000000000000000000000000000007 --approver github:<your-login> --sign
26
+ ```
27
+
28
+ Then run the wave's apply job again.
29
+
30
+ Plan digest: `jcs1-sha256:7623a8677afb0bf98d77c602521a3abfa96f76cff25675d350a28c2e26a7bad0`
31
+
32
+ Approved by `github:alice` for this digest.
33
+
34
+ ### Plan summary
35
+
36
+ 2 members: 2 groups, 0 destroys or replacements.
37
+
38
+ #### Group e84467713bf6: 1 member (outlier), change
39
+
40
+ ```
41
+ ~ terraform_data.subnet: input
42
+ ```
43
+
44
+ Members: `a`
45
+
46
+ #### Group 49648f9475c7: 1 member (outlier), no changes
47
+
48
+ Members: `app`
@@ -11,12 +11,12 @@
11
11
  ".": {
12
12
  "development": "./src/index.ts",
13
13
  "types": "./dist/index.d.ts",
14
- "default": "./src/index.ts"
14
+ "default": "./dist/index.js"
15
15
  },
16
16
  "./*": {
17
17
  "development": "./src/*.ts",
18
18
  "types": "./dist/*.d.ts",
19
- "default": "./src/*.ts"
19
+ "default": "./dist/*.js"
20
20
  },
21
21
  "./manifest": "./dist/manifest.json",
22
22
  "./meta": "./dist/meta.json",
@@ -26,7 +26,7 @@
26
26
  "generate": "npx tsx src/codegen/generate-cli.ts",
27
27
  "validate": "npx tsx src/validate-cli.ts",
28
28
  "docs": "npx tsx src/codegen/docs-cli.ts",
29
- "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && find dist -type f \\( -name \"*.js\" -o -name \"*.js.map\" \\) -delete",
29
+ "build": "tsc -p tsconfig.build.json --sourceMap false && tsc-alias -p tsconfig.build.json",
30
30
  "prepack": "npm run generate && npm run bundle && npm run validate && npm run build",
31
31
  "bundle": "tsx src/package-cli.ts"
32
32
  },
@@ -153,13 +153,13 @@ describe("auditCommand", () => {
153
153
  const envelope = JSON.parse(json.output) as { findings: Array<{ checkId: string; authority: Array<{ url: string }>; severity: string }> };
154
154
  const ftn11 = envelope.findings.find((f) => f.checkId === "FTN011")!;
155
155
  expect(ftn11.authority.length).toBeGreaterThan(0);
156
- expect(ftn11.authority[0].url).toContain("fountain");
156
+ expect(ftn11.authority[0].url).toContain("managoat");
157
157
  expect(envelope.findings.find((f) => f.checkId === "FTN012")!.severity).toBe("error");
158
158
 
159
159
  const sarif = await auditCommand({ path: repo, format: "sarif" });
160
160
  const run = (JSON.parse(sarif.output) as { runs: Array<{ tool: { driver: { rules: Array<{ id: string; helpUri?: string }> } }; results: Array<{ ruleId: string }> }> }).runs[0];
161
161
  expect(run.results.some((r) => r.ruleId === "FTN011")).toBe(true);
162
- expect(run.tool.driver.rules.find((r) => r.id === "FTN011")!.helpUri).toContain("fountain");
162
+ expect(run.tool.driver.rules.find((r) => r.id === "FTN011")!.helpUri).toContain("managoat");
163
163
 
164
164
  const md = await auditCommand({ path: repo, format: "markdown" });
165
165
  expect(md.output).toContain("FTN011");
@@ -55,6 +55,15 @@ describe("pluginEntryFor", () => {
55
55
  expect(pluginEntryFor(dir)).toBe(join(dir, "src/plugin.ts"));
56
56
  });
57
57
 
58
+ test("prefers the development source over the compiled default (#3981)", () => {
59
+ const dir = lexiconDir({
60
+ "package.json": JSON.stringify({ exports: { ".": { development: "./src/index.ts", default: "./dist/index.js" } } }),
61
+ "src/index.ts": "",
62
+ "dist/index.js": "",
63
+ });
64
+ expect(pluginEntryFor(dir)).toBe(join(dir, "src/index.ts"));
65
+ });
66
+
58
67
  test("skips a declared entry that does not exist", () => {
59
68
  const dir = lexiconDir({
60
69
  "package.json": JSON.stringify({ exports: { ".": { default: "./dist/index.js" } } }),
@@ -23,7 +23,7 @@ import { existsSync, readFileSync } from "fs";
23
23
  import { isAbsolute, join, resolve } from "path";
24
24
  import { pathToFileURL } from "url";
25
25
  import { isLexiconPlugin, type LexiconPlugin } from "../../lexicon";
26
- import { ensureTypeScriptLoader } from "../../ts-loader";
26
+ import { ensureTypeScriptLoaderFor } from "../../ts-loader";
27
27
  import { esModuleNamespace } from "../../module-interop";
28
28
 
29
29
  export interface LoadedLexicon {
@@ -36,20 +36,23 @@ export interface LoadedLexicon {
36
36
  }
37
37
 
38
38
  /**
39
- * The module a lexicon package presents to consumers.
39
+ * The module a lexicon package presents to consumers, as its source.
40
40
  *
41
- * Tier 1 requires `exports["."].default` to be `./src/index.ts`, so that is the
42
- * first choice — it is the module core itself imports. The fallbacks keep this
43
- * usable on a lexicon that has not reached that check yet.
41
+ * Tier 1 requires `exports["."].development` to be `./src/index.ts` and
42
+ * `default` to be its compiled `./dist/index.js` (#3981). The check reads the
43
+ * lexicon's source, so `development` is the first choice: a `dist/` may be
44
+ * missing or older than the source. `default` and `main` come next, and the
45
+ * conventional paths keep this usable on a lexicon that has not reached that
46
+ * check yet.
44
47
  */
45
48
  export function pluginEntryFor(dir: string): string | undefined {
46
49
  const candidates: string[] = [];
47
50
  try {
48
51
  const pkg = JSON.parse(readFileSync(join(dir, "package.json"), "utf-8")) as {
49
- exports?: { "."?: { default?: string } };
52
+ exports?: { "."?: { development?: string; default?: string } };
50
53
  main?: string;
51
54
  };
52
- for (const declared of [pkg.exports?.["."]?.default, pkg.main]) {
55
+ for (const declared of [pkg.exports?.["."]?.development, pkg.exports?.["."]?.default, pkg.main]) {
53
56
  if (typeof declared === "string") candidates.push(declared);
54
57
  }
55
58
  } catch {
@@ -78,7 +81,7 @@ export async function loadLexiconFromDir(dir: string): Promise<LoadedLexicon> {
78
81
 
79
82
  let mod: Record<string, unknown>;
80
83
  try {
81
- ensureTypeScriptLoader();
84
+ ensureTypeScriptLoaderFor(entry);
82
85
  mod = esModuleNamespace((await import(pathToFileURL(entry).href)) as Record<string, unknown>);
83
86
  } catch (error) {
84
87
  return { entry, error: `import failed: ${error instanceof Error ? error.message : String(error)}` };
@@ -25,7 +25,7 @@ describe("checkLexicon", () => {
25
25
  expect(names).toContain("Registered intrinsics are exported by the package");
26
26
  expect(names).toContain("Registered intrinsics' isTag matches how they're authored");
27
27
  expect(names).toContain("dist/manifest.json declares a chantVersion");
28
- expect(names).toContain('package.json routes exports["."].default at ./src/index.ts and deletes emitted JS in build');
28
+ expect(names).toContain('package.json routes exports["."] development at ./src/index.ts and default at ./dist/index.js, and build keeps emitted JS');
29
29
  });
30
30
 
31
31
  test("gitlab's own reference() intrinsic passes both the export and isTag audits", async () => {
@@ -310,27 +310,32 @@ export async function checkLexicon(dir: string): Promise<CheckResult> {
310
310
  detail: chantVersionDetail,
311
311
  });
312
312
 
313
- // chant #1067 — packaging shape ("all 11 lexicons route exports['.'].default
314
- // at ./src/index.ts and delete emitted JS in build") was real but
315
- // unenforced; a lexicon shipping differently would break consumers
316
- // silently. Cheap structural check on package.json, not a build execution.
313
+ // chant #1067 — packaging shape, real but unenforced before: a lexicon
314
+ // shipping differently would break consumers silently. Cheap structural
315
+ // check on package.json, not a build execution. #3981 — lexicons ship
316
+ // compiled JS: `default` is ./dist/index.js, `development` stays on
317
+ // ./src/index.ts for the repository's tools, and the build keeps the JS tsc
318
+ // emits (it used to delete it).
317
319
  const packageJsonRaw = readOr(join(dir, "package.json"));
318
320
  let packagingOk = false;
319
321
  let packagingDetail: string | undefined;
320
322
  if (packageJsonRaw) {
321
323
  try {
322
324
  const pkg = JSON.parse(packageJsonRaw) as {
323
- exports?: { "."?: { default?: string } };
325
+ exports?: { "."?: { development?: string; default?: string } };
324
326
  scripts?: { build?: string };
325
327
  };
328
+ const developmentExport = pkg.exports?.["."]?.development;
326
329
  const defaultExport = pkg.exports?.["."]?.default;
327
330
  const buildScript = pkg.scripts?.build ?? "";
328
- const exportOk = defaultExport === "./src/index.ts";
329
- const deletesEmittedJs = /-delete/.test(buildScript) && /\.js/.test(buildScript);
330
- packagingOk = exportOk && deletesEmittedJs;
331
+ const developmentOk = developmentExport === "./src/index.ts";
332
+ const defaultOk = defaultExport === "./dist/index.js";
333
+ const keepsEmittedJs = /tsconfig\.build\.json/.test(buildScript) && !/-delete/.test(buildScript);
334
+ packagingOk = developmentOk && defaultOk && keepsEmittedJs;
331
335
  const problems: string[] = [];
332
- if (!exportOk) problems.push(`exports["."].default is ${JSON.stringify(defaultExport)}, expected "./src/index.ts"`);
333
- if (!deletesEmittedJs) problems.push(`build script doesn't delete emitted .js from dist/: ${JSON.stringify(buildScript)}`);
336
+ if (!developmentOk) problems.push(`exports["."].development is ${JSON.stringify(developmentExport)}, expected "./src/index.ts"`);
337
+ if (!defaultOk) problems.push(`exports["."].default is ${JSON.stringify(defaultExport)}, expected "./dist/index.js"`);
338
+ if (!keepsEmittedJs) problems.push(`build script must compile tsconfig.build.json and keep the emitted .js in dist/: ${JSON.stringify(buildScript)}`);
334
339
  packagingDetail = problems.length > 0 ? problems.join("; ") : undefined;
335
340
  } catch {
336
341
  packagingDetail = "package.json is not valid JSON";
@@ -339,7 +344,7 @@ export async function checkLexicon(dir: string): Promise<CheckResult> {
339
344
  packagingDetail = "package.json missing or unreadable";
340
345
  }
341
346
  items.push({
342
- name: 'package.json routes exports["."].default at ./src/index.ts and deletes emitted JS in build',
347
+ name: 'package.json routes exports["."] development at ./src/index.ts and default at ./dist/index.js, and build keeps emitted JS',
343
348
  tier: 1,
344
349
  pass: packagingOk,
345
350
  detail: packagingDetail,
@@ -520,6 +520,43 @@ async function parseWithEmbedded(
520
520
  return { irs: parses.map((parse) => parse({ embedded })), embedded };
521
521
  }
522
522
 
523
+ /**
524
+ * Build the source import wrote and name each error-severity post-synth
525
+ * finding that would stop `chant build` (#3605). The findings go through the
526
+ * same `lint.presets` and `lint.rules` filtering build applies, against the
527
+ * project config above `outputDir`, so a check the project turns off is not
528
+ * named. When the source does not build here (the lexicon is not installed
529
+ * beside it, or embedded content needs another lexicon's serializer), nothing
530
+ * is said: import reports what build would refuse, not why it cannot run.
531
+ */
532
+ export async function buildErrorWarnings(plugin: LexiconPlugin, outputDir: string): Promise<string[]> {
533
+ try {
534
+ const checks = plugin.postSynthChecks?.() ?? [];
535
+ if (checks.length === 0) return [];
536
+ const [{ build }, { runPostSynthChecks }, { applyConfiguredPreset, applyConfiguredSeverity, resolvePresetIds }, { loadChantConfigUpward }] =
537
+ await Promise.all([import("../../build"), import("../../lint/post-synth"), import("../../lint/config"), import("../../config")]);
538
+ const result = await build(outputDir, [plugin.serializer]);
539
+ if (result.errors.length > 0) return [];
540
+ const { config } = await loadChantConfigUpward(outputDir);
541
+ const rules = config.lint?.rules;
542
+ // As build.ts runLexiconPostSynthChecks does: the plugin sees its own output only.
543
+ const output = result.outputs.get(plugin.serializer.name);
544
+ const outputs = new Map(output === undefined ? [] : [[plugin.serializer.name, output]]);
545
+ const diagnostics = runPostSynthChecks(checks, { ...result, outputs });
546
+ const presetIds = resolvePresetIds(plugin.lintPresets?.(), config.lint?.presets?.[plugin.name] ?? "recommended");
547
+ const afterPreset = applyConfiguredPreset(diagnostics, presetIds, rules).diagnostics;
548
+ return applyConfiguredSeverity(afterPreset, rules)
549
+ .diagnostics.filter((diag) => diag.severity === "error")
550
+ .map(
551
+ (diag) =>
552
+ `${diag.checkId}: ${diag.message.replace(/\.$/, "")}. chant build stops on this error; ` +
553
+ `change the generated source, or set lint.rules.${diag.checkId} to "off" in chant.config.ts.`,
554
+ );
555
+ } catch {
556
+ return [];
557
+ }
558
+ }
559
+
523
560
  /** The shared tail of every template import: parse → generate → write. */
524
561
  async function parseAndWrite(
525
562
  plugin: LexiconPlugin,
@@ -615,6 +652,9 @@ async function parseAndWrite(
615
652
  generatedFiles.push(file.path);
616
653
  }
617
654
 
655
+ // What `chant build` will refuse, said now rather than at the first build (#3605).
656
+ warnings.push(...(await buildErrorWarnings(plugin, outputDir)));
657
+
618
658
  return {
619
659
  success: true,
620
660
  generatedFiles,
@@ -13,12 +13,12 @@ export function generatePackageJson(name: string, names: { packageName: string }
13
13
  ".": {
14
14
  development: "./src/index.ts",
15
15
  types: "./dist/index.d.ts",
16
- default: "./src/index.ts",
16
+ default: "./dist/index.js",
17
17
  },
18
18
  "./*": {
19
19
  development: "./src/*.ts",
20
20
  types: "./dist/*.d.ts",
21
- default: "./src/*.ts",
21
+ default: "./dist/*.js",
22
22
  },
23
23
  "./manifest": "./dist/manifest.json",
24
24
  "./meta": "./dist/meta.json",
@@ -28,7 +28,8 @@ export function generatePackageJson(name: string, names: { packageName: string }
28
28
  generate: "npx tsx src/codegen/generate-cli.ts",
29
29
  validate: "npx tsx src/validate-cli.ts",
30
30
  docs: "npx tsx src/codegen/docs-cli.ts",
31
- build: 'tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && find dist -type f \\( -name "*.js" -o -name "*.js.map" \\) -delete',
31
+ // #3981 — the package ships the compiled dist/*.js its exports' `default` names.
32
+ build: "tsc -p tsconfig.build.json --sourceMap false && tsc-alias -p tsconfig.build.json",
32
33
  prepack: "npm run generate && npm run bundle && npm run validate && npm run build",
33
34
  bundle: "tsx src/package-cli.ts",
34
35
  },