@codyswann/lisa 4.98.0 → 4.98.1
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/dist/cli/doctor-coderabbit.d.ts +3 -3
- package/dist/cli/doctor-coderabbit.d.ts.map +1 -1
- package/dist/cli/doctor-coderabbit.js +107 -34
- package/dist/cli/doctor-coderabbit.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 +3 -2
- 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-agy/plugin.json +1 -1
- 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-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- 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-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-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/scripts/check-phrase-manifest-parity.mjs +36 -14
- package/scripts/lib/phrase-tests/parity.mjs +16 -3
|
@@ -3,14 +3,19 @@
|
|
|
3
3
|
* Prove the required-phrases manifest carries every phrase assertion of the
|
|
4
4
|
* test files it replaced (CodySwannGT/lisa#4609).
|
|
5
5
|
*
|
|
6
|
-
* For every test file present at `--base` but gone
|
|
6
|
+
* For every test file present at `--base` but gone at `--head` (default
|
|
7
|
+
* `HEAD`), the file and
|
|
7
8
|
* its helpers are read from the base commit (`git show`), classified, and the
|
|
8
9
|
* phrase-only ones are re-run under the recording runner. Their deduped
|
|
9
10
|
* (file, polarity, kind, value) assertions must all be in
|
|
10
11
|
* `tests/phrase-manifest/required-phrases.json`, and the deleted phrase-only
|
|
11
12
|
* files must be exactly the test files the manifest's `source` entries name.
|
|
12
13
|
* The full list of failure conditions is in `lib/phrase-tests/parity.mjs`;
|
|
13
|
-
* in particular a
|
|
14
|
+
* in particular a range that deletes nothing FAILS rather than passing empty.
|
|
15
|
+
*
|
|
16
|
+
* The range must be the fold's own commit. Comparing the base with today's
|
|
17
|
+
* HEAD would count every test file main deletes later, for unrelated reasons,
|
|
18
|
+
* as a fold deletion that is "not phrase-only".
|
|
14
19
|
*
|
|
15
20
|
* It replays the base's tests against the CURRENT tree's text files, so it is
|
|
16
21
|
* a merge-time proof of the fold. After later wording edits (which change the
|
|
@@ -18,8 +23,8 @@
|
|
|
18
23
|
* on the current tree" — that is expected, not a regression of the manifest.
|
|
19
24
|
*
|
|
20
25
|
* Usage:
|
|
21
|
-
* node scripts/check-phrase-manifest-parity.mjs --base <ref> [--exact]
|
|
22
|
-
* `bun run check:phrase-manifest-parity`
|
|
26
|
+
* node scripts/check-phrase-manifest-parity.mjs --base <ref> [--head <ref>] [--exact]
|
|
27
|
+
* `bun run check:phrase-manifest-parity` pins the fold commit as the range.
|
|
23
28
|
* @module scripts/check-phrase-manifest-parity
|
|
24
29
|
*/
|
|
25
30
|
import { readFileSync } from "node:fs";
|
|
@@ -30,7 +35,10 @@ import {
|
|
|
30
35
|
MANIFEST_PATH,
|
|
31
36
|
manifestEntries,
|
|
32
37
|
} from "./lib/phrase-tests/manifest.mjs";
|
|
33
|
-
import {
|
|
38
|
+
import {
|
|
39
|
+
deletedTestFiles,
|
|
40
|
+
parityFailures,
|
|
41
|
+
} from "./lib/phrase-tests/parity.mjs";
|
|
34
42
|
import {
|
|
35
43
|
commitReader,
|
|
36
44
|
REPO_ROOT,
|
|
@@ -38,13 +46,23 @@ import {
|
|
|
38
46
|
} from "./lib/phrase-tests/repo.mjs";
|
|
39
47
|
|
|
40
48
|
const argv = process.argv.slice(2);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The value of the last occurrence of a flag, so a flag appended to
|
|
52
|
+
* `bun run check:phrase-manifest-parity` overrides the package script's.
|
|
53
|
+
* @param {string} name - Flag name, e.g. `--base`.
|
|
54
|
+
* @returns {string | undefined} Its value, or undefined when absent.
|
|
55
|
+
*/
|
|
56
|
+
function flag(name) {
|
|
57
|
+
const index = argv.lastIndexOf(name);
|
|
58
|
+
return index === -1 ? undefined : argv[index + 1];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const base = flag("--base");
|
|
62
|
+
const head = flag("--head") ?? "HEAD";
|
|
63
|
+
if (base === undefined || base.startsWith("--") || head.startsWith("--")) {
|
|
46
64
|
console.error(
|
|
47
|
-
"usage: check-phrase-manifest-parity.mjs --base <ref> [--exact]"
|
|
65
|
+
"usage: check-phrase-manifest-parity.mjs --base <ref> [--head <ref>] [--exact]"
|
|
48
66
|
);
|
|
49
67
|
process.exit(2);
|
|
50
68
|
}
|
|
@@ -52,8 +70,10 @@ if (base === undefined || base.startsWith("--")) {
|
|
|
52
70
|
// Phrase tests resolve relative paths against the cwd, as vitest runs them.
|
|
53
71
|
process.chdir(REPO_ROOT);
|
|
54
72
|
|
|
55
|
-
const
|
|
56
|
-
|
|
73
|
+
const deleted = deletedTestFiles(
|
|
74
|
+
testFilesAt(REPO_ROOT, base),
|
|
75
|
+
testFilesAt(REPO_ROOT, head)
|
|
76
|
+
);
|
|
57
77
|
const fold = await foldPhraseTests(deleted, {
|
|
58
78
|
root: REPO_ROOT,
|
|
59
79
|
readSource: commitReader(REPO_ROOT, base),
|
|
@@ -62,7 +82,9 @@ const manifest = JSON.parse(
|
|
|
62
82
|
readFileSync(path.join(REPO_ROOT, MANIFEST_PATH), "utf8")
|
|
63
83
|
);
|
|
64
84
|
|
|
65
|
-
console.log(
|
|
85
|
+
console.log(
|
|
86
|
+
`${base}..${head}: ${deleted.length} test file(s) deleted by the range`
|
|
87
|
+
);
|
|
66
88
|
console.log(` phrase-only: ${fold.recordings.length}`);
|
|
67
89
|
console.log(` not phrase-only: ${deleted.length - fold.recordings.length}`);
|
|
68
90
|
console.log(
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* separate from the CLI so every way it can fail is unit-tested.
|
|
4
4
|
*
|
|
5
5
|
* The check must never pass vacuously. It fails when:
|
|
6
|
-
* - the
|
|
6
|
+
* - the range deletes no test file at all (a range that is not the fold
|
|
7
7
|
* proves nothing);
|
|
8
8
|
* - a deleted test file was not phrase-only, or was phrase-only but not
|
|
9
9
|
* fully translatable (it should have been kept);
|
|
@@ -25,10 +25,23 @@ function minus(left, right) {
|
|
|
25
25
|
return [...left].filter(item => !right.has(item)).sort();
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* The test files a range deletes: present at its base, gone at its head.
|
|
30
|
+
*
|
|
31
|
+
* The range is the fold's own commit, not "base to today", so a test file
|
|
32
|
+
* deleted later on main (by unrelated work) is never counted against the fold.
|
|
33
|
+
* @param {readonly string[]} atBase - Test files at the range's base.
|
|
34
|
+
* @param {readonly string[]} atHead - Test files at the range's head.
|
|
35
|
+
* @returns {string[]} The deleted test files, sorted.
|
|
36
|
+
*/
|
|
37
|
+
export function deletedTestFiles(atBase, atHead) {
|
|
38
|
+
return minus(atBase, new Set(atHead));
|
|
39
|
+
}
|
|
40
|
+
|
|
28
41
|
/**
|
|
29
42
|
* Every way the fold fails to match the manifest.
|
|
30
43
|
* @param {object} input - What to compare.
|
|
31
|
-
* @param {readonly string[]} input.deleted - Test files at the base but not at
|
|
44
|
+
* @param {readonly string[]} input.deleted - Test files at the base but not at the head.
|
|
32
45
|
* @param {import("./fold.mjs").Fold} input.fold - Their classification and recording.
|
|
33
46
|
* @param {import("./manifest.mjs").Manifest} input.manifest - The manifest.
|
|
34
47
|
* @param {boolean} input.exact - Also fail on manifest entries no deleted file asserted.
|
|
@@ -45,7 +58,7 @@ export function parityFailures({ deleted, fold, manifest, exact }) {
|
|
|
45
58
|
return [
|
|
46
59
|
...(deleted.length === 0
|
|
47
60
|
? [
|
|
48
|
-
`no test file is deleted between the base and
|
|
61
|
+
`no test file is deleted between the base and the head, so nothing is proved; use the commit before the fold as --base and the fold as --head (the manifest came from ${[...sources].sort().slice(0, 3).join(", ")}${sources.size > 3 ? ", ..." : ""})`,
|
|
49
62
|
]
|
|
50
63
|
: []),
|
|
51
64
|
...minus(deleted, recorded).map(
|