plumbbob 0.9.3 → 0.9.5

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 (278) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +15 -13
  3. package/dist/cli-core.js +19 -2
  4. package/dist/lib/check.js +46 -13
  5. package/dist/lib/intent.js +1 -1
  6. package/dist/lib/latch.js +3 -3
  7. package/dist/lib/reentry.js +70 -0
  8. package/dist/verbs/agent.js +2 -2
  9. package/dist/verbs/doctor.js +4 -4
  10. package/dist/verbs/finish.js +1 -1
  11. package/dist/verbs/recover.js +297 -0
  12. package/dist/verbs/revert.js +2 -2
  13. package/dist/verbs/spike.js +8 -2
  14. package/hooks/post-edit.sh +4 -4
  15. package/hooks/pre-bash-commit.sh +3 -3
  16. package/node_modules/checkride/.claude-plugin/plugin.json +11 -0
  17. package/node_modules/checkride/CHANGELOG.md +1003 -0
  18. package/node_modules/checkride/LICENSE +201 -21
  19. package/node_modules/checkride/README.md +171 -30
  20. package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.d.ts +15 -0
  21. package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.d.ts.map +1 -0
  22. package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.js +17 -0
  23. package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.js.map +1 -0
  24. package/node_modules/checkride/dist/adapters.d.ts +18 -6
  25. package/node_modules/checkride/dist/adapters.d.ts.map +1 -1
  26. package/node_modules/checkride/dist/adapters.js +42 -23
  27. package/node_modules/checkride/dist/adapters.js.map +1 -1
  28. package/node_modules/checkride/dist/agent-setup/claude.d.ts +88 -0
  29. package/node_modules/checkride/dist/agent-setup/claude.d.ts.map +1 -0
  30. package/node_modules/checkride/dist/agent-setup/claude.js +305 -0
  31. package/node_modules/checkride/dist/agent-setup/claude.js.map +1 -0
  32. package/node_modules/checkride/dist/agent-setup/command.d.ts +43 -0
  33. package/node_modules/checkride/dist/agent-setup/command.d.ts.map +1 -0
  34. package/node_modules/checkride/dist/agent-setup/command.js +77 -0
  35. package/node_modules/checkride/dist/agent-setup/command.js.map +1 -0
  36. package/node_modules/checkride/dist/agent-setup/cursor.d.ts +61 -0
  37. package/node_modules/checkride/dist/agent-setup/cursor.d.ts.map +1 -0
  38. package/node_modules/checkride/dist/agent-setup/cursor.js +189 -0
  39. package/node_modules/checkride/dist/agent-setup/cursor.js.map +1 -0
  40. package/node_modules/checkride/dist/agent-setup/files.d.ts +50 -0
  41. package/node_modules/checkride/dist/agent-setup/files.d.ts.map +1 -0
  42. package/node_modules/checkride/dist/agent-setup/files.js +80 -0
  43. package/node_modules/checkride/dist/agent-setup/files.js.map +1 -0
  44. package/node_modules/checkride/dist/agent-setup/harness.d.ts +101 -0
  45. package/node_modules/checkride/dist/agent-setup/harness.d.ts.map +1 -0
  46. package/node_modules/checkride/dist/agent-setup/harness.js +84 -0
  47. package/node_modules/checkride/dist/agent-setup/harness.js.map +1 -0
  48. package/node_modules/checkride/dist/agent-setup/hook.d.ts +45 -52
  49. package/node_modules/checkride/dist/agent-setup/hook.d.ts.map +1 -1
  50. package/node_modules/checkride/dist/agent-setup/hook.js +64 -95
  51. package/node_modules/checkride/dist/agent-setup/hook.js.map +1 -1
  52. package/node_modules/checkride/dist/agent-setup/index.d.ts +10 -4
  53. package/node_modules/checkride/dist/agent-setup/index.d.ts.map +1 -1
  54. package/node_modules/checkride/dist/agent-setup/index.js +9 -4
  55. package/node_modules/checkride/dist/agent-setup/index.js.map +1 -1
  56. package/node_modules/checkride/dist/agent-setup/scripts.d.ts +58 -0
  57. package/node_modules/checkride/dist/agent-setup/scripts.d.ts.map +1 -0
  58. package/node_modules/checkride/dist/agent-setup/scripts.js +299 -0
  59. package/node_modules/checkride/dist/agent-setup/scripts.js.map +1 -0
  60. package/node_modules/checkride/dist/agent-setup/skills.d.ts +31 -0
  61. package/node_modules/checkride/dist/agent-setup/skills.d.ts.map +1 -0
  62. package/node_modules/checkride/dist/agent-setup/skills.js +56 -0
  63. package/node_modules/checkride/dist/agent-setup/skills.js.map +1 -0
  64. package/node_modules/checkride/dist/artifacts/configured.d.ts +30 -0
  65. package/node_modules/checkride/dist/artifacts/configured.d.ts.map +1 -0
  66. package/node_modules/checkride/dist/artifacts/configured.js +45 -0
  67. package/node_modules/checkride/dist/artifacts/configured.js.map +1 -0
  68. package/node_modules/checkride/dist/artifacts/format.d.ts +33 -0
  69. package/node_modules/checkride/dist/artifacts/format.d.ts.map +1 -0
  70. package/node_modules/checkride/dist/artifacts/format.js +56 -0
  71. package/node_modules/checkride/dist/artifacts/format.js.map +1 -0
  72. package/node_modules/checkride/dist/artifacts/freshness.d.ts +32 -0
  73. package/node_modules/checkride/dist/artifacts/freshness.d.ts.map +1 -0
  74. package/node_modules/checkride/dist/artifacts/freshness.js +37 -0
  75. package/node_modules/checkride/dist/artifacts/freshness.js.map +1 -0
  76. package/node_modules/checkride/dist/artifacts/index.d.ts +22 -0
  77. package/node_modules/checkride/dist/artifacts/index.d.ts.map +1 -0
  78. package/node_modules/checkride/dist/artifacts/index.js +19 -0
  79. package/node_modules/checkride/dist/artifacts/index.js.map +1 -0
  80. package/node_modules/checkride/dist/artifacts/json.d.ts +31 -0
  81. package/node_modules/checkride/dist/artifacts/json.d.ts.map +1 -0
  82. package/node_modules/checkride/dist/artifacts/json.js +47 -0
  83. package/node_modules/checkride/dist/artifacts/json.js.map +1 -0
  84. package/node_modules/checkride/dist/artifacts/raw.d.ts +60 -0
  85. package/node_modules/checkride/dist/artifacts/raw.d.ts.map +1 -0
  86. package/node_modules/checkride/dist/artifacts/raw.js +91 -0
  87. package/node_modules/checkride/dist/artifacts/raw.js.map +1 -0
  88. package/node_modules/checkride/dist/artifacts/summary.d.ts +69 -0
  89. package/node_modules/checkride/dist/artifacts/summary.d.ts.map +1 -0
  90. package/node_modules/checkride/dist/artifacts/summary.js +108 -0
  91. package/node_modules/checkride/dist/artifacts/summary.js.map +1 -0
  92. package/node_modules/checkride/dist/atomic.d.ts +16 -1
  93. package/node_modules/checkride/dist/atomic.d.ts.map +1 -1
  94. package/node_modules/checkride/dist/atomic.js +25 -3
  95. package/node_modules/checkride/dist/atomic.js.map +1 -1
  96. package/node_modules/checkride/dist/baseline/fallow.d.ts +9 -5
  97. package/node_modules/checkride/dist/baseline/fallow.d.ts.map +1 -1
  98. package/node_modules/checkride/dist/baseline/fallow.js +161 -58
  99. package/node_modules/checkride/dist/baseline/fallow.js.map +1 -1
  100. package/node_modules/checkride/dist/baseline/fingerprint.d.ts +7 -7
  101. package/node_modules/checkride/dist/baseline/fingerprint.d.ts.map +1 -1
  102. package/node_modules/checkride/dist/baseline/fingerprint.js +16 -19
  103. package/node_modules/checkride/dist/baseline/fingerprint.js.map +1 -1
  104. package/node_modules/checkride/dist/baseline/index.d.ts +4 -4
  105. package/node_modules/checkride/dist/baseline/index.d.ts.map +1 -1
  106. package/node_modules/checkride/dist/baseline/index.js +4 -4
  107. package/node_modules/checkride/dist/baseline/index.js.map +1 -1
  108. package/node_modules/checkride/dist/baseline/store.d.ts +12 -4
  109. package/node_modules/checkride/dist/baseline/store.d.ts.map +1 -1
  110. package/node_modules/checkride/dist/baseline/store.js +16 -9
  111. package/node_modules/checkride/dist/baseline/store.js.map +1 -1
  112. package/node_modules/checkride/dist/baseline-command.d.ts +5 -5
  113. package/node_modules/checkride/dist/baseline-command.js +7 -7
  114. package/node_modules/checkride/dist/baseline-command.js.map +1 -1
  115. package/node_modules/checkride/dist/cli.d.ts +17 -4
  116. package/node_modules/checkride/dist/cli.d.ts.map +1 -1
  117. package/node_modules/checkride/dist/cli.js +259 -18
  118. package/node_modules/checkride/dist/cli.js.map +1 -1
  119. package/node_modules/checkride/dist/config.d.ts +84 -8
  120. package/node_modules/checkride/dist/config.d.ts.map +1 -1
  121. package/node_modules/checkride/dist/config.js +122 -18
  122. package/node_modules/checkride/dist/config.js.map +1 -1
  123. package/node_modules/checkride/dist/digest/digest.d.ts +5 -5
  124. package/node_modules/checkride/dist/digest/digest.js +5 -5
  125. package/node_modules/checkride/dist/digest/index.d.ts +2 -2
  126. package/node_modules/checkride/dist/digest/index.js +2 -2
  127. package/node_modules/checkride/dist/doctor.d.ts +25 -6
  128. package/node_modules/checkride/dist/doctor.d.ts.map +1 -1
  129. package/node_modules/checkride/dist/doctor.js +193 -27
  130. package/node_modules/checkride/dist/doctor.js.map +1 -1
  131. package/node_modules/checkride/dist/gate.d.ts +135 -0
  132. package/node_modules/checkride/dist/gate.d.ts.map +1 -0
  133. package/node_modules/checkride/dist/gate.js +490 -0
  134. package/node_modules/checkride/dist/gate.js.map +1 -0
  135. package/node_modules/checkride/dist/init.d.ts +72 -12
  136. package/node_modules/checkride/dist/init.d.ts.map +1 -1
  137. package/node_modules/checkride/dist/init.js +324 -81
  138. package/node_modules/checkride/dist/init.js.map +1 -1
  139. package/node_modules/checkride/dist/json.d.ts +21 -0
  140. package/node_modules/checkride/dist/json.d.ts.map +1 -0
  141. package/node_modules/checkride/dist/json.js +21 -0
  142. package/node_modules/checkride/dist/json.js.map +1 -0
  143. package/node_modules/checkride/dist/links.d.ts +31 -5
  144. package/node_modules/checkride/dist/links.d.ts.map +1 -1
  145. package/node_modules/checkride/dist/links.js +141 -32
  146. package/node_modules/checkride/dist/links.js.map +1 -1
  147. package/node_modules/checkride/dist/node-pin.d.ts +129 -0
  148. package/node_modules/checkride/dist/node-pin.d.ts.map +1 -0
  149. package/node_modules/checkride/dist/node-pin.js +211 -0
  150. package/node_modules/checkride/dist/node-pin.js.map +1 -0
  151. package/node_modules/checkride/dist/orchestrator.d.ts +40 -10
  152. package/node_modules/checkride/dist/orchestrator.d.ts.map +1 -1
  153. package/node_modules/checkride/dist/orchestrator.js +196 -102
  154. package/node_modules/checkride/dist/orchestrator.js.map +1 -1
  155. package/node_modules/checkride/dist/pack.d.ts +8 -9
  156. package/node_modules/checkride/dist/pack.d.ts.map +1 -1
  157. package/node_modules/checkride/dist/pack.js +53 -17
  158. package/node_modules/checkride/dist/pack.js.map +1 -1
  159. package/node_modules/checkride/dist/pm/detect.d.ts +6 -1
  160. package/node_modules/checkride/dist/pm/detect.d.ts.map +1 -1
  161. package/node_modules/checkride/dist/pm/detect.js +6 -1
  162. package/node_modules/checkride/dist/pm/detect.js.map +1 -1
  163. package/node_modules/checkride/dist/pm/index.d.ts +6 -2
  164. package/node_modules/checkride/dist/pm/index.d.ts.map +1 -1
  165. package/node_modules/checkride/dist/pm/index.js +6 -2
  166. package/node_modules/checkride/dist/pm/index.js.map +1 -1
  167. package/node_modules/checkride/dist/pm/launch.d.ts +51 -0
  168. package/node_modules/checkride/dist/pm/launch.d.ts.map +1 -0
  169. package/node_modules/checkride/dist/pm/launch.js +92 -0
  170. package/node_modules/checkride/dist/pm/launch.js.map +1 -0
  171. package/node_modules/checkride/dist/pm/tools.d.ts +73 -0
  172. package/node_modules/checkride/dist/pm/tools.d.ts.map +1 -0
  173. package/node_modules/checkride/dist/pm/tools.js +124 -0
  174. package/node_modules/checkride/dist/pm/tools.js.map +1 -0
  175. package/node_modules/checkride/dist/pm/translate.d.ts +35 -9
  176. package/node_modules/checkride/dist/pm/translate.d.ts.map +1 -1
  177. package/node_modules/checkride/dist/pm/translate.js +78 -18
  178. package/node_modules/checkride/dist/pm/translate.js.map +1 -1
  179. package/node_modules/checkride/dist/proc.d.ts +30 -0
  180. package/node_modules/checkride/dist/proc.d.ts.map +1 -0
  181. package/node_modules/checkride/dist/proc.js +42 -0
  182. package/node_modules/checkride/dist/proc.js.map +1 -0
  183. package/node_modules/checkride/dist/qa/cli.d.ts +20 -0
  184. package/node_modules/checkride/dist/qa/cli.d.ts.map +1 -0
  185. package/node_modules/checkride/dist/qa/cli.js +24 -0
  186. package/node_modules/checkride/dist/qa/cli.js.map +1 -0
  187. package/node_modules/checkride/dist/qa/dead.d.ts +39 -0
  188. package/node_modules/checkride/dist/qa/dead.d.ts.map +1 -0
  189. package/node_modules/checkride/dist/qa/dead.js +88 -0
  190. package/node_modules/checkride/dist/qa/dead.js.map +1 -0
  191. package/node_modules/checkride/dist/qa/dupes.d.ts +45 -0
  192. package/node_modules/checkride/dist/qa/dupes.d.ts.map +1 -0
  193. package/node_modules/checkride/dist/qa/dupes.js +62 -0
  194. package/node_modules/checkride/dist/qa/dupes.js.map +1 -0
  195. package/node_modules/checkride/dist/qa/health.d.ts +85 -0
  196. package/node_modules/checkride/dist/qa/health.d.ts.map +1 -0
  197. package/node_modules/checkride/dist/qa/health.js +109 -0
  198. package/node_modules/checkride/dist/qa/health.js.map +1 -0
  199. package/node_modules/checkride/dist/qa/index.d.ts +23 -0
  200. package/node_modules/checkride/dist/qa/index.d.ts.map +1 -0
  201. package/node_modules/checkride/dist/qa/index.js +22 -0
  202. package/node_modules/checkride/dist/qa/index.js.map +1 -0
  203. package/node_modules/checkride/dist/qa/mutation.d.ts +80 -0
  204. package/node_modules/checkride/dist/qa/mutation.d.ts.map +1 -0
  205. package/node_modules/checkride/dist/qa/mutation.js +195 -0
  206. package/node_modules/checkride/dist/qa/mutation.js.map +1 -0
  207. package/node_modules/checkride/dist/qa/qa.d.ts +71 -0
  208. package/node_modules/checkride/dist/qa/qa.d.ts.map +1 -0
  209. package/node_modules/checkride/dist/qa/qa.js +158 -0
  210. package/node_modules/checkride/dist/qa/qa.js.map +1 -0
  211. package/node_modules/checkride/dist/qa/read.d.ts +40 -0
  212. package/node_modules/checkride/dist/qa/read.d.ts.map +1 -0
  213. package/node_modules/checkride/dist/qa/read.js +47 -0
  214. package/node_modules/checkride/dist/qa/read.js.map +1 -0
  215. package/node_modules/checkride/dist/qa/render.d.ts +26 -0
  216. package/node_modules/checkride/dist/qa/render.d.ts.map +1 -0
  217. package/node_modules/checkride/dist/qa/render.js +310 -0
  218. package/node_modules/checkride/dist/qa/render.js.map +1 -0
  219. package/node_modules/checkride/dist/security.d.ts +45 -0
  220. package/node_modules/checkride/dist/security.d.ts.map +1 -0
  221. package/node_modules/checkride/dist/security.js +86 -0
  222. package/node_modules/checkride/dist/security.js.map +1 -0
  223. package/node_modules/checkride/dist/smoke.d.ts +5 -5
  224. package/node_modules/checkride/dist/smoke.js +5 -5
  225. package/node_modules/checkride/dist/snippets.d.ts +26 -29
  226. package/node_modules/checkride/dist/snippets.d.ts.map +1 -1
  227. package/node_modules/checkride/dist/snippets.js +26 -30
  228. package/node_modules/checkride/dist/snippets.js.map +1 -1
  229. package/node_modules/checkride/dist/tool-json.d.ts +33 -0
  230. package/node_modules/checkride/dist/tool-json.d.ts.map +1 -0
  231. package/node_modules/checkride/dist/tool-json.js +58 -0
  232. package/node_modules/checkride/dist/tool-json.js.map +1 -0
  233. package/node_modules/checkride/dist/triage/cli.d.ts +21 -0
  234. package/node_modules/checkride/dist/triage/cli.d.ts.map +1 -0
  235. package/node_modules/checkride/dist/triage/cli.js +26 -0
  236. package/node_modules/checkride/dist/triage/cli.js.map +1 -0
  237. package/node_modules/checkride/dist/triage/doctor-fold.d.ts +51 -0
  238. package/node_modules/checkride/dist/triage/doctor-fold.d.ts.map +1 -0
  239. package/node_modules/checkride/dist/triage/doctor-fold.js +88 -0
  240. package/node_modules/checkride/dist/triage/doctor-fold.js.map +1 -0
  241. package/node_modules/checkride/dist/triage/env.d.ts +54 -0
  242. package/node_modules/checkride/dist/triage/env.d.ts.map +1 -0
  243. package/node_modules/checkride/dist/triage/env.js +81 -0
  244. package/node_modules/checkride/dist/triage/env.js.map +1 -0
  245. package/node_modules/checkride/dist/triage/gate.d.ts +61 -0
  246. package/node_modules/checkride/dist/triage/gate.d.ts.map +1 -0
  247. package/node_modules/checkride/dist/triage/gate.js +121 -0
  248. package/node_modules/checkride/dist/triage/gate.js.map +1 -0
  249. package/node_modules/checkride/dist/triage/index.d.ts +22 -0
  250. package/node_modules/checkride/dist/triage/index.d.ts.map +1 -0
  251. package/node_modules/checkride/dist/triage/index.js +20 -0
  252. package/node_modules/checkride/dist/triage/index.js.map +1 -0
  253. package/node_modules/checkride/dist/triage/render.d.ts +19 -0
  254. package/node_modules/checkride/dist/triage/render.d.ts.map +1 -0
  255. package/node_modules/checkride/dist/triage/render.js +419 -0
  256. package/node_modules/checkride/dist/triage/render.js.map +1 -0
  257. package/node_modules/checkride/dist/triage/triage.d.ts +83 -0
  258. package/node_modules/checkride/dist/triage/triage.d.ts.map +1 -0
  259. package/node_modules/checkride/dist/triage/triage.js +131 -0
  260. package/node_modules/checkride/dist/triage/triage.js.map +1 -0
  261. package/node_modules/checkride/package.json +17 -15
  262. package/node_modules/checkride/schema/checkride.config.schema.json +62 -5
  263. package/node_modules/checkride/schema/checkride.summary.schema.json +1 -1
  264. package/node_modules/checkride/skills/check/SKILL.md +257 -0
  265. package/node_modules/checkride/skills/qa/SKILL.md +231 -0
  266. package/node_modules/checkride/templates/shared/cspell.json +1 -0
  267. package/node_modules/checkride/templates/shared/oxlintrc.json +1 -1
  268. package/package.json +2 -2
  269. package/skills/build/SKILL.md +23 -19
  270. package/skills/finish/SKILL.md +3 -1
  271. package/skills/harvest/SKILL.md +2 -1
  272. package/skills/plan/SKILL.md +8 -7
  273. package/skills/recover/SKILL.md +28 -0
  274. package/skills/refine/SKILL.md +5 -4
  275. package/skills/spike/SKILL.md +1 -1
  276. package/skills/step/SKILL.md +4 -4
  277. package/skills/verify/SKILL.md +19 -14
  278. package/templates/intent.md +8 -7
@@ -0,0 +1,129 @@
1
+ /**
2
+ * The repo's Node pin, and aligning a child process to it.
3
+ *
4
+ * Agent harnesses run their hooks in a **non-login shell**. A version manager
5
+ * puts its shims on `PATH` from a shell rc file, so the hook never sees them: it
6
+ * gets whatever `node` the machine defaults to, not the one the contributor's
7
+ * terminal has. In a repo that pins `engines.node`, that is enough for the
8
+ * package manager to refuse to run anything at all — the gate then reports a red
9
+ * that no code change can clear, every turn, and the rational response is to
10
+ * turn the gate off.
11
+ *
12
+ * So before running the check script, checkride puts the pinned interpreter back
13
+ * in front of the child's `PATH`. Four rules bound that, because silently
14
+ * choosing which Node a repo's whole pipeline runs on is not a small thing to
15
+ * do:
16
+ *
17
+ * 1. **Only on an explicit version-manager pin** — `.nvmrc` or `.node-version`,
18
+ * a file whose entire purpose is to name the interpreter this repo wants.
19
+ * `engines.node` is a *range*, a compatibility declaration about what will
20
+ * work, and reading it as an instruction to switch interpreters would be
21
+ * inventing intent the author did not express. It is read for diagnosis only.
22
+ * 2. **Only when the running Node does not already satisfy the pin.** A healthy
23
+ * environment is never touched.
24
+ * 3. **Only an interpreter already installed** in a known version-manager
25
+ * layout. Nothing is downloaded, and no version manager is invoked — under a
26
+ * non-login shell there is nothing to invoke, since `nvm` is a shell
27
+ * function rather than a binary.
28
+ * 4. **Never silently.** Every caller that aligns says so in its report.
29
+ *
30
+ * When any of those fails, this module returns what it found and changes
31
+ * nothing; the caller then has an honest cause to name instead of a false red.
32
+ * `CHECKRIDE_NODE_BIN` is the escape hatch in both directions — a directory to
33
+ * use verbatim (the wrapping point for a layout this module does not know), or
34
+ * `off` to disable alignment entirely.
35
+ */
36
+ /** The environment variable that overrides, or disables, alignment. */
37
+ export declare const NODE_BIN_VAR = "CHECKRIDE_NODE_BIN";
38
+ /** A version-manager pin: the file that carries it, and the version it names. */
39
+ export type NodePin = {
40
+ file: string;
41
+ version: string;
42
+ };
43
+ /** An installed interpreter: its `bin` directory and the exact version there. */
44
+ export type NodeInstall = {
45
+ bin: string;
46
+ version: string;
47
+ };
48
+ /**
49
+ * What aligning found. Produced only when there is something to do or to
50
+ * report, so the three shapes are all meaningful:
51
+ *
52
+ * - `bin` set — put it in front of the child's `PATH`, and say so.
53
+ * - `pin` set with no `bin` — the repo names a Node that is installed nowhere
54
+ * this module looks. The actionable case: nothing changes, and the caller now
55
+ * has a cause to name instead of a red it cannot explain.
56
+ * - no `pin` — {@link NODE_BIN_VAR} named the directory outright, so there was
57
+ * no pin to consult.
58
+ */
59
+ export type NodeAlignment = {
60
+ pin: NodePin | null;
61
+ /** The Node running this process, without the leading `v`. */
62
+ running: string;
63
+ /** The `bin` directory to prepend, or `null` when nothing satisfying the pin is installed. */
64
+ bin: string | null;
65
+ /** The version behind `bin`, when checkride resolved it rather than being handed it. */
66
+ version: string | null;
67
+ };
68
+ /** Every environment touch, injectable so the layouts are testable without them. */
69
+ export type PinEnv = {
70
+ exists: (path: string) => boolean;
71
+ read: (path: string) => string | null;
72
+ list: (dir: string) => string[];
73
+ home: () => string;
74
+ /** The running Node's version, without the leading `v`. */
75
+ running: () => string;
76
+ variable: (name: string) => string | undefined;
77
+ };
78
+ export declare const realPinEnv: PinEnv;
79
+ /**
80
+ * The pin `cwd` declares, or `null`.
81
+ *
82
+ * `null` covers both "no pin file" and a pin naming something this module cannot
83
+ * resolve to a version — `lts/*`, `lts/jod`, `node`, `system`. Those are aliases
84
+ * a version manager resolves against its own alias directory and its own idea of
85
+ * the current LTS, and guessing at either would pick an interpreter the repo
86
+ * never named.
87
+ */
88
+ export declare function readNodePin(cwd: string, env?: PinEnv): NodePin | null;
89
+ /**
90
+ * Does `version` satisfy `pin`, reading the pin as a prefix?
91
+ *
92
+ * That is how every version manager reads these files: `.nvmrc` holding `22`
93
+ * means "the newest 22 you have", not "22.0.0". A fully-spelled pin therefore
94
+ * matches only itself, and a partial one matches its whole line.
95
+ */
96
+ export declare function satisfiesPin(pin: string, version: string): boolean;
97
+ /**
98
+ * Find an installed interpreter satisfying `pin`, searching the known layouts in
99
+ * order and taking the newest match within the first layout that has one.
100
+ *
101
+ * Order matters only when two managers both hold a match, which is rare and
102
+ * where either answer is defensible; searching the first hit keeps this from
103
+ * stat-ing every layout on every gate run.
104
+ */
105
+ export declare function findPinnedNode(pin: NodePin, env?: PinEnv): NodeInstall | null;
106
+ /**
107
+ * Decide whether this process should align a child to the repo's Node pin, and
108
+ * to what.
109
+ *
110
+ * `null` means "nothing to do, change nothing" — alignment is off, the repo
111
+ * pins nothing resolvable, or the running Node already satisfies the pin. A
112
+ * returned alignment always describes a real divergence, whether or not an
113
+ * interpreter was found for it, because the caller has something to report
114
+ * either way.
115
+ *
116
+ * An explicit {@link NODE_BIN_VAR} path is honored *before* the pin is read and
117
+ * regardless of what it says: someone who names the directory has stated an
118
+ * intent more specific than any file in the repo, and a wrapping point that only
119
+ * worked in the cases checkride already handles would not be one.
120
+ */
121
+ export declare function alignNode(cwd: string, env?: PinEnv): NodeAlignment | null;
122
+ /**
123
+ * `env` with `bin` in front of `PATH`. Prepending rather than replacing is what
124
+ * keeps the rest of the toolchain reachable: only the interpreter resolution
125
+ * changes, and every other binary the check script needs still resolves exactly
126
+ * as it did.
127
+ */
128
+ export declare function withNodeBin(env: Readonly<Record<string, string | undefined>>, bin: string): Record<string, string | undefined>;
129
+ //# sourceMappingURL=node-pin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-pin.d.ts","sourceRoot":"","sources":["../src/node-pin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAMH,uEAAuE;AACvE,eAAO,MAAM,YAAY,uBAAuB,CAAC;AA4BjD,iFAAiF;AACjF,MAAM,MAAM,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IACpB,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,8FAA8F;IAC9F,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,wFAAwF;IACxF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,MAAM,GAAG;IACnB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACtC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;IAChC,IAAI,EAAE,MAAM,MAAM,CAAC;IACnB,2DAA2D;IAC3D,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAChD,CAAC;AAoBF,eAAO,MAAM,UAAU,EAAE,MAOxB,CAAC;AAQF;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAmB,GAAG,OAAO,GAAG,IAAI,CAQjF;AAOD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAIlE;AAsBD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,GAAE,MAAmB,GAAG,WAAW,GAAG,IAAI,CAWzF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAmB,GAAG,aAAa,GAAG,IAAI,CAWrF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EACjD,GAAG,EAAE,MAAM,GACV,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAGpC"}
@@ -0,0 +1,211 @@
1
+ /**
2
+ * The repo's Node pin, and aligning a child process to it.
3
+ *
4
+ * Agent harnesses run their hooks in a **non-login shell**. A version manager
5
+ * puts its shims on `PATH` from a shell rc file, so the hook never sees them: it
6
+ * gets whatever `node` the machine defaults to, not the one the contributor's
7
+ * terminal has. In a repo that pins `engines.node`, that is enough for the
8
+ * package manager to refuse to run anything at all — the gate then reports a red
9
+ * that no code change can clear, every turn, and the rational response is to
10
+ * turn the gate off.
11
+ *
12
+ * So before running the check script, checkride puts the pinned interpreter back
13
+ * in front of the child's `PATH`. Four rules bound that, because silently
14
+ * choosing which Node a repo's whole pipeline runs on is not a small thing to
15
+ * do:
16
+ *
17
+ * 1. **Only on an explicit version-manager pin** — `.nvmrc` or `.node-version`,
18
+ * a file whose entire purpose is to name the interpreter this repo wants.
19
+ * `engines.node` is a *range*, a compatibility declaration about what will
20
+ * work, and reading it as an instruction to switch interpreters would be
21
+ * inventing intent the author did not express. It is read for diagnosis only.
22
+ * 2. **Only when the running Node does not already satisfy the pin.** A healthy
23
+ * environment is never touched.
24
+ * 3. **Only an interpreter already installed** in a known version-manager
25
+ * layout. Nothing is downloaded, and no version manager is invoked — under a
26
+ * non-login shell there is nothing to invoke, since `nvm` is a shell
27
+ * function rather than a binary.
28
+ * 4. **Never silently.** Every caller that aligns says so in its report.
29
+ *
30
+ * When any of those fails, this module returns what it found and changes
31
+ * nothing; the caller then has an honest cause to name instead of a false red.
32
+ * `CHECKRIDE_NODE_BIN` is the escape hatch in both directions — a directory to
33
+ * use verbatim (the wrapping point for a layout this module does not know), or
34
+ * `off` to disable alignment entirely.
35
+ */
36
+ import { existsSync, readdirSync, readFileSync } from 'node:fs';
37
+ import { homedir } from 'node:os';
38
+ import { delimiter, join } from 'node:path';
39
+ /** The environment variable that overrides, or disables, alignment. */
40
+ export const NODE_BIN_VAR = 'CHECKRIDE_NODE_BIN';
41
+ /** The value of {@link NODE_BIN_VAR} that turns alignment off. */
42
+ const OFF = 'off';
43
+ /** Files that name the interpreter a repo wants, in the order they are consulted. */
44
+ const PIN_FILES = ['.nvmrc', '.node-version'];
45
+ /**
46
+ * Where version managers keep their installs: a directory of per-version
47
+ * folders, and the path from one of those to its `bin`.
48
+ *
49
+ * Home-relative only, and deliberately so. A relocated install root is
50
+ * configured through the manager's own environment variable (`NVM_DIR`,
51
+ * `N_PREFIX`, …), which a non-login shell does not have either — the very
52
+ * condition this module exists for. Reading them would work exactly when
53
+ * alignment is not needed. {@link NODE_BIN_VAR} covers the rest.
54
+ */
55
+ const LAYOUTS = [
56
+ { root: ['.nvm', 'versions', 'node'], bin: ['bin'] },
57
+ { root: ['.local', 'share', 'fnm', 'node-versions'], bin: ['installation', 'bin'] },
58
+ { root: ['.fnm', 'node-versions'], bin: ['installation', 'bin'] },
59
+ { root: ['.nodenv', 'versions'], bin: ['bin'] },
60
+ { root: ['.asdf', 'installs', 'nodejs'], bin: ['bin'] },
61
+ { root: ['.volta', 'tools', 'image', 'node'], bin: ['bin'] },
62
+ { root: ['n', 'versions', 'node'], bin: ['bin'] },
63
+ ];
64
+ function readReal(path) {
65
+ try {
66
+ return readFileSync(path, 'utf8');
67
+ }
68
+ catch {
69
+ return null;
70
+ }
71
+ }
72
+ function listReal(dir) {
73
+ try {
74
+ return readdirSync(dir, { withFileTypes: true })
75
+ .filter((e) => e.isDirectory() || e.isSymbolicLink())
76
+ .map((e) => e.name);
77
+ }
78
+ catch {
79
+ return [];
80
+ }
81
+ }
82
+ export const realPinEnv = {
83
+ exists: existsSync,
84
+ read: readReal,
85
+ list: listReal,
86
+ home: homedir,
87
+ running: () => process.version.replace(/^v/, ''),
88
+ variable: (name) => process.env[name],
89
+ };
90
+ /** `v22.22.3` / `22.22.3 ` → `22.22.3`; anything not starting with a digit → `null`. */
91
+ function normalize(raw) {
92
+ const trimmed = raw.trim().replace(/^v/, '');
93
+ return /^\d/.test(trimmed) ? trimmed : null;
94
+ }
95
+ /**
96
+ * The pin `cwd` declares, or `null`.
97
+ *
98
+ * `null` covers both "no pin file" and a pin naming something this module cannot
99
+ * resolve to a version — `lts/*`, `lts/jod`, `node`, `system`. Those are aliases
100
+ * a version manager resolves against its own alias directory and its own idea of
101
+ * the current LTS, and guessing at either would pick an interpreter the repo
102
+ * never named.
103
+ */
104
+ export function readNodePin(cwd, env = realPinEnv) {
105
+ for (const file of PIN_FILES) {
106
+ const raw = env.read(join(cwd, file));
107
+ if (raw === null)
108
+ continue;
109
+ const version = normalize(raw);
110
+ if (version !== null)
111
+ return { file, version };
112
+ }
113
+ return null;
114
+ }
115
+ /** A version as numbers, for comparison. Non-numeric segments sort as 0. */
116
+ function segments(version) {
117
+ return version.split('.').map((s) => Number.parseInt(s, 10) || 0);
118
+ }
119
+ /**
120
+ * Does `version` satisfy `pin`, reading the pin as a prefix?
121
+ *
122
+ * That is how every version manager reads these files: `.nvmrc` holding `22`
123
+ * means "the newest 22 you have", not "22.0.0". A fully-spelled pin therefore
124
+ * matches only itself, and a partial one matches its whole line.
125
+ */
126
+ export function satisfiesPin(pin, version) {
127
+ const wanted = pin.split('.');
128
+ const found = version.split('.');
129
+ return wanted.every((part, i) => found[i] === part);
130
+ }
131
+ /** The higher of two versions, compared segment by segment. */
132
+ function newer(a, b) {
133
+ const [as, bs] = [segments(a), segments(b)];
134
+ const length = Math.max(as.length, bs.length);
135
+ for (let i = 0; i < length; i++) {
136
+ const diff = (as[i] ?? 0) - (bs[i] ?? 0);
137
+ if (diff !== 0)
138
+ return diff > 0 ? a : b;
139
+ }
140
+ return a;
141
+ }
142
+ /** The best installed version under one layout root, or `null` if none satisfies the pin. */
143
+ function bestUnder(root, pin, env) {
144
+ const matching = env
145
+ .list(root)
146
+ .map((name) => normalize(name))
147
+ .filter((v) => v !== null && satisfiesPin(pin, v));
148
+ return matching.length === 0 ? null : matching.reduce(newer);
149
+ }
150
+ /**
151
+ * Find an installed interpreter satisfying `pin`, searching the known layouts in
152
+ * order and taking the newest match within the first layout that has one.
153
+ *
154
+ * Order matters only when two managers both hold a match, which is rare and
155
+ * where either answer is defensible; searching the first hit keeps this from
156
+ * stat-ing every layout on every gate run.
157
+ */
158
+ export function findPinnedNode(pin, env = realPinEnv) {
159
+ for (const layout of LAYOUTS) {
160
+ const root = join(env.home(), ...layout.root);
161
+ const version = bestUnder(root, pin.version, env);
162
+ if (version === null)
163
+ continue;
164
+ // The directory name may carry the `v` the normalized version dropped.
165
+ const dir = env.exists(join(root, `v${version}`)) ? `v${version}` : version;
166
+ const bin = join(root, dir, ...layout.bin);
167
+ if (env.exists(join(bin, 'node')))
168
+ return { bin, version };
169
+ }
170
+ return null;
171
+ }
172
+ /**
173
+ * Decide whether this process should align a child to the repo's Node pin, and
174
+ * to what.
175
+ *
176
+ * `null` means "nothing to do, change nothing" — alignment is off, the repo
177
+ * pins nothing resolvable, or the running Node already satisfies the pin. A
178
+ * returned alignment always describes a real divergence, whether or not an
179
+ * interpreter was found for it, because the caller has something to report
180
+ * either way.
181
+ *
182
+ * An explicit {@link NODE_BIN_VAR} path is honored *before* the pin is read and
183
+ * regardless of what it says: someone who names the directory has stated an
184
+ * intent more specific than any file in the repo, and a wrapping point that only
185
+ * worked in the cases checkride already handles would not be one.
186
+ */
187
+ export function alignNode(cwd, env = realPinEnv) {
188
+ const override = env.variable(NODE_BIN_VAR);
189
+ if (override === OFF)
190
+ return null;
191
+ const running = env.running();
192
+ if (override !== undefined && override.length > 0) {
193
+ return { pin: readNodePin(cwd, env), running, bin: override, version: null };
194
+ }
195
+ const pin = readNodePin(cwd, env);
196
+ if (pin === null || satisfiesPin(pin.version, running))
197
+ return null;
198
+ const install = findPinnedNode(pin, env);
199
+ return { pin, running, bin: install?.bin ?? null, version: install?.version ?? null };
200
+ }
201
+ /**
202
+ * `env` with `bin` in front of `PATH`. Prepending rather than replacing is what
203
+ * keeps the rest of the toolchain reachable: only the interpreter resolution
204
+ * changes, and every other binary the check script needs still resolves exactly
205
+ * as it did.
206
+ */
207
+ export function withNodeBin(env, bin) {
208
+ const current = env['PATH'] ?? '';
209
+ return { ...env, PATH: current.length > 0 ? `${bin}${delimiter}${current}` : bin };
210
+ }
211
+ //# sourceMappingURL=node-pin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-pin.js","sourceRoot":"","sources":["../src/node-pin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH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,EAAE,OAAO,IAAI,IAAI,EAAE,CAAC;AACxF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,GAAiD,EACjD,GAAW;IAEX,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAClC,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACrF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Orchestrator — behavior-ported from the interim `scripts/check.mjs`.
2
+ * The check orchestrator.
3
3
  *
4
4
  * Resolves slots to adapters, selects which to run (flags), spawns each command
5
5
  * (or runs a built-in), captures raw output to `.check/`, and writes the
@@ -15,7 +15,7 @@ import type { PackageManager } from './pm/index.js';
15
15
  export type Out = {
16
16
  write(text: string): unknown;
17
17
  };
18
- /** Run flags, mirroring the interim script's `parseArgs` surface. */
18
+ /** Selection and output flags for a run. */
19
19
  export type RunFlags = {
20
20
  bail?: boolean;
21
21
  json?: boolean;
@@ -24,7 +24,7 @@ export type RunFlags = {
24
24
  only?: string[] | null;
25
25
  skip?: string[] | null;
26
26
  include?: string[] | null;
27
- /** Write a capped failure excerpt to `.check/digest.md` (step 11). */
27
+ /** Write a capped failure excerpt to `.check/digest.md`. */
28
28
  digest?: boolean;
29
29
  /**
30
30
  * Treat zero checks actually executing as an error (exit 2), not a vacuous
@@ -35,7 +35,7 @@ export type RunFlags = {
35
35
  /**
36
36
  * Max checks running at once within a wave (equal-`order` group). Omitted →
37
37
  * {@link defaultConcurrency}; `1` runs the whole pipeline sequentially. Ignored
38
- * under `--bail`, which is fail-fast sequential by definition (D6) — a
38
+ * under `--bail`, which is fail-fast sequential by definition — a
39
39
  * `> 1` value passed alongside `--bail` earns a one-line stderr note.
40
40
  */
41
41
  concurrency?: number;
@@ -54,8 +54,7 @@ export type SummaryCheck = {
54
54
  /**
55
55
  * Present only when a baseline masked one or more of this slot's diagnostics:
56
56
  * the count of current findings grandfathered by `checkride.baseline.json`.
57
- * Additive field — absent on runs with no baseline, so `schema_version` holds
58
- * (D8/C4).
57
+ * Additive field — absent on runs with no baseline, so `schema_version` holds.
59
58
  */
60
59
  baselined?: number;
61
60
  };
@@ -116,7 +115,7 @@ export type RunResult = {
116
115
  runs: CheckRun[];
117
116
  };
118
117
  /**
119
- * Port of the interim `select_checks`: only/skip/opt-in selection by slot name.
118
+ * Only/skip/opt-in selection by slot name.
120
119
  * An opt-in slot runs when `--all`/`--include` names it, or when it was
121
120
  * explicitly configured in `checks` (`r.explicit`) — naming a slot is opting in.
122
121
  */
@@ -131,6 +130,18 @@ export declare function runtimeArgs(adapter: Adapter, changed: boolean): string[
131
130
  * disables the cap.
132
131
  */
133
132
  export declare const DEFAULT_TIMEOUT_SECONDS = 600;
133
+ /**
134
+ * Default pool width for a wave (equal-`order` group): `min(4, max(1, cores −
135
+ * reserve))`. Heavy checks (test, mutation, build) parallelize internally, so
136
+ * oversubscribing every core is worse than a conservative cap; one reserved
137
+ * core keeps the machine responsive — for the human at it. A hosted CI runner
138
+ * has no such human, and a standard GitHub-hosted runner reports 2 CPUs, so
139
+ * reserving one there collapsed the pool to 1 and wave scheduling silently
140
+ * degenerated to fully sequential — on exactly the machine class the docs say
141
+ * to gate on. Every CI provider sets `CI`, so no core is reserved there.
142
+ * Override with `--concurrency`; `--bail` stays fail-fast sequential.
143
+ */
144
+ export declare function defaultConcurrency(env?: NodeJS.ProcessEnv, cores?: number): number;
134
145
  /**
135
146
  * Reap every in-flight check before the process dies: SIGTERM each live
136
147
  * process group (grandchildren included — see `killGroup`), escalate to
@@ -140,6 +151,26 @@ export declare const DEFAULT_TIMEOUT_SECONDS = 600;
140
151
  * signal's default exit semantics after.
141
152
  */
142
153
  export declare function killLiveChecks(): Promise<void>;
154
+ /**
155
+ * Refuse a slot whose tool this repo never declared, rather than letting the
156
+ * launcher's per-user cache decide the verdict.
157
+ *
158
+ * `--no-install` stops `npx`/`bunx` fetching a missing tool, but both still run
159
+ * a copy cached from some earlier, unrelated invocation — so the same commit
160
+ * passes on a machine that happens to hold one and fails on a clean checkout,
161
+ * which is the CI runner. A gate whose result depends on that is not reporting
162
+ * on the code. Resolving the binary in the local tree first moves the failure
163
+ * to every machine equally, and to the one place it is cheap to fix.
164
+ *
165
+ * Scoped to the launchers that *have* such a cache ({@link
166
+ * execUsesGlobalCache}): `pnpm exec` and `yarn` resolve from the project tree
167
+ * already, and pre-flighting Yarn PnP — which has no `node_modules/.bin` — would
168
+ * report every tool missing. `null` means the check may spawn.
169
+ */
170
+ export declare function missingToolOutcome(slot: string, adapter: Adapter, args: readonly string[], ctx: {
171
+ cwd: string;
172
+ pm: PackageManager;
173
+ }): CheckOutcome | null;
143
174
  /** Options shared by every command entry point (`runChecks`/`runFix`/`runDoctor`). */
144
175
  type CommonOptions = {
145
176
  cwd?: string;
@@ -160,9 +191,8 @@ type CommonContext = {
160
191
  };
161
192
  /**
162
193
  * Apply the defaults every command shares: cwd, the slot/adapter catalogues, the
163
- * config (loaded from `cwd` unless injected), and the two streams. Extracted so
164
- * `runChecks`/`runFix`/`runDoctor` resolve this identical block one way (it was
165
- * copy-pasted across all three).
194
+ * config (loaded from `cwd` unless injected), and the two streams, so
195
+ * `runChecks`/`runFix`/`runDoctor` resolve this identical block one way.
166
196
  */
167
197
  export declare function resolveCommonOptions(options: CommonOptions): CommonContext;
168
198
  /** Run the selected checks against `cwd`, persist output, write the summary. */
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,KAAK,EAAE,OAAO,EAAS,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1D,OAAO,KAAK,EAAE,QAAQ,EAAe,MAAM,qBAAqB,CAAC;AAYjE,OAAO,K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