@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.
- package/all/copy-overwrite/scripts/lib/push-timing.mjs +135 -9
- package/all/copy-overwrite/scripts/lisa-push-timing-report.mjs +58 -4
- package/all/copy-overwrite/scripts/lisa-run-gates.mjs +13 -1
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +2 -2
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +18 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +67 -21
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +5 -5
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa/rules/reference/config-resolution.md +3 -2
- package/plugins/lisa/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-agy/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-agy/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +3 -2
- package/plugins/lisa-copilot/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-copilot/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +3 -2
- package/plugins/lisa-cursor/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-cursor/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/rules/reference/config-resolution.md +3 -2
- package/plugins/lisa-devin/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-devin/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-devin/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/rules/reference/config-resolution.md +3 -2
- package/plugins/src/base/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/src/base/scripts/ready-queue-order.mjs +62 -5
- package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/src/base/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/rails/copy-overwrite/scripts/lisa-rails-gates.mjs +6 -0
- package/scripts/check-shell-guard-refusal-coverage.mjs +10 -0
- package/scripts/check-test-files-executed.mjs +149 -0
- package/scripts/lib/nightly-slow-suites.mjs +58 -0
- 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
|
-
|
|
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: [
|
|
278
|
+
groups: [HISTORY_SCANNER_SUITES.filter(suite => !nightlyOnly.has(suite))],
|
|
270
279
|
});
|
|
271
280
|
if (timings.length === 0) {
|
|
272
281
|
deps.out(
|