@codyswann/lisa 2.205.1 → 2.207.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/sync/registry.d.ts.map +1 -1
- package/dist/sync/registry.js +6 -0
- package/dist/sync/registry.js.map +1 -1
- package/expo/copy-overwrite/scripts/check-e2e-coverage.mjs +374 -0
- package/expo/create-only/e2e.thresholds.json +8 -0
- package/package.json +1 -1
- 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-verify-workflow-change/SKILL.md +154 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-verify-workflow-change/agents/openai.yaml +4 -0
- package/plugins/lisa/commands/verify-workflow-change.md +6 -0
- package/plugins/lisa/skills/lisa-verify-workflow-change/SKILL.md +154 -0
- package/plugins/lisa/skills/lisa-verify-workflow-change/agents/openai.yaml +4 -0
- package/plugins/lisa-agy/commands/lisa/verify-workflow-change.md +6 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-verify-workflow-change/SKILL.md +154 -0
- 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/commands/lisa/verify-workflow-change.md +6 -0
- package/plugins/lisa-copilot/skills/lisa-verify-workflow-change/SKILL.md +154 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/commands/lisa/verify-workflow-change.md +6 -0
- package/plugins/lisa-cursor/skills/lisa-verify-workflow-change/SKILL.md +154 -0
- 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/commands/verify-workflow-change.md +6 -0
- package/plugins/src/base/skills/lisa-verify-workflow-change/SKILL.md +154 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sync/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC,uEAAuE;IACvE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAChD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,sDAAsD;IACtD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;A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AC5B;AAoCD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAgIjD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EA0C/C,CAAC"}
|
package/dist/sync/registry.js
CHANGED
|
@@ -49,6 +49,12 @@ export const SYNC_REGISTRY = [
|
|
|
49
49
|
],
|
|
50
50
|
description: "Test coverage floors (statements/branches/functions/lines)",
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
key: "quality.e2eCoverage",
|
|
54
|
+
defaultValue: { playwright: { routes: 80 }, maestro: { routes: 80 } },
|
|
55
|
+
artifacts: [{ file: "e2e.thresholds.json", pointer: "" }],
|
|
56
|
+
description: "E2E route/screen coverage floors (Playwright web routes, Maestro screens)",
|
|
57
|
+
},
|
|
52
58
|
{
|
|
53
59
|
key: "quality.lintBudgets",
|
|
54
60
|
defaultValue: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/sync/registry.ts"],"names":[],"mappings":"AAsDA,MAAM,iBAAiB,GAAG,cAAc,CAAC;AACzC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAC7C,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAC3C,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAC7C,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAC3C,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAE3C,MAAM,iBAAiB,GAAc;IACnC,MAAM,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;CACnE,CAAC;AAEF,MAAM,oBAAoB,GAAG;IAC3B,KAAK,EAAE,cAAc;IACrB,OAAO,EAAE,oBAAoB;IAC7B,OAAO,EAAE,gBAAgB;IACzB,YAAY,EAAE,cAAc;IAC5B,IAAI,EAAE;QACJ,GAAG,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route/screen coverage gate (Expo).
|
|
4
|
+
*
|
|
5
|
+
* The e2e counterpart of the unit-test coverage thresholds: where Vitest/Jest
|
|
6
|
+
* gate on line coverage, this gates on SURFACE coverage — the percentage of
|
|
7
|
+
* expo-router routes exercised by at least one e2e spec, computed per runner:
|
|
8
|
+
*
|
|
9
|
+
* - Playwright: routes visited via `page.goto("<path>")` in e2e specs
|
|
10
|
+
* (top-level `e2e/` or nested `tests/e2e/` trees).
|
|
11
|
+
* - Maestro: screens opened via `openLink: <deep link>` in `.maestro/` flows.
|
|
12
|
+
*
|
|
13
|
+
* Maestro is black-box (no code-coverage hook exists for a compiled native
|
|
14
|
+
* app), so route coverage is the shared metric both runners can honor. A spec
|
|
15
|
+
* or flow that reaches a screen by tapping rather than deep-linking can declare
|
|
16
|
+
* it with an `e2e-route: /path` comment annotation (JS/TS or YAML comment).
|
|
17
|
+
*
|
|
18
|
+
* Thresholds default to 80% per runner and are project-tunable via
|
|
19
|
+
* `e2e.thresholds.json` (create-only, same convention as vitest.thresholds.json):
|
|
20
|
+
* { "playwright": { "routes": 80 }, "maestro": { "routes": 80 } }
|
|
21
|
+
* A runner threshold of 0 disables that runner's gate (logged, never silent).
|
|
22
|
+
*
|
|
23
|
+
* Inputs (env, CI-friendly):
|
|
24
|
+
* E2E_COVERAGE_ROOT project root to scan (default: cwd)
|
|
25
|
+
*
|
|
26
|
+
* Exit 0 = every runner meets its threshold (or nothing to gate).
|
|
27
|
+
* Exit 1 = at least one runner is under threshold; uncovered routes are listed.
|
|
28
|
+
* @module scripts/check-e2e-coverage
|
|
29
|
+
*/
|
|
30
|
+
import * as fs from "node:fs";
|
|
31
|
+
import * as path from "node:path";
|
|
32
|
+
import { pathToFileURL } from "node:url";
|
|
33
|
+
|
|
34
|
+
export const defaultThresholds = {
|
|
35
|
+
playwright: { routes: 80 },
|
|
36
|
+
maestro: { routes: 80 },
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const ROUTE_FILE_PATTERN = /\.(?:tsx|ts|jsx|js)$/;
|
|
40
|
+
const SPEC_FILE_PATTERN = /\.(?:tsx|ts|jsx|js|mjs)$/;
|
|
41
|
+
const FLOW_FILE_PATTERN = /\.(?:yaml|yml)$/;
|
|
42
|
+
// `e2e-route: /path` inside any comment declares a route as covered even when
|
|
43
|
+
// the spec reaches it by tapping/navigating rather than by URL or deep link.
|
|
44
|
+
const ROUTE_ANNOTATION_PATTERN = /e2e-route:\s*(\/[^\s'"`,)]*)/g;
|
|
45
|
+
const GOTO_PATTERN = /\.goto\(\s*(["'`])([^"'`]+)\1/g;
|
|
46
|
+
const OPEN_LINK_PATTERN = /openLink:\s*["']?([^\s"']+)/g;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Derive the expo-router route for one file inside the app directory.
|
|
50
|
+
* Layouts (`_layout`), private files (`_*`), special files (`+not-found`,
|
|
51
|
+
* `+html`) and API routes (`*+api`) are not navigable screens and return null.
|
|
52
|
+
* @param {string} relativePath - Path relative to the app directory
|
|
53
|
+
* @returns {string | null} Route path (e.g. "/profile/[id]"), or null
|
|
54
|
+
*/
|
|
55
|
+
export function routeFromFile(relativePath) {
|
|
56
|
+
if (!ROUTE_FILE_PATTERN.test(relativePath)) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const withoutExtension = relativePath.replace(ROUTE_FILE_PATTERN, "");
|
|
60
|
+
const rawSegments = withoutExtension.split("/");
|
|
61
|
+
const basename = rawSegments[rawSegments.length - 1];
|
|
62
|
+
if (basename.startsWith("+") || basename.endsWith("+api")) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
if (rawSegments.some(segment => segment.startsWith("_"))) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const segments = rawSegments
|
|
69
|
+
// Route groups like "(tabs)" organize files without affecting the URL.
|
|
70
|
+
.filter(segment => !(segment.startsWith("(") && segment.endsWith(")")))
|
|
71
|
+
.filter(segment => segment !== "index");
|
|
72
|
+
return `/${segments.join("/")}`.replace(/\/+/g, "/");
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Enumerate the unique navigable routes for a set of app-directory files.
|
|
77
|
+
* @param {string[]} files - Paths relative to the app directory
|
|
78
|
+
* @returns {string[]} Sorted unique route paths
|
|
79
|
+
*/
|
|
80
|
+
export function enumerateRoutes(files) {
|
|
81
|
+
const routes = files
|
|
82
|
+
.map(file => routeFromFile(file))
|
|
83
|
+
.filter(route => route !== null);
|
|
84
|
+
return [...new Set(routes)].sort();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Normalize a visited URL or deep link to a route-comparable path.
|
|
89
|
+
* Handles absolute paths, http(s) URLs, custom-scheme deep links
|
|
90
|
+
* (`myapp://profile/1` → `/profile/1`), and Expo dev-client URLs
|
|
91
|
+
* (`exp://host:8081/--/profile` → `/profile`).
|
|
92
|
+
* @param {string} raw - The literal URL/path from a spec or flow
|
|
93
|
+
* @returns {string | null} Normalized path, or null when not a navigation
|
|
94
|
+
*/
|
|
95
|
+
export function normalizeVisitedPath(raw) {
|
|
96
|
+
if (!raw) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
const withoutQuery = raw.split(/[?#]/)[0];
|
|
100
|
+
const devClientSplit = withoutQuery.split("/--/");
|
|
101
|
+
if (devClientSplit.length > 1) {
|
|
102
|
+
return normalizeVisitedPath(`/${devClientSplit[1]}`);
|
|
103
|
+
}
|
|
104
|
+
const schemeMatch = withoutQuery.match(/^([a-zA-Z][\w+.-]*):\/\/(.*)$/);
|
|
105
|
+
const pathPart = schemeMatch
|
|
106
|
+
? schemeMatch[1] === "http" || schemeMatch[1] === "https"
|
|
107
|
+
? // http(s): the first segment is the host, the rest is the path.
|
|
108
|
+
`/${schemeMatch[2].split("/").slice(1).join("/")}`
|
|
109
|
+
: // Custom scheme: everything after :// is the route.
|
|
110
|
+
`/${schemeMatch[2]}`
|
|
111
|
+
: withoutQuery.startsWith("/")
|
|
112
|
+
? withoutQuery
|
|
113
|
+
: `/${withoutQuery.replace(/^\.\//, "")}`;
|
|
114
|
+
const collapsed = pathPart.replace(/\/+/g, "/");
|
|
115
|
+
const trimmed =
|
|
116
|
+
collapsed.length > 1 ? collapsed.replace(/\/$/, "") : collapsed;
|
|
117
|
+
return trimmed || "/";
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Extract every route-comparable path a Playwright spec visits.
|
|
122
|
+
* @param {string} source - Spec file contents
|
|
123
|
+
* @returns {string[]} Normalized visited paths
|
|
124
|
+
*/
|
|
125
|
+
export function extractPlaywrightPaths(source) {
|
|
126
|
+
const fromGoto = [...source.matchAll(GOTO_PATTERN)].map(match => match[2]);
|
|
127
|
+
const fromAnnotations = [...source.matchAll(ROUTE_ANNOTATION_PATTERN)].map(
|
|
128
|
+
match => match[1]
|
|
129
|
+
);
|
|
130
|
+
return [...fromGoto, ...fromAnnotations]
|
|
131
|
+
.map(visited => normalizeVisitedPath(visited))
|
|
132
|
+
.filter(visited => visited !== null);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Extract every route-comparable path a Maestro flow opens.
|
|
137
|
+
* @param {string} source - Flow YAML contents
|
|
138
|
+
* @returns {string[]} Normalized visited paths
|
|
139
|
+
*/
|
|
140
|
+
export function extractMaestroPaths(source) {
|
|
141
|
+
const fromOpenLink = [...source.matchAll(OPEN_LINK_PATTERN)].map(
|
|
142
|
+
match => match[1]
|
|
143
|
+
);
|
|
144
|
+
const fromAnnotations = [...source.matchAll(ROUTE_ANNOTATION_PATTERN)].map(
|
|
145
|
+
match => match[1]
|
|
146
|
+
);
|
|
147
|
+
return [...fromOpenLink, ...fromAnnotations]
|
|
148
|
+
.map(visited => normalizeVisitedPath(visited))
|
|
149
|
+
.filter(visited => visited !== null);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Does a visited path satisfy a route? Dynamic segments (`[id]`) match any
|
|
154
|
+
* one segment, catch-alls (`[...rest]`) match one or more, and interpolated
|
|
155
|
+
* spec segments (template `${...}` holes) match any route segment.
|
|
156
|
+
* @param {string} route - Enumerated route (e.g. "/profile/[id]")
|
|
157
|
+
* @param {string} visited - Normalized visited path (e.g. "/profile/42")
|
|
158
|
+
* @returns {boolean} Whether the visit covers the route
|
|
159
|
+
*/
|
|
160
|
+
export function routeMatchesVisit(route, visited) {
|
|
161
|
+
const routeSegments = route.split("/").filter(Boolean);
|
|
162
|
+
const visitedSegments = visited.split("/").filter(Boolean);
|
|
163
|
+
const isCovered = (routeIndex, visitedIndex) => {
|
|
164
|
+
if (routeIndex === routeSegments.length) {
|
|
165
|
+
return visitedIndex === visitedSegments.length;
|
|
166
|
+
}
|
|
167
|
+
const segment = routeSegments[routeIndex];
|
|
168
|
+
if (/^\[\.\.\..*\]$/.test(segment)) {
|
|
169
|
+
return visitedIndex < visitedSegments.length;
|
|
170
|
+
}
|
|
171
|
+
if (visitedIndex === visitedSegments.length) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
const visitedSegment = visitedSegments[visitedIndex];
|
|
175
|
+
const segmentMatches =
|
|
176
|
+
/^\[.*\]$/.test(segment) ||
|
|
177
|
+
visitedSegment.includes("${") ||
|
|
178
|
+
segment === visitedSegment;
|
|
179
|
+
return segmentMatches && isCovered(routeIndex + 1, visitedIndex + 1);
|
|
180
|
+
};
|
|
181
|
+
return isCovered(0, 0);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Merge project threshold overrides over the defaults, per runner.
|
|
186
|
+
* @param {typeof defaultThresholds} defaults - Baseline thresholds
|
|
187
|
+
* @param {object} overrides - Contents of e2e.thresholds.json (may be partial)
|
|
188
|
+
* @returns {typeof defaultThresholds} Effective thresholds
|
|
189
|
+
*/
|
|
190
|
+
export function mergeThresholds(defaults, overrides) {
|
|
191
|
+
return {
|
|
192
|
+
playwright: { ...defaults.playwright, ...overrides?.playwright },
|
|
193
|
+
maestro: { ...defaults.maestro, ...overrides?.maestro },
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Pure decision: does each runner's route coverage meet its threshold?
|
|
199
|
+
* @param {object} input - Evaluation input
|
|
200
|
+
* @param {string[]} input.routes - Enumerated app routes
|
|
201
|
+
* @param {string[]} input.playwrightVisited - Paths Playwright specs visit
|
|
202
|
+
* @param {string[]} input.maestroVisited - Paths Maestro flows open
|
|
203
|
+
* @param {typeof defaultThresholds} input.thresholds - Effective thresholds
|
|
204
|
+
* @returns {{ok: boolean, runners: Record<string, {threshold: number, total: number, covered: number, percentage: number, missing: string[], ok: boolean}>}} Verdict
|
|
205
|
+
*/
|
|
206
|
+
export function evaluateE2eCoverage({
|
|
207
|
+
routes,
|
|
208
|
+
playwrightVisited,
|
|
209
|
+
maestroVisited,
|
|
210
|
+
thresholds,
|
|
211
|
+
}) {
|
|
212
|
+
const evaluateRunner = (visited, threshold) => {
|
|
213
|
+
const missing = routes.filter(
|
|
214
|
+
route => !visited.some(visit => routeMatchesVisit(route, visit))
|
|
215
|
+
);
|
|
216
|
+
const covered = routes.length - missing.length;
|
|
217
|
+
const percentage =
|
|
218
|
+
routes.length === 0 ? 100 : (covered / routes.length) * 100;
|
|
219
|
+
return {
|
|
220
|
+
threshold,
|
|
221
|
+
total: routes.length,
|
|
222
|
+
covered,
|
|
223
|
+
percentage,
|
|
224
|
+
missing,
|
|
225
|
+
ok: threshold === 0 || percentage >= threshold,
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
const runners = {
|
|
229
|
+
playwright: evaluateRunner(playwrightVisited, thresholds.playwright.routes),
|
|
230
|
+
maestro: evaluateRunner(maestroVisited, thresholds.maestro.routes),
|
|
231
|
+
};
|
|
232
|
+
return { ok: runners.playwright.ok && runners.maestro.ok, runners };
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Load project threshold overrides from `e2e.thresholds.json`, if present.
|
|
237
|
+
* Malformed JSON is a readable, operator-facing failure rather than an
|
|
238
|
+
* uncaught SyntaxError and stack trace.
|
|
239
|
+
* @param {string} thresholdsFile - Absolute path to the thresholds file
|
|
240
|
+
* @returns {object} Parsed overrides, or {} when the file is absent
|
|
241
|
+
* @throws {Error} When the file exists but is not valid JSON
|
|
242
|
+
*/
|
|
243
|
+
export function loadThresholdOverrides(thresholdsFile) {
|
|
244
|
+
if (!fs.existsSync(thresholdsFile)) {
|
|
245
|
+
return {};
|
|
246
|
+
}
|
|
247
|
+
try {
|
|
248
|
+
return JSON.parse(fs.readFileSync(thresholdsFile, "utf8"));
|
|
249
|
+
} catch (error) {
|
|
250
|
+
throw new Error(`e2e.thresholds.json is not valid JSON — ${error.message}`);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Recursively list files under a directory, relative to it.
|
|
256
|
+
* @param {string} directory - Absolute directory path
|
|
257
|
+
* @returns {string[]} Relative file paths (posix separators), or [] if absent
|
|
258
|
+
*/
|
|
259
|
+
function listFiles(directory) {
|
|
260
|
+
if (!fs.existsSync(directory)) {
|
|
261
|
+
return [];
|
|
262
|
+
}
|
|
263
|
+
return fs
|
|
264
|
+
.readdirSync(directory, { recursive: true, withFileTypes: true })
|
|
265
|
+
.filter(entry => entry.isFile())
|
|
266
|
+
.map(entry =>
|
|
267
|
+
path
|
|
268
|
+
.relative(directory, path.join(entry.parentPath, entry.name))
|
|
269
|
+
.split(path.sep)
|
|
270
|
+
.join("/")
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Read every matching file under the given directories and extract paths.
|
|
276
|
+
* @param {object} input - Extraction input
|
|
277
|
+
* @param {string} input.root - Project root
|
|
278
|
+
* @param {string[]} input.directories - Candidate directories to scan
|
|
279
|
+
* @param {RegExp} input.filePattern - Which files to read
|
|
280
|
+
* @param {(source: string) => string[]} input.extract - Path extractor
|
|
281
|
+
* @returns {string[]} Every visited path found
|
|
282
|
+
*/
|
|
283
|
+
function collectVisitedPaths({ root, directories, filePattern, extract }) {
|
|
284
|
+
return directories.flatMap(directory => {
|
|
285
|
+
const absolute = path.join(root, directory);
|
|
286
|
+
return listFiles(absolute)
|
|
287
|
+
.filter(file => filePattern.test(file))
|
|
288
|
+
.flatMap(file =>
|
|
289
|
+
extract(fs.readFileSync(path.join(absolute, file), "utf8"))
|
|
290
|
+
);
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* CLI entry: scan the project, evaluate, and exit non-zero when under threshold.
|
|
296
|
+
* @returns {void}
|
|
297
|
+
*/
|
|
298
|
+
function main() {
|
|
299
|
+
const root = process.env.E2E_COVERAGE_ROOT || process.cwd();
|
|
300
|
+
const appDir = ["app", "src/app"]
|
|
301
|
+
.map(candidate => path.join(root, candidate))
|
|
302
|
+
.find(candidate => fs.existsSync(candidate));
|
|
303
|
+
if (!appDir) {
|
|
304
|
+
console.log(
|
|
305
|
+
"[e2e-coverage] OK: no expo-router app directory found — nothing to gate."
|
|
306
|
+
);
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
const routes = enumerateRoutes(listFiles(appDir));
|
|
310
|
+
if (routes.length === 0) {
|
|
311
|
+
console.log("[e2e-coverage] OK: no navigable routes — nothing to gate.");
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const thresholdsFile = path.join(root, "e2e.thresholds.json");
|
|
316
|
+
let overrides;
|
|
317
|
+
try {
|
|
318
|
+
overrides = loadThresholdOverrides(thresholdsFile);
|
|
319
|
+
} catch (error) {
|
|
320
|
+
console.error(`[e2e-coverage] FAIL: ${error.message}`);
|
|
321
|
+
process.exit(1);
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
const thresholds = mergeThresholds(defaultThresholds, overrides);
|
|
325
|
+
|
|
326
|
+
const result = evaluateE2eCoverage({
|
|
327
|
+
routes,
|
|
328
|
+
playwrightVisited: collectVisitedPaths({
|
|
329
|
+
root,
|
|
330
|
+
directories: ["e2e", "tests/e2e"],
|
|
331
|
+
filePattern: SPEC_FILE_PATTERN,
|
|
332
|
+
extract: extractPlaywrightPaths,
|
|
333
|
+
}),
|
|
334
|
+
maestroVisited: collectVisitedPaths({
|
|
335
|
+
root,
|
|
336
|
+
directories: [".maestro"],
|
|
337
|
+
filePattern: FLOW_FILE_PATTERN,
|
|
338
|
+
extract: extractMaestroPaths,
|
|
339
|
+
}),
|
|
340
|
+
thresholds,
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
for (const [runner, verdict] of Object.entries(result.runners)) {
|
|
344
|
+
const summary = `${verdict.covered}/${verdict.total} routes (${verdict.percentage.toFixed(1)}% vs ${verdict.threshold}% required)`;
|
|
345
|
+
if (verdict.threshold === 0) {
|
|
346
|
+
console.log(
|
|
347
|
+
`[e2e-coverage] ${runner}: gate disabled (threshold 0) — ${summary}`
|
|
348
|
+
);
|
|
349
|
+
} else if (verdict.ok) {
|
|
350
|
+
console.log(`[e2e-coverage] ${runner}: OK — ${summary}`);
|
|
351
|
+
} else {
|
|
352
|
+
console.error(`[e2e-coverage] ${runner}: FAIL — ${summary}`);
|
|
353
|
+
console.error(
|
|
354
|
+
`[e2e-coverage] ${runner}: screens with no e2e test yet:\n` +
|
|
355
|
+
verdict.missing.map(route => ` - ${route}`).join("\n")
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (!result.ok) {
|
|
360
|
+
console.error(
|
|
361
|
+
"[e2e-coverage] FAIL: some screens have no end-to-end test. Add a Playwright spec (page.goto) or Maestro flow (openLink) that reaches each screen listed above, add an `e2e-route: /path` comment to a spec that already reaches it by navigation, or adjust e2e.thresholds.json."
|
|
362
|
+
);
|
|
363
|
+
process.exit(1);
|
|
364
|
+
}
|
|
365
|
+
console.log("[e2e-coverage] OK");
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// Run only when invoked directly — importing for tests must have no side effects.
|
|
369
|
+
if (
|
|
370
|
+
process.argv[1] &&
|
|
371
|
+
import.meta.url === pathToFileURL(process.argv[1]).href
|
|
372
|
+
) {
|
|
373
|
+
main();
|
|
374
|
+
}
|
package/package.json
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"ws": ">=8.20.1"
|
|
96
96
|
},
|
|
97
97
|
"name": "@codyswann/lisa",
|
|
98
|
-
"version": "2.
|
|
98
|
+
"version": "2.207.0",
|
|
99
99
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
100
100
|
"main": "dist/index.js",
|
|
101
101
|
"exports": {
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lisa-verify-workflow-change
|
|
3
|
+
description: "a GitHub Actions workflow file…"
|
|
4
|
+
allowed-tools: ["Bash", "Read"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Verify Workflow Change
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
Use this skill when a pull request changes files under `.github/workflows/` and the change needs empirical GitHub Actions proof before merge.
|
|
12
|
+
|
|
13
|
+
This verifies workflow behavior, not product behavior. For product behavior, use `lisa-verify`. For PR merge driving, use `lisa-drive-pr-to-merge` after this skill has produced workflow evidence or a clear unverifiable verdict.
|
|
14
|
+
|
|
15
|
+
## Required Inputs
|
|
16
|
+
|
|
17
|
+
- Repository: `<org>/<repo>`.
|
|
18
|
+
- Branch ref containing the workflow change.
|
|
19
|
+
- Changed workflow path(s), usually `.github/workflows/<name>.yml`.
|
|
20
|
+
- The specific step, input, reusable workflow, or job behavior under test.
|
|
21
|
+
- Any known gate variable, secret, or repository variable that controls the dispatch path.
|
|
22
|
+
|
|
23
|
+
## Core Trap
|
|
24
|
+
|
|
25
|
+
GitHub evaluates `workflow_run`, `schedule`, `issue_comment`, and `pull_request_review` workflows from the default branch copy of the workflow file. A run fired by one of those triggers does not prove a pull request branch's copy of that workflow works.
|
|
26
|
+
|
|
27
|
+
Name this trap explicitly in the verification report. Do not cite a run fired by one of those triggers as evidence for branch changes.
|
|
28
|
+
|
|
29
|
+
## Procedure
|
|
30
|
+
|
|
31
|
+
1. **Establish the baseline**
|
|
32
|
+
|
|
33
|
+
Capture the repository default branch, current open PR count, branch list, issue count, and any relevant repo variable state before dispatch:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
gh repo view <org>/<repo> --json defaultBranchRef
|
|
37
|
+
gh pr list --repo <org>/<repo> --state open --json number,headRefName
|
|
38
|
+
gh issue list --repo <org>/<repo> --state open --json number,title --limit 100
|
|
39
|
+
gh variable list --repo <org>/<repo>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If a gate variable may need to be changed, record whether it is set and its exact value. "Unset" is a distinct state and must be restored as unset, not as `false`.
|
|
43
|
+
|
|
44
|
+
2. **Classify each changed workflow trigger**
|
|
45
|
+
|
|
46
|
+
Read the changed workflow file from the branch and list its `on:` triggers. If it uses `workflow_run`, `schedule`, `issue_comment`, or `pull_request_review`, state that the workflow's own trigger cannot exercise the branch copy pre-merge.
|
|
47
|
+
|
|
48
|
+
A default-branch-only trigger is not a blocker by itself. It means direct trigger evidence is invalid and a dispatchable sibling is required.
|
|
49
|
+
|
|
50
|
+
3. **Find a dispatchable sibling**
|
|
51
|
+
|
|
52
|
+
Search for a `workflow_dispatch` workflow that reaches the same reusable workflow, job, step, or input under test:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
rg -n "workflow_dispatch|uses:|<input-or-step-name>" .github/workflows
|
|
56
|
+
gh workflow list --repo <org>/<repo>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The sibling must exercise the same behavior, not merely run a nearby job. For reusable workflow caller changes, prove that the sibling reaches the same reusable and the same consumed input or install step.
|
|
60
|
+
|
|
61
|
+
If no sibling can exercise the behavior, report `UNVERIFIABLE_PRE_MERGE` and stop. Do not fabricate passing evidence from lint, YAML parsing, or a default-branch-triggered run.
|
|
62
|
+
|
|
63
|
+
4. **Prepare gate variables exactly**
|
|
64
|
+
|
|
65
|
+
If the sibling is gated by a repo variable, capture the prior state first:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
gh variable get <NAME> --repo <org>/<repo> || true
|
|
69
|
+
gh variable set <NAME> --repo <org>/<repo> --body true
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Use a cleanup trap in shell scripts so restoration runs on success, failure, or cancellation. Restore to the exact prior state:
|
|
73
|
+
|
|
74
|
+
- Previously unset: `gh variable delete <NAME> --repo <org>/<repo> --yes`
|
|
75
|
+
- Previously set: `gh variable set <NAME> --repo <org>/<repo> --body "$PRIOR_VALUE"`
|
|
76
|
+
|
|
77
|
+
5. **Dispatch on the branch ref**
|
|
78
|
+
|
|
79
|
+
Dispatch the sibling against the branch under test:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
gh workflow run <workflow-file-or-name> --repo <org>/<repo> --ref <branch>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Then locate the run whose `headBranch` and `workflowName` match:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
gh run list --repo <org>/<repo> --workflow <workflow-file-or-name> --branch <branch> --json databaseId,status,conclusion,headBranch,headSha,createdAt --limit 10
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
6. **Poll only until the step under test is observable**
|
|
92
|
+
|
|
93
|
+
Watch the run until the target job/step has completed or failed:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
gh run view <run-id> --repo <org>/<repo> --json status,conclusion,jobs
|
|
97
|
+
gh run view <run-id> --repo <org>/<repo> --log
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Capture the smallest log excerpt that proves the step under test used the branch behavior. Keep quotes short; prefer summarized evidence with exact job, step, run id, and conclusion.
|
|
101
|
+
|
|
102
|
+
7. **Cancel before side effects**
|
|
103
|
+
|
|
104
|
+
As soon as the target step is observed, cancel the run before any expensive or side-effectful stage starts:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
gh run cancel <run-id> --repo <org>/<repo>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Side-effectful stages include opening pull requests, pushing branches, creating issues, publishing packages, deploying, running AI agents, or mutating external systems. If the run reaches a side-effectful stage before cancellation, the verification failed even if the target step passed.
|
|
111
|
+
|
|
112
|
+
8. **Assert zero side effects**
|
|
113
|
+
|
|
114
|
+
Re-read and compare against the baseline:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
gh pr list --repo <org>/<repo> --state open --json number,headRefName
|
|
118
|
+
gh issue list --repo <org>/<repo> --state open --json number,title --limit 100
|
|
119
|
+
gh api -X GET repos/<org>/<repo>/branches --paginate
|
|
120
|
+
gh variable list --repo <org>/<repo>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Confirm no branches were created, no PRs were opened, no issues were filed, and every temporary gate variable is restored to its exact prior state, including unset.
|
|
124
|
+
|
|
125
|
+
## Verdicts
|
|
126
|
+
|
|
127
|
+
- `VERIFIED`: The branch-ref dispatch reached the exact behavior under test, the observed step passed, the run was cancelled before side effects, and cleanup was proven.
|
|
128
|
+
- `FAILED`: The branch-ref dispatch reached the behavior under test and the observed step failed, or side effects occurred.
|
|
129
|
+
- `UNVERIFIABLE_PRE_MERGE`: No dispatchable branch-ref path can exercise the behavior before merge.
|
|
130
|
+
- `BLOCKED`: GitHub auth, permissions, missing variables, or Actions availability prevent a reliable run.
|
|
131
|
+
|
|
132
|
+
## Output
|
|
133
|
+
|
|
134
|
+
Return a concise report with:
|
|
135
|
+
|
|
136
|
+
- Changed workflow(s) and trigger classification.
|
|
137
|
+
- Whether the default-branch execution trap applied.
|
|
138
|
+
- Dispatchable sibling selected, or why none exists.
|
|
139
|
+
- Exact `gh workflow run ... --ref <branch>` command used.
|
|
140
|
+
- Run id, branch, head SHA, job, and step observed.
|
|
141
|
+
- Observed outcome of the step under test.
|
|
142
|
+
- Cancellation point and proof that side-effectful stages did not start.
|
|
143
|
+
- Gate variable restoration proof, including unset restoration when applicable.
|
|
144
|
+
- Zero-side-effect readback for branches, PRs, and issues.
|
|
145
|
+
- Final verdict.
|
|
146
|
+
|
|
147
|
+
## Rules
|
|
148
|
+
|
|
149
|
+
- Never treat a `workflow_run`, `schedule`, `issue_comment`, or `pull_request_review` run as branch-copy evidence for the changed workflow.
|
|
150
|
+
- Always dispatch with `--ref <branch>` when using a sibling workflow for pre-merge proof.
|
|
151
|
+
- Cancel as soon as the step under test has produced evidence.
|
|
152
|
+
- Restore gate variables exactly; unset must return to unset.
|
|
153
|
+
- A verification that leaves new branches, PRs, issues, deployments, package publishes, or external mutations behind is failed verification.
|
|
154
|
+
- If no branch-ref dispatch path exists, say `UNVERIFIABLE_PRE_MERGE` and stop.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Verify a GitHub Actions workflow change pre-merge using branch-ref dispatch evidence, safe cancellation, and zero-side-effect cleanup."
|
|
3
|
+
argument-hint: "<repo> <branch> <workflow-path> <step-under-test>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa-verify-workflow-change skill to verify a GitHub Actions workflow change pre-merge. $ARGUMENTS
|