@codyswann/lisa 5.6.0 → 5.8.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 (176) hide show
  1. package/all/copy-overwrite/scripts/lib/push-timing.mjs +135 -9
  2. package/all/copy-overwrite/scripts/lisa-push-timing-report.mjs +58 -4
  3. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +13 -1
  4. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +2 -2
  5. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  6. package/dist/core/lisa-owned-hash-ledger.js +18 -0
  7. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  8. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  9. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  10. package/dist/core/upstream-evidence-manifest.js +67 -21
  11. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  12. package/package.json +5 -5
  13. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  14. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  15. package/plugins/lisa/.codex-plugin/scripts/operator-id-kinds.mjs +17 -4
  16. package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +62 -5
  17. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  18. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +23 -7
  19. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +1 -1
  20. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  21. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  22. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  23. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  24. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  25. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +26 -0
  26. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  27. package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/SKILL.md +7 -3
  28. package/plugins/lisa/rules/reference/config-resolution.md +3 -2
  29. package/plugins/lisa/scripts/operator-id-kinds.mjs +17 -4
  30. package/plugins/lisa/scripts/ready-queue-order.mjs +62 -5
  31. package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  32. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +23 -7
  33. package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +1 -1
  34. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  35. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  36. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  37. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  38. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  39. package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +26 -0
  40. package/plugins/lisa/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  41. package/plugins/lisa/skills/lisa-setup-session-manager/SKILL.md +7 -3
  42. package/plugins/lisa-agy/plugin.json +1 -1
  43. package/plugins/lisa-agy/scripts/operator-id-kinds.mjs +17 -4
  44. package/plugins/lisa-agy/scripts/ready-queue-order.mjs +62 -5
  45. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  46. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +23 -7
  47. package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +1 -1
  48. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  49. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  50. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  51. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  52. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  53. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +26 -0
  54. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  55. package/plugins/lisa-agy/skills/lisa-setup-session-manager/SKILL.md +7 -3
  56. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  58. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  59. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  63. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-copilot/rules/reference/config-resolution.md +3 -2
  65. package/plugins/lisa-copilot/scripts/operator-id-kinds.mjs +17 -4
  66. package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +62 -5
  67. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  68. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +23 -7
  69. package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +1 -1
  70. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  71. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  72. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  73. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  74. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  75. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +26 -0
  76. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  77. package/plugins/lisa-copilot/skills/lisa-setup-session-manager/SKILL.md +7 -3
  78. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +3 -2
  80. package/plugins/lisa-cursor/scripts/operator-id-kinds.mjs +17 -4
  81. package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +62 -5
  82. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  83. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +23 -7
  84. package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +1 -1
  85. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  86. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  87. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  88. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  89. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  90. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +26 -0
  91. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  92. package/plugins/lisa-cursor/skills/lisa-setup-session-manager/SKILL.md +7 -3
  93. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  94. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  95. package/plugins/lisa-devin/rules/reference/config-resolution.md +3 -2
  96. package/plugins/lisa-devin/scripts/operator-id-kinds.mjs +17 -4
  97. package/plugins/lisa-devin/scripts/ready-queue-order.mjs +62 -5
  98. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  99. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +23 -7
  100. package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +1 -1
  101. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  102. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  103. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  104. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  105. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  106. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +26 -0
  107. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  108. package/plugins/lisa-devin/skills/lisa-setup-session-manager/SKILL.md +7 -3
  109. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  111. package/plugins/lisa-expo-agy/plugin.json +1 -1
  112. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  114. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  115. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  116. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  118. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  119. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  120. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  121. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  122. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  123. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  125. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  126. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  127. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  128. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  129. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  130. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  132. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  133. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  134. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  135. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  136. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  137. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  138. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  139. package/plugins/lisa-rails-agy/plugin.json +1 -1
  140. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  141. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  142. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  143. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  144. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  145. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  146. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  147. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  148. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  149. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  150. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  151. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  152. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  153. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  154. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  155. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  156. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  157. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  158. package/plugins/src/base/rules/reference/config-resolution.md +3 -2
  159. package/plugins/src/base/scripts/operator-id-kinds.mjs +17 -4
  160. package/plugins/src/base/scripts/ready-queue-order.mjs +62 -5
  161. package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  162. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +23 -7
  163. package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +1 -1
  164. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  165. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  166. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  167. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  168. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  169. package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +26 -0
  170. package/plugins/src/base/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  171. package/plugins/src/base/skills/lisa-setup-session-manager/SKILL.md +7 -3
  172. package/rails/copy-overwrite/scripts/lisa-rails-gates.mjs +6 -0
  173. package/scripts/check-shell-guard-refusal-coverage.mjs +10 -0
  174. package/scripts/check-test-files-executed.mjs +149 -0
  175. package/scripts/lib/nightly-slow-suites.mjs +58 -0
  176. package/scripts/plan-integration-shards.mjs +12 -3
@@ -0,0 +1,149 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Proves every NAMED test file ran and passed, from a vitest JSON report.
4
+ *
5
+ * The file-level sibling of `scripts/check-test-case-executed.mjs`, written for
6
+ * the nightly slow-test lane (CodySwannGT/lisa#4896). That lane runs files the
7
+ * rest of the suite excludes, and an excluded, moved or renamed file is not a
8
+ * failure to Vitest: it is simply absent, and an absent file reports green. So
9
+ * a green run proves nothing until each file is shown to be in the report,
10
+ * with a passing status and at least one passing case.
11
+ *
12
+ * Vitest's JSON report names each file by its ABSOLUTE path in
13
+ * `testResults[].name`; this script compares repository-relative paths against
14
+ * `--root` (default: the working directory).
15
+ *
16
+ * ## Usage
17
+ *
18
+ * node scripts/check-test-files-executed.mjs --report <report.json> \
19
+ * [--root <dir>] (--list <module.mjs>#<export> | --file <path> ...)
20
+ *
21
+ * `--list` reads the file list from a module's named export, so the nightly
22
+ * lane can check the same list `vitest.config.local.ts` excludes without
23
+ * restating it.
24
+ *
25
+ * Exit 0 only when every file ran and passed; otherwise exit 1 naming each
26
+ * file and why.
27
+ * @module scripts/check-test-files-executed
28
+ */
29
+ import { readFileSync } from "node:fs";
30
+ import * as path from "node:path";
31
+ import { pathToFileURL } from "node:url";
32
+
33
+ import { invokedAsScript } from "./lib/invoked-as-script.mjs";
34
+
35
+ /**
36
+ * Parse the arguments.
37
+ * @param {readonly string[]} argv - Arguments after the script path
38
+ * @returns {{ report: string, root: string, files: string[], list?: string }} Invocation
39
+ */
40
+ export function parseArguments(argv) {
41
+ const files = [];
42
+ let report;
43
+ let root = process.cwd();
44
+ let list;
45
+ for (let index = 0; index < argv.length; index += 2) {
46
+ const flag = argv[index];
47
+ const value = argv[index + 1];
48
+ if (!["--report", "--root", "--file", "--list"].includes(String(flag)))
49
+ throw new Error(`Unknown argument: ${String(flag)}`);
50
+ if (value === undefined || value.startsWith("--"))
51
+ throw new Error(`${flag} requires a value`);
52
+ if (flag === "--report") report = value;
53
+ else if (flag === "--root") root = value;
54
+ else if (flag === "--list") list = value;
55
+ else files.push(value);
56
+ }
57
+ if (report === undefined) throw new Error("--report is required");
58
+ if (files.length === 0 && list === undefined)
59
+ throw new Error("Name the files with --file or --list");
60
+ return { report, root, files, ...(list === undefined ? {} : { list }) };
61
+ }
62
+
63
+ /**
64
+ * Each named file that did not run and pass, with the reason.
65
+ * @param {unknown} report - A parsed vitest JSON report
66
+ * @param {readonly string[]} files - Repository-relative paths that must have run
67
+ * @param {string} root - Directory the paths are relative to
68
+ * @returns {string[]} Failures, empty when every file ran and passed
69
+ */
70
+ export function unexecutedFiles(report, files, root) {
71
+ const results = Array.isArray(report?.testResults) ? report.testResults : [];
72
+ const byFile = new Map(
73
+ results.map(result => [
74
+ path.relative(root, String(result?.name)).split(path.sep).join("/"),
75
+ result,
76
+ ])
77
+ );
78
+ return files.flatMap(file => {
79
+ const result = byFile.get(file);
80
+ if (result === undefined)
81
+ return [
82
+ `${file} is ABSENT from the report — it was excluded, moved, or renamed, so nothing ran it.`,
83
+ ];
84
+ if (result.status !== "passed")
85
+ return [`${file} did not pass: the runner reported "${result.status}".`];
86
+ const cases = Array.isArray(result.assertionResults)
87
+ ? result.assertionResults
88
+ : [];
89
+ if (!cases.some(entry => entry?.status === "passed"))
90
+ return [
91
+ `${file} passed with no passing case — every case was skipped, so it proves nothing.`,
92
+ ];
93
+ return [];
94
+ });
95
+ }
96
+
97
+ /**
98
+ * Resolve `--list <module>#<export>` to the file list it names.
99
+ * @param {string} spec - Module path, `#`, export name
100
+ * @param {string} root - Directory a relative module path resolves against
101
+ * @returns {Promise<string[]>} Repository-relative paths
102
+ */
103
+ async function listFrom(spec, root) {
104
+ const [modulePath = "", exportName = ""] = spec.split("#");
105
+ const loaded = await import(
106
+ pathToFileURL(path.resolve(root, modulePath)).href
107
+ );
108
+ const value = loaded[exportName];
109
+ if (!Array.isArray(value) || value.length === 0)
110
+ throw new Error(`${spec} is not a non-empty list of files`);
111
+ return value.map(String);
112
+ }
113
+
114
+ /**
115
+ * CLI entry.
116
+ * @param {readonly string[]} argv - Arguments after the script path
117
+ * @returns {Promise<string[]>} Failures, empty when every file ran and passed
118
+ */
119
+ export async function checkTestFilesExecuted(argv) {
120
+ const options = parseArguments(argv);
121
+ const files = [
122
+ ...options.files,
123
+ ...(options.list === undefined
124
+ ? []
125
+ : await listFrom(options.list, options.root)),
126
+ ];
127
+ const report = JSON.parse(readFileSync(options.report, "utf8"));
128
+ const failures = unexecutedFiles(report, files, options.root);
129
+ for (const file of files)
130
+ if (!failures.some(failure => failure.startsWith(`${file} `)))
131
+ process.stdout.write(`RAN ${file}\n`);
132
+ return failures;
133
+ }
134
+
135
+ if (invokedAsScript(import.meta.url)) {
136
+ try {
137
+ const failures = await checkTestFilesExecuted(process.argv.slice(2));
138
+ for (const failure of failures)
139
+ process.stdout.write(
140
+ `::error title=Nightly test file did not run and pass::${failure}\n`
141
+ );
142
+ process.exit(failures.length === 0 ? 0 : 1);
143
+ } catch (error) {
144
+ process.stderr.write(
145
+ `${error instanceof Error ? error.message : String(error)}\n`
146
+ );
147
+ process.exit(1);
148
+ }
149
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * The test files that run only on the nightly lane (CodySwannGT/lisa#4896).
3
+ *
4
+ * A 2026-11-14 audit set each test file's CI runtime against 71 days of CI
5
+ * catch history. These six cost about 380 s per run between them and caught
6
+ * nothing confirmed in that window, so they leave every pull-request and push
7
+ * path and run once a night in `.github/workflows/nightly-slow-tests.yml`
8
+ * instead. Nothing about what they assert changes; only when they run does.
9
+ *
10
+ * ONE list, read by everything that decides a file set:
11
+ *
12
+ * - `vitest.config.local.ts` excludes them from every run, so every package
13
+ * script (`test`, `test:unit`, `test:cov:unit`, `test:cov:unit:push`,
14
+ * `test:integration`, `test:integration:push`) and every CI shard leg drops
15
+ * them without a flag of its own to keep in step.
16
+ * - `scripts/plan-integration-shards.mjs` leaves them out of the plan, so a
17
+ * leg is not weighed for files it will not run.
18
+ * - The nightly workflow sets {@link NIGHTLY_SLOW_SUITES_ENV} and names exactly
19
+ * these files; `tests/unit/config/nightly-slow-suites.test.ts` pins that the
20
+ * names match this list.
21
+ *
22
+ * Paths are exact repository-relative paths, never any-directory basename globs:
23
+ * `history-secret-private-report.test.ts` also names a cheap UNIT suite under
24
+ * `tests/unit/scripts/`, which must keep running on every pull request.
25
+ *
26
+ * To run one by hand, set the variable: `LISA_NIGHTLY_SLOW_SUITES=run bun run
27
+ * lisa-test-run -- --adapter vitest -- vitest run <file>`. Without it Vitest
28
+ * answers "No test files found", because the file is excluded.
29
+ * @module nightly-slow-suites
30
+ */
31
+
32
+ /** Repository-relative paths of the nightly-only suites. */
33
+ export const NIGHTLY_SLOW_SUITES = Object.freeze([
34
+ "tests/unit/config/test-run-supervision-wiring.test.ts",
35
+ "tests/integration/mutation-gate-bite.test.ts",
36
+ "tests/integration/history-secret-evidence.test.ts",
37
+ "tests/integration/history-secret-private-report.test.ts",
38
+ "tests/integration/vitest-nodenext-local-config.test.ts",
39
+ "tests/integration/staged-module-formatting.test.ts",
40
+ ]);
41
+
42
+ /** The variable that lifts the exclusion, set by the nightly lane. */
43
+ export const NIGHTLY_SLOW_SUITES_ENV = "LISA_NIGHTLY_SLOW_SUITES";
44
+
45
+ /** The one value of {@link NIGHTLY_SLOW_SUITES_ENV} that lifts it. */
46
+ export const NIGHTLY_SLOW_SUITES_RUN = "run";
47
+
48
+ /**
49
+ * The Vitest `exclude` entries for this run: the nightly list, unless the
50
+ * environment asks for those suites to run.
51
+ * @param {Readonly<Record<string, string | undefined>>} env - Environment
52
+ * @returns {string[]} Exclusion patterns (exact paths)
53
+ */
54
+ export function nightlySlowSuiteExclusions(env) {
55
+ return env[NIGHTLY_SLOW_SUITES_ENV] === NIGHTLY_SLOW_SUITES_RUN
56
+ ? []
57
+ : [...NIGHTLY_SLOW_SUITES];
58
+ }
@@ -11,6 +11,9 @@
11
11
  * the plan every leg applies through `lisa-test-run` (`LISA_TEST_SHARD_PLAN`,
12
12
  * `src/cli/lisa-test-run-shard-files.ts`).
13
13
  *
14
+ * The nightly-only suites (`scripts/lib/nightly-slow-suites.mjs`) are left
15
+ * out: the shared Vitest config excludes them from every leg.
16
+ *
14
17
  * The history-scanner suites are one item, so they land in one leg and a
15
18
  * sharded run downloads the pinned scanner at most once: their project's
16
19
  * global setup runs only in an invocation whose selection holds one of them.
@@ -34,6 +37,7 @@ import * as path from "node:path";
34
37
 
35
38
  import { HISTORY_SCANNER_SUITES } from "./lib/history-scanner-suites.mjs";
36
39
  import { invokedAsScript } from "./lib/invoked-as-script.mjs";
40
+ import { NIGHTLY_SLOW_SUITES } from "./lib/nightly-slow-suites.mjs";
37
41
  import { collectTimings } from "./test-timing-report.mjs";
38
42
 
39
43
  /** The schema token `lisa-test-run` requires of a plan. */
@@ -261,12 +265,17 @@ export function main(argv, deps) {
261
265
  return 2;
262
266
  }
263
267
  const read = readTimings(options, deps);
264
- // A file deleted since the timings were recorded would only skew the loads.
265
- const timings = read.timings.filter(entry => deps.exists(entry.file));
268
+ // A file deleted since the timings were recorded would only skew the loads,
269
+ // and so would a nightly-only suite the shared Vitest config excludes from
270
+ // every pull-request run (CodySwannGT/lisa#4896).
271
+ const nightlyOnly = new Set(NIGHTLY_SLOW_SUITES);
272
+ const timings = read.timings.filter(
273
+ entry => deps.exists(entry.file) && !nightlyOnly.has(entry.file)
274
+ );
266
275
  const plan = planShards({
267
276
  total: options.shards,
268
277
  timings,
269
- groups: [[...HISTORY_SCANNER_SUITES]],
278
+ groups: [HISTORY_SCANNER_SUITES.filter(suite => !nightlyOnly.has(suite))],
270
279
  });
271
280
  if (timings.length === 0) {
272
281
  deps.out(