@codyswann/lisa 6.1.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1149) hide show
  1. package/README.md +66 -0
  2. package/all/copy-overwrite/scripts/check-threshold-ratchet.mjs +12 -1
  3. package/all/copy-overwrite/scripts/lib/changed-paths.mjs +545 -0
  4. package/all/copy-overwrite/scripts/lib/npm-update-helper-inventory.mjs +1 -0
  5. package/all/copy-overwrite/scripts/lisa-gates.mjs +1304 -22
  6. package/all/copy-overwrite/scripts/lisa-reconcile-policy.mjs +40 -2
  7. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +1384 -52
  8. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +18 -6
  9. package/all/copy-overwrite/scripts/threshold-ratchet-compare.mjs +214 -3
  10. package/all/copy-overwrite/scripts/threshold-ratchet-families.mjs +166 -0
  11. package/dist/cli/controls-cmd.d.ts +31 -0
  12. package/dist/cli/controls-cmd.d.ts.map +1 -0
  13. package/dist/cli/controls-cmd.js +47 -0
  14. package/dist/cli/controls-cmd.js.map +1 -0
  15. package/dist/cli/index.d.ts.map +1 -1
  16. package/dist/cli/index.js +2 -0
  17. package/dist/cli/index.js.map +1 -1
  18. package/dist/cli/update-check-hook.d.ts.map +1 -1
  19. package/dist/cli/update-check-hook.js +5 -0
  20. package/dist/cli/update-check-hook.js.map +1 -1
  21. package/dist/controls/attest-check.d.ts +52 -0
  22. package/dist/controls/attest-check.d.ts.map +1 -0
  23. package/dist/controls/attest-check.js +278 -0
  24. package/dist/controls/attest-check.js.map +1 -0
  25. package/dist/controls/attest-record.d.ts +131 -0
  26. package/dist/controls/attest-record.d.ts.map +1 -0
  27. package/dist/controls/attest-record.js +220 -0
  28. package/dist/controls/attest-record.js.map +1 -0
  29. package/dist/controls/audit-answers-absorb.d.ts +54 -0
  30. package/dist/controls/audit-answers-absorb.d.ts.map +1 -0
  31. package/dist/controls/audit-answers-absorb.js +135 -0
  32. package/dist/controls/audit-answers-absorb.js.map +1 -0
  33. package/dist/controls/audit-answers-secrets.d.ts +31 -0
  34. package/dist/controls/audit-answers-secrets.d.ts.map +1 -0
  35. package/dist/controls/audit-answers-secrets.js +40 -0
  36. package/dist/controls/audit-answers-secrets.js.map +1 -0
  37. package/dist/controls/audit-answers.d.ts +21 -0
  38. package/dist/controls/audit-answers.d.ts.map +1 -0
  39. package/dist/controls/audit-answers.js +69 -0
  40. package/dist/controls/audit-answers.js.map +1 -0
  41. package/dist/controls/audit-gaps-file.d.ts +26 -0
  42. package/dist/controls/audit-gaps-file.d.ts.map +1 -0
  43. package/dist/controls/audit-gaps-file.js +121 -0
  44. package/dist/controls/audit-gaps-file.js.map +1 -0
  45. package/dist/controls/audit-inline-answers-file.d.ts +15 -0
  46. package/dist/controls/audit-inline-answers-file.d.ts.map +1 -0
  47. package/dist/controls/audit-inline-answers-file.js +69 -0
  48. package/dist/controls/audit-inline-answers-file.js.map +1 -0
  49. package/dist/controls/audit-inline-answers.d.ts +45 -0
  50. package/dist/controls/audit-inline-answers.d.ts.map +1 -0
  51. package/dist/controls/audit-inline-answers.js +267 -0
  52. package/dist/controls/audit-inline-answers.js.map +1 -0
  53. package/dist/controls/audit-probe-types.d.ts +97 -0
  54. package/dist/controls/audit-probe-types.d.ts.map +1 -0
  55. package/dist/controls/audit-probe-types.js +69 -0
  56. package/dist/controls/audit-probe-types.js.map +1 -0
  57. package/dist/controls/audit-probes-markdown.d.ts +12 -0
  58. package/dist/controls/audit-probes-markdown.d.ts.map +1 -0
  59. package/dist/controls/audit-probes-markdown.js +79 -0
  60. package/dist/controls/audit-probes-markdown.js.map +1 -0
  61. package/dist/controls/audit-probes.d.ts +41 -0
  62. package/dist/controls/audit-probes.d.ts.map +1 -0
  63. package/dist/controls/audit-probes.js +49 -0
  64. package/dist/controls/audit-probes.js.map +1 -0
  65. package/dist/controls/audit-question-lines.d.ts +59 -0
  66. package/dist/controls/audit-question-lines.d.ts.map +1 -0
  67. package/dist/controls/audit-question-lines.js +213 -0
  68. package/dist/controls/audit-question-lines.js.map +1 -0
  69. package/dist/controls/audit-question-region.d.ts +46 -0
  70. package/dist/controls/audit-question-region.d.ts.map +1 -0
  71. package/dist/controls/audit-question-region.js +69 -0
  72. package/dist/controls/audit-question-region.js.map +1 -0
  73. package/dist/controls/audit-question-repair.d.ts +67 -0
  74. package/dist/controls/audit-question-repair.d.ts.map +1 -0
  75. package/dist/controls/audit-question-repair.js +151 -0
  76. package/dist/controls/audit-question-repair.js.map +1 -0
  77. package/dist/controls/audit-questions-format.d.ts +71 -0
  78. package/dist/controls/audit-questions-format.d.ts.map +1 -0
  79. package/dist/controls/audit-questions-format.js +141 -0
  80. package/dist/controls/audit-questions-format.js.map +1 -0
  81. package/dist/controls/audit-questions-markdown.d.ts +28 -0
  82. package/dist/controls/audit-questions-markdown.d.ts.map +1 -0
  83. package/dist/controls/audit-questions-markdown.js +203 -0
  84. package/dist/controls/audit-questions-markdown.js.map +1 -0
  85. package/dist/controls/audit-report-file.d.ts +39 -0
  86. package/dist/controls/audit-report-file.d.ts.map +1 -0
  87. package/dist/controls/audit-report-file.js +135 -0
  88. package/dist/controls/audit-report-file.js.map +1 -0
  89. package/dist/controls/audit-report-markdown.d.ts +15 -0
  90. package/dist/controls/audit-report-markdown.d.ts.map +1 -0
  91. package/dist/controls/audit-report-markdown.js +179 -0
  92. package/dist/controls/audit-report-markdown.js.map +1 -0
  93. package/dist/controls/audit-report-probes-shape.d.ts +8 -0
  94. package/dist/controls/audit-report-probes-shape.d.ts.map +1 -0
  95. package/dist/controls/audit-report-probes-shape.js +203 -0
  96. package/dist/controls/audit-report-probes-shape.js.map +1 -0
  97. package/dist/controls/audit-report-questions-shape.d.ts +13 -0
  98. package/dist/controls/audit-report-questions-shape.d.ts.map +1 -0
  99. package/dist/controls/audit-report-questions-shape.js +197 -0
  100. package/dist/controls/audit-report-questions-shape.js.map +1 -0
  101. package/dist/controls/audit-report-rules/coverage.d.ts +53 -0
  102. package/dist/controls/audit-report-rules/coverage.d.ts.map +1 -0
  103. package/dist/controls/audit-report-rules/coverage.js +172 -0
  104. package/dist/controls/audit-report-rules/coverage.js.map +1 -0
  105. package/dist/controls/audit-report-rules/locators.d.ts +28 -0
  106. package/dist/controls/audit-report-rules/locators.d.ts.map +1 -0
  107. package/dist/controls/audit-report-rules/locators.js +62 -0
  108. package/dist/controls/audit-report-rules/locators.js.map +1 -0
  109. package/dist/controls/audit-report-rules/not-applicable.d.ts +32 -0
  110. package/dist/controls/audit-report-rules/not-applicable.d.ts.map +1 -0
  111. package/dist/controls/audit-report-rules/not-applicable.js +43 -0
  112. package/dist/controls/audit-report-rules/not-applicable.js.map +1 -0
  113. package/dist/controls/audit-report-rules/plain-language.d.ts +20 -0
  114. package/dist/controls/audit-report-rules/plain-language.d.ts.map +1 -0
  115. package/dist/controls/audit-report-rules/plain-language.js +47 -0
  116. package/dist/controls/audit-report-rules/plain-language.js.map +1 -0
  117. package/dist/controls/audit-report-rules/probe-dependents.d.ts +11 -0
  118. package/dist/controls/audit-report-rules/probe-dependents.d.ts.map +1 -0
  119. package/dist/controls/audit-report-rules/probe-dependents.js +55 -0
  120. package/dist/controls/audit-report-rules/probe-dependents.js.map +1 -0
  121. package/dist/controls/audit-report-rules/probe-secrets.d.ts +10 -0
  122. package/dist/controls/audit-report-rules/probe-secrets.d.ts.map +1 -0
  123. package/dist/controls/audit-report-rules/probe-secrets.js +33 -0
  124. package/dist/controls/audit-report-rules/probe-secrets.js.map +1 -0
  125. package/dist/controls/audit-report-rules/probes.d.ts +11 -0
  126. package/dist/controls/audit-report-rules/probes.d.ts.map +1 -0
  127. package/dist/controls/audit-report-rules/probes.js +102 -0
  128. package/dist/controls/audit-report-rules/probes.js.map +1 -0
  129. package/dist/controls/audit-report-rules/proved-evidence.d.ts +46 -0
  130. package/dist/controls/audit-report-rules/proved-evidence.d.ts.map +1 -0
  131. package/dist/controls/audit-report-rules/proved-evidence.js +162 -0
  132. package/dist/controls/audit-report-rules/proved-evidence.js.map +1 -0
  133. package/dist/controls/audit-report-rules/questions.d.ts +12 -0
  134. package/dist/controls/audit-report-rules/questions.d.ts.map +1 -0
  135. package/dist/controls/audit-report-rules/questions.js +171 -0
  136. package/dist/controls/audit-report-rules/questions.js.map +1 -0
  137. package/dist/controls/audit-report-rules/recorded-answers.d.ts +12 -0
  138. package/dist/controls/audit-report-rules/recorded-answers.d.ts.map +1 -0
  139. package/dist/controls/audit-report-rules/recorded-answers.js +104 -0
  140. package/dist/controls/audit-report-rules/recorded-answers.js.map +1 -0
  141. package/dist/controls/audit-report-rules/scopes.d.ts +21 -0
  142. package/dist/controls/audit-report-rules/scopes.d.ts.map +1 -0
  143. package/dist/controls/audit-report-rules/scopes.js +60 -0
  144. package/dist/controls/audit-report-rules/scopes.js.map +1 -0
  145. package/dist/controls/audit-report-rules/secret-values.d.ts +33 -0
  146. package/dist/controls/audit-report-rules/secret-values.d.ts.map +1 -0
  147. package/dist/controls/audit-report-rules/secret-values.js +40 -0
  148. package/dist/controls/audit-report-rules/secret-values.js.map +1 -0
  149. package/dist/controls/audit-report-rules/server-side-authority.d.ts +11 -0
  150. package/dist/controls/audit-report-rules/server-side-authority.d.ts.map +1 -0
  151. package/dist/controls/audit-report-rules/server-side-authority.js +52 -0
  152. package/dist/controls/audit-report-rules/server-side-authority.js.map +1 -0
  153. package/dist/controls/audit-report-rules/tracker-question.d.ts +26 -0
  154. package/dist/controls/audit-report-rules/tracker-question.d.ts.map +1 -0
  155. package/dist/controls/audit-report-rules/tracker-question.js +20 -0
  156. package/dist/controls/audit-report-rules/tracker-question.js.map +1 -0
  157. package/dist/controls/audit-report-shape.d.ts +36 -0
  158. package/dist/controls/audit-report-shape.d.ts.map +1 -0
  159. package/dist/controls/audit-report-shape.js +300 -0
  160. package/dist/controls/audit-report-shape.js.map +1 -0
  161. package/dist/controls/audit-report-types.d.ts +222 -0
  162. package/dist/controls/audit-report-types.d.ts.map +1 -0
  163. package/dist/controls/audit-report-types.js +53 -0
  164. package/dist/controls/audit-report-types.js.map +1 -0
  165. package/dist/controls/audit-report-wording.d.ts +36 -0
  166. package/dist/controls/audit-report-wording.d.ts.map +1 -0
  167. package/dist/controls/audit-report-wording.js +58 -0
  168. package/dist/controls/audit-report-wording.js.map +1 -0
  169. package/dist/controls/audit-report.d.ts +22 -0
  170. package/dist/controls/audit-report.d.ts.map +1 -0
  171. package/dist/controls/audit-report.js +79 -0
  172. package/dist/controls/audit-report.js.map +1 -0
  173. package/dist/controls/before-enforce-findings.d.ts +25 -0
  174. package/dist/controls/before-enforce-findings.d.ts.map +1 -0
  175. package/dist/controls/before-enforce-findings.js +172 -0
  176. package/dist/controls/before-enforce-findings.js.map +1 -0
  177. package/dist/controls/before-enforce-observe.d.ts +116 -0
  178. package/dist/controls/before-enforce-observe.d.ts.map +1 -0
  179. package/dist/controls/before-enforce-observe.js +164 -0
  180. package/dist/controls/before-enforce-observe.js.map +1 -0
  181. package/dist/controls/before-enforce-plan.d.ts +52 -0
  182. package/dist/controls/before-enforce-plan.d.ts.map +1 -0
  183. package/dist/controls/before-enforce-plan.js +83 -0
  184. package/dist/controls/before-enforce-plan.js.map +1 -0
  185. package/dist/controls/before-enforce-report.d.ts +33 -0
  186. package/dist/controls/before-enforce-report.d.ts.map +1 -0
  187. package/dist/controls/before-enforce-report.js +94 -0
  188. package/dist/controls/before-enforce-report.js.map +1 -0
  189. package/dist/controls/before-enforce-run.d.ts +50 -0
  190. package/dist/controls/before-enforce-run.d.ts.map +1 -0
  191. package/dist/controls/before-enforce-run.js +199 -0
  192. package/dist/controls/before-enforce-run.js.map +1 -0
  193. package/dist/controls/before-enforce-types.d.ts +161 -0
  194. package/dist/controls/before-enforce-types.d.ts.map +1 -0
  195. package/dist/controls/before-enforce-types.js +66 -0
  196. package/dist/controls/before-enforce-types.js.map +1 -0
  197. package/dist/controls/before-enforce-wording.d.ts +99 -0
  198. package/dist/controls/before-enforce-wording.d.ts.map +1 -0
  199. package/dist/controls/before-enforce-wording.js +182 -0
  200. package/dist/controls/before-enforce-wording.js.map +1 -0
  201. package/dist/controls/before-enforce-workspace.d.ts +31 -0
  202. package/dist/controls/before-enforce-workspace.d.ts.map +1 -0
  203. package/dist/controls/before-enforce-workspace.js +101 -0
  204. package/dist/controls/before-enforce-workspace.js.map +1 -0
  205. package/dist/controls/canary-door.d.ts +59 -0
  206. package/dist/controls/canary-door.d.ts.map +1 -0
  207. package/dist/controls/canary-door.js +143 -0
  208. package/dist/controls/canary-door.js.map +1 -0
  209. package/dist/controls/canary-eligibility.d.ts +107 -0
  210. package/dist/controls/canary-eligibility.d.ts.map +1 -0
  211. package/dist/controls/canary-eligibility.js +267 -0
  212. package/dist/controls/canary-eligibility.js.map +1 -0
  213. package/dist/controls/canary-half.d.ts +73 -0
  214. package/dist/controls/canary-half.d.ts.map +1 -0
  215. package/dist/controls/canary-half.js +251 -0
  216. package/dist/controls/canary-half.js.map +1 -0
  217. package/dist/controls/canary-lifecycle.d.ts +132 -0
  218. package/dist/controls/canary-lifecycle.d.ts.map +1 -0
  219. package/dist/controls/canary-lifecycle.js +313 -0
  220. package/dist/controls/canary-lifecycle.js.map +1 -0
  221. package/dist/controls/canary-names.d.ts +88 -0
  222. package/dist/controls/canary-names.d.ts.map +1 -0
  223. package/dist/controls/canary-names.js +147 -0
  224. package/dist/controls/canary-names.js.map +1 -0
  225. package/dist/controls/canary-plan.d.ts +31 -0
  226. package/dist/controls/canary-plan.d.ts.map +1 -0
  227. package/dist/controls/canary-plan.js +80 -0
  228. package/dist/controls/canary-plan.js.map +1 -0
  229. package/dist/controls/canary-tree.d.ts +49 -0
  230. package/dist/controls/canary-tree.d.ts.map +1 -0
  231. package/dist/controls/canary-tree.js +283 -0
  232. package/dist/controls/canary-tree.js.map +1 -0
  233. package/dist/controls/canonical-json.d.ts +62 -0
  234. package/dist/controls/canonical-json.d.ts.map +1 -0
  235. package/dist/controls/canonical-json.js +118 -0
  236. package/dist/controls/canonical-json.js.map +1 -0
  237. package/dist/controls/carrier-agent-files.d.ts +13 -0
  238. package/dist/controls/carrier-agent-files.d.ts.map +1 -0
  239. package/dist/controls/carrier-agent-files.js +139 -0
  240. package/dist/controls/carrier-agent-files.js.map +1 -0
  241. package/dist/controls/carrier-agent-program.d.ts +36 -0
  242. package/dist/controls/carrier-agent-program.d.ts.map +1 -0
  243. package/dist/controls/carrier-agent-program.js +284 -0
  244. package/dist/controls/carrier-agent-program.js.map +1 -0
  245. package/dist/controls/carrier-agent-result.d.ts +30 -0
  246. package/dist/controls/carrier-agent-result.d.ts.map +1 -0
  247. package/dist/controls/carrier-agent-result.js +134 -0
  248. package/dist/controls/carrier-agent-result.js.map +1 -0
  249. package/dist/controls/carrier-agent-script.d.ts +24 -0
  250. package/dist/controls/carrier-agent-script.d.ts.map +1 -0
  251. package/dist/controls/carrier-agent-script.js +132 -0
  252. package/dist/controls/carrier-agent-script.js.map +1 -0
  253. package/dist/controls/carrier-agent-settings.d.ts +30 -0
  254. package/dist/controls/carrier-agent-settings.d.ts.map +1 -0
  255. package/dist/controls/carrier-agent-settings.js +226 -0
  256. package/dist/controls/carrier-agent-settings.js.map +1 -0
  257. package/dist/controls/carrier-agent-surfaces.d.ts +117 -0
  258. package/dist/controls/carrier-agent-surfaces.d.ts.map +1 -0
  259. package/dist/controls/carrier-agent-surfaces.js +103 -0
  260. package/dist/controls/carrier-agent-surfaces.js.map +1 -0
  261. package/dist/controls/carrier-agents.d.ts +16 -0
  262. package/dist/controls/carrier-agents.d.ts.map +1 -0
  263. package/dist/controls/carrier-agents.js +251 -0
  264. package/dist/controls/carrier-agents.js.map +1 -0
  265. package/dist/controls/carrier-edits.d.ts +88 -0
  266. package/dist/controls/carrier-edits.d.ts.map +1 -0
  267. package/dist/controls/carrier-edits.js +170 -0
  268. package/dist/controls/carrier-edits.js.map +1 -0
  269. package/dist/controls/carrier-git-hooks.d.ts +10 -0
  270. package/dist/controls/carrier-git-hooks.d.ts.map +1 -0
  271. package/dist/controls/carrier-git-hooks.js +234 -0
  272. package/dist/controls/carrier-git-hooks.js.map +1 -0
  273. package/dist/controls/carrier-git.d.ts +65 -0
  274. package/dist/controls/carrier-git.d.ts.map +1 -0
  275. package/dist/controls/carrier-git.js +102 -0
  276. package/dist/controls/carrier-git.js.map +1 -0
  277. package/dist/controls/carrier-hook-here-documents.d.ts +30 -0
  278. package/dist/controls/carrier-hook-here-documents.d.ts.map +1 -0
  279. package/dist/controls/carrier-hook-here-documents.js +111 -0
  280. package/dist/controls/carrier-hook-here-documents.js.map +1 -0
  281. package/dist/controls/carrier-hook-reach.d.ts +24 -0
  282. package/dist/controls/carrier-hook-reach.d.ts.map +1 -0
  283. package/dist/controls/carrier-hook-reach.js +344 -0
  284. package/dist/controls/carrier-hook-reach.js.map +1 -0
  285. package/dist/controls/carrier-hook-words.d.ts +43 -0
  286. package/dist/controls/carrier-hook-words.d.ts.map +1 -0
  287. package/dist/controls/carrier-hook-words.js +129 -0
  288. package/dist/controls/carrier-hook-words.js.map +1 -0
  289. package/dist/controls/carrier-ignore.d.ts +19 -0
  290. package/dist/controls/carrier-ignore.d.ts.map +1 -0
  291. package/dist/controls/carrier-ignore.js +58 -0
  292. package/dist/controls/carrier-ignore.js.map +1 -0
  293. package/dist/controls/carrier-json-place.d.ts +62 -0
  294. package/dist/controls/carrier-json-place.d.ts.map +1 -0
  295. package/dist/controls/carrier-json-place.js +351 -0
  296. package/dist/controls/carrier-json-place.js.map +1 -0
  297. package/dist/controls/carrier-lefthook.d.ts +18 -0
  298. package/dist/controls/carrier-lefthook.d.ts.map +1 -0
  299. package/dist/controls/carrier-lefthook.js +151 -0
  300. package/dist/controls/carrier-lefthook.js.map +1 -0
  301. package/dist/controls/carrier-manager-file.d.ts +50 -0
  302. package/dist/controls/carrier-manager-file.d.ts.map +1 -0
  303. package/dist/controls/carrier-manager-file.js +125 -0
  304. package/dist/controls/carrier-manager-file.js.map +1 -0
  305. package/dist/controls/carrier-outcome.d.ts +43 -0
  306. package/dist/controls/carrier-outcome.d.ts.map +1 -0
  307. package/dist/controls/carrier-outcome.js +37 -0
  308. package/dist/controls/carrier-outcome.js.map +1 -0
  309. package/dist/controls/carrier-owned-files.d.ts +39 -0
  310. package/dist/controls/carrier-owned-files.d.ts.map +1 -0
  311. package/dist/controls/carrier-owned-files.js +113 -0
  312. package/dist/controls/carrier-owned-files.js.map +1 -0
  313. package/dist/controls/carrier-owner.d.ts +71 -0
  314. package/dist/controls/carrier-owner.d.ts.map +1 -0
  315. package/dist/controls/carrier-owner.js +174 -0
  316. package/dist/controls/carrier-owner.js.map +1 -0
  317. package/dist/controls/carrier-pre-commit.d.ts +15 -0
  318. package/dist/controls/carrier-pre-commit.d.ts.map +1 -0
  319. package/dist/controls/carrier-pre-commit.js +232 -0
  320. package/dist/controls/carrier-pre-commit.js.map +1 -0
  321. package/dist/controls/carrier-result.d.ts +14 -0
  322. package/dist/controls/carrier-result.d.ts.map +1 -0
  323. package/dist/controls/carrier-result.js +204 -0
  324. package/dist/controls/carrier-result.js.map +1 -0
  325. package/dist/controls/carrier-roster.d.ts +29 -0
  326. package/dist/controls/carrier-roster.d.ts.map +1 -0
  327. package/dist/controls/carrier-roster.js +162 -0
  328. package/dist/controls/carrier-roster.js.map +1 -0
  329. package/dist/controls/carrier-runner-files.d.ts +10 -0
  330. package/dist/controls/carrier-runner-files.d.ts.map +1 -0
  331. package/dist/controls/carrier-runner-files.js +92 -0
  332. package/dist/controls/carrier-runner-files.js.map +1 -0
  333. package/dist/controls/carrier-script.d.ts +226 -0
  334. package/dist/controls/carrier-script.d.ts.map +1 -0
  335. package/dist/controls/carrier-script.js +416 -0
  336. package/dist/controls/carrier-script.js.map +1 -0
  337. package/dist/controls/carrier-shell-hook.d.ts +45 -0
  338. package/dist/controls/carrier-shell-hook.d.ts.map +1 -0
  339. package/dist/controls/carrier-shell-hook.js +222 -0
  340. package/dist/controls/carrier-shell-hook.js.map +1 -0
  341. package/dist/controls/carrier-types.d.ts +327 -0
  342. package/dist/controls/carrier-types.d.ts.map +1 -0
  343. package/dist/controls/carrier-types.js +99 -0
  344. package/dist/controls/carrier-types.js.map +1 -0
  345. package/dist/controls/carrier-unenforceable.d.ts +22 -0
  346. package/dist/controls/carrier-unenforceable.d.ts.map +1 -0
  347. package/dist/controls/carrier-unenforceable.js +246 -0
  348. package/dist/controls/carrier-unenforceable.js.map +1 -0
  349. package/dist/controls/carrier-yaml-lines.d.ts +139 -0
  350. package/dist/controls/carrier-yaml-lines.d.ts.map +1 -0
  351. package/dist/controls/carrier-yaml-lines.js +192 -0
  352. package/dist/controls/carrier-yaml-lines.js.map +1 -0
  353. package/dist/controls/carriers.d.ts +56 -0
  354. package/dist/controls/carriers.d.ts.map +1 -0
  355. package/dist/controls/carriers.js +264 -0
  356. package/dist/controls/carriers.js.map +1 -0
  357. package/dist/controls/catalogue.d.ts +85 -0
  358. package/dist/controls/catalogue.d.ts.map +1 -0
  359. package/dist/controls/catalogue.js +120 -0
  360. package/dist/controls/catalogue.js.map +1 -0
  361. package/dist/controls/checks-binding.d.ts +75 -0
  362. package/dist/controls/checks-binding.d.ts.map +1 -0
  363. package/dist/controls/checks-binding.js +372 -0
  364. package/dist/controls/checks-binding.js.map +1 -0
  365. package/dist/controls/coding-agents.d.ts +45 -0
  366. package/dist/controls/coding-agents.d.ts.map +1 -0
  367. package/dist/controls/coding-agents.js +51 -0
  368. package/dist/controls/coding-agents.js.map +1 -0
  369. package/dist/controls/commands/attest-attempt.d.ts +68 -0
  370. package/dist/controls/commands/attest-attempt.d.ts.map +1 -0
  371. package/dist/controls/commands/attest-attempt.js +162 -0
  372. package/dist/controls/commands/attest-attempt.js.map +1 -0
  373. package/dist/controls/commands/attest-before-enforce.d.ts +56 -0
  374. package/dist/controls/commands/attest-before-enforce.d.ts.map +1 -0
  375. package/dist/controls/commands/attest-before-enforce.js +265 -0
  376. package/dist/controls/commands/attest-before-enforce.js.map +1 -0
  377. package/dist/controls/commands/attest-interruption.d.ts +36 -0
  378. package/dist/controls/commands/attest-interruption.d.ts.map +1 -0
  379. package/dist/controls/commands/attest-interruption.js +111 -0
  380. package/dist/controls/commands/attest-interruption.js.map +1 -0
  381. package/dist/controls/commands/attest-options.d.ts +68 -0
  382. package/dist/controls/commands/attest-options.d.ts.map +1 -0
  383. package/dist/controls/commands/attest-options.js +12 -0
  384. package/dist/controls/commands/attest-options.js.map +1 -0
  385. package/dist/controls/commands/attest-report-only.d.ts +27 -0
  386. package/dist/controls/commands/attest-report-only.d.ts.map +1 -0
  387. package/dist/controls/commands/attest-report-only.js +52 -0
  388. package/dist/controls/commands/attest-report-only.js.map +1 -0
  389. package/dist/controls/commands/attest-workspace.d.ts +65 -0
  390. package/dist/controls/commands/attest-workspace.d.ts.map +1 -0
  391. package/dist/controls/commands/attest-workspace.js +166 -0
  392. package/dist/controls/commands/attest-workspace.js.map +1 -0
  393. package/dist/controls/commands/attest.d.ts +23 -0
  394. package/dist/controls/commands/attest.d.ts.map +1 -0
  395. package/dist/controls/commands/attest.js +281 -0
  396. package/dist/controls/commands/attest.js.map +1 -0
  397. package/dist/controls/commands/catalogue.d.ts +72 -0
  398. package/dist/controls/commands/catalogue.d.ts.map +1 -0
  399. package/dist/controls/commands/catalogue.js +54 -0
  400. package/dist/controls/commands/catalogue.js.map +1 -0
  401. package/dist/controls/commands/declaration-check.d.ts +39 -0
  402. package/dist/controls/commands/declaration-check.d.ts.map +1 -0
  403. package/dist/controls/commands/declaration-check.js +98 -0
  404. package/dist/controls/commands/declaration-check.js.map +1 -0
  405. package/dist/controls/commands/enforce-report.d.ts +38 -0
  406. package/dist/controls/commands/enforce-report.d.ts.map +1 -0
  407. package/dist/controls/commands/enforce-report.js +183 -0
  408. package/dist/controls/commands/enforce-report.js.map +1 -0
  409. package/dist/controls/commands/gaps.d.ts +101 -0
  410. package/dist/controls/commands/gaps.d.ts.map +1 -0
  411. package/dist/controls/commands/gaps.js +146 -0
  412. package/dist/controls/commands/gaps.js.map +1 -0
  413. package/dist/controls/commands/install-carriers.d.ts +44 -0
  414. package/dist/controls/commands/install-carriers.d.ts.map +1 -0
  415. package/dist/controls/commands/install-carriers.js +235 -0
  416. package/dist/controls/commands/install-carriers.js.map +1 -0
  417. package/dist/controls/commands/merge-protection.d.ts +35 -0
  418. package/dist/controls/commands/merge-protection.d.ts.map +1 -0
  419. package/dist/controls/commands/merge-protection.js +136 -0
  420. package/dist/controls/commands/merge-protection.js.map +1 -0
  421. package/dist/controls/commands/proof-check.d.ts +62 -0
  422. package/dist/controls/commands/proof-check.d.ts.map +1 -0
  423. package/dist/controls/commands/proof-check.js +251 -0
  424. package/dist/controls/commands/proof-check.js.map +1 -0
  425. package/dist/controls/commands/propose-threshold.d.ts +63 -0
  426. package/dist/controls/commands/propose-threshold.d.ts.map +1 -0
  427. package/dist/controls/commands/propose-threshold.js +78 -0
  428. package/dist/controls/commands/propose-threshold.js.map +1 -0
  429. package/dist/controls/commands/protect.d.ts +40 -0
  430. package/dist/controls/commands/protect.d.ts.map +1 -0
  431. package/dist/controls/commands/protect.js +131 -0
  432. package/dist/controls/commands/protect.js.map +1 -0
  433. package/dist/controls/commands/reconcile.d.ts +43 -0
  434. package/dist/controls/commands/reconcile.d.ts.map +1 -0
  435. package/dist/controls/commands/reconcile.js +157 -0
  436. package/dist/controls/commands/reconcile.js.map +1 -0
  437. package/dist/controls/commands/register.d.ts +40 -0
  438. package/dist/controls/commands/register.d.ts.map +1 -0
  439. package/dist/controls/commands/register.js +212 -0
  440. package/dist/controls/commands/register.js.map +1 -0
  441. package/dist/controls/commands/report-absorb.d.ts +20 -0
  442. package/dist/controls/commands/report-absorb.d.ts.map +1 -0
  443. package/dist/controls/commands/report-absorb.js +174 -0
  444. package/dist/controls/commands/report-absorb.js.map +1 -0
  445. package/dist/controls/commands/report-check.d.ts +35 -0
  446. package/dist/controls/commands/report-check.d.ts.map +1 -0
  447. package/dist/controls/commands/report-check.js +148 -0
  448. package/dist/controls/commands/report-check.js.map +1 -0
  449. package/dist/controls/commands/seed.d.ts +70 -0
  450. package/dist/controls/commands/seed.d.ts.map +1 -0
  451. package/dist/controls/commands/seed.js +289 -0
  452. package/dist/controls/commands/seed.js.map +1 -0
  453. package/dist/controls/configure-road.d.ts +23 -0
  454. package/dist/controls/configure-road.d.ts.map +1 -0
  455. package/dist/controls/configure-road.js +51 -0
  456. package/dist/controls/configure-road.js.map +1 -0
  457. package/dist/controls/control-files.d.ts +37 -0
  458. package/dist/controls/control-files.d.ts.map +1 -0
  459. package/dist/controls/control-files.js +92 -0
  460. package/dist/controls/control-files.js.map +1 -0
  461. package/dist/controls/control-gap-marker.d.ts +33 -0
  462. package/dist/controls/control-gap-marker.d.ts.map +1 -0
  463. package/dist/controls/control-gap-marker.js +89 -0
  464. package/dist/controls/control-gap-marker.js.map +1 -0
  465. package/dist/controls/declaration-evidence.d.ts +26 -0
  466. package/dist/controls/declaration-evidence.d.ts.map +1 -0
  467. package/dist/controls/declaration-evidence.js +193 -0
  468. package/dist/controls/declaration-evidence.js.map +1 -0
  469. package/dist/controls/enforce-carriers.d.ts +51 -0
  470. package/dist/controls/enforce-carriers.d.ts.map +1 -0
  471. package/dist/controls/enforce-carriers.js +149 -0
  472. package/dist/controls/enforce-carriers.js.map +1 -0
  473. package/dist/controls/enforce-claims.d.ts +94 -0
  474. package/dist/controls/enforce-claims.d.ts.map +1 -0
  475. package/dist/controls/enforce-claims.js +299 -0
  476. package/dist/controls/enforce-claims.js.map +1 -0
  477. package/dist/controls/enforce-entry-outcome.d.ts +31 -0
  478. package/dist/controls/enforce-entry-outcome.d.ts.map +1 -0
  479. package/dist/controls/enforce-entry-outcome.js +209 -0
  480. package/dist/controls/enforce-entry-outcome.js.map +1 -0
  481. package/dist/controls/enforce-head-copy.d.ts +19 -0
  482. package/dist/controls/enforce-head-copy.d.ts.map +1 -0
  483. package/dist/controls/enforce-head-copy.js +129 -0
  484. package/dist/controls/enforce-head-copy.js.map +1 -0
  485. package/dist/controls/enforce-head-run.d.ts +34 -0
  486. package/dist/controls/enforce-head-run.d.ts.map +1 -0
  487. package/dist/controls/enforce-head-run.js +245 -0
  488. package/dist/controls/enforce-head-run.js.map +1 -0
  489. package/dist/controls/enforce-head.d.ts +40 -0
  490. package/dist/controls/enforce-head.d.ts.map +1 -0
  491. package/dist/controls/enforce-head.js +103 -0
  492. package/dist/controls/enforce-head.js.map +1 -0
  493. package/dist/controls/enforce-input-rules.d.ts +23 -0
  494. package/dist/controls/enforce-input-rules.d.ts.map +1 -0
  495. package/dist/controls/enforce-input-rules.js +200 -0
  496. package/dist/controls/enforce-input-rules.js.map +1 -0
  497. package/dist/controls/enforce-input-shape.d.ts +66 -0
  498. package/dist/controls/enforce-input-shape.d.ts.map +1 -0
  499. package/dist/controls/enforce-input-shape.js +110 -0
  500. package/dist/controls/enforce-input-shape.js.map +1 -0
  501. package/dist/controls/enforce-input-types.d.ts +84 -0
  502. package/dist/controls/enforce-input-types.d.ts.map +1 -0
  503. package/dist/controls/enforce-input-types.js +5 -0
  504. package/dist/controls/enforce-input-types.js.map +1 -0
  505. package/dist/controls/enforce-inputs.d.ts +9 -0
  506. package/dist/controls/enforce-inputs.d.ts.map +1 -0
  507. package/dist/controls/enforce-inputs.js +103 -0
  508. package/dist/controls/enforce-inputs.js.map +1 -0
  509. package/dist/controls/enforce-points.d.ts +27 -0
  510. package/dist/controls/enforce-points.d.ts.map +1 -0
  511. package/dist/controls/enforce-points.js +250 -0
  512. package/dist/controls/enforce-points.js.map +1 -0
  513. package/dist/controls/enforce-report.d.ts +38 -0
  514. package/dist/controls/enforce-report.d.ts.map +1 -0
  515. package/dist/controls/enforce-report.js +179 -0
  516. package/dist/controls/enforce-report.js.map +1 -0
  517. package/dist/controls/enforce-summary.d.ts +66 -0
  518. package/dist/controls/enforce-summary.d.ts.map +1 -0
  519. package/dist/controls/enforce-summary.js +192 -0
  520. package/dist/controls/enforce-summary.js.map +1 -0
  521. package/dist/controls/enforce-tickets.d.ts +47 -0
  522. package/dist/controls/enforce-tickets.d.ts.map +1 -0
  523. package/dist/controls/enforce-tickets.js +128 -0
  524. package/dist/controls/enforce-tickets.js.map +1 -0
  525. package/dist/controls/enforce-types.d.ts +222 -0
  526. package/dist/controls/enforce-types.d.ts.map +1 -0
  527. package/dist/controls/enforce-types.js +19 -0
  528. package/dist/controls/enforce-types.js.map +1 -0
  529. package/dist/controls/evidence-binding.d.ts +23 -0
  530. package/dist/controls/evidence-binding.d.ts.map +1 -0
  531. package/dist/controls/evidence-binding.js +147 -0
  532. package/dist/controls/evidence-binding.js.map +1 -0
  533. package/dist/controls/evidence-document.d.ts +28 -0
  534. package/dist/controls/evidence-document.d.ts.map +1 -0
  535. package/dist/controls/evidence-document.js +313 -0
  536. package/dist/controls/evidence-document.js.map +1 -0
  537. package/dist/controls/evidence-findings.d.ts +32 -0
  538. package/dist/controls/evidence-findings.d.ts.map +1 -0
  539. package/dist/controls/evidence-findings.js +216 -0
  540. package/dist/controls/evidence-findings.js.map +1 -0
  541. package/dist/controls/evidence-gather.d.ts +42 -0
  542. package/dist/controls/evidence-gather.d.ts.map +1 -0
  543. package/dist/controls/evidence-gather.js +168 -0
  544. package/dist/controls/evidence-gather.js.map +1 -0
  545. package/dist/controls/evidence-redact.d.ts +52 -0
  546. package/dist/controls/evidence-redact.d.ts.map +1 -0
  547. package/dist/controls/evidence-redact.js +86 -0
  548. package/dist/controls/evidence-redact.js.map +1 -0
  549. package/dist/controls/evidence-standing.d.ts +49 -0
  550. package/dist/controls/evidence-standing.d.ts.map +1 -0
  551. package/dist/controls/evidence-standing.js +42 -0
  552. package/dist/controls/evidence-standing.js.map +1 -0
  553. package/dist/controls/evidence-types.d.ts +305 -0
  554. package/dist/controls/evidence-types.d.ts.map +1 -0
  555. package/dist/controls/evidence-types.js +116 -0
  556. package/dist/controls/evidence-types.js.map +1 -0
  557. package/dist/controls/evidence-write.d.ts +113 -0
  558. package/dist/controls/evidence-write.d.ts.map +1 -0
  559. package/dist/controls/evidence-write.js +325 -0
  560. package/dist/controls/evidence-write.js.map +1 -0
  561. package/dist/controls/evidence.d.ts +86 -0
  562. package/dist/controls/evidence.d.ts.map +1 -0
  563. package/dist/controls/evidence.js +177 -0
  564. package/dist/controls/evidence.js.map +1 -0
  565. package/dist/controls/gates-declaration.d.ts +79 -0
  566. package/dist/controls/gates-declaration.d.ts.map +1 -0
  567. package/dist/controls/gates-declaration.js +63 -0
  568. package/dist/controls/gates-declaration.js.map +1 -0
  569. package/dist/controls/head-commit.d.ts +7 -0
  570. package/dist/controls/head-commit.d.ts.map +1 -0
  571. package/dist/controls/head-commit.js +41 -0
  572. package/dist/controls/head-commit.js.map +1 -0
  573. package/dist/controls/merge-protection-read.d.ts +88 -0
  574. package/dist/controls/merge-protection-read.d.ts.map +1 -0
  575. package/dist/controls/merge-protection-read.js +228 -0
  576. package/dist/controls/merge-protection-read.js.map +1 -0
  577. package/dist/controls/proof-change-rule.d.ts +99 -0
  578. package/dist/controls/proof-change-rule.d.ts.map +1 -0
  579. package/dist/controls/proof-change-rule.js +304 -0
  580. package/dist/controls/proof-change-rule.js.map +1 -0
  581. package/dist/controls/proof-check-plan.d.ts +77 -0
  582. package/dist/controls/proof-check-plan.d.ts.map +1 -0
  583. package/dist/controls/proof-check-plan.js +168 -0
  584. package/dist/controls/proof-check-plan.js.map +1 -0
  585. package/dist/controls/proof-check-report.d.ts +24 -0
  586. package/dist/controls/proof-check-report.d.ts.map +1 -0
  587. package/dist/controls/proof-check-report.js +113 -0
  588. package/dist/controls/proof-check-report.js.map +1 -0
  589. package/dist/controls/proof-check-run.d.ts +53 -0
  590. package/dist/controls/proof-check-run.d.ts.map +1 -0
  591. package/dist/controls/proof-check-run.js +258 -0
  592. package/dist/controls/proof-check-run.js.map +1 -0
  593. package/dist/controls/proof-check-types.d.ts +116 -0
  594. package/dist/controls/proof-check-types.d.ts.map +1 -0
  595. package/dist/controls/proof-check-types.js +68 -0
  596. package/dist/controls/proof-check-types.js.map +1 -0
  597. package/dist/controls/proof-check-wording.d.ts +146 -0
  598. package/dist/controls/proof-check-wording.d.ts.map +1 -0
  599. package/dist/controls/proof-check-wording.js +211 -0
  600. package/dist/controls/proof-check-wording.js.map +1 -0
  601. package/dist/controls/proof-check-workspace.d.ts +53 -0
  602. package/dist/controls/proof-check-workspace.d.ts.map +1 -0
  603. package/dist/controls/proof-check-workspace.js +104 -0
  604. package/dist/controls/proof-check-workspace.js.map +1 -0
  605. package/dist/controls/proof-copy-files.d.ts +45 -0
  606. package/dist/controls/proof-copy-files.d.ts.map +1 -0
  607. package/dist/controls/proof-copy-files.js +184 -0
  608. package/dist/controls/proof-copy-files.js.map +1 -0
  609. package/dist/controls/proof-copy-git.d.ts +42 -0
  610. package/dist/controls/proof-copy-git.d.ts.map +1 -0
  611. package/dist/controls/proof-copy-git.js +147 -0
  612. package/dist/controls/proof-copy-git.js.map +1 -0
  613. package/dist/controls/proof-copy-wording.d.ts +100 -0
  614. package/dist/controls/proof-copy-wording.d.ts.map +1 -0
  615. package/dist/controls/proof-copy-wording.js +159 -0
  616. package/dist/controls/proof-copy-wording.js.map +1 -0
  617. package/dist/controls/proof-copy-workspace.d.ts +39 -0
  618. package/dist/controls/proof-copy-workspace.d.ts.map +1 -0
  619. package/dist/controls/proof-copy-workspace.js +343 -0
  620. package/dist/controls/proof-copy-workspace.js.map +1 -0
  621. package/dist/controls/proof-copy.d.ts +77 -0
  622. package/dist/controls/proof-copy.d.ts.map +1 -0
  623. package/dist/controls/proof-copy.js +341 -0
  624. package/dist/controls/proof-copy.js.map +1 -0
  625. package/dist/controls/proof-half-run.d.ts +34 -0
  626. package/dist/controls/proof-half-run.d.ts.map +1 -0
  627. package/dist/controls/proof-half-run.js +229 -0
  628. package/dist/controls/proof-half-run.js.map +1 -0
  629. package/dist/controls/proof-halves.d.ts +40 -0
  630. package/dist/controls/proof-halves.d.ts.map +1 -0
  631. package/dist/controls/proof-halves.js +142 -0
  632. package/dist/controls/proof-halves.js.map +1 -0
  633. package/dist/controls/proof-judgement.d.ts +61 -0
  634. package/dist/controls/proof-judgement.d.ts.map +1 -0
  635. package/dist/controls/proof-judgement.js +99 -0
  636. package/dist/controls/proof-judgement.js.map +1 -0
  637. package/dist/controls/proof-patch.d.ts +96 -0
  638. package/dist/controls/proof-patch.d.ts.map +1 -0
  639. package/dist/controls/proof-patch.js +311 -0
  640. package/dist/controls/proof-patch.js.map +1 -0
  641. package/dist/controls/proof-plan.d.ts +69 -0
  642. package/dist/controls/proof-plan.d.ts.map +1 -0
  643. package/dist/controls/proof-plan.js +209 -0
  644. package/dist/controls/proof-plan.js.map +1 -0
  645. package/dist/controls/proof-preflight.d.ts +50 -0
  646. package/dist/controls/proof-preflight.d.ts.map +1 -0
  647. package/dist/controls/proof-preflight.js +69 -0
  648. package/dist/controls/proof-preflight.js.map +1 -0
  649. package/dist/controls/proof-report.d.ts +24 -0
  650. package/dist/controls/proof-report.d.ts.map +1 -0
  651. package/dist/controls/proof-report.js +69 -0
  652. package/dist/controls/proof-report.js.map +1 -0
  653. package/dist/controls/proof-runner.d.ts +39 -0
  654. package/dist/controls/proof-runner.d.ts.map +1 -0
  655. package/dist/controls/proof-runner.js +168 -0
  656. package/dist/controls/proof-runner.js.map +1 -0
  657. package/dist/controls/proof-task-runners.d.ts +64 -0
  658. package/dist/controls/proof-task-runners.d.ts.map +1 -0
  659. package/dist/controls/proof-task-runners.js +343 -0
  660. package/dist/controls/proof-task-runners.js.map +1 -0
  661. package/dist/controls/proof-tools.d.ts +38 -0
  662. package/dist/controls/proof-tools.d.ts.map +1 -0
  663. package/dist/controls/proof-tools.js +75 -0
  664. package/dist/controls/proof-tools.js.map +1 -0
  665. package/dist/controls/proof-types.d.ts +233 -0
  666. package/dist/controls/proof-types.d.ts.map +1 -0
  667. package/dist/controls/proof-types.js +101 -0
  668. package/dist/controls/proof-types.js.map +1 -0
  669. package/dist/controls/proof-wording.d.ts +111 -0
  670. package/dist/controls/proof-wording.d.ts.map +1 -0
  671. package/dist/controls/proof-wording.js +196 -0
  672. package/dist/controls/proof-wording.js.map +1 -0
  673. package/dist/controls/proof-workspace.d.ts +64 -0
  674. package/dist/controls/proof-workspace.d.ts.map +1 -0
  675. package/dist/controls/proof-workspace.js +127 -0
  676. package/dist/controls/proof-workspace.js.map +1 -0
  677. package/dist/controls/protect-apply.d.ts +81 -0
  678. package/dist/controls/protect-apply.d.ts.map +1 -0
  679. package/dist/controls/protect-apply.js +250 -0
  680. package/dist/controls/protect-apply.js.map +1 -0
  681. package/dist/controls/protect-derive.d.ts +88 -0
  682. package/dist/controls/protect-derive.d.ts.map +1 -0
  683. package/dist/controls/protect-derive.js +150 -0
  684. package/dist/controls/protect-derive.js.map +1 -0
  685. package/dist/controls/protect-examine.d.ts +32 -0
  686. package/dist/controls/protect-examine.d.ts.map +1 -0
  687. package/dist/controls/protect-examine.js +276 -0
  688. package/dist/controls/protect-examine.js.map +1 -0
  689. package/dist/controls/protect-handover-file.d.ts +16 -0
  690. package/dist/controls/protect-handover-file.d.ts.map +1 -0
  691. package/dist/controls/protect-handover-file.js +73 -0
  692. package/dist/controls/protect-handover-file.js.map +1 -0
  693. package/dist/controls/protect-handover.d.ts +35 -0
  694. package/dist/controls/protect-handover.d.ts.map +1 -0
  695. package/dist/controls/protect-handover.js +218 -0
  696. package/dist/controls/protect-handover.js.map +1 -0
  697. package/dist/controls/protect-held.d.ts +76 -0
  698. package/dist/controls/protect-held.d.ts.map +1 -0
  699. package/dist/controls/protect-held.js +186 -0
  700. package/dist/controls/protect-held.js.map +1 -0
  701. package/dist/controls/protect-live.d.ts +155 -0
  702. package/dist/controls/protect-live.d.ts.map +1 -0
  703. package/dist/controls/protect-live.js +309 -0
  704. package/dist/controls/protect-live.js.map +1 -0
  705. package/dist/controls/protect-modules.d.ts +177 -0
  706. package/dist/controls/protect-modules.d.ts.map +1 -0
  707. package/dist/controls/protect-modules.js +48 -0
  708. package/dist/controls/protect-modules.js.map +1 -0
  709. package/dist/controls/protect-platform.d.ts +63 -0
  710. package/dist/controls/protect-platform.d.ts.map +1 -0
  711. package/dist/controls/protect-platform.js +249 -0
  712. package/dist/controls/protect-platform.js.map +1 -0
  713. package/dist/controls/protect-prepare.d.ts +64 -0
  714. package/dist/controls/protect-prepare.d.ts.map +1 -0
  715. package/dist/controls/protect-prepare.js +64 -0
  716. package/dist/controls/protect-prepare.js.map +1 -0
  717. package/dist/controls/protect-reported.d.ts +109 -0
  718. package/dist/controls/protect-reported.d.ts.map +1 -0
  719. package/dist/controls/protect-reported.js +281 -0
  720. package/dist/controls/protect-reported.js.map +1 -0
  721. package/dist/controls/protect-requests.d.ts +75 -0
  722. package/dist/controls/protect-requests.d.ts.map +1 -0
  723. package/dist/controls/protect-requests.js +139 -0
  724. package/dist/controls/protect-requests.js.map +1 -0
  725. package/dist/controls/protect-types.d.ts +152 -0
  726. package/dist/controls/protect-types.d.ts.map +1 -0
  727. package/dist/controls/protect-types.js +41 -0
  728. package/dist/controls/protect-types.js.map +1 -0
  729. package/dist/controls/protect-wording.d.ts +86 -0
  730. package/dist/controls/protect-wording.d.ts.map +1 -0
  731. package/dist/controls/protect-wording.js +150 -0
  732. package/dist/controls/protect-wording.js.map +1 -0
  733. package/dist/controls/protect.d.ts +20 -0
  734. package/dist/controls/protect.d.ts.map +1 -0
  735. package/dist/controls/protect.js +113 -0
  736. package/dist/controls/protect.js.map +1 -0
  737. package/dist/controls/pull-request-canaries.d.ts +48 -0
  738. package/dist/controls/pull-request-canaries.d.ts.map +1 -0
  739. package/dist/controls/pull-request-canaries.js +266 -0
  740. package/dist/controls/pull-request-canaries.js.map +1 -0
  741. package/dist/controls/pull-request-evidence.d.ts +37 -0
  742. package/dist/controls/pull-request-evidence.d.ts.map +1 -0
  743. package/dist/controls/pull-request-evidence.js +205 -0
  744. package/dist/controls/pull-request-evidence.js.map +1 -0
  745. package/dist/controls/pull-request-executor.d.ts +62 -0
  746. package/dist/controls/pull-request-executor.d.ts.map +1 -0
  747. package/dist/controls/pull-request-executor.js +250 -0
  748. package/dist/controls/pull-request-executor.js.map +1 -0
  749. package/dist/controls/pull-request-notices.d.ts +27 -0
  750. package/dist/controls/pull-request-notices.d.ts.map +1 -0
  751. package/dist/controls/pull-request-notices.js +167 -0
  752. package/dist/controls/pull-request-notices.js.map +1 -0
  753. package/dist/controls/pull-request-observe.d.ts +76 -0
  754. package/dist/controls/pull-request-observe.d.ts.map +1 -0
  755. package/dist/controls/pull-request-observe.js +172 -0
  756. package/dist/controls/pull-request-observe.js.map +1 -0
  757. package/dist/controls/pull-request-points.d.ts +33 -0
  758. package/dist/controls/pull-request-points.d.ts.map +1 -0
  759. package/dist/controls/pull-request-points.js +171 -0
  760. package/dist/controls/pull-request-points.js.map +1 -0
  761. package/dist/controls/pull-request-settle.d.ts +30 -0
  762. package/dist/controls/pull-request-settle.d.ts.map +1 -0
  763. package/dist/controls/pull-request-settle.js +92 -0
  764. package/dist/controls/pull-request-settle.js.map +1 -0
  765. package/dist/controls/pull-request-types.d.ts +186 -0
  766. package/dist/controls/pull-request-types.d.ts.map +1 -0
  767. package/dist/controls/pull-request-types.js +24 -0
  768. package/dist/controls/pull-request-types.js.map +1 -0
  769. package/dist/controls/pull-request-wording.d.ts +89 -0
  770. package/dist/controls/pull-request-wording.d.ts.map +1 -0
  771. package/dist/controls/pull-request-wording.js +147 -0
  772. package/dist/controls/pull-request-wording.js.map +1 -0
  773. package/dist/controls/question-ids.d.ts +53 -0
  774. package/dist/controls/question-ids.d.ts.map +1 -0
  775. package/dist/controls/question-ids.js +91 -0
  776. package/dist/controls/question-ids.js.map +1 -0
  777. package/dist/controls/reconcile-audit-findings.d.ts +36 -0
  778. package/dist/controls/reconcile-audit-findings.d.ts.map +1 -0
  779. package/dist/controls/reconcile-audit-findings.js +232 -0
  780. package/dist/controls/reconcile-audit-findings.js.map +1 -0
  781. package/dist/controls/reconcile-carrier-points.d.ts +23 -0
  782. package/dist/controls/reconcile-carrier-points.d.ts.map +1 -0
  783. package/dist/controls/reconcile-carrier-points.js +198 -0
  784. package/dist/controls/reconcile-carrier-points.js.map +1 -0
  785. package/dist/controls/reconcile-declared.d.ts +49 -0
  786. package/dist/controls/reconcile-declared.d.ts.map +1 -0
  787. package/dist/controls/reconcile-declared.js +75 -0
  788. package/dist/controls/reconcile-declared.js.map +1 -0
  789. package/dist/controls/reconcile-executor.d.ts +21 -0
  790. package/dist/controls/reconcile-executor.d.ts.map +1 -0
  791. package/dist/controls/reconcile-executor.js +67 -0
  792. package/dist/controls/reconcile-executor.js.map +1 -0
  793. package/dist/controls/reconcile-findings.d.ts +18 -0
  794. package/dist/controls/reconcile-findings.d.ts.map +1 -0
  795. package/dist/controls/reconcile-findings.js +114 -0
  796. package/dist/controls/reconcile-findings.js.map +1 -0
  797. package/dist/controls/reconcile-hook-lines.d.ts +28 -0
  798. package/dist/controls/reconcile-hook-lines.d.ts.map +1 -0
  799. package/dist/controls/reconcile-hook-lines.js +191 -0
  800. package/dist/controls/reconcile-hook-lines.js.map +1 -0
  801. package/dist/controls/reconcile-hooks.d.ts +22 -0
  802. package/dist/controls/reconcile-hooks.d.ts.map +1 -0
  803. package/dist/controls/reconcile-hooks.js +189 -0
  804. package/dist/controls/reconcile-hooks.js.map +1 -0
  805. package/dist/controls/reconcile-manager-commands.d.ts +30 -0
  806. package/dist/controls/reconcile-manager-commands.d.ts.map +1 -0
  807. package/dist/controls/reconcile-manager-commands.js +246 -0
  808. package/dist/controls/reconcile-manager-commands.js.map +1 -0
  809. package/dist/controls/reconcile-platform.d.ts +73 -0
  810. package/dist/controls/reconcile-platform.d.ts.map +1 -0
  811. package/dist/controls/reconcile-platform.js +190 -0
  812. package/dist/controls/reconcile-platform.js.map +1 -0
  813. package/dist/controls/reconcile-points.d.ts +46 -0
  814. package/dist/controls/reconcile-points.d.ts.map +1 -0
  815. package/dist/controls/reconcile-points.js +59 -0
  816. package/dist/controls/reconcile-points.js.map +1 -0
  817. package/dist/controls/reconcile-result.d.ts +49 -0
  818. package/dist/controls/reconcile-result.d.ts.map +1 -0
  819. package/dist/controls/reconcile-result.js +129 -0
  820. package/dist/controls/reconcile-result.js.map +1 -0
  821. package/dist/controls/reconcile-shell-command.d.ts +72 -0
  822. package/dist/controls/reconcile-shell-command.d.ts.map +1 -0
  823. package/dist/controls/reconcile-shell-command.js +291 -0
  824. package/dist/controls/reconcile-shell-command.js.map +1 -0
  825. package/dist/controls/reconcile-shell-line.d.ts +29 -0
  826. package/dist/controls/reconcile-shell-line.d.ts.map +1 -0
  827. package/dist/controls/reconcile-shell-line.js +322 -0
  828. package/dist/controls/reconcile-shell-line.js.map +1 -0
  829. package/dist/controls/reconcile-shell-spans.d.ts +73 -0
  830. package/dist/controls/reconcile-shell-spans.d.ts.map +1 -0
  831. package/dist/controls/reconcile-shell-spans.js +210 -0
  832. package/dist/controls/reconcile-shell-spans.js.map +1 -0
  833. package/dist/controls/reconcile-shell-words.d.ts +72 -0
  834. package/dist/controls/reconcile-shell-words.d.ts.map +1 -0
  835. package/dist/controls/reconcile-shell-words.js +126 -0
  836. package/dist/controls/reconcile-shell-words.js.map +1 -0
  837. package/dist/controls/reconcile-types.d.ts +192 -0
  838. package/dist/controls/reconcile-types.d.ts.map +1 -0
  839. package/dist/controls/reconcile-types.js +44 -0
  840. package/dist/controls/reconcile-types.js.map +1 -0
  841. package/dist/controls/reconcile.d.ts +41 -0
  842. package/dist/controls/reconcile.d.ts.map +1 -0
  843. package/dist/controls/reconcile.js +215 -0
  844. package/dist/controls/reconcile.js.map +1 -0
  845. package/dist/controls/register-drift.d.ts +10 -0
  846. package/dist/controls/register-drift.d.ts.map +1 -0
  847. package/dist/controls/register-drift.js +153 -0
  848. package/dist/controls/register-drift.js.map +1 -0
  849. package/dist/controls/register-entries.d.ts +26 -0
  850. package/dist/controls/register-entries.d.ts.map +1 -0
  851. package/dist/controls/register-entries.js +157 -0
  852. package/dist/controls/register-entries.js.map +1 -0
  853. package/dist/controls/register-evidence-rule.d.ts +21 -0
  854. package/dist/controls/register-evidence-rule.d.ts.map +1 -0
  855. package/dist/controls/register-evidence-rule.js +59 -0
  856. package/dist/controls/register-evidence-rule.js.map +1 -0
  857. package/dist/controls/register-points.d.ts +36 -0
  858. package/dist/controls/register-points.d.ts.map +1 -0
  859. package/dist/controls/register-points.js +152 -0
  860. package/dist/controls/register-points.js.map +1 -0
  861. package/dist/controls/register-rules.d.ts +45 -0
  862. package/dist/controls/register-rules.d.ts.map +1 -0
  863. package/dist/controls/register-rules.js +49 -0
  864. package/dist/controls/register-rules.js.map +1 -0
  865. package/dist/controls/register-secrets-rule.d.ts +37 -0
  866. package/dist/controls/register-secrets-rule.d.ts.map +1 -0
  867. package/dist/controls/register-secrets-rule.js +41 -0
  868. package/dist/controls/register-secrets-rule.js.map +1 -0
  869. package/dist/controls/register-tier-rule.d.ts +48 -0
  870. package/dist/controls/register-tier-rule.d.ts.map +1 -0
  871. package/dist/controls/register-tier-rule.js +81 -0
  872. package/dist/controls/register-tier-rule.js.map +1 -0
  873. package/dist/controls/register-types.d.ts +227 -0
  874. package/dist/controls/register-types.d.ts.map +1 -0
  875. package/dist/controls/register-types.js +68 -0
  876. package/dist/controls/register-types.js.map +1 -0
  877. package/dist/controls/register.d.ts +75 -0
  878. package/dist/controls/register.d.ts.map +1 -0
  879. package/dist/controls/register.js +154 -0
  880. package/dist/controls/register.js.map +1 -0
  881. package/dist/controls/repository-reader.d.ts +33 -0
  882. package/dist/controls/repository-reader.d.ts.map +1 -0
  883. package/dist/controls/repository-reader.js +164 -0
  884. package/dist/controls/repository-reader.js.map +1 -0
  885. package/dist/controls/secret-scan-json.d.ts +78 -0
  886. package/dist/controls/secret-scan-json.d.ts.map +1 -0
  887. package/dist/controls/secret-scan-json.js +257 -0
  888. package/dist/controls/secret-scan-json.js.map +1 -0
  889. package/dist/controls/secret-scan.d.ts +62 -0
  890. package/dist/controls/secret-scan.d.ts.map +1 -0
  891. package/dist/controls/secret-scan.js +411 -0
  892. package/dist/controls/secret-scan.js.map +1 -0
  893. package/dist/controls/secret-shapes.d.ts +95 -0
  894. package/dist/controls/secret-shapes.d.ts.map +1 -0
  895. package/dist/controls/secret-shapes.js +167 -0
  896. package/dist/controls/secret-shapes.js.map +1 -0
  897. package/dist/controls/threshold-proposal.d.ts +72 -0
  898. package/dist/controls/threshold-proposal.d.ts.map +1 -0
  899. package/dist/controls/threshold-proposal.js +82 -0
  900. package/dist/controls/threshold-proposal.js.map +1 -0
  901. package/dist/controls/tracker-config.d.ts +22 -0
  902. package/dist/controls/tracker-config.d.ts.map +1 -0
  903. package/dist/controls/tracker-config.js +93 -0
  904. package/dist/controls/tracker-config.js.map +1 -0
  905. package/dist/controls/tracker-question.d.ts +13 -0
  906. package/dist/controls/tracker-question.d.ts.map +1 -0
  907. package/dist/controls/tracker-question.js +46 -0
  908. package/dist/controls/tracker-question.js.map +1 -0
  909. package/dist/controls/unenforceable-agents.d.ts +22 -0
  910. package/dist/controls/unenforceable-agents.d.ts.map +1 -0
  911. package/dist/controls/unenforceable-agents.js +62 -0
  912. package/dist/controls/unenforceable-agents.js.map +1 -0
  913. package/dist/controls/verdict-answers.d.ts +55 -0
  914. package/dist/controls/verdict-answers.d.ts.map +1 -0
  915. package/dist/controls/verdict-answers.js +241 -0
  916. package/dist/controls/verdict-answers.js.map +1 -0
  917. package/dist/controls/verdict-digest.d.ts +15 -0
  918. package/dist/controls/verdict-digest.d.ts.map +1 -0
  919. package/dist/controls/verdict-digest.js +42 -0
  920. package/dist/controls/verdict-digest.js.map +1 -0
  921. package/dist/controls/verdict-drift.d.ts +9 -0
  922. package/dist/controls/verdict-drift.d.ts.map +1 -0
  923. package/dist/controls/verdict-drift.js +227 -0
  924. package/dist/controls/verdict-drift.js.map +1 -0
  925. package/dist/controls/verdict-summary.d.ts +16 -0
  926. package/dist/controls/verdict-summary.d.ts.map +1 -0
  927. package/dist/controls/verdict-summary.js +39 -0
  928. package/dist/controls/verdict-summary.js.map +1 -0
  929. package/dist/controls/verdict-types.d.ts +111 -0
  930. package/dist/controls/verdict-types.d.ts.map +1 -0
  931. package/dist/controls/verdict-types.js +57 -0
  932. package/dist/controls/verdict-types.js.map +1 -0
  933. package/dist/controls/verdict-wording.d.ts +81 -0
  934. package/dist/controls/verdict-wording.d.ts.map +1 -0
  935. package/dist/controls/verdict-wording.js +146 -0
  936. package/dist/controls/verdict-wording.js.map +1 -0
  937. package/dist/controls/verdict.d.ts +43 -0
  938. package/dist/controls/verdict.d.ts.map +1 -0
  939. package/dist/controls/verdict.js +260 -0
  940. package/dist/controls/verdict.js.map +1 -0
  941. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  942. package/dist/core/lisa-owned-hash-ledger.js +82 -0
  943. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  944. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  945. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  946. package/dist/core/upstream-evidence-manifest.js +13011 -28
  947. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  948. package/dist/health/ruleset-inspection.d.ts +40 -6
  949. package/dist/health/ruleset-inspection.d.ts.map +1 -1
  950. package/dist/health/ruleset-inspection.js +87 -23
  951. package/dist/health/ruleset-inspection.js.map +1 -1
  952. package/dist/migrations/ensure-seeded-gates.d.ts +19 -0
  953. package/dist/migrations/ensure-seeded-gates.d.ts.map +1 -1
  954. package/dist/migrations/ensure-seeded-gates.js +1 -1
  955. package/dist/migrations/ensure-seeded-gates.js.map +1 -1
  956. package/package.json +13 -6
  957. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  958. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  959. package/plugins/lisa/.codex-plugin/skills/lisa-agent-ready/SKILL.md +4 -0
  960. package/plugins/lisa/.codex-plugin/skills/lisa-attest/SKILL.md +531 -0
  961. package/plugins/lisa/.codex-plugin/skills/lisa-attest/agents/openai.yaml +4 -0
  962. package/plugins/lisa/.codex-plugin/skills/lisa-audit/SKILL.md +741 -0
  963. package/plugins/lisa/.codex-plugin/skills/lisa-audit/agents/openai.yaml +4 -0
  964. package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +546 -0
  965. package/plugins/lisa/.codex-plugin/skills/lisa-configure/agents/openai.yaml +4 -0
  966. package/plugins/lisa/.codex-plugin/skills/lisa-enforce/SKILL.md +473 -0
  967. package/plugins/lisa/.codex-plugin/skills/lisa-enforce/agents/openai.yaml +4 -0
  968. package/plugins/lisa/.codex-plugin/skills/lisa-enforce/references/missing-capability-tickets.md +258 -0
  969. package/plugins/lisa/.codex-plugin/skills/lisa-enforce/references/pull-request-executor.md +235 -0
  970. package/plugins/lisa/.codex-plugin/skills/lisa-github-write-prd/SKILL.md +40 -12
  971. package/plugins/lisa/.codex-plugin/skills/lisa-prd-backlink/SKILL.md +171 -1
  972. package/plugins/lisa/commands/attest.md +7 -0
  973. package/plugins/lisa/commands/audit.md +7 -0
  974. package/plugins/lisa/commands/configure.md +7 -0
  975. package/plugins/lisa/commands/enforce.md +7 -0
  976. package/plugins/lisa/hooks/threshold-ratchet-compare.mjs +214 -3
  977. package/plugins/lisa/hooks/threshold-ratchet-families.mjs +166 -0
  978. package/plugins/lisa/hooks/threshold-ratchet.mjs +12 -1
  979. package/plugins/lisa/skills/lisa-agent-ready/SKILL.md +4 -0
  980. package/plugins/lisa/skills/lisa-attest/SKILL.md +529 -0
  981. package/plugins/lisa/skills/lisa-attest/agents/openai.yaml +4 -0
  982. package/plugins/lisa/skills/lisa-audit/SKILL.md +739 -0
  983. package/plugins/lisa/skills/lisa-audit/agents/openai.yaml +4 -0
  984. package/plugins/lisa/skills/lisa-configure/SKILL.md +544 -0
  985. package/plugins/lisa/skills/lisa-configure/agents/openai.yaml +4 -0
  986. package/plugins/lisa/skills/lisa-enforce/SKILL.md +471 -0
  987. package/plugins/lisa/skills/lisa-enforce/agents/openai.yaml +4 -0
  988. package/plugins/lisa/skills/lisa-enforce/references/missing-capability-tickets.md +258 -0
  989. package/plugins/lisa/skills/lisa-enforce/references/pull-request-executor.md +235 -0
  990. package/plugins/lisa/skills/lisa-github-write-prd/SKILL.md +40 -12
  991. package/plugins/lisa/skills/lisa-prd-backlink/SKILL.md +171 -1
  992. package/plugins/lisa-agy/commands/lisa/attest.md +6 -0
  993. package/plugins/lisa-agy/commands/lisa/audit.md +6 -0
  994. package/plugins/lisa-agy/commands/lisa/configure.md +6 -0
  995. package/plugins/lisa-agy/commands/lisa/enforce.md +6 -0
  996. package/plugins/lisa-agy/plugin.json +1 -1
  997. package/plugins/lisa-agy/skills/lisa-agent-ready/SKILL.md +4 -0
  998. package/plugins/lisa-agy/skills/lisa-attest/SKILL.md +529 -0
  999. package/plugins/lisa-agy/skills/lisa-audit/SKILL.md +739 -0
  1000. package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +544 -0
  1001. package/plugins/lisa-agy/skills/lisa-enforce/SKILL.md +471 -0
  1002. package/plugins/lisa-agy/skills/lisa-enforce/references/missing-capability-tickets.md +258 -0
  1003. package/plugins/lisa-agy/skills/lisa-enforce/references/pull-request-executor.md +235 -0
  1004. package/plugins/lisa-agy/skills/lisa-github-write-prd/SKILL.md +40 -12
  1005. package/plugins/lisa-agy/skills/lisa-prd-backlink/SKILL.md +171 -1
  1006. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  1007. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  1008. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  1009. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  1010. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  1011. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  1012. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  1013. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  1014. package/plugins/lisa-copilot/commands/lisa/attest.md +6 -0
  1015. package/plugins/lisa-copilot/commands/lisa/audit.md +6 -0
  1016. package/plugins/lisa-copilot/commands/lisa/configure.md +6 -0
  1017. package/plugins/lisa-copilot/commands/lisa/enforce.md +6 -0
  1018. package/plugins/lisa-copilot/hooks/threshold-ratchet-compare.mjs +214 -3
  1019. package/plugins/lisa-copilot/hooks/threshold-ratchet-families.mjs +166 -0
  1020. package/plugins/lisa-copilot/hooks/threshold-ratchet.mjs +12 -1
  1021. package/plugins/lisa-copilot/skills/lisa-agent-ready/SKILL.md +4 -0
  1022. package/plugins/lisa-copilot/skills/lisa-attest/SKILL.md +529 -0
  1023. package/plugins/lisa-copilot/skills/lisa-audit/SKILL.md +739 -0
  1024. package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +544 -0
  1025. package/plugins/lisa-copilot/skills/lisa-enforce/SKILL.md +471 -0
  1026. package/plugins/lisa-copilot/skills/lisa-enforce/references/missing-capability-tickets.md +258 -0
  1027. package/plugins/lisa-copilot/skills/lisa-enforce/references/pull-request-executor.md +235 -0
  1028. package/plugins/lisa-copilot/skills/lisa-github-write-prd/SKILL.md +40 -12
  1029. package/plugins/lisa-copilot/skills/lisa-prd-backlink/SKILL.md +171 -1
  1030. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  1031. package/plugins/lisa-cursor/commands/lisa/attest.md +6 -0
  1032. package/plugins/lisa-cursor/commands/lisa/audit.md +6 -0
  1033. package/plugins/lisa-cursor/commands/lisa/configure.md +6 -0
  1034. package/plugins/lisa-cursor/commands/lisa/enforce.md +6 -0
  1035. package/plugins/lisa-cursor/hooks/threshold-ratchet-compare.mjs +214 -3
  1036. package/plugins/lisa-cursor/hooks/threshold-ratchet-families.mjs +166 -0
  1037. package/plugins/lisa-cursor/hooks/threshold-ratchet.mjs +12 -1
  1038. package/plugins/lisa-cursor/skills/lisa-agent-ready/SKILL.md +4 -0
  1039. package/plugins/lisa-cursor/skills/lisa-attest/SKILL.md +529 -0
  1040. package/plugins/lisa-cursor/skills/lisa-audit/SKILL.md +739 -0
  1041. package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +544 -0
  1042. package/plugins/lisa-cursor/skills/lisa-enforce/SKILL.md +471 -0
  1043. package/plugins/lisa-cursor/skills/lisa-enforce/references/missing-capability-tickets.md +258 -0
  1044. package/plugins/lisa-cursor/skills/lisa-enforce/references/pull-request-executor.md +235 -0
  1045. package/plugins/lisa-cursor/skills/lisa-github-write-prd/SKILL.md +40 -12
  1046. package/plugins/lisa-cursor/skills/lisa-prd-backlink/SKILL.md +171 -1
  1047. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  1048. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  1049. package/plugins/lisa-devin/hooks/threshold-ratchet-compare.mjs +214 -3
  1050. package/plugins/lisa-devin/hooks/threshold-ratchet-families.mjs +166 -0
  1051. package/plugins/lisa-devin/hooks/threshold-ratchet.mjs +12 -1
  1052. package/plugins/lisa-devin/skills/lisa-agent-ready/SKILL.md +4 -0
  1053. package/plugins/lisa-devin/skills/lisa-attest/SKILL.md +529 -0
  1054. package/plugins/lisa-devin/skills/lisa-audit/SKILL.md +739 -0
  1055. package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +544 -0
  1056. package/plugins/lisa-devin/skills/lisa-enforce/SKILL.md +471 -0
  1057. package/plugins/lisa-devin/skills/lisa-enforce/references/missing-capability-tickets.md +258 -0
  1058. package/plugins/lisa-devin/skills/lisa-enforce/references/pull-request-executor.md +235 -0
  1059. package/plugins/lisa-devin/skills/lisa-github-write-prd/SKILL.md +40 -12
  1060. package/plugins/lisa-devin/skills/lisa-prd-backlink/SKILL.md +171 -1
  1061. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  1062. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  1063. package/plugins/lisa-expo-agy/plugin.json +1 -1
  1064. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  1065. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  1066. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  1067. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  1068. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  1069. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  1070. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  1071. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  1072. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  1073. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  1074. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  1075. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  1076. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  1077. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  1078. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  1079. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  1080. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  1081. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  1082. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  1083. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  1084. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  1085. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  1086. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  1087. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  1088. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  1089. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  1090. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  1091. package/plugins/lisa-rails-agy/plugin.json +1 -1
  1092. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  1093. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  1094. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  1095. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  1096. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  1097. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  1098. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  1099. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  1100. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  1101. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  1102. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  1103. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  1104. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  1105. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  1106. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  1107. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  1108. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  1109. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  1110. package/plugins/src/base/commands/attest.md +7 -0
  1111. package/plugins/src/base/commands/audit.md +7 -0
  1112. package/plugins/src/base/commands/configure.md +7 -0
  1113. package/plugins/src/base/commands/enforce.md +7 -0
  1114. package/plugins/src/base/hooks/threshold-ratchet-compare.mjs +214 -3
  1115. package/plugins/src/base/hooks/threshold-ratchet-families.mjs +166 -0
  1116. package/plugins/src/base/hooks/threshold-ratchet.mjs +12 -1
  1117. package/plugins/src/base/skills/lisa-agent-ready/SKILL.md +4 -0
  1118. package/plugins/src/base/skills/lisa-attest/SKILL.md +529 -0
  1119. package/plugins/src/base/skills/lisa-audit/SKILL.md +739 -0
  1120. package/plugins/src/base/skills/lisa-configure/SKILL.md +544 -0
  1121. package/plugins/src/base/skills/lisa-enforce/SKILL.md +471 -0
  1122. package/plugins/src/base/skills/lisa-enforce/references/missing-capability-tickets.md +258 -0
  1123. package/plugins/src/base/skills/lisa-enforce/references/pull-request-executor.md +235 -0
  1124. package/plugins/src/base/skills/lisa-github-write-prd/SKILL.md +40 -12
  1125. package/plugins/src/base/skills/lisa-prd-backlink/SKILL.md +171 -1
  1126. package/rails/copy-overwrite/scripts/check-threshold-ratchet.mjs +12 -1
  1127. package/rails/copy-overwrite/scripts/threshold-ratchet-compare.mjs +214 -3
  1128. package/rails/copy-overwrite/scripts/threshold-ratchet-families.mjs +166 -0
  1129. package/schemas/control-evidence.schema.json +527 -0
  1130. package/schemas/control-register.schema.json +336 -0
  1131. package/schemas/control-verdict.schema.json +292 -0
  1132. package/scripts/check-control-command-parity.mjs +94 -0
  1133. package/scripts/check-derived-artifacts.mjs +51 -3
  1134. package/scripts/check-generated-artifact-merge-coverage.mjs +7 -0
  1135. package/scripts/check-plugins-sync.sh +25 -0
  1136. package/scripts/check-release-commit-listed.mjs +80 -0
  1137. package/scripts/generate-readiness-questionnaire.mjs +410 -0
  1138. package/scripts/generate-upstream-evidence-manifest.mjs +69 -6
  1139. package/scripts/lib/control-command-parity.mjs +865 -0
  1140. package/scripts/lib/phrase-tests/redact.mjs +10 -2
  1141. package/scripts/lib/upstream-manifest-staleness.mjs +1 -1
  1142. package/scripts/lib/upstream-public-commits.mjs +94 -0
  1143. package/scripts/two-channel-couplings.json +1 -1
  1144. package/spec/tasc-criteria.json +853 -0
  1145. package/spec/tasc-criteria.schema.json +212 -0
  1146. package/typescript/copy-overwrite/.prettierignore +1 -0
  1147. package/typescript/copy-overwrite/scripts/check-threshold-ratchet.mjs +12 -1
  1148. package/typescript/copy-overwrite/scripts/threshold-ratchet-compare.mjs +214 -3
  1149. package/typescript/copy-overwrite/scripts/threshold-ratchet-families.mjs +166 -0
@@ -32,17 +32,95 @@
32
32
  * UNPROVABLE rather than FAILED: it blocks, and it stops claiming a
33
33
  * measurement that never happened.
34
34
  *
35
+ * ## A gate with parts
36
+ *
37
+ * A gate may declare `parts`: one command per folder, each written as a list
38
+ * of arguments. Every part is started, judged and reported on its own, by the
39
+ * same rules as any other gate. Two things differ, and both are about what
40
+ * the declaration is — a committed file that names commands to run:
41
+ *
42
+ * - The list is started as written, with no shell at any point, so nothing
43
+ * in it can be read as an instruction. See `spawnArgv`.
44
+ * - It starts in the part's folder, and only once that folder has been
45
+ * resolved on disk and found to be inside the repository. See
46
+ * `partDirectory`.
47
+ *
48
+ * A gate with no parts takes none of this path.
49
+ *
50
+ * ## A part the change does not touch
51
+ *
52
+ * In a repository with two parts, a change to one should not run the other's
53
+ * check — and must not be reported as having passed it. At commit and at
54
+ * push the runner learns which paths the change touches (`lib/changed-paths`)
55
+ * and leaves out a part whose folder holds none of them. That part prints as
56
+ * NOT APPLICABLE with its folder, its command is never started, and it is
57
+ * counted among the gates that were not applicable here, never among the
58
+ * ones that were proved.
59
+ *
60
+ * The mistake that matters is the other one: a part left out that the change
61
+ * did touch is a folder nothing checked. So a part is left out only when the
62
+ * runner is sure, and everything else runs it — a change that is not known,
63
+ * a moment other than commit and push, a part for the whole repository, a
64
+ * part that could not have started anyway.
65
+ *
66
+ * The same care is owed in the other direction, to a caller that stands a
67
+ * check of its own down on this runner's word. A part that ran says nothing
68
+ * about a changed path outside its folder, so a gate with parts is reported
69
+ * as proved for a change only when the parts that ran reached every path the
70
+ * change touches. See `provenFloor`.
71
+ *
35
72
  * ## Exit codes are the hook's control flow
36
73
  *
37
74
  * The hooks fall back to their hardcoded steps unless this runner positively
38
75
  * reports a verdict, so "the runner could not run" must never look like "all
39
76
  * gates passed". Hence `NO_GATES` and `RUNNER_FAILED` are distinct from
40
77
  * `PROVED`, and the hook routes each one deliberately.
78
+ *
79
+ * ## A caller with no built-in checks
80
+ *
81
+ * `NO_GATES` means "run your own checks instead", and it is only an answer
82
+ * for a caller that has some. The hooks a stack template ships do: a secret
83
+ * scan, lint-staged, a test run. A repository on no supported project type
84
+ * has no such hook, and a caller there that was sent away with 78 would let
85
+ * the commit through having checked nothing.
86
+ *
87
+ * That caller passes `--builtins=none`, and gets a verdict every time:
88
+ *
89
+ * - `0` — let it through. Every required gate declared at this moment was
90
+ * proved; or nothing is declared at this moment; or every part declared at
91
+ * this moment is for a folder the change does not touch, so no command ran.
92
+ * The runner says which.
93
+ * - `1` — stop it. A required gate was not proved, or the declaration is one
94
+ * the validator refuses.
95
+ * - `70` — stop it. The runner could not run, so nothing was proved.
96
+ *
97
+ * It never gets 78. A half-written gates block is simply run, because there
98
+ * is no built-in check for its silence to delete; and a gate the registry
99
+ * leaves to a built-in check is reported as not proved, because nothing is
100
+ * left to check it. Without the flag every exit code means what it always has.
41
101
  * @module lisa-run-gates
42
102
  */
43
103
 
44
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
45
- import { dirname, join, relative } from "node:path";
104
+ import {
105
+ accessSync,
106
+ constants,
107
+ existsSync,
108
+ mkdirSync,
109
+ readFileSync,
110
+ realpathSync,
111
+ statSync,
112
+ writeFileSync,
113
+ } from "node:fs";
114
+ import {
115
+ delimiter,
116
+ dirname,
117
+ isAbsolute,
118
+ join,
119
+ relative,
120
+ resolve,
121
+ sep,
122
+ } from "node:path";
123
+ import { performance } from "node:perf_hooks";
46
124
  import { fileURLToPath } from "node:url";
47
125
 
48
126
  import {
@@ -64,6 +142,13 @@ import {
64
142
  openSelectionReports,
65
143
  } from "./lib/affected-tests.mjs";
66
144
  import { BUILD_ONCE_ID, runBuildOnce } from "./lib/build-marker.mjs";
145
+ import {
146
+ changeAt,
147
+ pathsOutside,
148
+ PUSH_REFS_STDIN,
149
+ readPushRefs,
150
+ touchesFolder,
151
+ } from "./lib/changed-paths.mjs";
67
152
  import { invokedAsScript } from "./lib/invoked-as-script.mjs";
68
153
  import { runStartOfRunSweep } from "./lib/lisa-cleanup-sweep.mjs";
69
154
  import {
@@ -93,6 +178,7 @@ import {
93
178
  projectScripts,
94
179
  readGates,
95
180
  resolveMoment,
181
+ WHOLE_REPOSITORY,
96
182
  } from "./lisa-gates.mjs";
97
183
 
98
184
  // Re-exported rather than dropped. `compareCodeUnits` was this module's public
@@ -108,13 +194,20 @@ export { compareCodeUnits };
108
194
  * send the hook to its hardcoded path. They are separate because one is a
109
195
  * project that has not migrated and the other is a broken tool, and an
110
196
  * operator reading a hook transcript needs to be able to tell them apart.
197
+ *
198
+ * A caller that passed `--builtins=none` has no hardcoded path, and is never
199
+ * answered with `NO_GATES`: see "A caller with no built-in checks" above.
111
200
  */
112
201
  export const EXIT = Object.freeze({
113
202
  /** Every required gate at this moment was proved. */
114
203
  PROVED: 0,
115
204
  /** At least one required gate failed. Stop the commit or push. */
116
205
  BLOCKED: 1,
117
- /** No gates block in config: this project has not migrated. Fall back. */
206
+ /**
207
+ * Fall back to the built-in checks. No gates block in config (this project
208
+ * has not migrated), a half-written one, or — for a caller that did not
209
+ * pass `--coverage` — parts that did not reach every path of the change.
210
+ */
118
211
  NO_GATES: 78,
119
212
  /** The runner itself could not run. Nothing was proved. Fall back. */
120
213
  RUNNER_FAILED: 70,
@@ -246,6 +339,19 @@ export const CONDITIONAL_FLOOR = Object.freeze({
246
339
  * @property {{files: string[], truncated: boolean}} [failingTests] Test files
247
340
  * a nonzero run's output named as failing, for the push timing report only
248
341
  * (CodySwannGT/lisa#4896). Absent on a pass; never read into a verdict.
342
+ * @property {string} [scope] The folder one PART of a gate covers, written
343
+ * from the repository root. Present only on an entry resolved from a gate's
344
+ * `parts`; such a gate has one entry per part, all sharing one `id`.
345
+ * @property {string[]|null} [argv] The argument list that checks that part.
346
+ * Present only beside `scope`. `task` and `command` are null on a part: its
347
+ * command is started directly and is never joined into one line of text.
348
+ * @property {boolean} [untouched] True on a part that was left out because
349
+ * the change touches nothing in its folder (CodySwannGT/lisa#4988). Its
350
+ * state is SKIPPED and its command never started. Absent everywhere else.
351
+ * @property {string} [resolved] Where a part's folder really is, written from
352
+ * the repository root the way git writes a path; empty for the root itself.
353
+ * It differs from `scope` only when the declared name is a link. Present on
354
+ * a part whose folder was found, and read by `unreachedFloor`.
249
355
  */
250
356
 
251
357
  /**
@@ -257,15 +363,22 @@ export const CONDITIONAL_FLOOR = Object.freeze({
257
363
  * @property {string|null} blockedBy The first required gate that went unproved.
258
364
  * @property {string|null} interrupted Why the run stopped early, when the
259
365
  * caller it was proving for went away; `null` on a run that ran to the end.
260
- * @property {number} total Gates declared at this moment.
366
+ * @property {number} total Gates declared at this moment. A gate with parts
367
+ * counts once per part, because each part is checked and reported on its own.
261
368
  * @property {GateOutcome[]} results Every gate, in execution order.
262
369
  * @property {GateOutcome[]} passed Gates that ran and exited zero.
263
370
  * @property {GateOutcome[]} failed Gates that failed or could not be proved.
264
371
  * @property {GateOutcome[]} unprovable Gates that ran and proved nothing.
265
372
  * @property {GateOutcome[]} killed Gates whose command was terminated by a
266
373
  * signal, so it never reached a verdict.
267
- * @property {GateOutcome[]} skipped Gates with nothing to run locally.
374
+ * @property {GateOutcome[]} skipped Gates with nothing to run locally, and
375
+ * parts the change does not touch (those carry `untouched: true`).
268
376
  * @property {GateOutcome[]} notRun Gates queued behind a blocking failure.
377
+ * @property {{paths: string[]|null}} [change] The paths this run was told the
378
+ * change touches. `null` when they are not known, which includes a run
379
+ * that never had to ask because no part for a folder was reached.
380
+ * `runGates` always sets it. A result put together by hand may leave it
381
+ * out, and is then read as a change that is not known.
269
382
  */
270
383
 
271
384
  /** Per-gate outcomes, in the order an operator reads them. */
@@ -318,6 +431,52 @@ function skipReason(gate) {
318
431
  return null;
319
432
  }
320
433
 
434
+ /**
435
+ * Whether a resolved entry is one PART of a gate.
436
+ *
437
+ * A gate that declares `parts` resolves to one entry per part, each carrying
438
+ * the folder it covers (`scope`) and the argument list that checks it
439
+ * (`argv`). An entry with neither key is a gate as it has always been, and
440
+ * nothing below treats it differently from before parts existed.
441
+ *
442
+ * EITHER key marks a part, not both. An entry carrying a folder and no
443
+ * argument list is a part whose command is missing, and it has to be reported
444
+ * as that — read as an ordinary gate it would say "resolves to no task" about
445
+ * a declaration that named one.
446
+ * @param {GateOutcome} gate A gate from `resolveMoment`.
447
+ * @returns {boolean} True for one part of a gate.
448
+ */
449
+ function isPart(gate) {
450
+ return gate.argv !== undefined || gate.scope !== undefined;
451
+ }
452
+
453
+ /**
454
+ * What an operator calls one line of the report.
455
+ *
456
+ * A gate's id, and for a part the folder as well: every part of a gate shares
457
+ * the gate's id, so the id alone cannot say which folder passed and which did
458
+ * not.
459
+ * @param {GateOutcome} gate A resolved gate, or one of its results.
460
+ * @returns {string} The gate id, or `<gate id> in <folder>` for a part.
461
+ */
462
+ function nameOf(gate) {
463
+ return isPart(gate) ? `${gate.id} in ${gate.scope}` : gate.id;
464
+ }
465
+
466
+ /**
467
+ * A part's argument list as the report prints it.
468
+ *
469
+ * As a JSON list rather than joined with spaces, so the report shows where
470
+ * each argument starts and ends: `["sh", "a b"]` and `["sh", "a", "b"]` are
471
+ * different commands, and `; rm -rf x` inside quotes is visibly one argument
472
+ * that nothing will act on.
473
+ * @param {unknown} argv The part's argument list.
474
+ * @returns {string} The list, as text.
475
+ */
476
+ function shownArgv(argv) {
477
+ return JSON.stringify(argv) ?? "(no command)";
478
+ }
479
+
321
480
  /**
322
481
  * One aligned line per gate, so a transcript can be read at a glance.
323
482
  *
@@ -325,14 +484,20 @@ function skipReason(gate) {
325
484
  * scripts. Two scripts can now back one gate, so "what proved this" stops
326
485
  * being answerable from the gate id alone — and a reader who has to open the
327
486
  * registry to find out is back where #2916 started.
328
- * @param {string} state A `STATE` value.
487
+ * @param {string} state A `STATE` value, or the words `shownState` gives a
488
+ * part the change does not touch.
329
489
  * @param {GateOutcome} gate The resolved gate.
330
490
  * @param {string} detail Command, reason, or failure note.
331
491
  * @returns {string} The formatted line.
332
492
  */
333
493
  function formatLine(state, gate, detail) {
334
- const token = `${state.toUpperCase()}`.padEnd(STATE_WIDTH);
335
- const id = gate.id.padEnd(ID_WIDTH);
494
+ // The space is for a token as wide as the column, which would otherwise
495
+ // run into the level beside it. It changes nothing for a shorter one.
496
+ const token = `${state.toUpperCase()} `.padEnd(STATE_WIDTH);
497
+ // A name has no fixed width: a part's carries its folder, and a gate id may
498
+ // be longer than the column. The space keeps a long one from running into
499
+ // the detail beside it, and changes nothing for a name that fits.
500
+ const id = `${nameOf(gate)} `.padEnd(ID_WIDTH);
336
501
  const alias = gate.alias
337
502
  ? ` (no "${gate.alias.from}" script here; this project ships "${gate.alias.to}")`
338
503
  : "";
@@ -460,7 +625,105 @@ function stateFor(kind) {
460
625
  }
461
626
 
462
627
  function execute(gate, exec, declarations) {
463
- const { code, output, signal } = normaliseExec(exec(gate.command, gate));
628
+ return judge(
629
+ gate.command,
630
+ normaliseExec(exec(gate.command, gate)),
631
+ declarations
632
+ );
633
+ }
634
+
635
+ /**
636
+ * Start one part's argument list in its folder and classify the result.
637
+ *
638
+ * The judgement is {@link judge}, the one every gate gets: a part that exits 0
639
+ * while saying it ran nothing is not proved, a killed one is not failed, and a
640
+ * failure says which failure it was. Only the start differs — an argument
641
+ * list handed to `execArgv` with the folder to start it in, never one line of
642
+ * text handed to a shell.
643
+ *
644
+ * `notStarted` is the one answer an ordinary gate has no equivalent of. A
645
+ * shell that cannot find a program still runs and exits 127; with no shell
646
+ * between this runner and the program, nothing runs at all, so the executor
647
+ * says so in words and the part reports that nothing checked it. That is
648
+ * never a pass, and it is not a kill either: a kill asks an operator to look
649
+ * at the machine, and this asks them to install a program or fix a name.
650
+ * @param {GateOutcome} gate One part of a gate, already cleared to start.
651
+ * @param {(argv: string[], context: {cwd: string, gate: GateOutcome}) => (number|null|undefined|{code: number|null, output: string|null, signal?: string, notStarted?: string})} execArgv
652
+ * Executor for an argument list.
653
+ * @param {string} directory The folder to start in, from `partStart`.
654
+ * @param {Array<{gate: string, shape: string[]}>} declarations Declared
655
+ * failure shapes for this part's command.
656
+ * @returns {{state: string, detail: string, code: number|null,
657
+ * diagnosis: string|null, evidence: string[]}} The outcome.
658
+ */
659
+ function executePart(gate, execArgv, directory, declarations) {
660
+ // A copy, so no executor can change what the report goes on to print.
661
+ const raw = execArgv([...gate.argv], { cwd: directory, gate });
662
+ return judgePart(gate.argv, raw, declarations, directory);
663
+ }
664
+
665
+ /**
666
+ * Classify what one part's argument list answered, without starting it.
667
+ *
668
+ * The second half of {@link executePart}, on its own so that something other
669
+ * than this runner can ask the same question of an answer it obtained itself.
670
+ * The paired-proof runner is that something (CodySwannGT/lisa#4995): it plants
671
+ * a change, starts the part's command, and has to read the answer by exactly
672
+ * the rules a gate is read by — exit 0 from a run that says it ran nothing is
673
+ * not a pass, a kill is not a failure, and a failure says which failure it
674
+ * was. Two readings of one answer would let a proof say a control works when
675
+ * the gate itself would not have been believed.
676
+ *
677
+ * It decides nothing new and starts nothing. `detail` and `evidence` are
678
+ * written for a person and may quote this machine's load; `state`, `code` and
679
+ * `diagnosis` are what a caller should act on.
680
+ * @param {readonly string[]} argv The argument list, as the report prints it.
681
+ * @param {number|null|undefined|{code: number|null, output: string|null, signal?: string, notStarted?: string}} raw
682
+ * What an executor answered, in any shape `runGates` accepts from one.
683
+ * @param {Array<{gate: string, shape: string[]}>} [declarations] Declared
684
+ * failure shapes for this command.
685
+ * @param {string} [cwd] The folder the command ran in.
686
+ * @returns {{state: string, detail: string, code: number|null,
687
+ * diagnosis: string|null, evidence: string[]}} The outcome.
688
+ */
689
+ export function judgePart(argv, raw, declarations = [], cwd = process.cwd()) {
690
+ const shown = shownArgv(argv);
691
+ const notStarted =
692
+ raw !== null && typeof raw === "object" ? raw.notStarted : undefined;
693
+ if (typeof notStarted === "string" && notStarted !== "") {
694
+ return {
695
+ state: STATE.UNPROVABLE,
696
+ detail: `${shown} — ${NOTHING_RAN}: ${notStarted}`,
697
+ code: null,
698
+ diagnosis: null,
699
+ evidence: [],
700
+ };
701
+ }
702
+ return judge(shown, normaliseExec(raw), declarations, cwd);
703
+ }
704
+
705
+ /**
706
+ * Classify what one command answered. The one judgement every gate gets.
707
+ *
708
+ * Split from the two functions that START a command so that a gate's command
709
+ * line and a part's argument list cannot be judged by different rules: there
710
+ * is one place that decides what exit 0 proves, and both reach it.
711
+ * @param {string} command The command as the report prints it.
712
+ * @param {{code: number|null, output: string|null, signal?: string}} answer
713
+ * The executor's answer, from `normaliseExec`.
714
+ * @param {Array<{gate: string, shape: string[]}>} declarations Declared
715
+ * failure shapes for this command.
716
+ * @param {string} [cwd] The folder the command ran in. Read only to explain a
717
+ * verdict already reached — a root quoted back, a failing file named.
718
+ * @returns {{state: string, detail: string, code: number|null,
719
+ * diagnosis: string|null, evidence: string[]}} The outcome.
720
+ */
721
+ function judge(
722
+ command,
723
+ { code, output, signal },
724
+ declarations,
725
+ cwd = process.cwd()
726
+ ) {
464
727
  if (code === 0) {
465
728
  // Exit 0 is ADJACENT to "the property holds"; it is not the observation.
466
729
  // A command that exited 0 while its own output says it collected zero
@@ -472,11 +735,11 @@ function execute(gate, exec, declarations) {
472
735
  //
473
736
  // Silence still passes. The verdict requires the tool to have SAID it ran
474
737
  // nothing, so a gate whose command reports no count at all is untouched.
475
- const hollow = diagnoseHollowSuccess(output);
738
+ const hollow = diagnoseHollowSuccess(output, cwd);
476
739
  if (!hollow) {
477
740
  return {
478
741
  state: STATE.PASSED,
479
- detail: gate.command,
742
+ detail: command,
480
743
  code: 0,
481
744
  diagnosis: null,
482
745
  evidence: [],
@@ -484,7 +747,7 @@ function execute(gate, exec, declarations) {
484
747
  }
485
748
  return {
486
749
  state: stateFor(hollow.kind),
487
- detail: `${gate.command} (exit 0) — ${hollow.summary}`,
750
+ detail: `${command} (exit 0) — ${hollow.summary}`,
488
751
  code: 0,
489
752
  diagnosis: hollow.kind,
490
753
  evidence: hollow.evidence,
@@ -505,7 +768,7 @@ function execute(gate, exec, declarations) {
505
768
  );
506
769
  return {
507
770
  state: stateFor(diagnosis.kind),
508
- detail: `${gate.command} (exit ${shown}) — ${diagnosis.summary}`,
771
+ detail: `${command} (exit ${shown}) — ${diagnosis.summary}`,
509
772
  code: typeof code === "number" ? code : null,
510
773
  diagnosis: diagnosis.kind,
511
774
  evidence: diagnosis.evidence,
@@ -514,7 +777,7 @@ function execute(gate, exec, declarations) {
514
777
  // (CodySwannGT/lisa#4896). Read only on this failure branch, so a passing
515
778
  // gate never carries a list. Diagnostics only: the parser never throws and
516
779
  // nothing above or below reads it into a verdict.
517
- failingTests: failingTestFiles(output, { root: process.cwd() }),
780
+ failingTests: failingTestFiles(output, { root: cwd }),
518
781
  };
519
782
  }
520
783
 
@@ -603,15 +866,40 @@ function attributed(gate, outcome, siblings) {
603
866
  };
604
867
  }
605
868
 
869
+ /**
870
+ * What a gate left to a built-in check says when the caller has none.
871
+ *
872
+ * `builtin` is the registry's word for "the hook that called this runner
873
+ * proves this property itself, with a step of its own". That is true of the
874
+ * hooks a stack template ships and of nothing else. Reported as not
875
+ * applicable to a caller with no such step, the gate would read as settled
876
+ * while nothing anywhere had checked it — so it is reported as what it is.
877
+ */
878
+ const NO_BUILTIN_TO_DEFER_TO =
879
+ "left to a check built in to the caller, and this caller has no built-in " +
880
+ "checks, so nothing ran and nothing was proved. Name a command for this " +
881
+ 'gate under "parts", or declare it "off"';
882
+
606
883
  /**
607
884
  * Classify a gate without running it, when there is nothing to run.
608
885
  * @param {GateOutcome} gate The resolved gate.
886
+ * @param {boolean} [builtins] Whether the caller of this run has built-in
887
+ * checks of its own. See `runGates`.
609
888
  * @returns {{state: string, detail: string, code: null}|null} Outcome or null.
610
889
  */
611
- function classifyStatic(gate) {
890
+ function classifyStatic(gate, builtins = true) {
891
+ if (!builtins && gate.mode === "builtin") {
892
+ return {
893
+ state: STATE.UNPROVABLE,
894
+ detail: NO_BUILTIN_TO_DEFER_TO,
895
+ code: null,
896
+ };
897
+ }
612
898
  const skip = skipReason(gate);
613
899
  if (skip) return { state: STATE.SKIPPED, detail: skip, code: null };
614
- if (!gate.command) {
900
+ // A part has no command LINE by design — it has an argument list, and
901
+ // `partStart` decides whether that can start.
902
+ if (!gate.command && !isPart(gate)) {
615
903
  return {
616
904
  state: STATE.UNPROVABLE,
617
905
  detail: "resolves to no task, so nothing ran and nothing was proved",
@@ -621,6 +909,290 @@ function classifyStatic(gate) {
621
909
  return null;
622
910
  }
623
911
 
912
+ /**
913
+ * How every part that was never started begins its explanation.
914
+ *
915
+ * Said the same way whatever the reason, so the two facts an operator needs
916
+ * come first and in one order: no command ran, and the folder is unchecked.
917
+ * The reason follows the colon.
918
+ */
919
+ const NOTHING_RAN = "nothing ran, so this part was not checked";
920
+
921
+ /** The most arguments one part's command may hold. */
922
+ const PART_ARGUMENT_LIMIT = 500;
923
+
924
+ /** The most bytes one argument of a part's command may hold. */
925
+ const PART_ARGUMENT_BYTES = 65_536;
926
+
927
+ /** The most bytes a part's whole command may hold, written as JSON. */
928
+ const PART_COMMAND_BYTES = 250_000;
929
+
930
+ /**
931
+ * Why a value cannot be started as a part's command, or null when it can.
932
+ *
933
+ * `validateGates` already refuses a `command` that is not a list, and
934
+ * `resolveMoment` refuses to resolve a block that would not validate. This is
935
+ * the same question asked again at the last moment before a process starts,
936
+ * because the answer is what keeps a shell out: a string has to be split into
937
+ * a program and its arguments by something, and whatever splits it is a shell
938
+ * or an imitation of one. So anything that is not a list of text naming a
939
+ * program is refused here, whoever handed it over.
940
+ *
941
+ * The size limits sit just inside what the process supervisor accepts for a
942
+ * literal argument list, so an oversized command is refused here in a
943
+ * sentence rather than by the supervisor in a stack trace.
944
+ * @param {unknown} argv What a resolved entry carries as its argument list.
945
+ * @returns {string|null} The reason, finishing `NOTHING_RAN`, or null.
946
+ */
947
+ function argvProblem(argv) {
948
+ if (!Array.isArray(argv)) {
949
+ return "its command is not a list of arguments";
950
+ }
951
+ if (argv.length === 0) return "its command is an empty list";
952
+ if (argv.some(item => typeof item !== "string")) {
953
+ return "its command holds an item that is not text";
954
+ }
955
+ if (argv[0].trim() === "") return "its command names no program";
956
+ if (argv.some(item => item.includes("\0"))) {
957
+ return "its command holds a NUL character, which no program can be handed";
958
+ }
959
+ if (
960
+ argv.length > PART_ARGUMENT_LIMIT ||
961
+ argv.some(item => Buffer.byteLength(item) > PART_ARGUMENT_BYTES) ||
962
+ Buffer.byteLength(JSON.stringify(argv)) > PART_COMMAND_BYTES
963
+ ) {
964
+ return "its command is too long to start";
965
+ }
966
+ return null;
967
+ }
968
+
969
+ /**
970
+ * The folder a part's command starts in, or why there is none.
971
+ *
972
+ * The declaration is a committed file, and so is any link it points at. A
973
+ * scope that reads `api` is only inside the repository if what `api` IS on
974
+ * disk is inside the repository: a link named `api` leading to another
975
+ * directory would start the command there, with whatever that command does
976
+ * to the folder it is started in. So the folder is resolved through every
977
+ * link first, and the command starts in the RESOLVED folder — the one that
978
+ * was checked — rather than in the name that was declared.
979
+ *
980
+ * That one comparison is the whole test. `..`, a path from the top of the
981
+ * disk and a link all fail it for the same reason, so there is no list of
982
+ * spellings to keep complete.
983
+ *
984
+ * Exported for the paired-proof runner (CodySwannGT/lisa#4995), which starts
985
+ * a part's command in a copy of the repository and must hold the folder to
986
+ * the same test there.
987
+ * @param {string} root The repository root.
988
+ * @param {unknown} scope The part's folder, written from the root.
989
+ * @returns {{directory: string, resolved: string}|{problem: string}} The
990
+ * folder and its own path from the repository root, or the reason,
991
+ * finishing `NOTHING_RAN`.
992
+ */
993
+ export function partDirectory(root, scope) {
994
+ if (typeof scope !== "string" || scope === "") {
995
+ return { problem: "it names no folder" };
996
+ }
997
+ const named = JSON.stringify(scope);
998
+ let top;
999
+ try {
1000
+ top = realpathSync(root);
1001
+ } catch {
1002
+ return { problem: "the repository folder could not be read" };
1003
+ }
1004
+ let directory;
1005
+ try {
1006
+ directory = realpathSync(resolve(top, scope));
1007
+ } catch (error) {
1008
+ const code = /** @type {{code?: unknown}} */ (error)?.code;
1009
+ return {
1010
+ problem:
1011
+ code === "ENOENT" || code === "ENOTDIR"
1012
+ ? `the folder ${named} does not exist in this repository`
1013
+ : `the folder ${named} could not be opened (${String(code)})`,
1014
+ };
1015
+ }
1016
+ const path = relative(top, directory);
1017
+ const inside =
1018
+ path === "" ||
1019
+ (!isAbsolute(path) && path !== ".." && !path.startsWith(`..${sep}`));
1020
+ if (!inside) {
1021
+ return {
1022
+ problem: `the folder ${named} leads outside this repository`,
1023
+ };
1024
+ }
1025
+ if (!isFolder(directory)) return { problem: `${named} is not a folder` };
1026
+ // Where the folder really is, written the way git writes a path. It
1027
+ // differs from the declared name only when that name is a link.
1028
+ return { directory, resolved: path.split(sep).join("/") };
1029
+ }
1030
+
1031
+ /**
1032
+ * Whether a path is a folder that is there.
1033
+ * @param {string} path The path to ask about.
1034
+ * @returns {boolean} True for an existing folder; false for anything else,
1035
+ * including a path that cannot be read.
1036
+ */
1037
+ function isFolder(path) {
1038
+ try {
1039
+ return statSync(path).isDirectory();
1040
+ } catch {
1041
+ return false;
1042
+ }
1043
+ }
1044
+
1045
+ /**
1046
+ * Whether one part's command may start, and where.
1047
+ *
1048
+ * Asked before anything else is decided about the part, for the reason a
1049
+ * gate's own skip is: these are facts about THIS part — its command is not a
1050
+ * list, its folder is not there — and a part that cannot start must say so
1051
+ * itself rather than wait behind another gate or borrow a sibling's result.
1052
+ * @param {GateOutcome} gate One part of a gate.
1053
+ * @param {string} root The repository root.
1054
+ * @returns {{directory: string, resolved: string}|{problem: string}} Where to
1055
+ * start, or why not.
1056
+ */
1057
+ function partStart(gate, root) {
1058
+ const problem = argvProblem(gate.argv);
1059
+ return problem === null ? partDirectory(root, gate.scope) : { problem };
1060
+ }
1061
+
1062
+ /**
1063
+ * The outcome of a part that was never started.
1064
+ *
1065
+ * UNPROVABLE, not FAILED: nothing measured the folder, so nothing found it
1066
+ * wanting. It blocks exactly as a failure does — a required part nobody
1067
+ * checked is not a pass.
1068
+ * @param {string} problem The reason, from `partStart`.
1069
+ * @returns {{state: string, detail: string, code: null}} The outcome.
1070
+ */
1071
+ function partNotStarted(problem) {
1072
+ return {
1073
+ state: STATE.UNPROVABLE,
1074
+ detail: `${NOTHING_RAN}: ${problem}`,
1075
+ code: null,
1076
+ };
1077
+ }
1078
+
1079
+ /** What an operator reads in place of the state on a part left out. */
1080
+ const NOT_APPLICABLE = "not applicable";
1081
+
1082
+ /**
1083
+ * The words a result's line starts with.
1084
+ *
1085
+ * A state's own name, except for a part the change does not touch. That part
1086
+ * is SKIPPED to everything that counts results, and says NOT APPLICABLE to
1087
+ * the person reading, because "skipped" does not say why and the reason is
1088
+ * the whole point: nothing in that folder changed.
1089
+ * @param {{state: string, untouched?: boolean}} outcome A verdict.
1090
+ * @returns {string} What `formatLine` prints as the state.
1091
+ */
1092
+ function shownState(outcome) {
1093
+ return outcome.untouched === true ? NOT_APPLICABLE : outcome.state;
1094
+ }
1095
+
1096
+ /**
1097
+ * What the runner was told about the change, read strictly.
1098
+ *
1099
+ * A list is believed only when it is a list of text. Anything else — a
1100
+ * caller that answered with nothing, a list holding something that is not a
1101
+ * path — is "not known", which runs every part.
1102
+ * @param {unknown} told What the `change` function answered.
1103
+ * @returns {{paths: string[]|null, note: string|null}} The change.
1104
+ */
1105
+ function readChange(told) {
1106
+ const paths = /** @type {{paths?: unknown}|null|undefined} */ (told)?.paths;
1107
+ const note = /** @type {{note?: unknown}|null|undefined} */ (told)?.note;
1108
+ return {
1109
+ paths:
1110
+ Array.isArray(paths) && paths.every(path => typeof path === "string")
1111
+ ? paths
1112
+ : null,
1113
+ note: typeof note === "string" && note !== "" ? note : null,
1114
+ };
1115
+ }
1116
+
1117
+ /**
1118
+ * Ask what the change touches, and treat any failure to answer as "not
1119
+ * known".
1120
+ *
1121
+ * Working out the change is there to save time, and it must never cost a
1122
+ * verdict. If the question itself breaks, the run goes on with every part,
1123
+ * and says why: stopping here would refuse every commit over a fault in the
1124
+ * narrowing, and guessing would leave a part out.
1125
+ * @param {() => unknown} change The `change` function `runGates` was given.
1126
+ * @param {string} moment The moment being run.
1127
+ * @returns {{paths: string[]|null, note: string|null}} The change.
1128
+ */
1129
+ function askChange(change, moment) {
1130
+ try {
1131
+ return readChange(change());
1132
+ } catch (error) {
1133
+ // probe-direction: fail-closed — a change that could not be worked out,
1134
+ // for whatever reason, is not known, and every part runs.
1135
+ return {
1136
+ paths: null,
1137
+ note:
1138
+ `Every part runs at ${moment}: what the change touches could not ` +
1139
+ `be worked out (${error instanceof Error ? error.message : String(error)}).`,
1140
+ };
1141
+ }
1142
+ }
1143
+
1144
+ /**
1145
+ * The verdict of a part the change does not touch, or null to run it.
1146
+ *
1147
+ * Asked only of a part that could start: one that could not says so itself,
1148
+ * whatever the change touches, so a broken declaration is not hidden until
1149
+ * somebody edits that folder.
1150
+ *
1151
+ * A part for the whole repository always applies, and is answered without
1152
+ * asking what changed at all. A folder that resolves to the repository root
1153
+ * is the same thing under another name.
1154
+ *
1155
+ * The folder is matched under both of its spellings — the one declared, and
1156
+ * the one it resolves to on disk. They differ only when the declared name is
1157
+ * a link, and a change made where the link leads is a change to that part.
1158
+ * @param {GateOutcome} gate One part of a gate.
1159
+ * @param {{directory: string, resolved: string}} start Where it would start.
1160
+ * @param {() => {paths: string[]|null, note: string|null}} change Asks what
1161
+ * the change touches. Called at most once per run, by `runGates`.
1162
+ * @returns {{state: string, untouched: true, detail: string, code: null}|null}
1163
+ * The verdict, or null when the part must run.
1164
+ */
1165
+ function untouchedOutcome(gate, start, change) {
1166
+ if (gate.scope === WHOLE_REPOSITORY || start.resolved === "") return null;
1167
+ const { paths } = change();
1168
+ if (paths === null) return null;
1169
+ if (touchesFolder(paths, [gate.scope, start.resolved])) return null;
1170
+ return {
1171
+ state: STATE.SKIPPED,
1172
+ untouched: true,
1173
+ detail:
1174
+ `the change touches nothing inside ${JSON.stringify(gate.scope)}, so ` +
1175
+ `${shownArgv(gate.argv)} was not run. Not counted as proved`,
1176
+ code: null,
1177
+ };
1178
+ }
1179
+
1180
+ /**
1181
+ * What a run is shared and explained under: the thing that actually ran.
1182
+ *
1183
+ * For a gate, its command line, exactly as before. For a part, its folder
1184
+ * together with its argument list — the same list in two folders is two
1185
+ * different checks, and two gates naming one list in one folder are one. The
1186
+ * leading NUL keeps a part's key apart from every command line, which cannot
1187
+ * hold one.
1188
+ * @param {GateOutcome} gate The resolved gate.
1189
+ * @returns {string|null} The key, or null when the gate runs nothing.
1190
+ */
1191
+ function proverKey(gate) {
1192
+ if (!isPart(gate)) return gate.command;
1193
+ return `\0part\0${JSON.stringify([gate.scope ?? null, gate.argv ?? null])}`;
1194
+ }
1195
+
624
1196
  /**
625
1197
  * Summarise a completed run in operator-readable lines.
626
1198
  *
@@ -641,11 +1213,11 @@ function summarise(result, priorKills = []) {
641
1213
  const failedOptional = byLevel("optional");
642
1214
 
643
1215
  for (const entry of byLevel("required")) {
644
- lines.push(`❌ required gate FAILED: ${entry.id} — ${entry.detail}`);
1216
+ lines.push(`❌ required gate FAILED: ${nameOf(entry)} — ${entry.detail}`);
645
1217
  }
646
1218
  for (const entry of failedOptional) {
647
1219
  lines.push(
648
- `⚠️ optional gate FAILED: ${entry.id} — ${entry.detail} ` +
1220
+ `⚠️ optional gate FAILED: ${nameOf(entry)} — ${entry.detail} ` +
649
1221
  `(reported, not blocking)`
650
1222
  );
651
1223
  }
@@ -656,7 +1228,7 @@ function summarise(result, priorKills = []) {
656
1228
  // block; neither is the word "failed".
657
1229
  for (const entry of result.killed) {
658
1230
  lines.push(
659
- `🛑 ${entry.level} gate NOT PROVED — KILLED: ${entry.id} — ${entry.detail}`
1231
+ `🛑 ${entry.level} gate NOT PROVED — KILLED: ${nameOf(entry)} — ${entry.detail}`
660
1232
  );
661
1233
  }
662
1234
  // Its own headline, and deliberately not the word "failed". A property
@@ -665,7 +1237,7 @@ function summarise(result, priorKills = []) {
665
1237
  // sightings of a starved suite each cost.
666
1238
  for (const entry of result.unprovable) {
667
1239
  lines.push(
668
- `❓ ${entry.level} gate NOT PROVED: ${entry.id} — ${entry.detail}`
1240
+ `❓ ${entry.level} gate NOT PROVED: ${nameOf(entry)} — ${entry.detail}`
669
1241
  );
670
1242
  }
671
1243
 
@@ -681,11 +1253,20 @@ function summarise(result, priorKills = []) {
681
1253
  if (result.notRun.length) {
682
1254
  lines.push(
683
1255
  `❓ ${result.notRun.length} gate(s) UNKNOWN — never ran, verdict not ` +
684
- `established: ${result.notRun.map(entry => entry.id).join(", ")}`
1256
+ `established: ${result.notRun.map(nameOf).join(", ")}`
1257
+ );
1258
+ // `blockedBy` is a gate id, and every part of a gate shares it. The first
1259
+ // required result of that gate to go unproved is the one that stopped the
1260
+ // rest, and for a part its name says which folder that was.
1261
+ const blocker = result.results.find(
1262
+ entry =>
1263
+ entry.id === result.blockedBy &&
1264
+ entry.level === "required" &&
1265
+ result.failed.includes(entry)
685
1266
  );
686
1267
  const whyStopped = result.interrupted
687
1268
  ? "The run was interrupted before it reached them."
688
- : `${result.blockedBy} failed first and stopped them.`;
1269
+ : `${blocker ? nameOf(blocker) : result.blockedBy} failed first and stopped them.`;
689
1270
  lines.push(
690
1271
  ` Each of those may pass or fail; this run does not say which. ${whyStopped}`
691
1272
  );
@@ -695,7 +1276,7 @@ function summarise(result, priorKills = []) {
695
1276
  lines.push(
696
1277
  `⏭️ ${result.skipped.length} gate(s) NOT APPLICABLE here — their ` +
697
1278
  `verdict IS established, there was nothing to run: ` +
698
- `${result.skipped.map(entry => entry.id).join(", ")}`
1279
+ `${result.skipped.map(nameOf).join(", ")}`
699
1280
  );
700
1281
  }
701
1282
  // The headline an interrupted run gets INSTEAD of the completion one
@@ -730,6 +1311,7 @@ function summarise(result, priorKills = []) {
730
1311
  // These five are exhaustive on this path, so they sum to `total`: a required
731
1312
  // FAILED/UNPROVABLE/KILLED gate would have blocked and returned above, and
732
1313
  // `notRun` is populated only once something has blocked.
1314
+ const untouched = result.skipped.filter(entry => entry.untouched).length;
733
1315
  const counts =
734
1316
  `${result.passed.length} proved, ${failedOptional.length} failed ` +
735
1317
  `(optional), ${result.unprovable.length} not proved, ` +
@@ -739,6 +1321,20 @@ function summarise(result, priorKills = []) {
739
1321
  `${failedOptional.length ? "⚠️ " : "✅"} ${result.moment}: ${counts}, ` +
740
1322
  `of ${result.total} gate(s) declared.${
741
1323
  failedOptional.length ? " See the optional failure(s) above." : ""
1324
+ }${
1325
+ // The tally counts lines of this report. Without the sentence, a gate
1326
+ // with three parts reads as three gates to anyone who knows how many
1327
+ // the project declared.
1328
+ result.results.some(isPart)
1329
+ ? " Each part of a gate is counted on its own."
1330
+ : ""
1331
+ }${
1332
+ // Said in the tally itself, because the tally is what gets quoted: a
1333
+ // part left out is in the last number, and never in the first.
1334
+ untouched
1335
+ ? ` ${untouched} part(s) this change does not touch were not run, ` +
1336
+ `and are counted as not applicable, never as proved.`
1337
+ : ""
742
1338
  }`
743
1339
  );
744
1340
  return lines;
@@ -757,17 +1353,44 @@ function summarise(result, priorKills = []) {
757
1353
  * The command genuinely ran and its answer is known, so reporting NOT-RUN there
758
1354
  * would understate what was proved — the mirror image of overstating it, and
759
1355
  * just as untrue.
1356
+ *
1357
+ * A part adds two questions in front of all of that. May its command start at
1358
+ * all, and where: see `partStart`. And does the change touch its folder: see
1359
+ * `untouchedOutcome`. A part left out is settled there, before the pass cache
1360
+ * and before any shared result are looked at, so it is never read from either
1361
+ * and never written to either.
760
1362
  * @param {GateOutcome} gate The resolved gate.
761
- * @param {{proved: Map<string, object>, blockedBy: string|null, exec: Function}} ctx Run state.
1363
+ * @param {{proved: Map<string, object>, blockedBy: string|null, exec: Function, execArgv: Function, start: {directory: string, resolved: string}|{problem: string}|null, builtins: boolean, change: Function}} ctx
1364
+ * Run state. `start` is `partStart`'s answer for a part, and null for a
1365
+ * gate with no parts; the caller asks, because it records where the part's
1366
+ * folder really is beside the verdict.
762
1367
  * @returns {{outcome: object, shared: object|undefined, ran: boolean}} The verdict.
763
1368
  */
764
1369
  function verdictFor(
765
1370
  gate,
766
- { proved, blockedBy, exec, siblings, declarations, cache }
1371
+ {
1372
+ proved,
1373
+ blockedBy,
1374
+ exec,
1375
+ execArgv,
1376
+ start,
1377
+ builtins,
1378
+ siblings,
1379
+ declarations,
1380
+ cache,
1381
+ change,
1382
+ }
767
1383
  ) {
768
- const own = classifyStatic(gate);
1384
+ const own =
1385
+ classifyStatic(gate, builtins) ??
1386
+ (start !== null && "problem" in start
1387
+ ? partNotStarted(start.problem)
1388
+ : null);
769
1389
  if (own) return { outcome: own, shared: undefined, ran: false };
770
1390
 
1391
+ const leftOut = start === null ? null : untouchedOutcome(gate, start, change);
1392
+ if (leftOut) return { outcome: leftOut, shared: undefined, ran: false };
1393
+
771
1394
  // A remembered pass for this exact content (CodySwannGT/lisa#4594). It is a
772
1395
  // known verdict, so it is honoured even once the run is blocked, exactly as
773
1396
  // a shared result is. It is never shared onward: a sibling computes its own
@@ -788,7 +1411,8 @@ function verdictFor(
788
1411
  };
789
1412
  }
790
1413
 
791
- const shared = gate.command ? proved.get(gate.command) : undefined;
1414
+ const key = proverKey(gate);
1415
+ const shared = key ? proved.get(key) : undefined;
792
1416
  if (shared) {
793
1417
  // The RAW outcome is what is shared, and each gate reads it for itself.
794
1418
  // Sharing the already-attributed view would hand the second gate the first
@@ -798,7 +1422,7 @@ function verdictFor(
798
1422
  return {
799
1423
  outcome: {
800
1424
  ...view,
801
- detail: `${view.detail} (proved by the ${shared.id} run)`,
1425
+ detail: `${view.detail} (proved by the ${shared.name} run)`,
802
1426
  },
803
1427
  shared,
804
1428
  ran: false,
@@ -830,7 +1454,10 @@ function verdictFor(
830
1454
  ran: false,
831
1455
  };
832
1456
  }
833
- const raw = execute(gate, exec, declarations);
1457
+ const raw =
1458
+ start === null
1459
+ ? execute(gate, exec, declarations)
1460
+ : executePart(gate, execArgv, start.directory, declarations);
834
1461
  return {
835
1462
  outcome: attributed(gate, raw, siblings),
836
1463
  raw,
@@ -857,6 +1484,16 @@ function verdictFor(
857
1484
  * transcript, and a number-only type can express the null while silently
858
1485
  * erasing the transcript that says what the run was doing when it died.
859
1486
  * A type that cannot describe `spawnExec` is a type no caller can trust.
1487
+ * @param {(argv: string[], context: {cwd: string, gate: GateOutcome}) => (number|null|undefined|{code: number|null, output: string|null, signal?: string, notStarted?: string})} [options.execArgv]
1488
+ * Executor for one PART of a gate: an argument list, and the folder to start
1489
+ * it in. Separate from `exec` because the two take different things on
1490
+ * purpose — `exec` takes one line of text for a shell, and a part's command
1491
+ * must never become one. Defaults to `spawnArgv`; injected by tests for the
1492
+ * reason `exec` is. An answer carrying `notStarted` says the program could
1493
+ * not be started at all, and why.
1494
+ * @param {string} [options.root] The repository root, which every part's
1495
+ * folder is resolved inside. Defaults to the working directory, where the
1496
+ * hooks start this runner.
860
1497
  * @param {(line: string) => void} [options.out] Line sink; defaults to stdout.
861
1498
  * @param {Record<string, string>|null} [options.scripts] The project's package
862
1499
  * scripts, from `projectScripts`. `null` means unknown, and an unknown
@@ -885,6 +1522,17 @@ function verdictFor(
885
1522
  * `openSelectionReports` (CodySwannGT/lisa#4600), or null for none. A
886
1523
  * partial selection is never remembered by the cache, and one run with
887
1524
  * coverage off reports coverage-adequacy SKIPPED.
1525
+ * @param {boolean} [options.builtins] Whether the caller of this run has
1526
+ * built-in checks of its own to prove what the registry leaves to them.
1527
+ * True by default, which is every hook a stack template ships. False for a
1528
+ * caller with none (`--builtins=none`): a gate resolved to `builtin` is then
1529
+ * reported as not proved, because nothing is left to prove it.
1530
+ * @param {() => ({paths: string[]|null, note: string|null})} [options.change]
1531
+ * Says which paths the change touches (CodySwannGT/lisa#4988), as
1532
+ * `changeAt` in `lib/changed-paths` answers it. `paths: null` means "not
1533
+ * known", and is the default: every part runs. Called at most once, and
1534
+ * only when the moment has a part for a folder, so a gates block with no
1535
+ * parts never asks. `note` is printed once, before the first such part.
888
1536
  * @returns {GateRun} What every declared gate at this moment produced.
889
1537
  */
890
1538
  export function runGates({
@@ -892,6 +1540,8 @@ export function runGates({
892
1540
  moment,
893
1541
  runner = "npm run",
894
1542
  exec,
1543
+ execArgv = spawnArgv,
1544
+ root = process.cwd(),
895
1545
  out = line => console.log(line),
896
1546
  scripts = null,
897
1547
  priorKills = recentKillMarks(),
@@ -900,13 +1550,28 @@ export function runGates({
900
1550
  clock = Date.now,
901
1551
  cache = null,
902
1552
  selection = null,
1553
+ builtins = true,
1554
+ change = () => ({ paths: null, note: null }),
903
1555
  }) {
904
1556
  const resolved = resolveMoment({ gates, moment, runner, scripts });
1557
+ // What the change touches, asked for when the first part for a folder is
1558
+ // reached and never again. Said once, where it is first used, so the
1559
+ // reader of a NOT APPLICABLE line has already been told what the change is.
1560
+ let known = null;
1561
+ const changeOnce = () => {
1562
+ if (known === null) {
1563
+ known = askChange(change, moment);
1564
+ if (known.note !== null) out(` 🔎 ${known.note}`);
1565
+ }
1566
+ return known;
1567
+ };
905
1568
  const results = [];
906
1569
  // The id of the first required gate to go unproved, not merely a boolean:
907
1570
  // every gate queued behind it has to be able to say WHAT stopped it, or its
908
1571
  // line is indistinguishable from a gate that had nothing to run.
909
1572
  let blockedBy = null;
1573
+ // The same gate as an operator reads it: for a part, with its folder.
1574
+ let blocker = null;
910
1575
 
911
1576
  // Which gates name each command, built before anything runs. Attribution
912
1577
  // needs the answer on the FIRST execution: gates run alphabetically, so the
@@ -919,16 +1584,14 @@ export function runGates({
919
1584
  // declared by a gate other than the one that happened to run it.
920
1585
  const declaredShapes = new Map();
921
1586
  for (const gate of resolved) {
922
- if (!gate.command) continue;
923
- sharers.set(
924
- gate.command,
925
- (sharers.get(gate.command) ?? new Set()).add(gate.id)
926
- );
1587
+ const key = proverKey(gate);
1588
+ if (!key) continue;
1589
+ sharers.set(key, (sharers.get(key) ?? new Set()).add(gate.id));
927
1590
  if (!Array.isArray(gate.failureShape) || gate.failureShape.length === 0) {
928
1591
  continue;
929
1592
  }
930
- declaredShapes.set(gate.command, [
931
- ...(declaredShapes.get(gate.command) ?? []),
1593
+ declaredShapes.set(key, [
1594
+ ...(declaredShapes.get(key) ?? []),
932
1595
  { gate: gate.id, shape: gate.failureShape },
933
1596
  ]);
934
1597
  }
@@ -978,13 +1641,19 @@ export function runGates({
978
1641
  continue;
979
1642
  }
980
1643
  const began = clock();
1644
+ const key = proverKey(gate);
1645
+ const start = isPart(gate) ? partStart(gate, root) : null;
981
1646
  const verdict = verdictFor(gate, {
982
1647
  proved,
983
- blockedBy,
1648
+ blockedBy: blocker,
984
1649
  exec,
985
- siblings: sharers.get(gate.command) ?? new Set(),
986
- declarations: declaredShapes.get(gate.command) ?? [],
1650
+ execArgv,
1651
+ start,
1652
+ builtins,
1653
+ siblings: sharers.get(key) ?? new Set(),
1654
+ declarations: declaredShapes.get(key) ?? [],
987
1655
  cache,
1656
+ change: changeOnce,
988
1657
  });
989
1658
  const { shared, ran, raw } = verdict;
990
1659
  // What the command said it selected (CodySwannGT/lisa#4600). A partial
@@ -1014,9 +1683,10 @@ export function runGates({
1014
1683
  // test would treat a terminated run as never having happened and send the
1015
1684
  // next gate to run it again — re-running a whole suite an operator has
1016
1685
  // just interrupted.
1017
- if (ran && gate.command) {
1018
- proved.set(gate.command, {
1686
+ if (ran && key) {
1687
+ proved.set(key, {
1019
1688
  id: gate.id,
1689
+ name: nameOf(gate),
1020
1690
  outcome: raw ?? outcome,
1021
1691
  durationMs,
1022
1692
  });
@@ -1039,11 +1709,17 @@ export function runGates({
1039
1709
  results.push({
1040
1710
  ...gate,
1041
1711
  ...outcome,
1712
+ // Where the part's folder really is, kept beside its verdict: whether
1713
+ // the parts that ran reached the whole change is worked out from the
1714
+ // rows afterwards (`unreachedFloor`), under both of a folder's names.
1715
+ ...(start !== null && "resolved" in start
1716
+ ? { resolved: start.resolved }
1717
+ : {}),
1042
1718
  provedBy: shared?.id ?? null,
1043
1719
  startedAt: new Date(began).toISOString(),
1044
1720
  durationMs: shared ? 0 : elapsedMs,
1045
1721
  });
1046
- out(formatLine(outcome.state, gate, outcome.detail));
1722
+ out(formatLine(shownState(outcome), gate, outcome.detail));
1047
1723
  for (const line of outcome.evidence ?? []) out(`${" ".repeat(6)}↳ ${line}`);
1048
1724
  const unproved =
1049
1725
  outcome.state === STATE.FAILED ||
@@ -1053,8 +1729,10 @@ export function runGates({
1053
1729
  // gate inherit only the pass, or letting a failure count only against the
1054
1730
  // optional gate that ran first, would be the original defect again: a
1055
1731
  // required gate satisfied by a run that failed.
1056
- if (unproved && gate.level === "required" && !blockedBy)
1732
+ if (unproved && gate.level === "required" && !blockedBy) {
1057
1733
  blockedBy = gate.id;
1734
+ blocker = nameOf(gate);
1735
+ }
1058
1736
  }
1059
1737
 
1060
1738
  // The caller may disappear while the FINAL gate executes. There is then no
@@ -1088,6 +1766,10 @@ export function runGates({
1088
1766
  killed: bucket(STATE.KILLED),
1089
1767
  skipped: bucket(STATE.SKIPPED),
1090
1768
  notRun: bucket(STATE.NOT_RUN),
1769
+ // What this run was told the change touches, kept for whoever decides
1770
+ // afterwards what the run covered. Never asked is "not known": a run
1771
+ // with no part for a folder had no reason to find out.
1772
+ change: { paths: known?.paths ?? null },
1091
1773
  };
1092
1774
  // Left for a LATER run, because this one already knows. The note only ever
1093
1775
  // helps a different run whose own output carries no trace of the machine.
@@ -1197,6 +1879,18 @@ const UNPROVED_STATES = new Set([
1197
1879
  * function and is deliberately left alone here — it is a design question about
1198
1880
  * whether a CI signal may retire a local step, not the errored-leg defect.)
1199
1881
  *
1882
+ * ## A gate with parts is covered only when they reached the whole change
1883
+ *
1884
+ * The hook stands its check down for the WHOLE commit or push, and a part
1885
+ * looks at one folder. So a gate with parts is named here only when every
1886
+ * path the change touches is inside the folder of a part that ran. A change
1887
+ * to `api/a.go` and `tools/b.js`, with parts for `api` and `web`, runs the
1888
+ * `api` part and leaves `tools/b.js` to nobody: the caller's built-in check
1889
+ * is the only thing left that can look at it, so the gate is withheld and
1890
+ * that check runs. The same holds when no part ran at all, and when the
1891
+ * change is not known and no part covers the whole repository
1892
+ * (CodySwannGT/lisa#4988). See `unreachedFloor`, which says why for each.
1893
+ *
1200
1894
  * Fail-safe on the input: no result means no run, and no run proves nothing.
1201
1895
  * @param {object} options Inputs.
1202
1896
  * @param {object} options.gates The gates block.
@@ -1217,7 +1911,123 @@ export function provenFloor({ gates, moment, wired = [], result = null }) {
1217
1911
  )
1218
1912
  .map(entry => entry.id)
1219
1913
  );
1220
- return declared.filter(id => !unproved.has(id));
1914
+ const unreached = new Set(
1915
+ unreachedFloor({ gates, moment, wired, result }).map(entry => entry.id)
1916
+ );
1917
+ return declared.filter(id => !unproved.has(id) && !unreached.has(id));
1918
+ }
1919
+
1920
+ /** How every reason `unreachedFloor` gives ends: what the caller does next. */
1921
+ const BUILT_IN_STILL_RUNS = "so the built-in check for it still runs.";
1922
+
1923
+ /** The most changed paths one reason names before it counts the rest. */
1924
+ const PATHS_NAMED = 3;
1925
+
1926
+ /**
1927
+ * Changed paths as an operator reads them in one line: the first few, each
1928
+ * quoted so a space or an odd character in a name cannot be misread, and a
1929
+ * count of the rest.
1930
+ * @param {string[]} paths Changed paths; at least one.
1931
+ * @returns {string} The paths, for the middle of a sentence.
1932
+ */
1933
+ function namedPaths(paths) {
1934
+ const named = paths
1935
+ .slice(0, PATHS_NAMED)
1936
+ .map(path => JSON.stringify(path))
1937
+ .join(", ");
1938
+ const rest = paths.length - PATHS_NAMED;
1939
+ return rest > 0 ? `${named} and ${rest} more` : named;
1940
+ }
1941
+
1942
+ /**
1943
+ * Why the parts of one gate did not reach the whole change, or null when
1944
+ * they did.
1945
+ *
1946
+ * Three answers keep the caller's built-in check, and each is the same fact
1947
+ * seen from a different side — some path of this change was looked at by no
1948
+ * part:
1949
+ *
1950
+ * - No part ran. The change touches none of the gate's folders.
1951
+ * - A changed path is inside no part that ran.
1952
+ * - The change is not known, and no part that ran covers the whole
1953
+ * repository. Every part ran, and nothing says their folders are all of
1954
+ * the change: a commit that edits `.lisa.config.json` is "not known", and
1955
+ * that file is outside every folder a part can name except `.`.
1956
+ *
1957
+ * A part for the whole repository that ran reaches every path there is, so
1958
+ * with one the answer is null whatever the change touches, known or not.
1959
+ *
1960
+ * A path is covered only when it is a part's folder or lies inside it —
1961
+ * `pathsOutside`, read strictly and compared exactly (`API` is not `api`),
1962
+ * and under both names a linked folder has.
1963
+ * A row that does not say where its folder really is (one a caller wrote by
1964
+ * hand) is matched under its declared name alone, which can only keep a
1965
+ * built-in check that could have stood down.
1966
+ * @param {string} id The gate id.
1967
+ * @param {GateOutcome[]} parts The gate's rows, one per part.
1968
+ * @param {string[]|null} paths The changed paths, or null when not known.
1969
+ * @returns {string|null} The reason, finishing `BUILT_IN_STILL_RUNS`, or null.
1970
+ */
1971
+ function unreachedReason(id, parts, paths) {
1972
+ const ran = parts.filter(part => part.untouched !== true);
1973
+ if (ran.length === 0) {
1974
+ return `No part of ${id} applies to this change, ${BUILT_IN_STILL_RUNS}`;
1975
+ }
1976
+ const whole = ran.some(
1977
+ part => part.scope === WHOLE_REPOSITORY || part.resolved === ""
1978
+ );
1979
+ if (whole) return null;
1980
+ if (paths === null) {
1981
+ return (
1982
+ `What this change touches is not known and ${id} has no part for the ` +
1983
+ `whole repository, ${BUILT_IN_STILL_RUNS}`
1984
+ );
1985
+ }
1986
+ const folders = ran.flatMap(part =>
1987
+ [part.scope, part.resolved].filter(folder => typeof folder === "string")
1988
+ );
1989
+ const outside = pathsOutside(paths, folders);
1990
+ return outside.length === 0
1991
+ ? null
1992
+ : `${id} has no part for ${outside.length} path(s) this change touches ` +
1993
+ `(${namedPaths(outside)}), ${BUILT_IN_STILL_RUNS}`;
1994
+ }
1995
+
1996
+ /**
1997
+ * Floor properties whose parts did not reach every path of this change, and
1998
+ * why.
1999
+ *
2000
+ * Each of these is declared and was not found wanting by the parts that ran,
2001
+ * and still proved nothing about some path the change touches. `provenFloor`
2002
+ * withholds them, and `main` prints each reason so the operator knows why a
2003
+ * built-in check still ran. A gate with no parts is never listed: its one
2004
+ * command is the project's check for the whole repository.
2005
+ *
2006
+ * A gate that failed or went unproved may be listed too. `provenFloor`
2007
+ * withholds it on either count, and `main` blocks before it prints these.
2008
+ * @param {object} options Inputs.
2009
+ * @param {object} options.gates The gates block.
2010
+ * @param {string} options.moment The moment being run.
2011
+ * @param {string[]} [options.wired] Conditional floor ids this project wired.
2012
+ * @param {GateRun|null} [options.result] What `runGates` produced. Read for
2013
+ * its rows and for `change.paths`; a result with no `change` is read as a
2014
+ * change that is not known.
2015
+ * @returns {Array<{id: string, reason: string}>} One entry per floor gate
2016
+ * whose built-in check is kept, in floor order.
2017
+ */
2018
+ export function unreachedFloor({ gates, moment, wired = [], result = null }) {
2019
+ const results = result?.results ?? [];
2020
+ const told = result?.change?.paths;
2021
+ const paths =
2022
+ Array.isArray(told) && told.every(path => typeof path === "string")
2023
+ ? told
2024
+ : null;
2025
+ return coveredFloor({ gates, moment, wired }).flatMap(id => {
2026
+ const parts = results.filter(entry => entry.id === id && isPart(entry));
2027
+ if (parts.length === 0) return [];
2028
+ const reason = unreachedReason(id, parts, paths);
2029
+ return reason === null ? [] : [{ id, reason }];
2030
+ });
1221
2031
  }
1222
2032
 
1223
2033
  /**
@@ -1436,6 +2246,343 @@ export function spawnExec(command) {
1436
2246
  }
1437
2247
  }
1438
2248
 
2249
+ /**
2250
+ * Hang-detector deadline for one part's command, in milliseconds.
2251
+ *
2252
+ * Thirty minutes, where a gate's command line gets two hours. The process
2253
+ * supervisor accepts a literal argument list only with a deadline of thirty
2254
+ * minutes or less, and a part's command goes through that mode because it is
2255
+ * the one that starts a program with no shell. Like `GATE_COMMAND_BUDGET_MS`
2256
+ * this is a ceiling on "has stopped making progress", not a budget: a part
2257
+ * still running at the deadline is reported KILLED, never failed and never
2258
+ * passed.
2259
+ */
2260
+ const PART_COMMAND_BUDGET_MS = 30 * 60 * 1000;
2261
+
2262
+ /** The most output a quiet start with no supervisor collects, in bytes. */
2263
+ const QUIET_OUTPUT_BYTES = 64 * 1024 * 1024;
2264
+
2265
+ /** Where a program is looked for when the environment sets no `PATH`. */
2266
+ const DEFAULT_SEARCH_PATH = "/usr/bin:/bin";
2267
+
2268
+ /**
2269
+ * Whether a path names a file this user may run.
2270
+ * @param {string} path An absolute path.
2271
+ * @returns {boolean} True for a regular file with the execute permission.
2272
+ */
2273
+ function isRunnableFile(path) {
2274
+ try {
2275
+ if (!statSync(path).isFile()) return false;
2276
+ accessSync(path, constants.X_OK);
2277
+ return true;
2278
+ } catch {
2279
+ return false;
2280
+ }
2281
+ }
2282
+
2283
+ /**
2284
+ * Why the system would find no program to start, on Linux and macOS.
2285
+ *
2286
+ * The same search the system makes: a name holding a `/` is a path from the
2287
+ * folder the command starts in, and any other name is looked for in each
2288
+ * folder of `PATH`, in order.
2289
+ *
2290
+ * Asked BEFORE starting, because of where the answer would otherwise come
2291
+ * from. A shell that cannot find a program still runs, prints `command not
2292
+ * found` and exits 127. With no shell, a missing program means nothing runs,
2293
+ * and the supervisor can only report that as its own failure — a stack trace
2294
+ * and exit 1, which reads as the program having run and failed. Asking first
2295
+ * turns that into one sentence naming the program.
2296
+ *
2297
+ * It only ever makes the report clearer. A program this misses is reported as
2298
+ * not found and blocks; a program it wrongly finds fails to start under the
2299
+ * supervisor and blocks there. Neither is a pass.
2300
+ * @param {string} program The first item of a part's argument list.
2301
+ * @param {string} cwd The folder the command starts in.
2302
+ * @returns {string|null} Why the program cannot be started, finishing
2303
+ * `NOTHING_RAN`, or null when a runnable file answers to that name.
2304
+ */
2305
+ function programProblem(program, cwd) {
2306
+ if (!program.includes("/")) {
2307
+ const found = (process.env.PATH ?? DEFAULT_SEARCH_PATH)
2308
+ .split(delimiter)
2309
+ .some(folder => isRunnableFile(resolve(cwd, folder, program)));
2310
+ return found ? null : programMissing(program);
2311
+ }
2312
+ const path = resolve(cwd, program);
2313
+ if (isRunnableFile(path)) return null;
2314
+ // There, and not runnable, is a different fix from not there: the file
2315
+ // needs its execute permission, not installing.
2316
+ return existsSync(path)
2317
+ ? `${JSON.stringify(program)} is there but may not be run as a program. ` +
2318
+ `Give the file its execute permission, or name the program that ` +
2319
+ `runs it as the first item of this part's command`
2320
+ : programMissing(program);
2321
+ }
2322
+
2323
+ /**
2324
+ * The sentence for a program that is not there to start.
2325
+ * @param {string} program The first item of a part's argument list.
2326
+ * @returns {string} The reason, finishing `NOTHING_RAN`.
2327
+ */
2328
+ function programMissing(program) {
2329
+ return (
2330
+ `the program ${JSON.stringify(program)} was not found. Install it, or ` +
2331
+ `correct the first item of this part's command in .lisa.config.json`
2332
+ );
2333
+ }
2334
+
2335
+ /**
2336
+ * Start an argument list under the process supervisor's literal mode.
2337
+ *
2338
+ * The same supervisor every gate command runs under, so a part keeps what a
2339
+ * gate has: output shown as it is printed, a captured tail to diagnose from,
2340
+ * a deadline that takes the whole process tree with it, and a stop when the
2341
+ * hook that started this run goes away. `--direct-argv` is the mode that
2342
+ * hands the list to the system as written; there is no `/bin/sh -c` on this
2343
+ * path, and `shell: false` says so for the one hop this file owns.
2344
+ *
2345
+ * A quiet start shows nothing while the command runs: the command reads from
2346
+ * nothing and what it prints goes only to the captured tail. Only the
2347
+ * supervisor's own messages still reach this process's error output.
2348
+ * @param {readonly string[]} argv The program and its arguments.
2349
+ * @param {string} cwd The folder to start in.
2350
+ * @param {{capture: boolean, quiet: boolean, budgetMs: number}} how Whether to
2351
+ * keep a diagnostic tail of the output, whether to show nothing while the
2352
+ * command runs, and the deadline.
2353
+ * @returns {import("node:child_process").SpawnSyncReturns<string>} Result.
2354
+ */
2355
+ function superviseArgv(argv, cwd, { capture, quiet, budgetMs }) {
2356
+ const watch = isWatchablePid(LAUNCH_PARENT_PID)
2357
+ ? [`--watch-pid=${LAUNCH_PARENT_PID}`]
2358
+ : [];
2359
+ const shown = quiet ? "ignore" : "inherit";
2360
+ return boundedSpawnSync(
2361
+ process.execPath,
2362
+ [
2363
+ PROCESS_TREE_RUNNER,
2364
+ `--timeout-ms=${budgetMs}`,
2365
+ ...watch,
2366
+ ...(capture ? ["--capture-fd=3"] : []),
2367
+ "--direct-argv",
2368
+ "--",
2369
+ ...argv,
2370
+ ],
2371
+ {
2372
+ cwd,
2373
+ shell: false,
2374
+ stdio: capture ? [shown, shown, "inherit", "pipe"] : "inherit",
2375
+ timeout: budgetMs + PROCESS_TREE_REAP_BUDGET_MS,
2376
+ }
2377
+ );
2378
+ }
2379
+
2380
+ /**
2381
+ * The deadline one start of a part's command is held to, in milliseconds.
2382
+ *
2383
+ * A gate never passes one and gets {@link PART_COMMAND_BUDGET_MS}. A proof
2384
+ * passes the limit its declaration gives one half (CodySwannGT/lisa#4995).
2385
+ * The supervisor's literal mode accepts a whole number of milliseconds up to
2386
+ * thirty minutes and nothing else, so anything else is refused here in a
2387
+ * sentence instead of by the supervisor in a stack trace that would read as
2388
+ * the command having run and failed.
2389
+ * @param {unknown} timeoutMs What the caller asked for, if anything.
2390
+ * @returns {number} The deadline.
2391
+ * @throws {TypeError} When a limit was given and is not one the supervisor
2392
+ * accepts.
2393
+ */
2394
+ function partBudget(timeoutMs) {
2395
+ if (timeoutMs === undefined) return PART_COMMAND_BUDGET_MS;
2396
+ if (
2397
+ Number.isInteger(timeoutMs) &&
2398
+ timeoutMs >= 1 &&
2399
+ timeoutMs <= PART_COMMAND_BUDGET_MS
2400
+ ) {
2401
+ return timeoutMs;
2402
+ }
2403
+ throw new TypeError(
2404
+ `A part's command was not started: its time limit is ` +
2405
+ `${JSON.stringify(timeoutMs)}, and a limit is a whole number of ` +
2406
+ `milliseconds from 1 to ${PART_COMMAND_BUDGET_MS}.`
2407
+ );
2408
+ }
2409
+
2410
+ /**
2411
+ * Start an argument list with no supervisor in between.
2412
+ *
2413
+ * The route for Windows, where the supervisor has no literal mode. The
2414
+ * program is started directly with its output inherited, so nothing is
2415
+ * captured — the same thing Windows gets for a gate's command line — and a
2416
+ * failure is reported from its exit code alone.
2417
+ *
2418
+ * Here the system itself says when a program is not there (`ENOENT`), so
2419
+ * nothing is looked up first.
2420
+ *
2421
+ * A quiet start is the one case that keeps the output here: the command
2422
+ * reads from nothing and what it prints is collected instead of shown.
2423
+ * @param {readonly string[]} argv The program and its arguments.
2424
+ * @param {string} cwd The folder to start in.
2425
+ * @param {{quiet: boolean, budgetMs: number}} how Whether to collect the
2426
+ * output instead of showing it, and the deadline.
2427
+ * @returns {{code: number|null, output: string|null, signal?: string, notStarted?: string}}
2428
+ * Exit code; null with `notStarted` when the program could not be started.
2429
+ * @throws {Error} When the program was killed at its deadline.
2430
+ */
2431
+ function startArgv(argv, cwd, { quiet, budgetMs }) {
2432
+ const [program, ...rest] = argv;
2433
+ const child = boundedSpawnSync(program, rest, {
2434
+ cwd,
2435
+ shell: false,
2436
+ stdio: quiet ? ["ignore", "pipe", "pipe"] : "inherit",
2437
+ timeout: budgetMs,
2438
+ // Only a quiet start collects anything, and a check that prints a great
2439
+ // deal must still be read rather than cut off as if it could not start.
2440
+ ...(quiet ? { maxBuffer: QUIET_OUTPUT_BYTES } : {}),
2441
+ });
2442
+ if (child.error) {
2443
+ const code = /** @type {{code?: unknown}} */ (child.error).code;
2444
+ return {
2445
+ code: null,
2446
+ output: null,
2447
+ notStarted:
2448
+ code === "ENOENT"
2449
+ ? programMissing(program)
2450
+ : `the program ${JSON.stringify(program)} could not be started ` +
2451
+ `(${String(code ?? child.error.message)})`,
2452
+ };
2453
+ }
2454
+ return {
2455
+ code: child.status,
2456
+ output: quiet ? `${child.stdout ?? ""}${child.stderr ?? ""}` : null,
2457
+ ...(child.signal ? { signal: child.signal } : {}),
2458
+ };
2459
+ }
2460
+
2461
+ /**
2462
+ * Start one part's argument list in its folder, with no shell.
2463
+ *
2464
+ * The default `execArgv` of `runGates`, and the counterpart of `spawnExec`.
2465
+ * The two differ in exactly the way the declaration does: `spawnExec` is
2466
+ * given one line of text and hands it to a shell, and this is given a list
2467
+ * and hands each item to the program as one argument. Nothing reads `;`,
2468
+ * `&&`, `$(…)`, a quote or a space as anything but a character.
2469
+ *
2470
+ * It starts in `cwd` and nowhere else, so `cwd` is required: a part's command
2471
+ * must never run in whatever folder the runner happened to be started in.
2472
+ *
2473
+ * The program gets this process's environment unchanged, as every gate
2474
+ * command does.
2475
+ *
2476
+ * ## What it refuses, and how
2477
+ *
2478
+ * A command that is not a list of text is a programming error by this point —
2479
+ * validation and `runGates` have both already refused it — so it THROWS
2480
+ * rather than answering, and nothing is started. Everything that can go wrong
2481
+ * with a well-formed list is an answer instead: `{code: null}` with
2482
+ * `notStarted` for a folder or a program that is not there, and `{code:
2483
+ * null}` alone for a command killed at its deadline.
2484
+ *
2485
+ * ## What a proof asks for that a gate does not
2486
+ *
2487
+ * A gate passes neither `timeoutMs` nor `quiet`, and nothing above changes
2488
+ * for it. The paired-proof runner (CodySwannGT/lisa#4995) passes both.
2489
+ *
2490
+ * `timeoutMs` is the limit its declaration gives one half of a proof. A
2491
+ * command still running at that limit is stopped with its whole process
2492
+ * tree, exactly as at the gate's own deadline, and the answer says so with
2493
+ * `timedOut: true` — the one thing an exit code cannot say, and the
2494
+ * difference between "this check is too slow for its limit" and "this
2495
+ * machine killed it". The key is only ever present, and only ever true, on a
2496
+ * start that was given a limit and was stopped no earlier than it.
2497
+ *
2498
+ * `quiet` shows nothing while the command runs. A proof's report is one
2499
+ * document, and a command printing into the middle of it would make that
2500
+ * document unreadable by the program it was written for. The command reads
2501
+ * from nothing, and what it prints is kept for the answer whatever
2502
+ * `LISA_GATES_CAPTURE` says, because the output is what the proof is read
2503
+ * from.
2504
+ * @param {readonly string[]} argv The program, then its arguments.
2505
+ * @param {object} options How to start it.
2506
+ * @param {string} options.cwd The folder to start in.
2507
+ * @param {string} [options.platform] The platform, for the route Windows
2508
+ * takes. Injectable so that route can be run where it is not the default.
2509
+ * @param {number} [options.timeoutMs] The deadline, in whole milliseconds
2510
+ * from 1 to thirty minutes. Thirty minutes when left out.
2511
+ * @param {boolean} [options.quiet] Show nothing while the command runs, and
2512
+ * always keep what it printed.
2513
+ * @returns {{code: number|null, output: string|null, signal?: string, notStarted?: string, timedOut?: true}}
2514
+ * OS status and diagnostic tail, or why nothing started.
2515
+ * @throws {TypeError} When `argv` is not a list of text naming a program,
2516
+ * `cwd` is not given, or `timeoutMs` is not a limit the supervisor accepts.
2517
+ */
2518
+ export function spawnArgv(
2519
+ argv,
2520
+ { cwd, platform = process.platform, timeoutMs, quiet = false } = {}
2521
+ ) {
2522
+ const problem = argvProblem(argv);
2523
+ if (problem !== null) {
2524
+ throw new TypeError(
2525
+ `A part's command was not started: ${problem}. A command is a list ` +
2526
+ `with one item per argument, the program first, and is never split ` +
2527
+ `from one string.`
2528
+ );
2529
+ }
2530
+ if (typeof cwd !== "string" || cwd === "") {
2531
+ throw new TypeError(
2532
+ "A part's command was not started: no folder to start it in was given."
2533
+ );
2534
+ }
2535
+ const budgetMs = partBudget(timeoutMs);
2536
+ // Asked here as well as in `partDirectory`, for a caller that is not
2537
+ // `runGates`: the system reports a missing folder as the PROGRAM not being
2538
+ // found, which would send an operator to install something they have.
2539
+ if (!isFolder(cwd)) {
2540
+ return {
2541
+ code: null,
2542
+ output: null,
2543
+ notStarted: `the folder ${JSON.stringify(cwd)} does not exist`,
2544
+ };
2545
+ }
2546
+ const limited = timeoutMs !== undefined;
2547
+ const began = performance.now();
2548
+ // Read off a clock that cannot be set back, and only to name a stop that
2549
+ // has already happened: the supervisor ends a tree at its deadline with the
2550
+ // same signal anything else on the machine would use, so the elapsed time
2551
+ // is the only thing that tells the two apart.
2552
+ const atDeadline = answer =>
2553
+ limited && answer.code === null && performance.now() - began >= budgetMs
2554
+ ? { ...answer, timedOut: true }
2555
+ : answer;
2556
+ if (platform === "win32") {
2557
+ try {
2558
+ return startArgv(argv, cwd, { quiet, budgetMs });
2559
+ } catch (error) {
2560
+ // A gate keeps what it always had here. Only a start that was given a
2561
+ // limit of its own is answered instead.
2562
+ if (!limited) throw error;
2563
+ return atDeadline(killedOrRethrow(error));
2564
+ }
2565
+ }
2566
+ const notStarted = programProblem(argv[0], cwd);
2567
+ if (notStarted !== null) return { code: null, output: null, notStarted };
2568
+ const capture = quiet || process.env.LISA_GATES_CAPTURE !== "0";
2569
+ try {
2570
+ const child = superviseArgv(argv, cwd, { capture, quiet, budgetMs });
2571
+ // A non-timeout `spawnSync` failure arrives on the result, and it means
2572
+ // the supervisor itself never ran: nothing checked this part.
2573
+ if (child.error) return { code: null, output: null };
2574
+ const captured = capture ? child.output?.[3] : null;
2575
+ return atDeadline({
2576
+ code: child.status,
2577
+ ...(child.signal ? { signal: child.signal } : {}),
2578
+ output:
2579
+ captured === null || captured === undefined ? null : String(captured),
2580
+ });
2581
+ } catch (error) {
2582
+ return atDeadline(killedOrRethrow(error));
2583
+ }
2584
+ }
2585
+
1439
2586
  /**
1440
2587
  * The one schema token, which a reader REFUSES to best-effort parse past.
1441
2588
  *
@@ -1463,7 +2610,12 @@ export const EVIDENCE_VERDICT = Object.freeze({
1463
2610
  REFUSED: "refused",
1464
2611
  /** The project has no gates block; the registry governs nothing here. */
1465
2612
  NO_GATES: "no-gates",
1466
- /** The block is half-written, so the caller's built-in steps still run. */
2613
+ /**
2614
+ * The caller's built-in steps still run: the block is half-written, or the
2615
+ * parts that ran did not reach every path of the change and the caller
2616
+ * cannot keep one step on its own. In the second case the rows of what did
2617
+ * run are recorded beside it.
2618
+ */
1467
2619
  FELL_BACK: "fell-back",
1468
2620
  /** The runner could not run. Nothing was proved. */
1469
2621
  RUNNER_FAILED: "runner-failed",
@@ -1540,8 +2692,18 @@ function evidenceSubject() {
1540
2692
  * or restated the exit code, so they were removed with the checker
1541
2693
  * (CodySwannGT/lisa#4794). `status` stays three-valued: only PASSED becomes
1542
2694
  * `pass`, FAILED becomes `fail`, and everything else is `unknown`.
2695
+ *
2696
+ * One PART of a gate adds `scope`, the folder it covers. A gate with parts
2697
+ * records one row per part, all under one `gate`, and without the folder a
2698
+ * reader could not tell the row that failed from the row that passed. A gate
2699
+ * with no parts records exactly the four keys it always has.
2700
+ *
2701
+ * A part the change does not touch adds `applicable: false`. Its `status` is
2702
+ * `unknown`, as it is for everything that was not measured, so a reader that
2703
+ * knows only the three statuses still cannot take it for a pass; the extra
2704
+ * key is what tells it apart from a part that ran and proved nothing.
1543
2705
  * @param {GateOutcome} outcome One resolved gate and its verdict.
1544
- * @returns {{gate: string, status: string, level: string, label: string}} The gate's record.
2706
+ * @returns {{gate: string, status: string, level: string, label: string, scope?: string|null, applicable?: false}} The gate's record.
1545
2707
  */
1546
2708
  function gateEvidence(outcome) {
1547
2709
  return {
@@ -1549,6 +2711,8 @@ function gateEvidence(outcome) {
1549
2711
  status: EVIDENCE_STATUS_FOR[outcome.state] ?? "unknown",
1550
2712
  level: outcome.level,
1551
2713
  label: outcome.label ?? outcome.id,
2714
+ ...(isPart(outcome) ? { scope: outcome.scope ?? null } : {}),
2715
+ ...(outcome.untouched === true ? { applicable: false } : {}),
1552
2716
  };
1553
2717
  }
1554
2718
 
@@ -1626,6 +2790,87 @@ function readFlag(argv, name) {
1626
2790
  return hit ? hit.slice(name.length + 3) : null;
1627
2791
  }
1628
2792
 
2793
+ /** How the command line is written. */
2794
+ const USAGE =
2795
+ "usage: lisa-run-gates.mjs --moment=<moment> [--coverage=<file>] " +
2796
+ "[--evidence=<file>] [--builtins=none] [--push-refs=<file>|-] [--parts=all]";
2797
+
2798
+ /**
2799
+ * The flag a push hook uses to hand over what git told it is being pushed.
2800
+ *
2801
+ * Its value is a file holding the hook's standard input exactly as git wrote
2802
+ * it — one `<local ref> <local object> <remote ref> <remote object>` line per
2803
+ * ref — or `-` to have this runner read its own standard input. Read only at
2804
+ * push. Without it (and without the file the shipped push hook names in
2805
+ * `LISA_PUSHED_REFS_FILE`) the runner does not know what is being pushed, and
2806
+ * runs every part.
2807
+ *
2808
+ * With `-`, standard input is read to its end before any gate starts, so a
2809
+ * gate's command then finds it empty. A caller whose gates read the pushed
2810
+ * refs themselves hands over a file instead.
2811
+ */
2812
+ const PUSH_REFS_FLAG = "push-refs";
2813
+
2814
+ /** The flag that runs every part, whatever the change touches. */
2815
+ const PARTS_FLAG = "parts";
2816
+
2817
+ /** The one value that flag takes. */
2818
+ const ALL_PARTS = "all";
2819
+
2820
+ /**
2821
+ * Why the `--parts` flag cannot be honoured as given, or null when it can.
2822
+ *
2823
+ * Refused rather than guessed at, for the reason `--builtins` is: a caller
2824
+ * that wrote `--parts=api` meant something, and running a different set of
2825
+ * parts than it asked for is not a favour.
2826
+ * @param {string|null} value The flag's value, or null when it was not given.
2827
+ * @returns {string|null} The problem, in a sentence, or null.
2828
+ */
2829
+ function partsFlagProblem(value) {
2830
+ if (value === null || value === ALL_PARTS) return null;
2831
+ return (
2832
+ `--${PARTS_FLAG}=${JSON.stringify(value)} is not something this runner ` +
2833
+ `understands. The only value is --${PARTS_FLAG}=${ALL_PARTS}, which runs ` +
2834
+ `every part whatever the change touches.`
2835
+ );
2836
+ }
2837
+
2838
+ /** The flag a caller uses to say what checks of its own it has. */
2839
+ const BUILTINS_FLAG = "builtins";
2840
+
2841
+ /** The one value that flag takes: the caller has no checks of its own. */
2842
+ const NO_BUILTINS = "none";
2843
+
2844
+ /**
2845
+ * Why the `--builtins` flag cannot be honoured as given, or null when it can.
2846
+ *
2847
+ * `--coverage` and `--builtins=none` are refused together because they say
2848
+ * opposite things about the caller. The first asks which of its built-in
2849
+ * checks it may skip; the second says it has none. Honouring either one would
2850
+ * mean ignoring the other, and the caller would not learn which.
2851
+ * @param {string|null} value The flag's value, or null when it was not given.
2852
+ * @param {string|null} coveragePath The `--coverage` file, if one was given.
2853
+ * @returns {string|null} The problem, in a sentence, or null.
2854
+ */
2855
+ function builtinsFlagProblem(value, coveragePath) {
2856
+ if (value === null) return null;
2857
+ if (value !== NO_BUILTINS) {
2858
+ return (
2859
+ `--${BUILTINS_FLAG}=${JSON.stringify(value)} is not something this ` +
2860
+ `runner understands. The only value is --${BUILTINS_FLAG}=${NO_BUILTINS}, ` +
2861
+ `for a caller that has no built-in checks of its own.`
2862
+ );
2863
+ }
2864
+ if (coveragePath) {
2865
+ return (
2866
+ `--coverage and --${BUILTINS_FLAG}=${NO_BUILTINS} cannot be used ` +
2867
+ `together: the first asks which built-in checks to skip, and the ` +
2868
+ `second says there are none.`
2869
+ );
2870
+ }
2871
+ return null;
2872
+ }
2873
+
1629
2874
  /**
1630
2875
  * Write the covered ids where the calling hook can read them.
1631
2876
  *
@@ -1716,12 +2961,39 @@ export function main(argv = process.argv.slice(2)) {
1716
2961
  // Host load at the START of the run, for the push timing report (#4591).
1717
2962
  const startReading = hostReading();
1718
2963
  if (!moment) {
1719
- console.error(
1720
- "usage: lisa-run-gates.mjs --moment=<moment> [--coverage=<file>] " +
1721
- "[--evidence=<file>]"
1722
- );
2964
+ console.error(USAGE);
1723
2965
  return EXIT.RUNNER_FAILED;
1724
2966
  }
2967
+ // Read before anything runs, and refused rather than guessed at. This flag
2968
+ // decides whether "go and run your own checks" is an answer the caller can
2969
+ // act on, so a value this runner does not know must not quietly become
2970
+ // either answer.
2971
+ const builtinsFlag = argv.includes(`--${BUILTINS_FLAG}`)
2972
+ ? ""
2973
+ : readFlag(argv, BUILTINS_FLAG);
2974
+ const partsFlag = argv.includes(`--${PARTS_FLAG}`)
2975
+ ? ""
2976
+ : readFlag(argv, PARTS_FLAG);
2977
+ const flagProblem =
2978
+ builtinsFlagProblem(builtinsFlag, coveragePath) ??
2979
+ partsFlagProblem(partsFlag);
2980
+ if (flagProblem) {
2981
+ console.error(`⚠️ ${flagProblem}`);
2982
+ console.error(USAGE);
2983
+ console.error(" Nothing ran, so nothing was proved. This is NOT a pass.");
2984
+ return EXIT.RUNNER_FAILED;
2985
+ }
2986
+ const standalone = builtinsFlag === NO_BUILTINS;
2987
+ // Standard input is read NOW, before anything else is started. Every gate
2988
+ // command inherits it, and git writes the pushed refs there exactly once:
2989
+ // read lazily, whichever of the runner and a gate got there first would
2990
+ // leave the other nothing, and the answer would depend on the order the
2991
+ // gates happen to run in.
2992
+ const pushRefsFlag = readFlag(argv, PUSH_REFS_FLAG);
2993
+ const stdinRefs =
2994
+ moment === "push" && pushRefsFlag === PUSH_REFS_STDIN
2995
+ ? readPushRefs(PUSH_REFS_STDIN)
2996
+ : undefined;
1725
2997
 
1726
2998
  // PRINTED BEFORE ANY GATE RUNS, so it is present whether they pass, fail,
1727
2999
  // are optional, or never run at all. Every early return below is a report an
@@ -1791,6 +3063,17 @@ export function main(argv = process.argv.slice(2)) {
1791
3063
  // has not adopted the registry, so the caller must run its hardcoded steps.
1792
3064
  if (!config.gates || Object.keys(config.gates).length === 0) {
1793
3065
  if (coveragePath) writeCoverage(coveragePath, []);
3066
+ // A caller with no built-in checks has no hardcoded steps to run instead,
3067
+ // so 78 would be an instruction it cannot follow. What is true is that
3068
+ // nothing is declared and so nothing was checked: the same answer a gates
3069
+ // block that is silent at this moment gets further down, said out loud.
3070
+ if (standalone) {
3071
+ console.log(
3072
+ `ℹ️ No gates are declared in .lisa.config.json, so nothing was ` +
3073
+ `checked at ${moment}.`
3074
+ );
3075
+ return settle(EXIT.PROVED, EVIDENCE_VERDICT.NO_GATES);
3076
+ }
1794
3077
  return settle(EXIT.NO_GATES, EVIDENCE_VERDICT.NO_GATES);
1795
3078
  }
1796
3079
 
@@ -1850,8 +3133,13 @@ export function main(argv = process.argv.slice(2)) {
1850
3133
  // and anything it does declare, `false` included, wins.
1851
3134
  const pushConfig = withPushGateDefaults(config.config, process.cwd());
1852
3135
 
1853
- const wired = wiredConditionalFloor({ moment });
1854
- const missing = undeclaredFloor({ gates: config.gates, moment, wired });
3136
+ // The floor is the list of properties the caller's built-in checks prove.
3137
+ // A caller with none has no floor: there is nothing for a half-written
3138
+ // block to delete by omission, and nothing to fall back to if it did.
3139
+ const wired = standalone ? [] : wiredConditionalFloor({ moment });
3140
+ const missing = standalone
3141
+ ? []
3142
+ : undeclaredFloor({ gates: config.gates, moment, wired });
1855
3143
 
1856
3144
  // One cleanup sweep per push (CodySwannGT/lisa#4597), before the first gate
1857
3145
  // and before the built-in fallback below, which runs tests too. It never
@@ -1997,6 +3285,23 @@ export function main(argv = process.argv.slice(2)) {
1997
3285
  : exec,
1998
3286
  cache,
1999
3287
  selection,
3288
+ builtins: !standalone,
3289
+ // What the change touches is read HERE and handed down, for the reason
3290
+ // the manifest is: `runGates` stays a function of its inputs. It is asked
3291
+ // only if this moment has a part for a folder, so a gates block with no
3292
+ // parts starts no git and prints nothing new.
3293
+ change: () =>
3294
+ partsFlag === ALL_PARTS
3295
+ ? {
3296
+ paths: null,
3297
+ note: `Every part runs at ${moment}: --${PARTS_FLAG}=${ALL_PARTS} was given.`,
3298
+ }
3299
+ : changeAt({
3300
+ moment,
3301
+ root: process.cwd(),
3302
+ pushRefs: pushRefsFlag,
3303
+ ...(stdinRefs === undefined ? {} : { read: () => stdinRefs }),
3304
+ }),
2000
3305
  // The manifest is read HERE and handed down, rather than read inside the
2001
3306
  // resolver, so that `runGates` stays a pure function of its inputs and
2002
3307
  // every test above can state what this project ships instead of writing a
@@ -2029,6 +3334,33 @@ export function main(argv = process.argv.slice(2)) {
2029
3334
  // errored retired the fallback that would have caught the error. See
2030
3335
  // `provenFloor`. A write failure keeps its old meaning: the record the caller
2031
3336
  // asked for does not exist, so no verdict may be reported off it.
3337
+ //
3338
+ // A gate whose parts did not reach every path of the change is withheld
3339
+ // from that file, and the operator is told which and why. Asked only of a
3340
+ // caller with built-in checks to keep, and said only on a run that is about
3341
+ // to report success: a blocked run stops the commit whatever this says.
3342
+ const unreached =
3343
+ standalone || result.blocked
3344
+ ? []
3345
+ : unreachedFloor({ gates: config.gates, moment, wired, result });
3346
+ for (const { reason } of unreached) console.log(`ℹ️ ${reason}`);
3347
+ // A caller that did not pass `--coverage` cannot keep ONE built-in check:
3348
+ // exit 0 makes it skip them all. So the answer it gets is the one a
3349
+ // half-written block gets, for the same reason — some path of this change
3350
+ // would otherwise be checked by nothing. The parts that ran stay on the
3351
+ // record; only the verdict says the caller's own checks still have to run.
3352
+ if (!coveragePath && unreached.length) {
3353
+ console.log(
3354
+ ` This caller did not pass --coverage, so it cannot keep one ` +
3355
+ `built-in check on its own: every built-in check runs.`
3356
+ );
3357
+ return settle(EXIT.NO_GATES, EVIDENCE_VERDICT.FELL_BACK, {
3358
+ gates: config.gates,
3359
+ result,
3360
+ runner: config.runner,
3361
+ scripts,
3362
+ });
3363
+ }
2032
3364
  if (
2033
3365
  coveragePath &&
2034
3366
  !writeCoverage(