@codyswann/lisa 5.14.2 → 5.14.3

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 (211) hide show
  1. package/all/copy-overwrite/scripts/check-npm-publish-landed.mjs +5 -2
  2. package/all/copy-overwrite/scripts/lib/gate-failure-diagnosis.mjs +14 -18
  3. package/all/copy-overwrite/scripts/lib/invoked-as-script.d.mts +5 -0
  4. package/all/copy-overwrite/scripts/lisa-commit-msg-gates.mjs +1 -1
  5. package/all/copy-overwrite/scripts/lisa-destructive-guard.mjs +4 -4
  6. package/all/copy-overwrite/scripts/lisa-environment-prepare.mjs +2 -2
  7. package/all/copy-overwrite/scripts/lisa-gates.mjs +61 -30
  8. package/all/copy-overwrite/scripts/lisa-reconcile-policy.mjs +5 -3
  9. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +2 -2
  10. package/all/copy-overwrite/scripts/lisa-work-item.mjs +3 -2
  11. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +6 -6
  12. package/all/copy-overwrite/scripts/threshold-ratchet-families.mjs +0 -8
  13. package/dist/cli/lisa-test-run.js +0 -1
  14. package/dist/cli/lisa-test-run.js.map +1 -1
  15. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  16. package/dist/core/lisa-owned-hash-ledger.js +30 -0
  17. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  18. package/dist/core/nightly-e2e-guard-behavior-certificate.d.ts +5 -0
  19. package/dist/core/nightly-e2e-guard-behavior-certificate.d.ts.map +1 -1
  20. package/dist/core/nightly-e2e-guard-behavior-certificate.js +8 -1
  21. package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
  22. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  23. package/dist/core/upstream-evidence-manifest.js +45 -40
  24. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  25. package/package.json +4 -4
  26. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  28. package/plugins/lisa/.codex-plugin/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
  29. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
  30. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
  31. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
  32. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
  33. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
  34. package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
  35. package/plugins/lisa/.codex-plugin/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
  36. package/plugins/lisa/.codex-plugin/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
  37. package/plugins/lisa/.codex-plugin/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
  38. package/plugins/lisa/hooks/threshold-ratchet-families.mjs +0 -8
  39. package/plugins/lisa/scripts/design-bindings-probe.mjs +37 -8
  40. package/plugins/lisa/scripts/design-intake-gate.mjs +23 -5
  41. package/plugins/lisa/scripts/design-source-gate.mjs +5 -5
  42. package/plugins/lisa/scripts/lifecycle-label-trust.mjs +1 -1
  43. package/plugins/lisa/scripts/rollup-blocker-classification.mjs +41 -4
  44. package/plugins/lisa/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
  45. package/plugins/lisa/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
  46. package/plugins/lisa/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
  47. package/plugins/lisa/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
  48. package/plugins/lisa/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
  49. package/plugins/lisa/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
  50. package/plugins/lisa/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
  51. package/plugins/lisa/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
  52. package/plugins/lisa/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
  53. package/plugins/lisa/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
  54. package/plugins/lisa-agy/plugin.json +1 -1
  55. package/plugins/lisa-agy/scripts/design-bindings-probe.mjs +37 -8
  56. package/plugins/lisa-agy/scripts/design-intake-gate.mjs +23 -5
  57. package/plugins/lisa-agy/scripts/design-source-gate.mjs +5 -5
  58. package/plugins/lisa-agy/scripts/lifecycle-label-trust.mjs +1 -1
  59. package/plugins/lisa-agy/scripts/rollup-blocker-classification.mjs +41 -4
  60. package/plugins/lisa-agy/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
  61. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
  62. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
  63. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
  64. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
  65. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
  66. package/plugins/lisa-agy/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
  67. package/plugins/lisa-agy/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
  68. package/plugins/lisa-agy/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
  69. package/plugins/lisa-agy/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
  70. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  72. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  73. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  77. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-copilot/hooks/threshold-ratchet-families.mjs +0 -8
  79. package/plugins/lisa-copilot/scripts/design-bindings-probe.mjs +37 -8
  80. package/plugins/lisa-copilot/scripts/design-intake-gate.mjs +23 -5
  81. package/plugins/lisa-copilot/scripts/design-source-gate.mjs +5 -5
  82. package/plugins/lisa-copilot/scripts/lifecycle-label-trust.mjs +1 -1
  83. package/plugins/lisa-copilot/scripts/rollup-blocker-classification.mjs +41 -4
  84. package/plugins/lisa-copilot/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
  85. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
  86. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
  87. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
  88. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
  89. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
  90. package/plugins/lisa-copilot/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
  91. package/plugins/lisa-copilot/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
  92. package/plugins/lisa-copilot/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
  93. package/plugins/lisa-copilot/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
  94. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa-cursor/hooks/threshold-ratchet-families.mjs +0 -8
  96. package/plugins/lisa-cursor/scripts/design-bindings-probe.mjs +37 -8
  97. package/plugins/lisa-cursor/scripts/design-intake-gate.mjs +23 -5
  98. package/plugins/lisa-cursor/scripts/design-source-gate.mjs +5 -5
  99. package/plugins/lisa-cursor/scripts/lifecycle-label-trust.mjs +1 -1
  100. package/plugins/lisa-cursor/scripts/rollup-blocker-classification.mjs +41 -4
  101. package/plugins/lisa-cursor/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
  102. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
  103. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
  104. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
  105. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
  106. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
  107. package/plugins/lisa-cursor/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
  108. package/plugins/lisa-cursor/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
  109. package/plugins/lisa-cursor/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
  110. package/plugins/lisa-cursor/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
  111. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  112. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  113. package/plugins/lisa-devin/hooks/threshold-ratchet-families.mjs +0 -8
  114. package/plugins/lisa-devin/scripts/design-bindings-probe.mjs +37 -8
  115. package/plugins/lisa-devin/scripts/design-intake-gate.mjs +23 -5
  116. package/plugins/lisa-devin/scripts/design-source-gate.mjs +5 -5
  117. package/plugins/lisa-devin/scripts/lifecycle-label-trust.mjs +1 -1
  118. package/plugins/lisa-devin/scripts/rollup-blocker-classification.mjs +41 -4
  119. package/plugins/lisa-devin/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
  120. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
  121. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
  122. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
  123. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
  124. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
  125. package/plugins/lisa-devin/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
  126. package/plugins/lisa-devin/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
  127. package/plugins/lisa-devin/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
  128. package/plugins/lisa-devin/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
  129. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  130. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  131. package/plugins/lisa-expo-agy/plugin.json +1 -1
  132. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  133. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  134. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  135. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  136. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  137. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  138. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  139. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  140. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  141. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  142. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  143. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  144. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  145. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  146. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  147. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  148. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  149. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  150. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  151. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  152. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  153. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  154. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  155. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  156. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  157. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  158. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  159. package/plugins/lisa-rails-agy/plugin.json +1 -1
  160. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  161. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  162. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  163. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  164. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  165. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  166. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  167. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  168. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  169. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  170. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  171. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  172. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  173. package/plugins/lisa-wiki/scripts/wiki-status.mjs +18 -0
  174. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  175. package/plugins/lisa-wiki-agy/scripts/wiki-status.mjs +18 -0
  176. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  177. package/plugins/lisa-wiki-copilot/scripts/wiki-status.mjs +18 -0
  178. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  179. package/plugins/lisa-wiki-cursor/scripts/wiki-status.mjs +18 -0
  180. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  181. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  182. package/plugins/lisa-wiki-devin/scripts/wiki-status.mjs +18 -0
  183. package/plugins/src/base/hooks/threshold-ratchet-families.mjs +0 -8
  184. package/plugins/src/base/scripts/design-bindings-probe.mjs +37 -8
  185. package/plugins/src/base/scripts/design-intake-gate.mjs +23 -5
  186. package/plugins/src/base/scripts/design-source-gate.mjs +5 -5
  187. package/plugins/src/base/scripts/lifecycle-label-trust.mjs +1 -1
  188. package/plugins/src/base/scripts/rollup-blocker-classification.mjs +41 -4
  189. package/plugins/src/base/skills/lisa-detect-tooling/scripts/detect-tooling.mjs +3 -3
  190. package/plugins/src/base/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +2 -2
  191. package/plugins/src/base/skills/lisa-secrets-access/scripts/doctor-secrets.mjs +1 -1
  192. package/plugins/src/base/skills/lisa-secrets-access/scripts/publish-aws-bootstrap.mjs +4 -3
  193. package/plugins/src/base/skills/lisa-secrets-access/scripts/sync-secret-to-ci.mjs +1 -1
  194. package/plugins/src/base/skills/lisa-secrets-access/scripts/tools-from-notes.mjs +1 -1
  195. package/plugins/src/base/skills/lisa-setup-remote-env/scripts/toolchain.mjs +2 -2
  196. package/plugins/src/base/skills/lisa-setup-workstation/scripts/catalogue.mjs +32 -1
  197. package/plugins/src/base/skills/lisa-setup-workstation/scripts/cli.mjs +2 -2
  198. package/plugins/src/base/skills/lisa-setup-workstation/scripts/workstation.mjs +22 -7
  199. package/plugins/src/wiki/scripts/wiki-status.mjs +18 -0
  200. package/rails/copy-overwrite/scripts/threshold-ratchet-families.mjs +0 -8
  201. package/scripts/check-typecheck-tests.mjs +37 -115
  202. package/scripts/check-whole-output-guards.mjs +12 -2
  203. package/scripts/generate-nightly-e2e-guard-certificate.mjs +6 -0
  204. package/scripts/lib/dependency-tree.mjs +7 -11
  205. package/scripts/lib/invoked-as-script.d.mts +5 -0
  206. package/scripts/lisa-ruleset-payload.mjs +1 -1
  207. package/scripts/measure-tmpdir-growth.mjs +21 -2
  208. package/scripts/reconcile-release-tags.mjs +3 -3
  209. package/scripts/two-channel-couplings.json +1 -1
  210. package/typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs +1 -1
  211. package/typescript/copy-overwrite/scripts/threshold-ratchet-families.mjs +0 -8
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Type-check `tests/` and hold the result to a quarantine that can only shrink.
3
+ * Type-check `tests/` and fail on any error, in any file.
4
4
  *
5
5
  * WHY THIS EXISTS. The required `type-correctness` gate compiles `tsconfig.json`,
6
6
  * whose `include` is `src/**\/*`, so it compiled 0 of 1385 test files and reported
@@ -8,33 +8,19 @@
8
8
  * (CodySwannGT/lisa#3811). Test files here are not incidental: they hold fixture
9
9
  * builders, shape assertions and harnesses other suites import.
10
10
  *
11
- * WHY A FILE-LEVEL QUARANTINE RATHER THAN A STAGED ROLLOUT. Turning the program
12
- * on surfaces a backlog that predates this gate, so something has to hold it.
13
- * The tempting option is to widen the program one directory at a time. That is
14
- * the defect surviving in miniature: with a directory scope, a brand-new file
15
- * under an unreached directory is unchecked on the day it is written. A
16
- * file-level quarantine inverts it — **every new or renamed file is checked
17
- * immediately**, and only the files that were already failing are exempt.
11
+ * THERE IS NO EXEMPTION LIST. The gate once held a file-level quarantine of
12
+ * files that were already failing when the program was switched on, ratcheted
13
+ * so it could only shrink. CodySwannGT/lisa#4923 emptied it and deleted it: an
14
+ * exemption list is debt with a mechanism attached, and the mechanism outlives
15
+ * the reason. Every file in the program is now held to the same rule — one type
16
+ * error anywhere fails the gate.
18
17
  *
19
- * IT RATCHETS IN BOTH DIRECTIONS, which is what stops it becoming permanent:
20
- *
21
- * - an error in a file NOT in the quarantine fails the gate: that is new debt;
22
- * - a quarantined file with NO errors fails the gate too, asking to be
23
- * removed from the list. Without that rule the list would record files that
24
- * were fixed years ago and quietly re-authorise them if they regressed.
25
- *
26
- * `typecheck-quarantine.json` is additionally watched by the existing
27
- * threshold-ratchet as an `allow-list` family, so *adding* an entry is flagged
28
- * by a gate somebody already reads.
29
- *
30
- * IT REFUSES TO ANSWER FROM AN UNRESOLVABLE TREE (CodySwannGT/lisa#3913). The
31
- * second of those ratchet directions is the destructive one: it names files and
32
- * tells a reader to delete their quarantine entries. With an empty
33
- * `node_modules` the compiler cannot start, nothing is compiled, no diagnostic
34
- * is parsed — and "no diagnostic for this file" is exactly the shape of "this
35
- * file was fixed". The gate reported all 370 quarantined files as cleared and
36
- * instructed their removal, which is a destructive edit ordered on the strength
37
- * of a comparison whose inputs never resolved.
18
+ * IT REFUSES TO ANSWER FROM AN UNRESOLVABLE TREE (CodySwannGT/lisa#3913). With
19
+ * an empty `node_modules` the compiler cannot start, nothing is compiled and no
20
+ * diagnostic is parsed. Under the old quarantine that emptiness read as "every
21
+ * quarantined file was fixed" and ordered a destructive edit; without one it
22
+ * would read as a clean run. Either way it is a verdict about a program nobody
23
+ * compiled, so it is refused rather than reported.
38
24
  *
39
25
  * So there are two ways this refuses instead of reporting, and the second is
40
26
  * the general one:
@@ -63,7 +49,6 @@
63
49
  * @module scripts/check-typecheck-tests
64
50
  */
65
51
  import { spawnSync } from "node:child_process";
66
- import { readFileSync } from "node:fs";
67
52
  import * as path from "node:path";
68
53
  import process from "node:process";
69
54
  import { fileURLToPath } from "node:url";
@@ -90,9 +75,9 @@ const GATE = "type-correctness (tests)";
90
75
  * program about ten times faster than `tsc` (CodySwannGT/lisa#4614, #4695). On
91
76
  * this program it puts the same set of files in error as `tsc`, though error
92
77
  * counts, codes and wording can differ — which is enough, because this gate
93
- * compares file sets (or runs of the same compiler), never raw diagnostics
94
- * across compilers. Its bin is a plain Node script, so it is spawned under
95
- * `node` exactly as `tsc` was.
78
+ * asks only whether any file is in error and names the files, never compares
79
+ * raw diagnostics across compilers. Its bin is a plain Node script, so it is
80
+ * spawned under `node` exactly as `tsc` was.
96
81
  */
97
82
  const TSC = path.join(
98
83
  "node_modules",
@@ -105,29 +90,6 @@ const TSC = path.join(
105
90
  /** Matches `path/to/file.ts(12,34): error TS1234: message`. */
106
91
  const ERROR_LINE = /^(?<file>[^(]+)\((?<line>\d+),\d+\): error (?<code>TS\d+):/;
107
92
 
108
- /**
109
- * Read the quarantined paths.
110
- * @param {string} root - The directory holding the quarantine.
111
- * @returns {{files: string[], reason: string} | null} The parsed quarantine, or
112
- * `null` when it could not be read — an unreadable list is a refusal, not a
113
- * pass, because that file is what makes this gate green.
114
- */
115
- function readQuarantine(root) {
116
- const quarantine = path.join(root, "typecheck-quarantine.json");
117
- try {
118
- const parsed = JSON.parse(readFileSync(quarantine, "utf-8"));
119
- return { files: parsed.files ?? [], reason: parsed.reason ?? "" };
120
- } catch (error) {
121
- console.error(
122
- `check-typecheck-tests: cannot read ${path.relative(root, quarantine)} — ${error.message}`
123
- );
124
- console.error(
125
- "That file is what makes this gate green, so an unreadable one is a refusal, not a pass."
126
- );
127
- return null;
128
- }
129
- }
130
-
131
93
  /**
132
94
  * Parse the compiler's output into a per-file error count.
133
95
  * @param {string} output - Combined stdout and stderr.
@@ -148,45 +110,34 @@ function parseDiagnostics(output) {
148
110
  /**
149
111
  * The refusal issued when nothing was compiled.
150
112
  *
151
- * The denial names the destructive remedy explicitly. "Nothing type-checked" is
152
- * the inference a reader draws from an empty diagnostic set, and the gate's own
153
- * cleared-entry message is what turns that inference into a deletion — so this
154
- * has to deny both, not just the first.
113
+ * The denial names the inference a reader draws from an empty diagnostic set —
114
+ * that the test program type-checks — because that is exactly what was not
115
+ * established.
155
116
  *
156
- * NO FILE IS NAMED HERE, deliberately. A list of paths is what makes the
157
- * destructive message actionable, and a refusal that still printed 370 paths
158
- * would be followed exactly as often as the finding it replaces.
117
+ * NO FILE IS NAMED HERE, deliberately: nothing was compiled, so nothing is
118
+ * known about any file.
159
119
  *
160
120
  * @param {string} because - Why the measurement could not happen.
161
- * @param {number} quarantined - How many entries went unexamined.
162
121
  * @param {string} fix - The action that repairs THIS cause. Named per call
163
122
  * site rather than fixed, because telling someone to install dependencies
164
123
  * they already have is how a refusal gets dismissed as noise.
165
124
  * @returns {string} The refusal block.
166
125
  */
167
- function refuseUnmeasurable(because, quarantined, fix) {
126
+ function refuseUnmeasurable(because, fix) {
168
127
  return cannotMeasure({
169
128
  gate: GATE,
170
- denial: `that any of the ${quarantined} quarantined file(s) now type-check`,
129
+ denial: "that the test program type-checks",
171
130
  because,
172
- remedy:
173
- `${fix} Do NOT edit typecheck-quarantine.json on the strength of ` +
174
- `this — no file was compiled, so nothing was established about any ` +
175
- `entry in it.`,
131
+ remedy: `${fix} No file was compiled, so nothing was established about any of them.`,
176
132
  });
177
133
  }
178
134
 
179
135
  /**
180
136
  * Run the gate.
181
- * @param {string} root - Directory to resolve the project and quarantine under.
137
+ * @param {string} root - Directory to resolve the project under.
182
138
  * @returns {number} The process exit code.
183
139
  */
184
140
  export function main(root) {
185
- const quarantine = readQuarantine(root);
186
- if (quarantine === null) return 1;
187
- const quarantined = quarantine.files;
188
- const exempt = new Set(quarantined);
189
-
190
141
  // PRECONDITION. Checked before the spawn rather than inferred from it: the
191
142
  // spawn SUCCEEDS with an empty `node_modules` — node starts, and it is node
192
143
  // that cannot find the module — so `tsc.error` never fires and the failure
@@ -196,7 +147,6 @@ export function main(root) {
196
147
  console.error(
197
148
  refuseUnmeasurable(
198
149
  `the TypeScript native compiler (tsgo) is not installed — no file at ${missing[0]}.`,
199
- quarantined.length,
200
150
  `Run \`${INSTALL_COMMAND}\`, then re-run this gate.`
201
151
  )
202
152
  );
@@ -228,10 +178,10 @@ export function main(root) {
228
178
  );
229
179
 
230
180
  // POSTCONDITION, and the general form of the same defect. The compiler
231
- // signalled failure and produced nothing this gate can read, so the
232
- // comparison below would run against an empty set — the exact shape of "every
233
- // quarantined file is fixed". A ZERO exit with no diagnostics is not this: it
234
- // is a clean run, and it reports normally.
181
+ // signalled failure and produced nothing this gate can read — a broken
182
+ // tsconfig, an OOM, a crash. Reporting that as a pass would be a verdict
183
+ // about a program nobody compiled. A ZERO exit with no diagnostics is not
184
+ // this: it is a clean run, and it reports normally.
235
185
  if (ranVacuously(tsc.status, errorsByFile.size)) {
236
186
  const firstLine = `${tsc.stderr ?? ""}${tsc.stdout ?? ""}`
237
187
  .split("\n")
@@ -240,63 +190,35 @@ export function main(root) {
240
190
  console.error(
241
191
  refuseUnmeasurable(
242
192
  `tsgo exited ${tsc.status} without emitting one diagnostic this gate ` +
243
- `could parse, so the comparison had no subject.` +
193
+ `could parse, so the check had no subject.` +
244
194
  `${firstLine ? ` First output line: ${firstLine}` : ""}`,
245
- quarantined.length,
246
195
  "Fix the cause named above, then re-run this gate."
247
196
  )
248
197
  );
249
198
  return 1;
250
199
  }
251
200
 
252
- const offenders = [...errorsByFile.keys()]
253
- .filter(file => !exempt.has(file))
254
- .sort();
255
- const cleared = quarantined.filter(file => !errorsByFile.has(file)).sort();
256
-
201
+ const offenders = [...errorsByFile.keys()].sort();
257
202
  const totalErrors = [...errorsByFile.values()].reduce((sum, n) => sum + n, 0);
258
203
  console.log(
259
- `${GATE}: ${errorsByFile.size} file(s) with ${totalErrors} error(s); ` +
260
- `${quarantined.length} quarantined.`
204
+ `${GATE}: ${errorsByFile.size} file(s) with ${totalErrors} error(s).`
261
205
  );
262
206
 
263
207
  if (offenders.length > 0) {
264
208
  console.error("");
265
- console.error(
266
- `❌ ${offenders.length} file(s) outside the quarantine have type errors:`
267
- );
209
+ console.error(`❌ ${offenders.length} file(s) have type errors:`);
268
210
  for (const file of offenders) {
269
211
  console.error(` ${file} (${errorsByFile.get(file)})`);
270
212
  }
271
213
  console.error("");
272
214
  console.error(
273
- "Fix them. Do NOT add them to typecheck-quarantine.json — that list"
274
- );
275
- console.error(
276
- "only shrinks, and the threshold-ratchet flags additions to it."
277
- );
278
- }
279
-
280
- if (cleared.length > 0) {
281
- console.error("");
282
- console.error(
283
- `❌ ${cleared.length} quarantined file(s) now type-check and must leave the list:`
284
- );
285
- for (const file of cleared) console.error(` ${file}`);
286
- console.error("");
287
- console.error(
288
- "Remove them from typecheck-quarantine.json. A list that keeps entries"
289
- );
290
- console.error(
291
- "after they are fixed would re-authorise them if they ever regressed."
215
+ "Fix each at its cause. There is no exemption list: every file in the"
292
216
  );
217
+ console.error("test program is type-checked, and one error fails it.");
218
+ return 1;
293
219
  }
294
220
 
295
- if (offenders.length > 0 || cleared.length > 0) return 1;
296
-
297
- console.log(
298
- "✅ No type errors outside the quarantine, and no stale quarantine entries."
299
- );
221
+ console.log("✅ The test program type-checks with no errors.");
300
222
  return 0;
301
223
  }
302
224
 
@@ -442,11 +442,21 @@ export function byPosition(left, right) {
442
442
  return (left.position ?? 0) - (right.position ?? 0);
443
443
  }
444
444
 
445
+ /**
446
+ * One scope whose whole-output guard leaves transform steps unaccounted for.
447
+ * @typedef {object} GuardFinding
448
+ * @property {string} file Repository-relative path.
449
+ * @property {string} scope The scope's name, or `<module>` / `<anonymous>`.
450
+ * @property {number} steps Transform steps counted, an iterated step as two.
451
+ * @property {Array<{line: number, test: string, operands: string[]}>} guards Whole-output guards in the scope.
452
+ * @property {Array<{line: number, anchor: string}>} unaccounted Steps no anchor assertion accounts for, in source order.
453
+ */
454
+
445
455
  /**
446
456
  * Turn one scope's evidence into a finding, or `null`.
447
457
  * @param {object} evidence - Collected evidence for the scope.
448
458
  * @param {string} file - Repository-relative path, for reporting.
449
- * @returns {object | null} A finding, or `null` when the scope is sound.
459
+ * @returns {GuardFinding | null} A finding, or `null` when the scope is sound.
450
460
  */
451
461
  export function judgeScope(evidence, file) {
452
462
  const stepCount = evidence.steps.reduce(
@@ -513,7 +523,7 @@ export function collectFiles(root, repoRoot) {
513
523
  * Run the sweep over a tree.
514
524
  * @param {string} repoRoot - Absolute path of the tree to inspect.
515
525
  * @param {readonly string[]} [roots] - Sub-directories to scan.
516
- * @returns {{ inspected: number, files: number, findings: object[] }} Report.
526
+ * @returns {{ inspected: number, files: number, findings: GuardFinding[] }} Report.
517
527
  */
518
528
  export function sweep(repoRoot, roots = SCANNED_ROOTS) {
519
529
  const report = { inspected: 0, files: 0, findings: [] };
@@ -70,6 +70,12 @@ export const RETAINED_RELEASES = Object.freeze([
70
70
  // to the 50 releases from v4.22.13 through v4.26.0 (#3500), found only after
71
71
  // the fact. Adding the ref here is what stops this change repeating it.
72
72
  "v4.50.3",
73
+ // The guard every release from at least v4.111.2 through v5.14.2 shipped
74
+ // (sha256 d1b26caeaf65…). Retained in the commit that corrects a JSDoc type
75
+ // in the workspace guard (#4923): the edit changes the file's digest, so
76
+ // without this ref regeneration would revoke the certificate those installed
77
+ // releases rely on, the #3500 regression again.
78
+ "v5.14.2",
73
79
  ]);
74
80
 
75
81
  const digest = bytes => createHash("sha256").update(bytes).digest("hex");
@@ -11,17 +11,13 @@
11
11
  * module — so the gate's `if (tsc.error)` guard does not fire. node's
12
12
  * "Cannot find module" goes to stderr and does not match the gate's
13
13
  * `file(line,col): error TSxxxx:` pattern, so the parsed-diagnostics map comes
14
- * back EMPTY. Every quarantined file then satisfies "has no errors", and the
15
- * gate reports:
16
- *
17
- * ```
18
- * ❌ 370 quarantined file(s) now type-check and must leave the list:
19
- * Remove them from typecheck-quarantine.json.
20
- * ```
21
- *
22
- * Following that deletes 370 live quarantine entries on the word of a checker
23
- * that compiled nothing. The comparison was not wrong — it was correct about an
24
- * input it was never entitled to accept.
14
+ * back EMPTY. The gate then held a file-level quarantine of known-failing files
15
+ * (since deleted, CodySwannGT/lisa#4923), and every one of them satisfied "has
16
+ * no errors": the gate reported all 370 as fixed and instructed their removal
17
+ * — a destructive edit ordered on the word of a checker that compiled nothing.
18
+ * The comparison was not wrong; it was correct about an input it was never
19
+ * entitled to accept. Without the quarantine the same emptiness would read as
20
+ * a clean run, which is the same defect pointed the other way.
25
21
  *
26
22
  * ## Why "cannot measure" is a THIRD outcome, not a failure message
27
23
  *
@@ -0,0 +1,5 @@
1
+ // This file is managed by Lisa and IS replaced on each `lisa` run.
2
+ // Do not edit directly — durable changes belong upstream in Lisa.
3
+
4
+ /** Whether the calling module was run as the CLI entry point, comparing real paths. */
5
+ export function invokedAsScript(moduleUrl: string, argv1?: string): boolean;
@@ -307,7 +307,7 @@ function pullRequestRule(policy) {
307
307
  * @param {object} [options.gates] The gates block.
308
308
  * @param {object} [options.policy] The policy block.
309
309
  * @param {string} [options.moment] Moment to derive awaited checks for.
310
- * @returns {object} A create/update payload for the `base` ruleset.
310
+ * @returns {{name: string, target: string, enforcement: unknown, conditions: {ref_name: {exclude: unknown[], include: unknown[]}}, bypass_actors: unknown[], rules: Array<{type: string, parameters?: Record<string, unknown>}>}} A create/update payload for the `base` ruleset.
311
311
  */
312
312
  export function buildRulesetPayload({
313
313
  gates = {},
@@ -73,7 +73,11 @@ export function collectBoundedEntryNames(iterable, limit = MAX_TMPDIR_ENTRIES) {
73
73
  return names.sort(codePointCompare);
74
74
  }
75
75
 
76
- /** Build sorted prefix counts while enforcing a unique-prefix cap. */
76
+ /**
77
+ * Build sorted prefix counts while enforcing a unique-prefix cap.
78
+ * @param {readonly string[]} names Entry names.
79
+ * @returns {Array<{prefix: string, count: number}>} Counts, most common first.
80
+ */
77
81
  function prefixCounts(names) {
78
82
  const counts = new Map();
79
83
  for (const name of names) {
@@ -533,11 +537,26 @@ function assertComparable(before, after) {
533
537
  }
534
538
  }
535
539
 
540
+ /**
541
+ * What changed in the temp directory between two snapshots.
542
+ * @typedef {object} GrowthReport
543
+ * @property {number} total Entries in the current snapshot.
544
+ * @property {number|null} delta Change in entry count, or null with no previous snapshot.
545
+ * @property {number} created Entries that appeared.
546
+ * @property {number} removed Entries that disappeared.
547
+ * @property {number} unreclaimed Net entries created and not removed.
548
+ * @property {number|null} elapsedMs Time between snapshots, or null.
549
+ * @property {number|null} rateEntriesPerDay Net growth rate, or null.
550
+ * @property {Array<{prefix: string, count: number}>} topPrefixes The ten most common canonical prefixes.
551
+ * @property {{total: number, owned: number, live: number, unowned: number, created: number, removed: number, unreclaimed: number, newlyUnowned: number}} namespace Lisa scratch-namespace counts.
552
+ * @property {string[]} violations Plain-language growth violations.
553
+ */
554
+
536
555
  /**
537
556
  * Compare two complete snapshots without hiding equal creation/removal.
538
557
  * @param {object|undefined} before Previous snapshot
539
558
  * @param {object} after Current snapshot
540
- * @returns {object} Deterministic growth report
559
+ * @returns {GrowthReport} Deterministic growth report
541
560
  */
542
561
  export function buildGrowthReport(before, after) {
543
562
  if (before === undefined) {
@@ -160,8 +160,8 @@ export function classifyProbe({ verdict = null } = {}) {
160
160
  * registry outage exactly.
161
161
  * @param {object} options Inputs.
162
162
  * @param {readonly string[]} options.tags Every ref name in the repository.
163
- * @param {(version: string) => {status?: number|null, error?: string|null}} options.probe Registry probe.
164
- * @returns {{rows: object[], ignored: string[]}} Rows per release tag, and refs that were not release tags.
163
+ * @param {(version: string) => {verdict?: string|null}} options.probe Registry probe; its `verdict` is classified by `classifyProbe`.
164
+ * @returns {{rows: Array<{tag: string, version: string, verdict: string}>, ignored: string[]}} Rows per release tag, and refs that were not release tags.
165
165
  */
166
166
  export function reconcile({ tags, probe }) {
167
167
  const rows = [];
@@ -234,7 +234,7 @@ export async function probeVersion(
234
234
  * a proven failed release. Someone reading the report in a hurry must not be
235
235
  * able to take the number for an incident count, so the distinction is printed
236
236
  * rather than left in a doc comment nobody opens.
237
- * @param {{rows: object[], ignored: string[]}} result As returned by `reconcile`.
237
+ * @param {{rows: ReadonlyArray<{tag: string, version: string, verdict: string}>, ignored: readonly string[]}} result As returned by `reconcile`.
238
238
  * @returns {string} The report.
239
239
  */
240
240
  export function formatReport({ rows, ignored }) {
@@ -145,7 +145,7 @@
145
145
  "workflows": 26,
146
146
  "steps": 873,
147
147
  "couplings": 45,
148
- "inventory": 244
148
+ "inventory": 245
149
149
  },
150
150
  "counts": {
151
151
  "package-backed": 11,
@@ -1666,7 +1666,7 @@ export function parseWaiverTrailer(prBody) {
1666
1666
  * PR body — a security limit a caller can relax is not a limit.
1667
1667
  *
1668
1668
  * @param {object} request - `{ labelEvent, prAuthor, prNumber, label, prBody, actorPermission, maxHours, extraReasonPattern, now }`
1669
- * @returns {{valid: boolean, reason: string, actor: string|null, appliedAt: string|null, expiresAt: string|null, ticket: string|null, detail: string|null}} The decision
1669
+ * @returns {{valid: boolean, reason: string, actor: string|null, appliedAt: string|null, expiresAt: string|null, ticket: string|null, detail: string|null, label: string|null, prAuthor: string|null, prNumber: number|null, actorPermission: string|null}} The decision
1670
1670
  */
1671
1671
  export function evaluateBypass(request) {
1672
1672
  const {
@@ -92,14 +92,6 @@ export const FAMILIES = [
92
92
  match: /(^|\/)\.lisa\.config\.json$/,
93
93
  kind: "allow-list",
94
94
  },
95
- {
96
- // The #3811 quarantine. `allow-list` is exactly right here: the list may
97
- // shrink freely, and ADDING a file — re-authorising type debt that the
98
- // gate would otherwise refuse — is the change that needs a human to see it.
99
- id: "typecheck-quarantine",
100
- match: /(^|\/)typecheck-quarantine\.json$/,
101
- kind: "allow-list",
102
- },
103
95
  {
104
96
  id: "lighthouse",
105
97
  match: /(^|\/)(?:lighthouserc-config|lighthouserc|\.lighthouserc)\.json$/,