@codyswann/lisa 4.23.38 → 4.24.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/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +8 -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/nightly-e2e-guard-behavior-certificate.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +18 -6
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/expo/copy-overwrite/scripts/check-e2e-coverage.mjs +97 -11
- package/expo/copy-overwrite/scripts/classify-maestro-failures.mjs +535 -47
- package/expo/create-only/.maestro/flake-classification.json +6 -0
- package/package.json +3 -3
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-validate-tracker-mapping/SKILL.md +111 -1
- package/plugins/lisa/scripts/scoping-label-audit.mjs +474 -0
- package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-validate-tracker-mapping/SKILL.md +112 -2
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/scoping-label-audit.mjs +474 -0
- package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-validate-tracker-mapping/SKILL.md +112 -2
- 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-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/scripts/scoping-label-audit.mjs +474 -0
- package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-validate-tracker-mapping/SKILL.md +112 -2
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/scripts/scoping-label-audit.mjs +474 -0
- package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-validate-tracker-mapping/SKILL.md +112 -2
- 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-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-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-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-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-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-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-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/src/base/scripts/scoping-label-audit.mjs +474 -0
- package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-validate-tracker-mapping/SKILL.md +112 -2
- package/typescript/copy-contents/.husky/pre-push +76 -0
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
* or flow that reaches a screen by tapping rather than deep-linking can declare
|
|
19
19
|
* it with an `e2e-route: /path` comment annotation (JS/TS or YAML comment).
|
|
20
20
|
*
|
|
21
|
+
* Coverage is inferred from source text, so a navigation the source does not
|
|
22
|
+
* spell out is not coverage this gate can see. It is credited to nothing and
|
|
23
|
+
* PRINTED as an unmatched navigation — never guessed at. An unresolved template
|
|
24
|
+
* hole is the sharpest case: `${...}` matches a route's dynamic segment, which
|
|
25
|
+
* accepts any value anyway, and nothing else. See `routeMatchesVisit`.
|
|
26
|
+
*
|
|
21
27
|
* Thresholds default to 80% per runner and are project-tunable via
|
|
22
28
|
* `e2e.thresholds.json` (create-only, same convention as vitest.thresholds.json):
|
|
23
29
|
* { "playwright": { "routes": 80 }, "maestro": { "routes": 80 } }
|
|
@@ -178,9 +184,30 @@ export function extractMaestroPaths(source) {
|
|
|
178
184
|
}
|
|
179
185
|
|
|
180
186
|
/**
|
|
181
|
-
* Does a visited path satisfy a route? Dynamic segments (`[id]`) match any
|
|
182
|
-
*
|
|
183
|
-
*
|
|
187
|
+
* Does a visited path satisfy a route? Dynamic segments (`[id]`) match any one
|
|
188
|
+
* segment and catch-alls (`[...rest]`) match one or more.
|
|
189
|
+
*
|
|
190
|
+
* A template hole (`${...}`) in the VISITED path is deliberately NOT a
|
|
191
|
+
* wildcard. It used to be, and the direction of that rule was backwards: an
|
|
192
|
+
* unresolved interpolation is the case where the gate knows LEAST about what
|
|
193
|
+
* the spec visits, and it was the case that credited the MOST. A 404 spec
|
|
194
|
+
* navigating to `` page.goto(`${UNKNOWN_PATH}-first`) `` — a URL chosen
|
|
195
|
+
* precisely because nothing serves it — was therefore credited with every
|
|
196
|
+
* single-segment route in the app. Measured in one consumer: nine routes,
|
|
197
|
+
* `/watchlist` and `/shadow-team` among them, credited to a test that proves
|
|
198
|
+
* the 404 screen renders.
|
|
199
|
+
*
|
|
200
|
+
* An interpolated segment still matches a route's DYNAMIC segment, because
|
|
201
|
+
* `[id]` matches any value including an unknown one — `/players/${playerId}`
|
|
202
|
+
* still covers `/players/[id]`. What it no longer does is match a route's
|
|
203
|
+
* LITERAL segment, where the resolved value would have had to be that exact
|
|
204
|
+
* word for the visit to be real.
|
|
205
|
+
*
|
|
206
|
+
* A visit that consequently matches nothing is listed by `unmatchedVisits` and
|
|
207
|
+
* printed every run, so the credit this removes shows up as a named diagnostic
|
|
208
|
+
* rather than as a number that quietly got smaller. A spec that genuinely
|
|
209
|
+
* reaches a screen by a path this gate cannot resolve declares it with an
|
|
210
|
+
* `e2e-route: /path` annotation.
|
|
184
211
|
* @param {string} route - Enumerated route (e.g. "/profile/[id]")
|
|
185
212
|
* @param {string} visited - Normalized visited path (e.g. "/profile/42")
|
|
186
213
|
* @returns {boolean} Whether the visit covers the route
|
|
@@ -199,16 +226,54 @@ export function routeMatchesVisit(route, visited) {
|
|
|
199
226
|
if (visitedIndex === visitedSegments.length) {
|
|
200
227
|
return false;
|
|
201
228
|
}
|
|
202
|
-
const visitedSegment = visitedSegments[visitedIndex];
|
|
203
229
|
const segmentMatches =
|
|
204
|
-
/^\[.*\]$/.test(segment) ||
|
|
205
|
-
visitedSegment.includes("${") ||
|
|
206
|
-
segment === visitedSegment;
|
|
230
|
+
/^\[.*\]$/.test(segment) || segment === visitedSegments[visitedIndex];
|
|
207
231
|
return segmentMatches && isCovered(routeIndex + 1, visitedIndex + 1);
|
|
208
232
|
};
|
|
209
233
|
return isCovered(0, 0);
|
|
210
234
|
}
|
|
211
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Visits that credited no route at all, with the file each came from.
|
|
238
|
+
*
|
|
239
|
+
* Removing the `${` wildcard makes a whole class of visit stop counting, and a
|
|
240
|
+
* matcher that silently discards its non-matches is the same defect wearing the
|
|
241
|
+
* opposite sign: the number would just be smaller, with nothing saying why. So
|
|
242
|
+
* every visit that matches nothing is named — an unresolved interpolation, a
|
|
243
|
+
* typo'd path, a route that was renamed out from under a spec. All three read
|
|
244
|
+
* identically in a coverage percentage and differently in this list.
|
|
245
|
+
*
|
|
246
|
+
* This is diagnostic, not a gate. An unmatched visit is often correct (a spec
|
|
247
|
+
* navigating to a 404 on purpose), so failing on one would punish the very test
|
|
248
|
+
* this defect was found in. The gate still fails on the coverage number; this
|
|
249
|
+
* explains the number.
|
|
250
|
+
* @param {object} input - Matching input
|
|
251
|
+
* @param {string[]} input.routes - Enumerated app routes (after exemptions)
|
|
252
|
+
* @param {{path: string, file: string}[]} input.visits - Visits with provenance
|
|
253
|
+
* @returns {{path: string, files: string[]}[]} Unmatched visits, sorted
|
|
254
|
+
*/
|
|
255
|
+
export function unmatchedVisits({ routes, visits }) {
|
|
256
|
+
const byPath = new Map();
|
|
257
|
+
for (const visit of visits) {
|
|
258
|
+
if (routes.some(route => routeMatchesVisit(route, visit.path))) {
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
byPath.set(
|
|
262
|
+
visit.path,
|
|
263
|
+
(byPath.get(visit.path) ?? new Set()).add(visit.file)
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
// Code-unit comparator, matching enumerateRoutes: output order must be
|
|
267
|
+
// reproducible across environments regardless of the runtime's ICU locale.
|
|
268
|
+
const byCodeUnit = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
269
|
+
return [...byPath.entries()]
|
|
270
|
+
.map(([visitedPath, files]) => ({
|
|
271
|
+
path: visitedPath,
|
|
272
|
+
files: [...files].sort(byCodeUnit),
|
|
273
|
+
}))
|
|
274
|
+
.sort((a, b) => byCodeUnit(a.path, b.path));
|
|
275
|
+
}
|
|
276
|
+
|
|
212
277
|
/**
|
|
213
278
|
* Merge project threshold overrides over the defaults, per runner.
|
|
214
279
|
* @param {typeof defaultThresholds} defaults - Baseline thresholds
|
|
@@ -491,12 +556,16 @@ function listFiles(directory) {
|
|
|
491
556
|
|
|
492
557
|
/**
|
|
493
558
|
* Read every matching file under the given directories and extract paths.
|
|
559
|
+
*
|
|
560
|
+
* Each visit keeps the file it came from. Provenance is what lets an unmatched
|
|
561
|
+
* visit be reported as something an author can act on rather than as an
|
|
562
|
+
* anonymous path, and it costs one field.
|
|
494
563
|
* @param {object} input - Extraction input
|
|
495
564
|
* @param {string} input.root - Project root
|
|
496
565
|
* @param {string[]} input.directories - Candidate directories to scan
|
|
497
566
|
* @param {RegExp} input.filePattern - Which files to read
|
|
498
567
|
* @param {(source: string) => string[]} input.extract - Path extractor
|
|
499
|
-
* @returns {string[]}
|
|
568
|
+
* @returns {{visited: string[], visits: {path: string, file: string}[], read: string[], skipped: string[]}} Collected paths
|
|
500
569
|
*/
|
|
501
570
|
function collectVisitedPaths({
|
|
502
571
|
root,
|
|
@@ -507,7 +576,7 @@ function collectVisitedPaths({
|
|
|
507
576
|
}) {
|
|
508
577
|
const read = [];
|
|
509
578
|
const skipped = [];
|
|
510
|
-
const
|
|
579
|
+
const visits = directories.flatMap(directory => {
|
|
511
580
|
const absolute = path.join(root, directory);
|
|
512
581
|
return listFiles(absolute)
|
|
513
582
|
.filter(file => filePattern.test(file))
|
|
@@ -520,10 +589,13 @@ function collectVisitedPaths({
|
|
|
520
589
|
return [];
|
|
521
590
|
}
|
|
522
591
|
read.push(`${directory}/${file}`);
|
|
523
|
-
return extract(source)
|
|
592
|
+
return extract(source).map(visitedPath => ({
|
|
593
|
+
path: visitedPath,
|
|
594
|
+
file: `${directory}/${file}`,
|
|
595
|
+
}));
|
|
524
596
|
});
|
|
525
597
|
});
|
|
526
|
-
return { visited, read, skipped };
|
|
598
|
+
return { visited: visits.map(visit => visit.path), visits, read, skipped };
|
|
527
599
|
}
|
|
528
600
|
|
|
529
601
|
/**
|
|
@@ -639,6 +711,20 @@ function main() {
|
|
|
639
711
|
thresholds,
|
|
640
712
|
});
|
|
641
713
|
|
|
714
|
+
for (const [runner, collected] of [
|
|
715
|
+
["playwright", playwright],
|
|
716
|
+
["maestro", maestro],
|
|
717
|
+
]) {
|
|
718
|
+
const unmatched = unmatchedVisits({ routes, visits: collected.visits });
|
|
719
|
+
if (unmatched.length > 0) {
|
|
720
|
+
console.log(
|
|
721
|
+
`[e2e-coverage] ${runner}: ${unmatched.length} navigation(s) matched no route and credited nothing. An unresolved \`\${...}\` hole, a typo, or a renamed screen all look like this — declare a real one with an \`e2e-route: /path\` comment:\n${unmatched
|
|
722
|
+
.map(visit => ` - ${visit.path} (${visit.files.join(", ")})`)
|
|
723
|
+
.join("\n")}`
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
642
728
|
for (const [runner, verdict] of Object.entries(result.runners)) {
|
|
643
729
|
const summary = `${verdict.covered}/${verdict.total} routes (${verdict.percentage.toFixed(1)}% vs ${verdict.threshold}% required)`;
|
|
644
730
|
if (verdict.threshold === 0) {
|