@codyswann/lisa 5.4.0 → 5.5.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 (370) hide show
  1. package/README.md +60 -3
  2. package/all/copy-contents/gitignore +16 -0
  3. package/all/copy-contents/scripts/lisa-mutation.sh +4 -6
  4. package/all/copy-overwrite/scripts/fetch-test-access-map.d.mts +71 -0
  5. package/all/copy-overwrite/scripts/fetch-test-access-map.mjs +674 -0
  6. package/all/copy-overwrite/scripts/lib/affected-tests.mjs +818 -0
  7. package/all/copy-overwrite/scripts/lib/automation-provenance-local.mjs +22 -1
  8. package/all/copy-overwrite/scripts/lib/build-marker.mjs +410 -0
  9. package/all/copy-overwrite/scripts/lib/gate-pass-cache.mjs +537 -0
  10. package/all/copy-overwrite/scripts/lib/kill-marks.mjs +1 -2
  11. package/all/copy-overwrite/scripts/lib/lisa-cleanup-sweep-processes.mjs +3 -4
  12. package/all/copy-overwrite/scripts/lib/npm-update-controller-broker.mjs +1 -1
  13. package/all/copy-overwrite/scripts/lib/npm-update-gate-hooks.mjs +2 -1
  14. package/all/copy-overwrite/scripts/lib/npm-update-helper-inventory.mjs +8 -1
  15. package/all/copy-overwrite/scripts/lib/npm-update-hosted-hook.mjs +1 -1
  16. package/all/copy-overwrite/scripts/lib/npm-update-tool-launcher.mjs +1 -1
  17. package/all/copy-overwrite/scripts/lib/push-admission.mjs +158 -0
  18. package/all/copy-overwrite/scripts/lib/push-gate-defaults.d.mts +34 -0
  19. package/all/copy-overwrite/scripts/lib/push-gate-defaults.mjs +147 -0
  20. package/all/copy-overwrite/scripts/lib/push-timing.mjs +323 -0
  21. package/all/copy-overwrite/scripts/lib/rspec-selection.mjs +672 -0
  22. package/all/copy-overwrite/scripts/lisa-affected-tests.mjs +566 -0
  23. package/all/copy-overwrite/scripts/lisa-gates.mjs +29 -0
  24. package/all/copy-overwrite/scripts/lisa-lint-staged-preflight.mjs +10 -1
  25. package/all/copy-overwrite/scripts/lisa-push-timing-report.mjs +153 -0
  26. package/all/copy-overwrite/scripts/lisa-rspec-select.mjs +982 -0
  27. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +231 -6
  28. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +105 -17
  29. package/all/deletions.json +11 -2
  30. package/cdk/create-only/vitest.config.local.ts +1 -7
  31. package/cdk/package-lisa/package.lisa.json +4 -4
  32. package/dist/cli/admit-cmd.d.ts +21 -0
  33. package/dist/cli/admit-cmd.d.ts.map +1 -0
  34. package/dist/cli/admit-cmd.js +142 -0
  35. package/dist/cli/admit-cmd.js.map +1 -0
  36. package/dist/cli/check-cmd.d.ts +72 -0
  37. package/dist/cli/check-cmd.d.ts.map +1 -0
  38. package/dist/cli/check-cmd.js +316 -0
  39. package/dist/cli/check-cmd.js.map +1 -0
  40. package/dist/cli/index.d.ts.map +1 -1
  41. package/dist/cli/index.js +6 -4
  42. package/dist/cli/index.js.map +1 -1
  43. package/dist/cli/lisa-test-run-admission.d.ts +18 -0
  44. package/dist/cli/lisa-test-run-admission.d.ts.map +1 -0
  45. package/dist/cli/lisa-test-run-admission.js +62 -0
  46. package/dist/cli/lisa-test-run-admission.js.map +1 -0
  47. package/dist/cli/lisa-test-run-payload.d.ts +37 -0
  48. package/dist/cli/lisa-test-run-payload.d.ts.map +1 -0
  49. package/dist/cli/lisa-test-run-payload.js +55 -0
  50. package/dist/cli/lisa-test-run-payload.js.map +1 -0
  51. package/dist/cli/lisa-test-run-shard-files.d.ts +89 -0
  52. package/dist/cli/lisa-test-run-shard-files.d.ts.map +1 -0
  53. package/dist/cli/lisa-test-run-shard-files.js +239 -0
  54. package/dist/cli/lisa-test-run-shard-files.js.map +1 -0
  55. package/dist/cli/lisa-test-run-shard.d.ts +6 -2
  56. package/dist/cli/lisa-test-run-shard.d.ts.map +1 -1
  57. package/dist/cli/lisa-test-run-shard.js +25 -13
  58. package/dist/cli/lisa-test-run-shard.js.map +1 -1
  59. package/dist/cli/lisa-test-run.d.ts +1 -1
  60. package/dist/cli/lisa-test-run.d.ts.map +1 -1
  61. package/dist/cli/lisa-test-run.js +47 -10
  62. package/dist/cli/lisa-test-run.js.map +1 -1
  63. package/dist/cli/update-check-hook.d.ts.map +1 -1
  64. package/dist/cli/update-check-hook.js +3 -0
  65. package/dist/cli/update-check-hook.js.map +1 -1
  66. package/dist/configs/vitest/base.d.ts +58 -135
  67. package/dist/configs/vitest/base.d.ts.map +1 -1
  68. package/dist/configs/vitest/base.js +76 -228
  69. package/dist/configs/vitest/base.js.map +1 -1
  70. package/dist/configs/vitest/cdk.d.ts.map +1 -1
  71. package/dist/configs/vitest/cdk.js +3 -2
  72. package/dist/configs/vitest/cdk.js.map +1 -1
  73. package/dist/configs/vitest/coverage-include-global-setup.d.ts.map +1 -1
  74. package/dist/configs/vitest/coverage-include-global-setup.js +3 -4
  75. package/dist/configs/vitest/coverage-include-global-setup.js.map +1 -1
  76. package/dist/configs/vitest/coverage-reports-directory.d.ts +27 -5
  77. package/dist/configs/vitest/coverage-reports-directory.d.ts.map +1 -1
  78. package/dist/configs/vitest/coverage-reports-directory.js +47 -10
  79. package/dist/configs/vitest/coverage-reports-directory.js.map +1 -1
  80. package/dist/configs/vitest/harper-fabric.d.ts.map +1 -1
  81. package/dist/configs/vitest/harper-fabric.js +3 -2
  82. package/dist/configs/vitest/harper-fabric.js.map +1 -1
  83. package/dist/configs/vitest/nestjs.d.ts.map +1 -1
  84. package/dist/configs/vitest/nestjs.js +3 -2
  85. package/dist/configs/vitest/nestjs.js.map +1 -1
  86. package/dist/configs/vitest/phaser.d.ts.map +1 -1
  87. package/dist/configs/vitest/phaser.js +3 -2
  88. package/dist/configs/vitest/phaser.js.map +1 -1
  89. package/dist/configs/vitest/refusal-announcement.d.ts +51 -0
  90. package/dist/configs/vitest/refusal-announcement.d.ts.map +1 -0
  91. package/dist/configs/vitest/refusal-announcement.js +97 -0
  92. package/dist/configs/vitest/refusal-announcement.js.map +1 -0
  93. package/dist/configs/vitest/socket-safe-temp-base.d.ts +3 -4
  94. package/dist/configs/vitest/socket-safe-temp-base.d.ts.map +1 -1
  95. package/dist/configs/vitest/socket-safe-temp-base.js +7 -6
  96. package/dist/configs/vitest/socket-safe-temp-base.js.map +1 -1
  97. package/dist/configs/vitest/typescript.d.ts.map +1 -1
  98. package/dist/configs/vitest/typescript.js +3 -2
  99. package/dist/configs/vitest/typescript.js.map +1 -1
  100. package/dist/core/admission-decision.d.ts +110 -0
  101. package/dist/core/admission-decision.d.ts.map +1 -0
  102. package/dist/core/admission-decision.js +91 -0
  103. package/dist/core/admission-decision.js.map +1 -0
  104. package/dist/core/admission-lock.d.ts +69 -0
  105. package/dist/core/admission-lock.d.ts.map +1 -0
  106. package/dist/core/admission-lock.js +278 -0
  107. package/dist/core/admission-lock.js.map +1 -0
  108. package/dist/core/admission-settings.d.ts +69 -0
  109. package/dist/core/admission-settings.d.ts.map +1 -0
  110. package/dist/core/admission-settings.js +204 -0
  111. package/dist/core/admission-settings.js.map +1 -0
  112. package/dist/core/admission-state.d.ts +50 -0
  113. package/dist/core/admission-state.d.ts.map +1 -0
  114. package/dist/core/admission-state.js +168 -0
  115. package/dist/core/admission-state.js.map +1 -0
  116. package/dist/core/admission.d.ts +70 -0
  117. package/dist/core/admission.d.ts.map +1 -0
  118. package/dist/core/admission.js +205 -0
  119. package/dist/core/admission.js.map +1 -0
  120. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  121. package/dist/core/lisa-owned-hash-ledger.js +318 -0
  122. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  123. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  124. package/dist/core/project-config-push-gate.d.ts +66 -0
  125. package/dist/core/project-config-push-gate.d.ts.map +1 -0
  126. package/dist/core/project-config-push-gate.js +82 -0
  127. package/dist/core/project-config-push-gate.js.map +1 -0
  128. package/dist/core/project-config.d.ts +4 -0
  129. package/dist/core/project-config.d.ts.map +1 -1
  130. package/dist/core/project-config.js +14 -9
  131. package/dist/core/project-config.js.map +1 -1
  132. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  133. package/dist/core/upstream-evidence-manifest.js +197 -123
  134. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  135. package/expo/package-lisa/package.lisa.json +2 -2
  136. package/harper-fabric/package-lisa/package.lisa.json +4 -4
  137. package/nestjs/create-only/vitest.config.local.ts +1 -7
  138. package/nestjs/package-lisa/package.lisa.json +4 -4
  139. package/npm-package/package-lisa/package.lisa.json +4 -4
  140. package/package.json +12 -11
  141. package/phaser/package-lisa/package.lisa.json +4 -4
  142. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  143. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  144. package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
  145. package/plugins/lisa/.codex-plugin/skills/lisa-git-submit-pr/SKILL.md +1 -1
  146. package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +1 -1
  147. package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
  148. package/plugins/lisa/skills/lisa-git-submit-pr/SKILL.md +1 -1
  149. package/plugins/lisa/skills/lisa-implement/SKILL.md +1 -1
  150. package/plugins/lisa-agy/plugin.json +1 -1
  151. package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
  152. package/plugins/lisa-agy/skills/lisa-git-submit-pr/SKILL.md +1 -1
  153. package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +1 -1
  154. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  155. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  156. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  157. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  158. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  159. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  160. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  161. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  162. package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
  163. package/plugins/lisa-copilot/skills/lisa-git-submit-pr/SKILL.md +1 -1
  164. package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +1 -1
  165. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  166. package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
  167. package/plugins/lisa-cursor/skills/lisa-git-submit-pr/SKILL.md +1 -1
  168. package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +1 -1
  169. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  170. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  171. package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
  172. package/plugins/lisa-devin/skills/lisa-git-submit-pr/SKILL.md +1 -1
  173. package/plugins/lisa-devin/skills/lisa-implement/SKILL.md +1 -1
  174. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  175. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  176. package/plugins/lisa-expo-agy/plugin.json +1 -1
  177. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  178. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  179. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  180. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  181. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  182. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  183. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  184. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  185. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  186. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  187. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  188. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  189. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  190. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  191. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  192. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  193. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  194. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  195. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  196. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  197. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  198. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  199. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  200. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  201. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  202. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  203. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  204. package/plugins/lisa-rails-agy/plugin.json +1 -1
  205. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  206. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  207. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  208. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  209. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  210. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  211. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  212. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  213. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  214. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  215. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  216. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  217. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  218. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  219. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  220. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  221. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  222. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  223. package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
  224. package/plugins/src/base/skills/lisa-git-submit-pr/SKILL.md +1 -1
  225. package/plugins/src/base/skills/lisa-implement/SKILL.md +1 -1
  226. package/rails/copy-overwrite/Gemfile.lisa +8 -0
  227. package/rails/copy-overwrite/lefthook.yml +25 -11
  228. package/rails/copy-overwrite/scripts/lisa-rails-gates.mjs +686 -0
  229. package/rails/copy-overwrite/scripts/lisa-rspec-shards.mjs +2 -2
  230. package/rails/copy-overwrite/scripts/lisa_crystalball_recorder.rb +239 -0
  231. package/rails/copy-overwrite/scripts/lisa_rspec_partial_coverage.rb +83 -0
  232. package/scripts/build-unless-marked.mjs +83 -0
  233. package/scripts/check-plugins-sync.sh +22 -5
  234. package/scripts/classify-markdown-assertions.mjs +141 -0
  235. package/scripts/integration-shard-build.mjs +143 -0
  236. package/scripts/lib/history-scanner-suites.mjs +19 -0
  237. package/scripts/lib/markdown-assertions/classify.mjs +289 -0
  238. package/scripts/lib/markdown-assertions/context.mjs +53 -0
  239. package/scripts/lib/markdown-assertions/corpus.mjs +222 -0
  240. package/scripts/lib/markdown-assertions/manifest-cull.mjs +86 -0
  241. package/scripts/lib/markdown-assertions/record-setup.mjs +265 -0
  242. package/scripts/lib/markdown-assertions/record.mjs +115 -0
  243. package/scripts/lib/markdown-assertions/record.vitest.config.mjs +24 -0
  244. package/scripts/lib/markdown-assertions/sites.mjs +273 -0
  245. package/scripts/lib/markdown-assertions/test-cull.mjs +768 -0
  246. package/scripts/lib/markdown-assertions/tokens.mjs +158 -0
  247. package/scripts/lib/shell-guard-trace.mjs +6 -0
  248. package/scripts/lib/test-access-map-setup.mjs +40 -0
  249. package/scripts/lib/test-access-map-tracer.mjs +205 -0
  250. package/scripts/lib/test-access-map.d.mts +72 -0
  251. package/scripts/lib/test-access-map.mjs +395 -0
  252. package/scripts/lib/test-timings-reporter.d.mts +17 -0
  253. package/scripts/lib/test-timings-reporter.mjs +99 -0
  254. package/scripts/plan-integration-shards.mjs +300 -0
  255. package/scripts/test-timing-report.d.mts +41 -0
  256. package/scripts/test-timing-report.mjs +361 -0
  257. package/scripts/two-channel-couplings.json +132 -36
  258. package/scripts/verify-npm-advisories-4333.mjs +3 -12
  259. package/typescript/copy-overwrite/.prettierignore +12 -0
  260. package/typescript/create-only/vitest.config.local.ts +1 -7
  261. package/typescript/package-lisa/package.lisa.json +4 -4
  262. package/all/copy-overwrite/scripts/lisa-scratch-run.sh +0 -1078
  263. package/dist/cli/lisa-test-run-bootstrap.d.ts +0 -3
  264. package/dist/cli/lisa-test-run-bootstrap.d.ts.map +0 -1
  265. package/dist/cli/lisa-test-run-bootstrap.js +0 -229
  266. package/dist/cli/lisa-test-run-bootstrap.js.map +0 -1
  267. package/dist/cli/lisa-test-run-ipc.d.ts +0 -49
  268. package/dist/cli/lisa-test-run-ipc.d.ts.map +0 -1
  269. package/dist/cli/lisa-test-run-ipc.js +0 -226
  270. package/dist/cli/lisa-test-run-ipc.js.map +0 -1
  271. package/dist/cli/lisa-test-run-process-group.d.ts +0 -30
  272. package/dist/cli/lisa-test-run-process-group.d.ts.map +0 -1
  273. package/dist/cli/lisa-test-run-process-group.js +0 -140
  274. package/dist/cli/lisa-test-run-process-group.js.map +0 -1
  275. package/dist/cli/lisa-test-run-reaper.d.ts +0 -3
  276. package/dist/cli/lisa-test-run-reaper.d.ts.map +0 -1
  277. package/dist/cli/lisa-test-run-reaper.js +0 -195
  278. package/dist/cli/lisa-test-run-reaper.js.map +0 -1
  279. package/dist/cli/lisa-test-run-runtime.d.ts +0 -46
  280. package/dist/cli/lisa-test-run-runtime.d.ts.map +0 -1
  281. package/dist/cli/lisa-test-run-runtime.js +0 -123
  282. package/dist/cli/lisa-test-run-runtime.js.map +0 -1
  283. package/dist/cli/lisa-test-run-supervisor.d.ts +0 -13
  284. package/dist/cli/lisa-test-run-supervisor.d.ts.map +0 -1
  285. package/dist/cli/lisa-test-run-supervisor.js +0 -265
  286. package/dist/cli/lisa-test-run-supervisor.js.map +0 -1
  287. package/dist/configs/vitest/fleet-admission-global-setup.d.ts +0 -34
  288. package/dist/configs/vitest/fleet-admission-global-setup.d.ts.map +0 -1
  289. package/dist/configs/vitest/fleet-admission-global-setup.js +0 -123
  290. package/dist/configs/vitest/fleet-admission-global-setup.js.map +0 -1
  291. package/dist/configs/vitest/fleet-admission.d.ts +0 -129
  292. package/dist/configs/vitest/fleet-admission.d.ts.map +0 -1
  293. package/dist/configs/vitest/fleet-admission.js +0 -239
  294. package/dist/configs/vitest/fleet-admission.js.map +0 -1
  295. package/dist/configs/vitest/scratch-authority.d.ts +0 -25
  296. package/dist/configs/vitest/scratch-authority.d.ts.map +0 -1
  297. package/dist/configs/vitest/scratch-authority.js +0 -107
  298. package/dist/configs/vitest/scratch-authority.js.map +0 -1
  299. package/dist/configs/vitest/scratch-bound-cleanup-programs.d.ts +0 -5
  300. package/dist/configs/vitest/scratch-bound-cleanup-programs.d.ts.map +0 -1
  301. package/dist/configs/vitest/scratch-bound-cleanup-programs.js +0 -219
  302. package/dist/configs/vitest/scratch-bound-cleanup-programs.js.map +0 -1
  303. package/dist/configs/vitest/scratch-bound-cleanup.d.ts +0 -28
  304. package/dist/configs/vitest/scratch-bound-cleanup.d.ts.map +0 -1
  305. package/dist/configs/vitest/scratch-bound-cleanup.js +0 -155
  306. package/dist/configs/vitest/scratch-bound-cleanup.js.map +0 -1
  307. package/dist/configs/vitest/scratch-bound-root-cleanup.d.ts +0 -17
  308. package/dist/configs/vitest/scratch-bound-root-cleanup.d.ts.map +0 -1
  309. package/dist/configs/vitest/scratch-bound-root-cleanup.js +0 -149
  310. package/dist/configs/vitest/scratch-bound-root-cleanup.js.map +0 -1
  311. package/dist/configs/vitest/scratch-global-setup.d.ts +0 -258
  312. package/dist/configs/vitest/scratch-global-setup.d.ts.map +0 -1
  313. package/dist/configs/vitest/scratch-global-setup.js +0 -505
  314. package/dist/configs/vitest/scratch-global-setup.js.map +0 -1
  315. package/dist/configs/vitest/scratch-leak-setup.d.ts +0 -2
  316. package/dist/configs/vitest/scratch-leak-setup.d.ts.map +0 -1
  317. package/dist/configs/vitest/scratch-leak-setup.js +0 -108
  318. package/dist/configs/vitest/scratch-leak-setup.js.map +0 -1
  319. package/dist/configs/vitest/scratch-namespace-authority.d.ts +0 -80
  320. package/dist/configs/vitest/scratch-namespace-authority.d.ts.map +0 -1
  321. package/dist/configs/vitest/scratch-namespace-authority.js +0 -291
  322. package/dist/configs/vitest/scratch-namespace-authority.js.map +0 -1
  323. package/dist/configs/vitest/scratch-owner.d.ts +0 -131
  324. package/dist/configs/vitest/scratch-owner.d.ts.map +0 -1
  325. package/dist/configs/vitest/scratch-owner.js +0 -297
  326. package/dist/configs/vitest/scratch-owner.js.map +0 -1
  327. package/dist/configs/vitest/scratch-route-profile.d.ts +0 -46
  328. package/dist/configs/vitest/scratch-route-profile.d.ts.map +0 -1
  329. package/dist/configs/vitest/scratch-route-profile.js +0 -233
  330. package/dist/configs/vitest/scratch-route-profile.js.map +0 -1
  331. package/dist/configs/vitest/scratch-run-root-compatibility.d.ts +0 -33
  332. package/dist/configs/vitest/scratch-run-root-compatibility.d.ts.map +0 -1
  333. package/dist/configs/vitest/scratch-run-root-compatibility.js +0 -137
  334. package/dist/configs/vitest/scratch-run-root-compatibility.js.map +0 -1
  335. package/dist/configs/vitest/scratch-run-root-intent.d.ts +0 -66
  336. package/dist/configs/vitest/scratch-run-root-intent.d.ts.map +0 -1
  337. package/dist/configs/vitest/scratch-run-root-intent.js +0 -183
  338. package/dist/configs/vitest/scratch-run-root-intent.js.map +0 -1
  339. package/dist/configs/vitest/scratch-setup.d.ts +0 -46
  340. package/dist/configs/vitest/scratch-setup.d.ts.map +0 -1
  341. package/dist/configs/vitest/scratch-setup.js +0 -226
  342. package/dist/configs/vitest/scratch-setup.js.map +0 -1
  343. package/dist/configs/vitest/scratch-supervision-intent.d.ts +0 -8
  344. package/dist/configs/vitest/scratch-supervision-intent.d.ts.map +0 -1
  345. package/dist/configs/vitest/scratch-supervision-intent.js +0 -125
  346. package/dist/configs/vitest/scratch-supervision-intent.js.map +0 -1
  347. package/dist/configs/vitest/scratch-supervision-protocol.d.ts +0 -12
  348. package/dist/configs/vitest/scratch-supervision-protocol.d.ts.map +0 -1
  349. package/dist/configs/vitest/scratch-supervision-protocol.js +0 -230
  350. package/dist/configs/vitest/scratch-supervision-protocol.js.map +0 -1
  351. package/dist/configs/vitest/scratch-supervision.d.ts +0 -69
  352. package/dist/configs/vitest/scratch-supervision.d.ts.map +0 -1
  353. package/dist/configs/vitest/scratch-supervision.js +0 -244
  354. package/dist/configs/vitest/scratch-supervision.js.map +0 -1
  355. package/dist/configs/vitest/scratch-sweep.d.ts +0 -66
  356. package/dist/configs/vitest/scratch-sweep.d.ts.map +0 -1
  357. package/dist/configs/vitest/scratch-sweep.js +0 -82
  358. package/dist/configs/vitest/scratch-sweep.js.map +0 -1
  359. package/dist/configs/vitest/scratch-tmpdir-trust.d.ts +0 -48
  360. package/dist/configs/vitest/scratch-tmpdir-trust.d.ts.map +0 -1
  361. package/dist/configs/vitest/scratch-tmpdir-trust.js +0 -194
  362. package/dist/configs/vitest/scratch-tmpdir-trust.js.map +0 -1
  363. package/dist/configs/vitest/scratch.d.ts +0 -19
  364. package/dist/configs/vitest/scratch.d.ts.map +0 -1
  365. package/dist/configs/vitest/scratch.js +0 -34
  366. package/dist/configs/vitest/scratch.js.map +0 -1
  367. package/dist/configs/vitest/synthesis-scratch-reclaim.d.ts +0 -86
  368. package/dist/configs/vitest/synthesis-scratch-reclaim.d.ts.map +0 -1
  369. package/dist/configs/vitest/synthesis-scratch-reclaim.js +0 -226
  370. package/dist/configs/vitest/synthesis-scratch-reclaim.js.map +0 -1
@@ -10,16 +10,13 @@
10
10
  * @see https://vitest.dev/config/
11
11
  * @module configs/vitest/base
12
12
  */
13
- import { existsSync, readdirSync } from "node:fs";
13
+ import { existsSync } from "node:fs";
14
14
  import { availableParallelism } from "node:os";
15
- import { basename, join } from "node:path";
16
15
  import { env } from "node:process";
17
16
  import { fileURLToPath } from "node:url";
17
+ import { testAccessMapPlugin, testAccessMapSetupFiles, } from "../../../scripts/lib/test-access-map.mjs";
18
18
  import { isUnitCoverageScope } from "../coverage-scope.js";
19
19
  import { isInsideWorktree } from "../worktrees.js";
20
- import { scratchNamespaceDir } from "./scratch-namespace-authority.js";
21
- import { parseScratchRunRootName } from "./scratch-owner.js";
22
- import { SCRATCH_SUPERVISION_LEASE_ENV, parseScratchSupervisionLease, } from "./scratch-supervision.js";
23
20
  /**
24
21
  * Default coverage thresholds used when not specified in project config.
25
22
  * Projects can override via vitest.thresholds.json.
@@ -102,17 +99,20 @@ export const MAX_WORKERS_OVERRIDE_VAR = "LISA_VITEST_MAX_WORKERS";
102
99
  * Environment variable stating how many concurrent runs share this machine.
103
100
  *
104
101
  * Optional, and it is a statement of INTENT rather than an observation: "six
105
- * runs are coming", which is knowledge a count of what is live right now cannot
106
- * have. So it outranks {@link discoverFleetConcurrency} when present.
107
- *
108
- * It is no longer the only way the divisor is reached, and that correction is
109
- * the whole of #3665. Shipped as the sole mechanism, it was set by nothing —
110
- * one occurrence in the tree, its own declaration — so the divisor was inert
111
- * for every consumer and the cap arrived as floor-only. Discovery is the layer
112
- * that reaches a run nobody configured; this variable is now the way to
113
- * override what discovery sees.
102
+ * runs are coming". Counting live sibling runs was retired with the scratch
103
+ * run roots it read (CodySwannGT/lisa#4602); headroom admission
104
+ * ({@link ADMITTED_WORKERS_VAR}) is what sizes a run to a busy machine now.
114
105
  */
115
106
  export const FLEET_CONCURRENCY_VAR = "LISA_FLEET_CONCURRENCY";
107
+ /**
108
+ * Environment variable carrying the workers headroom admission granted.
109
+ *
110
+ * Set by `lisa admit` and `lisa-test-run` when `pushGate.admission` is on
111
+ * (CodySwannGT/lisa#4596). Admission has already measured the machine, so its
112
+ * grant replaces the floor and the divisor; only an explicit
113
+ * {@link MAX_WORKERS_OVERRIDE_VAR} outranks it.
114
+ */
115
+ export const ADMITTED_WORKERS_VAR = "LISA_ADMITTED_WORKERS";
116
116
  /**
117
117
  * The pool size an uninstructed run gets.
118
118
  *
@@ -149,157 +149,10 @@ const positiveInteger = (raw) => {
149
149
  const value = Number(trimmed);
150
150
  return value > 0 ? value : null;
151
151
  };
152
- /**
153
- * How many Lisa test runs are live on this machine right now, including this one.
154
- *
155
- * ## Why this is discovered rather than declared
156
- *
157
- * The divisor shipped as an explicit signal, and for a release nothing set it:
158
- * `LISA_FLEET_CONCURRENCY` occurred exactly once in the tree, at its own
159
- * declaration. So the cap reached every consumer as floor-only, and the layer
160
- * that addresses multi-agent contention was inert by default
161
- * (CodySwannGT/lisa#3665).
162
- *
163
- * The obvious repair — pick a component and have it export the variable — fails
164
- * its own test. **Nothing knows how many runs it is about to start.** Agents are
165
- * launched independently, each in its own worktree, by whoever happens to be
166
- * driving; there is no scheduler holding that number. A setter would have to
167
- * guess, and a guessed fleet size that goes stale the moment the fleet resizes
168
- * is a worse contract than no setter at all.
169
- *
170
- * What every run *can* do is look. Each supervised run already registers a
171
- * `run-<pid>-<epoch>-<suffix>` root inside one namespace under `os.tmpdir()`,
172
- * which on this platform is per-user and therefore shared by every checkout on
173
- * the machine. Counting the roots whose owning process is still alive answers
174
- * the question at the only moment it matters — when this run is about to size
175
- * its pool — without anybody having to know the answer in advance.
176
- *
177
- * ## Fail open, never closed
178
- *
179
- * This runs inside a Vitest config factory, so a throw here does not degrade a
180
- * test run, it prevents one. Every failure path returns 1 (no fleet detected),
181
- * which yields the floor — the behaviour that shipped. An unreadable namespace,
182
- * a permission error, a platform without `process.kill`, an absent directory on
183
- * the very first run: all of them mean "no evidence of siblings", never "assume
184
- * the worst and throttle".
185
- *
186
- * Our own pid is excluded rather than subtracted, because the config may load
187
- * before or after this run registers its own root, and both orders must give
188
- * the same count. The result adds one back for this run.
189
- * @param deps - Injectable seams so tests state a fleet instead of spawning one.
190
- * @param deps.namespaceDir - One directory holding run roots; overrides the candidates.
191
- * @param deps.namespaceDirs - Every directory worth counting.
192
- * @param deps.readDir - Directory lister.
193
- * @param deps.isAlive - Process-liveness probe.
194
- * @param deps.self - This process's id.
195
- * @param deps.selfBasename - This run's own root basename, when supervised.
196
- * @returns Live run count including this one; 1 when nothing else is detected.
197
- */
198
- export function discoverFleetConcurrency(deps = {}) {
199
- const { namespaceDir, namespaceDirs = namespaceDir === undefined
200
- ? candidateNamespaceDirs
201
- : () => [namespaceDir()], readDir = (dir) => readdirSync(dir), isAlive = defaultIsAlive, self = process.pid, selfBasename = ownRunRootBasename, } = deps;
202
- return (liveFleetRunRootNames({ namespaceDirs, readDir, isAlive }).filter(name => !isOwnRunRoot(name, self, selfBasename())).length + 1);
203
- }
204
- /**
205
- * Every namespace a sibling run might have registered itself in.
206
- *
207
- * `scratchNamespaceDir()` is built on `os.tmpdir()`, which is `TMPDIR` when the
208
- * environment sets one. Two agents with different `TMPDIR` values therefore
209
- * enumerate different directories and each sees only its own cohort — a real,
210
- * measured undercount, and the largest of the four named in #3941. The fix is
211
- * not to relocate the scratch namespace, which the authority owns and which
212
- * other machinery depends on: it is to LOOK in more than one place when
213
- * counting. Reading a namespace that does not exist costs one `ENOENT`.
214
- *
215
- * `/tmp` is the platform default `os.tmpdir()` falls back to when `TMPDIR` is
216
- * unset, so it is where a run with a plain environment registers. Including it
217
- * makes a `TMPDIR`-carrying run see a plain one and vice versa. Windows has no
218
- * such stable second location, so there the list is the resolved one alone.
219
- * @returns Namespace directories to count, without duplicates.
220
- */
221
- function candidateNamespaceDirs() {
222
- const resolved = scratchNamespaceDir();
223
- if (process.platform === "win32")
224
- return [resolved];
225
- const fallback = join("/tmp", basename(resolved));
226
- return resolved === fallback ? [resolved] : [resolved, fallback];
227
- }
228
- /**
229
- * This run's own scratch root basename, when it is supervised.
230
- *
231
- * The config factory runs inside the PAYLOAD process, whose pid is not the pid
232
- * the run root is named for — the supervisor allocates the root before it forks
233
- * the bootstrap that launches the payload. So `process.pid` never matches the
234
- * run's own root, and a pid-only exclusion counts this run's root as a sibling
235
- * and then adds one more for itself. The lease is the only thing in the payload
236
- * that names the root, so it is what identifies it.
237
- * @returns The run root basename, or undefined when this run is unsupervised.
238
- */
239
- export function ownRunRootBasename() {
240
- const raw = env[SCRATCH_SUPERVISION_LEASE_ENV];
241
- if (raw === undefined)
242
- return undefined;
243
- try {
244
- return parseScratchSupervisionLease(raw).suiteRootBasename;
245
- }
246
- catch {
247
- return undefined;
248
- }
249
- }
250
- /**
251
- * Whether one run-root basename belongs to this run.
252
- * @param name - Candidate run-root basename.
253
- * @param self - This process's id.
254
- * @param ownBasename - This run's own root basename, when it has one.
255
- * @returns Whether the entry is this run rather than a sibling.
256
- */
257
- function isOwnRunRoot(name, self, ownBasename) {
258
- if (ownBasename !== undefined && name === ownBasename)
259
- return true;
260
- return parseScratchRunRootName(name)?.pid === self;
261
- }
262
- /**
263
- * Names of every live run root across the namespaces worth counting.
264
- *
265
- * Fails open per namespace rather than per call: one unreadable directory must
266
- * not erase the count from a readable one. An empty result means "no evidence
267
- * of siblings", which yields the floor — the behaviour that shipped.
268
- * @param deps - Injected seams; every one defaults to the real machine.
269
- * @param deps.namespaceDirs - Directories to enumerate.
270
- * @param deps.readDir - Directory lister.
271
- * @param deps.isAlive - Process-liveness probe.
272
- * @returns Live run-root basenames, de-duplicated across namespaces.
273
- */
274
- export function liveFleetRunRootNames(deps = {}) {
275
- const { namespaceDirs = candidateNamespaceDirs, readDir = (dir) => readdirSync(dir), isAlive = defaultIsAlive, } = deps;
276
- const names = namespaceDirs().flatMap(dir => {
277
- try {
278
- return [...readDir(dir)];
279
- }
280
- catch {
281
- // Absent namespace, unreadable directory, or a platform that refuses the
282
- // probe. None of these is evidence of a fleet, and none may stop a run.
283
- return [];
284
- }
285
- });
286
- return [...new Set(names)].filter(name => {
287
- const owner = parseScratchRunRootName(name);
288
- if (owner === undefined)
289
- return false;
290
- try {
291
- return isAlive(owner.pid);
292
- }
293
- catch {
294
- return false;
295
- }
296
- });
297
- }
298
152
  /**
299
153
  * The pool one run gets when a fleet of the stated size shares the machine.
300
154
  *
301
- * Extracted so admission control can ask what a run would be given without
302
- * re-deriving the arithmetic. Never below {@link MIN_FLEET_WORKERS}, which is
155
+ * Never below {@link MIN_FLEET_WORKERS}, which is
303
156
  * exactly why the product `fleetShare(cores, fleet) * fleet` grows without
304
157
  * bound in `fleet` and why pool sizing alone cannot bound the fleet
305
158
  * (CodySwannGT/lisa#3941).
@@ -310,43 +163,6 @@ export function liveFleetRunRootNames(deps = {}) {
310
163
  export function fleetShare(cores, fleet) {
311
164
  return Math.max(MIN_FLEET_WORKERS, Math.floor(cores / 2 / fleet));
312
165
  }
313
- /**
314
- * Whether a pid names a live process.
315
- *
316
- * `EPERM` means the process exists and belongs to somebody else, which counts:
317
- * another user's Lisa run still competes for this machine's cores. Only `ESRCH`
318
- * — no such process — means the root is abandoned.
319
- * @param pid - Process id to probe.
320
- * @returns Whether it is alive.
321
- */
322
- function defaultIsAlive(pid) {
323
- try {
324
- process.kill(pid, 0);
325
- return true;
326
- }
327
- catch (error) {
328
- return error.code === "EPERM";
329
- }
330
- }
331
- /**
332
- * Why discovery no longer truncates its listing.
333
- *
334
- * A `.slice(0, 4_096)` used to bound the entries inspected, and the stated
335
- * reason was that an unbounded `readdir` over a pathologically grown directory
336
- * is the shape that once turned a shared temp directory into a 24.8 MB inode.
337
- * The concern is real; the slice did not address it. `readdirSync` materialises
338
- * the WHOLE listing before anything can slice it, so the expensive part had
339
- * already happened — the bound removed only the per-name regex, and bought that
340
- * saving by silently undercounting the fleet the moment the namespace held more
341
- * than 4,096 entries. This namespace has been measured holding 3,730
342
- * (CodySwannGT/lisa#3032), so the undercount was reachable rather than
343
- * theoretical, and it undercounts hardest exactly when the fleet is largest.
344
- *
345
- * A bound that protects nothing and corrupts the count is worse than no bound,
346
- * so the listing is now counted in full. The real protection against a grown
347
- * namespace lives where the reading happens — `MAX_SCRATCH_NAMESPACE_SCAN_ENTRIES`
348
- * in the scratch authority — not here.
349
- */
350
166
  /**
351
167
  * Resolves the Vitest worker-pool cap for this run.
352
168
  *
@@ -372,16 +188,19 @@ function defaultIsAlive(pid) {
372
188
  * fleet's total pool is bounded by the machine rather than multiplied by its
373
189
  * own size — never below {@link MIN_FLEET_WORKERS}. That number comes from
374
190
  * {@link FLEET_CONCURRENCY_VAR} when something states it, and otherwise from
375
- * {@link discoverFleetConcurrency}, which counts live sibling runs.
376
- * Discovery is what makes this layer reach a run nobody configured; as an
377
- * opt-in signal it reached nothing for a release (#3665).
191
+ * the injected `discover` seam, which defaults to "this run alone". The
192
+ * live-sibling count it used to make read the scratch run roots retired in
193
+ * CodySwannGT/lisa#4602.
378
194
  * 3. **Override.** {@link MAX_WORKERS_OVERRIDE_VAR} replaces both, upward or
379
195
  * downward.
380
196
  *
381
- * A stated signal outranks discovery rather than being reconciled with it. An
382
- * operator who says "we are six" is describing an intent — six runs are coming,
383
- * even if only two have started — and a count of what happens to be live right
384
- * now must not quietly contradict it.
197
+ * Between the override and the divisor sits the **admitted grant**,
198
+ * {@link ADMITTED_WORKERS_VAR}: when headroom admission started this run it has
199
+ * already measured the machine, so its number replaces the fleet arithmetic.
200
+ *
201
+ * A stated signal outranks the `discover` seam rather than being reconciled
202
+ * with it. An operator who says "we are six" is describing an intent — six runs
203
+ * are coming, even if only two have started.
385
204
  * ## Why the environment is imported rather than reached for
386
205
  *
387
206
  * The default comes from `node:process`'s `env` binding, not from the ambient
@@ -394,13 +213,18 @@ function defaultIsAlive(pid) {
394
213
  * parameter injectable so tests state an environment rather than mutating one.
395
214
  * @param environment - Environment to read; defaults to this process's.
396
215
  * @param cores - Logical cores available; defaults to this machine's count.
397
- * @param discover - Fleet-size discovery; defaults to counting live run roots.
216
+ * @param discover - Fleet size when nothing states one; defaults to 1.
398
217
  * @returns A value for Vitest's `maxWorkers` — a worker count, or a percentage.
399
218
  */
400
- export function resolveMaxWorkers(environment = env, cores = availableParallelism(), discover = discoverFleetConcurrency) {
219
+ export function resolveMaxWorkers(environment = env, cores = availableParallelism(), discover = () => 1) {
401
220
  const override = positiveInteger(environment[MAX_WORKERS_OVERRIDE_VAR]);
402
221
  if (override !== null)
403
222
  return override;
223
+ // Headroom admission already sized this run to the machine
224
+ // (CodySwannGT/lisa#4596), so the grant wins over any fleet arithmetic.
225
+ const admitted = positiveInteger(environment[ADMITTED_WORKERS_VAR]);
226
+ if (admitted !== null)
227
+ return admitted;
404
228
  const stated = positiveInteger(environment[FLEET_CONCURRENCY_VAR]);
405
229
  const fleet = stated ?? discover();
406
230
  if (fleet <= 1)
@@ -425,35 +249,55 @@ const resolveSiblingModule = (basename) => {
425
249
  : fileURLToPath(new URL(`./${basename}.ts`, import.meta.url));
426
250
  };
427
251
  /**
428
- * Setup files that bound and reclaim the suite's temporary directories.
429
- *
430
- * Every stack factory spreads this. Without it, each fixture's
431
- * `mkdtemp(os.tmpdir())` lands directly in the shared platform temp root, which
432
- * is never emptied while the machine is up and which no in-process cleanup can
433
- * protect once the runner is killed.
434
- * @returns Absolute paths to spread into `test.setupFiles`.
435
- * @see {@link module:configs/vitest/scratch} for the measurements behind this
252
+ * Per-worker setup files for the suite's temporary directories: none.
253
+ *
254
+ * This used to wire the scratch redirection and leak audit into every worker.
255
+ * That per-test policing was retired (CodySwannGT/lisa#4602): stale Lisa temp
256
+ * entries and orphaned test processes are now cleared once, by the
257
+ * start-of-run sweep in `lisa-test-run` and the gate runner
258
+ * (CodySwannGT/lisa#4597), and each test still removes what it creates. The
259
+ * function is kept so every stack factory and downstream config that spreads
260
+ * it keeps working.
261
+ * @returns An empty list to spread into `test.setupFiles`.
436
262
  */
437
263
  export function scratchSetupFiles() {
264
+ return [];
265
+ }
266
+ /**
267
+ * Per-worker setup for the test-to-file access map (CodySwannGT/lisa#4611).
268
+ *
269
+ * Names each test file for the tracer, and only when `LISA_ACCESS_MAP=1`, so
270
+ * an ordinary run gets nothing. CI sets that variable on a pull request, and
271
+ * the map it records is what lets a TypeScript host's push run only the tests
272
+ * a change can reach.
273
+ * @returns Setup files to spread into `test.setupFiles`.
274
+ */
275
+ export function accessMapSetupFiles() {
276
+ return testAccessMapSetupFiles(env);
277
+ }
278
+ /**
279
+ * The Vite plugins every stack preset carries: the access-map recorder.
280
+ *
281
+ * It does nothing unless `LISA_ACCESS_MAP=1` and the project's effective
282
+ * `pushGate.affectedTests` is on, so it only costs anything on a CI run whose
283
+ * map a push will read.
284
+ * @returns Plugins for the preset's top-level `plugins`.
285
+ */
286
+ export function accessMapPlugins() {
438
287
  return [
439
- resolveSiblingModule("scratch-setup"),
440
- resolveSiblingModule("scratch-leak-setup"),
288
+ testAccessMapPlugin(),
441
289
  ];
442
290
  }
443
291
  /**
444
- * Global setup that reclaims residue before a run and audits the namespace after it.
292
+ * Global setup for the suite's temporary directories: none.
445
293
  *
446
- * Admission runs FIRST, and the order is load-bearing: it is the only hook that
447
- * can decline to start work, and holding a run before the namespace sweep keeps
448
- * a queued run from doing filesystem work it may not get to use. Vitest runs
449
- * `globalSetup` entries in order, so the array order is the contract.
450
- * @returns Absolute paths to spread into `test.globalSetup`.
294
+ * The residue audit that ran here was retired with the rest of the scratch
295
+ * policing (CodySwannGT/lisa#4602); see {@link scratchSetupFiles}. Kept so
296
+ * existing callers keep working.
297
+ * @returns An empty list to spread into `test.globalSetup`.
451
298
  */
452
299
  export function scratchGlobalSetup() {
453
- return [
454
- resolveSiblingModule("fleet-admission-global-setup"),
455
- resolveSiblingModule("scratch-global-setup"),
456
- ];
300
+ return [];
457
301
  }
458
302
  /**
459
303
  * Global setup that refuses a coverage run measuring an empty file set.
@@ -560,9 +404,13 @@ export const mergeVitestConfigs = (...configs) => {
560
404
  return configs.reduce((acc, config) => {
561
405
  const accTest = (acc.test ?? {});
562
406
  const configTest = (config.test ?? {});
407
+ // Plugins accumulate rather than replace, so a project's local plugins
408
+ // keep the preset's access-map recorder (CodySwannGT/lisa#4611).
409
+ const plugins = [...(acc.plugins ?? []), ...(config.plugins ?? [])];
563
410
  return {
564
411
  ...acc,
565
412
  ...config,
413
+ ...(plugins.length > 0 ? { plugins } : {}),
566
414
  test: mergeObjects(accTest, configTest),
567
415
  };
568
416
  }, {});
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/configs/vitest/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,0BAA0B,CAAC;AA+ClC;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAuB;IACnD,MAAM,EAAE;QACN,UA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B,EACrB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC;AAEF,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;GAEG;AACH,UAAU,gBAAgB;IACxB,mFAAmF;IACnF,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAI,kBAEhC,gBAAqB,KAAG,UAgCzB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
1
+ import { accessMapPlugins, accessMapSetupFiles, coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusions, defaultTestExclusions, defaultThresholds, mapThresholds, mergeThresholds, mergeVitestConfigs, resolveMaxWorkers, scratchGlobalSetup, scratchSetupFiles, } from "./base.js";
2
2
  /** Prefix used by AWS CDK's default CloudAssemblyBuilder output directory. */
3
3
  export const CDK_SCRATCH_PREFIX = "cdk.out";
4
4
  /** Opaque owner label recorded before a CDK suite is collected. */
@@ -17,8 +17,9 @@ export { coverageGlobalSetup, coverageReportsDirectory, defaultCoverageExclusion
17
17
  * @returns Vitest UserConfig object with node environment and CDK-specific paths
18
18
  */
19
19
  export const getCdkVitestConfig = ({ thresholds, } = {}) => ({
20
+ plugins: [...accessMapPlugins()],
20
21
  test: {
21
- setupFiles: [...scratchSetupFiles()],
22
+ setupFiles: [...scratchSetupFiles(), ...accessMapSetupFiles()],
22
23
  globalSetup: [...scratchGlobalSetup(), ...coverageGlobalSetup()],
23
24
  sequence: { setupFiles: "list", hooks: "stack" },
24
25
  // Bounded so k concurrent runs do not claim k x cores. See resolveMaxWorkers.
@@ -1 +1 @@
1
- {"version":3,"file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QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;QAChD,8EAA8E;QAC9E,UAAU,EAAE,iBAAiB,EAAE;QAC/B,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE;YACP,mBAAmB;YACnB,mBAAmB;YACnB,+BAA+B;YAC/B,+BAA+B;SAChC;QACD,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;QACnC,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE;YACR,QAAQ,EAAE,IAAI;YACd,gEAAgE;YAChE,qEAAqE;YACrE,gBAAgB,EAAE,wBAAwB,EAAE;YAC5C,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;YACxC,OAAO,EAAE,CAAC,GAAG,yBAAyB,CAAC;YACvC,UAAU,EAAE,aAAa,CACvB,UAAU;gBACR,CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,UAAU,CAAC;gBAChD,CAAC,CAAC,iBAAiB,CACtB;SACF;KACF;CACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"coverage-include-global-setup.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-include-global-setup.ts"],"names":[],"mappings":"AAiCA;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,CAAC,EACZ;QACE,QAAQ,CAAC,QAAQ,CAAC,EACd;YACE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;YACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;SAClD,GACD,SAAS,CAAC;QACd,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACpC,GACD,SAAS,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,GAAI,UAAU,eAAe,KAAG,IAiBjD,CAAC"}
1
+ {"version":3,"file":"coverage-include-global-setup.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-include-global-setup.ts"],"names":[],"mappings":"AAgCA;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,CAAC,EACZ;QACE,QAAQ,CAAC,QAAQ,CAAC,EACd;YACE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;YACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;SAClD,GACD,SAAS,CAAC;QACd,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACpC,GACD,SAAS,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,GAAI,UAAU,eAAe,KAAG,IAiBjD,CAAC"}
@@ -7,7 +7,7 @@
7
7
  * the hook that acts on the verdict.
8
8
  *
9
9
  * IT LIVES IN `setup`, NOT `teardown`, and that placement is load-bearing for
10
- * the same measured reason the scratch guard records: vitest SWALLOWS a throw
10
+ * a measured reason: vitest SWALLOWS a throw
11
11
  * from `globalSetup` teardown — it prints `error during close` and the process
12
12
  * still exits 0 — while the same throw from `setup` exits 1. A guard placed in
13
13
  * a hook the runner ignores is the very defect this file exists to stop,
@@ -20,8 +20,7 @@
20
20
  * boundary is deliberate: the claim being protected is "coverage met the
21
21
  * threshold", and nothing else here is a claim about coverage.
22
22
  *
23
- * It reuses the scratch guard's two-part announcement rather than growing its
24
- * own. A refusal speaks twice, a banner before collection and a summary line at
23
+ * It uses the shared two-part announcement. A refusal speaks twice, a banner before collection and a summary line at
25
24
  * exit, because those are the top and the bottom of a transcript nobody reads
26
25
  * in full — and the summary line already says the exact thing that is true
27
26
  * here: the run was refused before collection, so no coverage was measured.
@@ -29,7 +28,7 @@
29
28
  * @module configs/vitest/coverage-include-global-setup
30
29
  */
31
30
  import { describeCoverageIncludeFailure } from "./coverage-include-authority.js";
32
- import { announceRefusal } from "./scratch-global-setup.js";
31
+ import { announceRefusal } from "./refusal-announcement.js";
33
32
  /**
34
33
  * Refuses the run when coverage would be measured over an empty file set.
35
34
  *
@@ -1 +1 @@
1
- {"version":3,"file":"coverage-include-global-setup.js","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-include-global-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAyB5D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,OAAyB,EAAQ,EAAE;IACvD,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAC/B,MAAM,IAAI,GAAG,MAAM,EAAE,IAAI,CAAC;IAC1B,IAAI,MAAM,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO;IAEvD,MAAM,OAAO,GAAG,8BAA8B,CAAC;QAC7C,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI;QAC1C,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO;QACjC,IAAI;KACL,CAAC,CAAC;IAEH,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,uEAAuE;QACvE,oCAAoC;QACpC,eAAe,CAAC,OAAO,CAAC,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"coverage-include-global-setup.js","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-include-global-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAyB5D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,OAAyB,EAAQ,EAAE;IACvD,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAC/B,MAAM,IAAI,GAAG,MAAM,EAAE,IAAI,CAAC;IAC1B,IAAI,MAAM,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO;IAEvD,MAAM,OAAO,GAAG,8BAA8B,CAAC;QAC7C,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI;QAC1C,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO;QACjC,IAAI;KACL,CAAC,CAAC;IAEH,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,uEAAuE;QACvE,oCAAoC;QACpC,eAAe,CAAC,OAAO,CAAC,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC,CAAC"}
@@ -1,3 +1,27 @@
1
+ /**
2
+ * Name one run directory from the identity of the run that owns it.
3
+ * @param owner - Process id owning the run
4
+ * @param startedAt - Epoch milliseconds the directory was named
5
+ * @param suffix - Opaque random suffix, free of `-`
6
+ * @returns The directory basename
7
+ */
8
+ export declare function runRootName(owner: number, startedAt: number, suffix: string): string;
9
+ /**
10
+ * Parse the owner fields encoded in a run directory basename.
11
+ * @param name - Directory basename
12
+ * @returns Parsed owner, or undefined for an unrelated name
13
+ */
14
+ export declare function parseRunRootName(name: string): {
15
+ readonly pid: number;
16
+ readonly startedAt: number;
17
+ } | undefined;
18
+ /**
19
+ * Whether a pid names a live process. `EPERM` means it exists and belongs to
20
+ * somebody else, which counts as alive.
21
+ * @param owner - Process id to probe
22
+ * @returns Whether it is alive
23
+ */
24
+ export declare const isProcessAlive: (owner: number) => boolean;
1
25
  /**
2
26
  * Directory under `coverage/` holding one run's isolated output.
3
27
  *
@@ -90,11 +114,9 @@ export declare function removeOwnCoverageRunDirectory(directory: string, expecte
90
114
  * always probes alive. The lock this module refuses has the opposite asymmetry
91
115
  * — there, a wrong answer releases a lock somebody is holding.
92
116
  *
93
- * It introduces no second authority. {@link parseRunRootName} and
94
- * {@link isProcessAlive} are the scratch namespace's existing parser and
95
- * liveness probe, and these directories are named by {@link runRootName}, so
96
- * that parser reads them unchanged. Anything it does not recognise is left
97
- * alone.
117
+ * {@link parseRunRootName} reads the names {@link runRootName} writes, and
118
+ * {@link isProcessAlive} probes their owner. Anything it does not recognise
119
+ * is left alone.
98
120
  * @param runsRoot - Directory holding the run directories
99
121
  * @param alive - Liveness probe; defaults to the shared one
100
122
  * @returns Basenames of the directories removed
@@ -1 +1 @@
1
- {"version":3,"file":"coverage-reports-directory.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-reports-directory.ts"],"names":[],"mappings":"AAuEA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UAAU,CAAC;AAEzC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AAkBpE;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAER;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAyBT;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAWT;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,GAAE,MAAoD,EAC9D,KAAK,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAwB,GACjD,SAAS,MAAM,EAAE,CAenB;AAYD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,GAAE,MAAM,CAAC,UAAgB,GACnC,MAAM,CAcR;AAkCD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAGpD"}
1
+ {"version":3,"file":"coverage-reports-directory.d.ts","sourceRoot":"","sources":["../../../src/configs/vitest/coverage-reports-directory.ts"],"names":[],"mappings":"AAmEA;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAER;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,GACX;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAQlE;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,OAO9C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UAAU,CAAC;AAEzC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AAkBpE;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAER;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAyBT;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,OAAO,CAWT;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,GAAE,MAAoD,EAC9D,KAAK,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAwB,GACjD,SAAS,MAAM,EAAE,CAenB;AAYD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,GAAE,MAAM,CAAC,UAAgB,GACnC,MAAM,CAcR;AAkCD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAGpD"}
@@ -43,9 +43,8 @@
43
43
  * cleaning a directory two runs share is precisely what deletes the other
44
44
  * run's files.
45
45
  *
46
- * The naming scheme is the one the scratch namespace already proved for the
47
- * same class of collision — `run-<pid>-<startedAt>-<suffix>`, reused here via
48
- * {@link runRootName} rather than re-spelled, so the two cannot drift apart.
46
+ * Each directory is named `run-<pid>-<startedAt>-<suffix>` by
47
+ * {@link runRootName}, so a dead owner can be recognised and reclaimed.
49
48
  *
50
49
  * ## What this does not change
51
50
  *
@@ -62,8 +61,48 @@ import { randomBytes } from "node:crypto";
62
61
  import * as fs from "node:fs";
63
62
  import * as path from "node:path";
64
63
  import { env, pid } from "node:process";
65
- import { parseRunRootName, runRootName, } from "./scratch-namespace-authority.js";
66
- import { isProcessAlive } from "./scratch-sweep.js";
64
+ /** Prefix of every run directory name, `run-<pid>-<startedAt>-<suffix>`. */
65
+ const RUN_DIRECTORY_PREFIX = "run-";
66
+ /**
67
+ * Name one run directory from the identity of the run that owns it.
68
+ * @param owner - Process id owning the run
69
+ * @param startedAt - Epoch milliseconds the directory was named
70
+ * @param suffix - Opaque random suffix, free of `-`
71
+ * @returns The directory basename
72
+ */
73
+ export function runRootName(owner, startedAt, suffix) {
74
+ return `${RUN_DIRECTORY_PREFIX}${String(owner)}-${String(startedAt)}-${suffix}`;
75
+ }
76
+ /**
77
+ * Parse the owner fields encoded in a run directory basename.
78
+ * @param name - Directory basename
79
+ * @returns Parsed owner, or undefined for an unrelated name
80
+ */
81
+ export function parseRunRootName(name) {
82
+ const match = /^run-(\d+)-(\d+)-[^-]+$/.exec(name);
83
+ if (match === null)
84
+ return undefined;
85
+ const owner = Number(match[1]);
86
+ const startedAt = Number(match[2]);
87
+ return Number.isSafeInteger(owner) && Number.isSafeInteger(startedAt)
88
+ ? { pid: owner, startedAt }
89
+ : undefined;
90
+ }
91
+ /**
92
+ * Whether a pid names a live process. `EPERM` means it exists and belongs to
93
+ * somebody else, which counts as alive.
94
+ * @param owner - Process id to probe
95
+ * @returns Whether it is alive
96
+ */
97
+ export const isProcessAlive = (owner) => {
98
+ try {
99
+ process.kill(owner, 0);
100
+ return true;
101
+ }
102
+ catch (error) {
103
+ return error.code === "EPERM";
104
+ }
105
+ };
67
106
  /**
68
107
  * Directory under `coverage/` holding one run's isolated output.
69
108
  *
@@ -213,11 +252,9 @@ export function removeOwnCoverageRunDirectory(directory, expectedName) {
213
252
  * always probes alive. The lock this module refuses has the opposite asymmetry
214
253
  * — there, a wrong answer releases a lock somebody is holding.
215
254
  *
216
- * It introduces no second authority. {@link parseRunRootName} and
217
- * {@link isProcessAlive} are the scratch namespace's existing parser and
218
- * liveness probe, and these directories are named by {@link runRootName}, so
219
- * that parser reads them unchanged. Anything it does not recognise is left
220
- * alone.
255
+ * {@link parseRunRootName} reads the names {@link runRootName} writes, and
256
+ * {@link isProcessAlive} probes their owner. Anything it does not recognise
257
+ * is left alone.
221
258
  * @param runsRoot - Directory holding the run directories
222
259
  * @param alive - Liveness probe; defaults to the shared one
223
260
  * @returns Basenames of the directories removed