@ia-qa/pal 0.2.0 → 0.4.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/README.md +50 -10
- package/TUTORIAL.md +144 -27
- package/dist/accept.d.ts +20 -0
- package/dist/accept.js +119 -0
- package/dist/accept.js.map +1 -0
- package/dist/cli/index.js +97 -18
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts +95 -0
- package/dist/mcp/server.js +251 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/plan.d.ts +60 -1
- package/dist/plan.js +59 -1
- package/dist/plan.js.map +1 -1
- package/dist/report.js +113 -28
- package/dist/report.js.map +1 -1
- package/dist/run.d.ts +66 -0
- package/dist/run.js +209 -0
- package/dist/run.js.map +1 -0
- package/dist/setup.d.ts +11 -0
- package/dist/setup.js +52 -4
- package/dist/setup.js.map +1 -1
- package/dist/state.d.ts +3 -0
- package/dist/state.js.map +1 -1
- package/dist/suite.d.ts +63 -0
- package/dist/suite.js +145 -0
- package/dist/suite.js.map +1 -0
- package/dist/tour.d.ts +66 -6
- package/dist/tour.js +125 -30
- package/dist/tour.js.map +1 -1
- package/package.json +4 -3
package/dist/plan.d.ts
CHANGED
|
@@ -47,6 +47,60 @@ export interface CheckSplit {
|
|
|
47
47
|
* broken link is still broken the second time — and only their "already reported" count moves.
|
|
48
48
|
*/
|
|
49
49
|
export declare function splitFindings(report: CheckReport, known: ReadonlySet<string>): CheckSplit;
|
|
50
|
+
/**
|
|
51
|
+
* The findings the next tour treats as already reported. A source that gave no answer this tour
|
|
52
|
+
* (null) keeps what it had reported before: "no answer" is not "nothing found", and dropping them
|
|
53
|
+
* would re-announce every known warning as new on the tour after.
|
|
54
|
+
*/
|
|
55
|
+
export declare function carryKnown(previous: string[], checkKeys: string[] | null, deadNameKeys: string[] | null): string[];
|
|
56
|
+
export interface DriftRowLike {
|
|
57
|
+
status: string;
|
|
58
|
+
role: string;
|
|
59
|
+
name: string;
|
|
60
|
+
selector: string;
|
|
61
|
+
rebound?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface DriftFinding {
|
|
64
|
+
page: string;
|
|
65
|
+
role: string;
|
|
66
|
+
name: string;
|
|
67
|
+
status: 'lost' | 'ambiguous' | 'rebound';
|
|
68
|
+
/** The clicks that reached it in the baseline. Absent: visible on load. */
|
|
69
|
+
via?: string[];
|
|
70
|
+
}
|
|
71
|
+
export interface DriftClass {
|
|
72
|
+
/** Whether this drift fails the tour. */
|
|
73
|
+
gating: boolean;
|
|
74
|
+
onLoad: DriftFinding[];
|
|
75
|
+
behindInteraction: DriftFinding[];
|
|
76
|
+
/** Drift on pages this tour could not re-capture: it describes an older moment, so it never fails the tour. */
|
|
77
|
+
olderCapture: DriftFinding[];
|
|
78
|
+
/** Pages held at BLOCK by the suite (a renamed label it locates by name, a selector now reaching another element) with no blocking row of their own. */
|
|
79
|
+
suitePages: string[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Which drift fails the tour. The statuses are the ones `ia-qa-heal diff` gave; this only decides
|
|
83
|
+
* what a person must act on today.
|
|
84
|
+
*
|
|
85
|
+
* An element visible on load that is lost, ambiguous or now reached by another selector is a fact
|
|
86
|
+
* about the page, and fails. One reached only by clicking — a profile opened from a ranking, a
|
|
87
|
+
* button present in one state of a game — may be there or not depending on the data the click
|
|
88
|
+
* lands on: measured on a live app, two tours five minutes apart disagreed about exactly those.
|
|
89
|
+
* They are reported, and fail only under `strict`. A page the suite holds at BLOCK always fails:
|
|
90
|
+
* that is a test about to act on the wrong thing.
|
|
91
|
+
*
|
|
92
|
+
* A page this tour could not re-capture keeps its previous contract, so its "drift" compares the
|
|
93
|
+
* baseline with an older moment — possibly a change already reported and fixed since. It is
|
|
94
|
+
* listed apart and never fails the tour, whatever its status: the page is in "Not seen" already.
|
|
95
|
+
*/
|
|
96
|
+
export declare function classifyDrift(reports: Array<{
|
|
97
|
+
name: string;
|
|
98
|
+
isLayout: boolean;
|
|
99
|
+
report: {
|
|
100
|
+
verdict: string;
|
|
101
|
+
rows: DriftRowLike[];
|
|
102
|
+
};
|
|
103
|
+
}>, viaOf: (page: string, row: DriftRowLike) => string[] | undefined, strict?: boolean, notRecaptured?: ReadonlySet<string>): DriftClass;
|
|
50
104
|
/**
|
|
51
105
|
* 0 nothing to decide · 1 something broke or needs a decision · 2 could not answer.
|
|
52
106
|
* The same contract as `ia-qa-heal`: a warning never fails a build, and "could not answer" is
|
|
@@ -54,6 +108,11 @@ export declare function splitFindings(report: CheckReport, known: ReadonlySet<st
|
|
|
54
108
|
*/
|
|
55
109
|
export declare function exitCodeFor(input: {
|
|
56
110
|
measured: number;
|
|
57
|
-
|
|
111
|
+
/** `gating` from `classifyDrift`; without it, a BLOCK verdict gates. */
|
|
112
|
+
drift?: (Pick<DirReport, 'verdict'> & {
|
|
113
|
+
gating?: boolean;
|
|
114
|
+
}) | null;
|
|
58
115
|
deadLinks: number;
|
|
116
|
+
/** The suite ran during this tour and exited non-zero. */
|
|
117
|
+
suiteFailed?: boolean;
|
|
59
118
|
}): 0 | 1 | 2;
|
package/dist/plan.js
CHANGED
|
@@ -5,6 +5,8 @@ exports.selectBatch = selectBatch;
|
|
|
5
5
|
exports.needingDepth = needingDepth;
|
|
6
6
|
exports.estimate = estimate;
|
|
7
7
|
exports.splitFindings = splitFindings;
|
|
8
|
+
exports.carryKnown = carryKnown;
|
|
9
|
+
exports.classifyDrift = classifyDrift;
|
|
8
10
|
exports.exitCodeFor = exitCodeFor;
|
|
9
11
|
/**
|
|
10
12
|
* The decisions a tour makes, kept free of I/O so each one is tested without a browser.
|
|
@@ -66,6 +68,59 @@ function splitFindings(report, known) {
|
|
|
66
68
|
keys: [...dead, ...warnings].map((x) => x.key),
|
|
67
69
|
};
|
|
68
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* The findings the next tour treats as already reported. A source that gave no answer this tour
|
|
73
|
+
* (null) keeps what it had reported before: "no answer" is not "nothing found", and dropping them
|
|
74
|
+
* would re-announce every known warning as new on the tour after.
|
|
75
|
+
*/
|
|
76
|
+
function carryKnown(previous, checkKeys, deadNameKeys) {
|
|
77
|
+
const isDeadName = (k) => k.startsWith('deadname ');
|
|
78
|
+
return [...(checkKeys ?? previous.filter((k) => !isDeadName(k))), ...(deadNameKeys ?? previous.filter(isDeadName))];
|
|
79
|
+
}
|
|
80
|
+
const blockingStatus = (row) => row.rebound ? 'rebound' : row.status === 'lost' || row.status === 'ambiguous' ? row.status : null;
|
|
81
|
+
/**
|
|
82
|
+
* Which drift fails the tour. The statuses are the ones `ia-qa-heal diff` gave; this only decides
|
|
83
|
+
* what a person must act on today.
|
|
84
|
+
*
|
|
85
|
+
* An element visible on load that is lost, ambiguous or now reached by another selector is a fact
|
|
86
|
+
* about the page, and fails. One reached only by clicking — a profile opened from a ranking, a
|
|
87
|
+
* button present in one state of a game — may be there or not depending on the data the click
|
|
88
|
+
* lands on: measured on a live app, two tours five minutes apart disagreed about exactly those.
|
|
89
|
+
* They are reported, and fail only under `strict`. A page the suite holds at BLOCK always fails:
|
|
90
|
+
* that is a test about to act on the wrong thing.
|
|
91
|
+
*
|
|
92
|
+
* A page this tour could not re-capture keeps its previous contract, so its "drift" compares the
|
|
93
|
+
* baseline with an older moment — possibly a change already reported and fixed since. It is
|
|
94
|
+
* listed apart and never fails the tour, whatever its status: the page is in "Not seen" already.
|
|
95
|
+
*/
|
|
96
|
+
function classifyDrift(reports, viaOf, strict = false, notRecaptured = new Set()) {
|
|
97
|
+
const onLoad = [];
|
|
98
|
+
const behindInteraction = [];
|
|
99
|
+
const olderCapture = [];
|
|
100
|
+
const suitePages = [];
|
|
101
|
+
for (const { name, isLayout, report } of reports) {
|
|
102
|
+
const stale = notRecaptured.has(name);
|
|
103
|
+
let blockingHere = 0;
|
|
104
|
+
for (const row of report.rows) {
|
|
105
|
+
const status = blockingStatus(row);
|
|
106
|
+
if (!status)
|
|
107
|
+
continue;
|
|
108
|
+
blockingHere++;
|
|
109
|
+
const via = isLayout ? undefined : viaOf(name, row);
|
|
110
|
+
const finding = { page: name, role: row.role, name: row.name, status, ...(via && via.length > 0 ? { via } : {}) };
|
|
111
|
+
(stale ? olderCapture : finding.via ? behindInteraction : onLoad).push(finding);
|
|
112
|
+
}
|
|
113
|
+
if (report.verdict === 'BLOCK' && blockingHere === 0 && !stale)
|
|
114
|
+
suitePages.push(name);
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
gating: onLoad.length > 0 || suitePages.length > 0 || (strict && behindInteraction.length > 0),
|
|
118
|
+
onLoad,
|
|
119
|
+
behindInteraction,
|
|
120
|
+
olderCapture,
|
|
121
|
+
suitePages,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
69
124
|
/**
|
|
70
125
|
* 0 nothing to decide · 1 something broke or needs a decision · 2 could not answer.
|
|
71
126
|
* The same contract as `ia-qa-heal`: a warning never fails a build, and "could not answer" is
|
|
@@ -76,7 +131,10 @@ function exitCodeFor(input) {
|
|
|
76
131
|
return 2;
|
|
77
132
|
if (input.deadLinks > 0)
|
|
78
133
|
return 1;
|
|
79
|
-
if (input.
|
|
134
|
+
if (input.suiteFailed)
|
|
135
|
+
return 1;
|
|
136
|
+
const drift = input.drift;
|
|
137
|
+
if (drift && (drift.gating ?? drift.verdict === 'BLOCK'))
|
|
80
138
|
return 1;
|
|
81
139
|
return 0;
|
|
82
140
|
}
|
package/dist/plan.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":";;;AAeA,kCAOC;AAED,oCAMC;AAqBD,4BAeC;AAmBD,sCAmBC;AAOD,
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":";;;AAeA,kCAOC;AAED,oCAMC;AAqBD,4BAeC;AAmBD,sCAmBC;AAOD,gCAGC;A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AAC,EAAE,CAAC;YAChI,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClF,CAAC;QACD,IAAI,MAAM,CAAC,OAAO,KAAK,OAAO,IAAI,YAAY,KAAK,CAAC,IAAI,CAAC,KAAK;YAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxF,CAAC;IACD,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC;QAC9F,MAAM;QACN,iBAAiB;QACjB,YAAY;QACZ,UAAU;KACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,KAO3B;IACC,IAAI,KAAK,CAAC,QAAQ,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACnC,IAAI,KAAK,CAAC,SAAS,GAAG,CAAC;QAAE,OAAO,CAAC,CAAC;IAClC,IAAI,KAAK,CAAC,WAAW;QAAE,OAAO,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1B,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,KAAK,OAAO,CAAC;QAAE,OAAO,CAAC,CAAC;IACnE,OAAO,CAAC,CAAC;AACX,CAAC"}
|
package/dist/report.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderReport = renderReport;
|
|
4
|
+
const suite_1 = require("./suite");
|
|
4
5
|
/**
|
|
5
6
|
* The one rendering of a tour for a terminal. Four sections, each printed only when it holds
|
|
6
7
|
* something, in the order a reader acts on them: what is broken, what needs a person, what is
|
|
@@ -8,6 +9,7 @@ exports.renderReport = renderReport;
|
|
|
8
9
|
* a green tour over a third of the app is the failure this tool exists to refuse.
|
|
9
10
|
*/
|
|
10
11
|
const plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
|
|
12
|
+
const LEVELS = ['level 0 (public pages)', 'level 1 (with a login)', 'level 2 (with your test suite)'];
|
|
11
13
|
function duration(seconds) {
|
|
12
14
|
if (seconds < 90)
|
|
13
15
|
return `${seconds} s`;
|
|
@@ -16,6 +18,7 @@ function duration(seconds) {
|
|
|
16
18
|
return `${minutes} min`;
|
|
17
19
|
return `${Math.floor(minutes / 60)} h ${String(minutes % 60).padStart(2, '0')}`;
|
|
18
20
|
}
|
|
21
|
+
const day = (iso) => iso.slice(0, 10);
|
|
19
22
|
function headline(r) {
|
|
20
23
|
if (r.refused)
|
|
21
24
|
return `⏸ Did not run — ${r.refused}`;
|
|
@@ -30,39 +33,64 @@ function headline(r) {
|
|
|
30
33
|
if (!r.drift)
|
|
31
34
|
return '⏸ No page could be compared with the baseline this tour.';
|
|
32
35
|
const t = r.drift.totals;
|
|
36
|
+
const counts = `${t.ok} ok · ${t.renamed} renamed · ${t.lost} lost · ${t.ambiguous} ambiguous · ${t.rebound} rebound`;
|
|
37
|
+
if (r.drift.verdict === 'BLOCK' && !r.drift.gating) {
|
|
38
|
+
return `⚠️ Drift only behind interaction — not failing the tour (--strict would) · ${counts}`;
|
|
39
|
+
}
|
|
33
40
|
const word = r.drift.verdict === 'PASS' ? '✅ PASS' : r.drift.verdict === 'FIX' ? '🔧 FIX' : '⛔ BLOCK';
|
|
34
|
-
return `${word} · ${
|
|
41
|
+
return `${word} · ${counts}`;
|
|
35
42
|
}
|
|
36
43
|
function renderReport(r) {
|
|
37
44
|
const out = [];
|
|
38
|
-
|
|
39
|
-
out.push(r.baseUrl ? `ia-qa-pal tour — ${r.baseUrl} · ${level}` : 'ia-qa-pal tour');
|
|
45
|
+
out.push(r.baseUrl ? `ia-qa-pal tour — ${r.baseUrl} · ${LEVELS[r.level]}` : 'ia-qa-pal tour');
|
|
40
46
|
out.push(headline(r));
|
|
41
47
|
if (r.setupRequired)
|
|
42
|
-
out.push('', ` Set it up: ${r.setupRequired.command}`, ' (in a terminal, `ia-qa-pal tour` asks the
|
|
48
|
+
out.push('', ` Set it up: ${r.setupRequired.command}`, ' (in a terminal, `ia-qa-pal tour` asks the questions itself)');
|
|
43
49
|
if (r.refused)
|
|
44
50
|
return out.join('\n') + '\n';
|
|
45
51
|
const p = r.pages;
|
|
52
|
+
const s = r.suite;
|
|
46
53
|
const needing = p.explored + p.notExplored.length;
|
|
47
54
|
out.push(` ${p.underContract} of ${plural(p.configured, 'page')} under contract · ` +
|
|
48
55
|
`${p.explored} explored in depth of ${plural(needing, 'page')} with closed controls`);
|
|
49
|
-
const broken =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
out.push(` ${String(d.status ?? d.error ?? 'no answer').padEnd(5)} ${d.url}${where}`);
|
|
55
|
-
}
|
|
56
|
-
if (broken.length > 10)
|
|
57
|
-
out.push(` …and ${broken.length - 10} more`);
|
|
58
|
-
if (r.check && r.check.knownDeadLinks > 0)
|
|
59
|
-
out.push(` ${r.check.knownDeadLinks} of these were already reported by a previous tour.`);
|
|
56
|
+
const broken = [];
|
|
57
|
+
const deadLinks = r.check?.deadLinks ?? [];
|
|
58
|
+
for (const d of deadLinks.slice(0, 10)) {
|
|
59
|
+
const where = d.from[0] ? ` — linked from ${d.from[0].page}${d.from[0].name ? ` ("${d.from[0].name}")` : ''}${d.from.length > 1 ? `, +${d.from.length - 1} more` : ''}` : '';
|
|
60
|
+
broken.push(` ${String(d.status ?? d.error ?? 'no answer').padEnd(5)} ${d.url}${where}`);
|
|
60
61
|
}
|
|
62
|
+
if (deadLinks.length > 10)
|
|
63
|
+
broken.push(` …and ${deadLinks.length - 10} more`);
|
|
64
|
+
if (r.check && r.check.knownDeadLinks > 0)
|
|
65
|
+
broken.push(` ${r.check.knownDeadLinks} of these were already reported by a previous tour.`);
|
|
66
|
+
if (s?.ranThisTour && s.run && s.run.exitCode !== 0)
|
|
67
|
+
broken.push(` suite your test command exited ${s.run.exitCode}: ${s.run.command}`);
|
|
68
|
+
if (broken.length > 0)
|
|
69
|
+
out.push('', `🔴 Broken`, ...broken);
|
|
61
70
|
const decide = [];
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
71
|
+
const d = r.drift;
|
|
72
|
+
if (d) {
|
|
73
|
+
const onLoad = d.onLoad.slice(0, 8);
|
|
74
|
+
for (const f of onLoad)
|
|
75
|
+
decide.push(` drift ${f.page}: ${f.role} "${f.name}" ${f.status}`);
|
|
76
|
+
if (d.onLoad.length > onLoad.length)
|
|
77
|
+
decide.push(` …and ${d.onLoad.length - onLoad.length} more on load`);
|
|
78
|
+
for (const page of d.suitePages)
|
|
79
|
+
decide.push(` drift ${page}: your tests would act on the wrong element — details: ia-qa-heal diff`);
|
|
80
|
+
if (d.behindInteraction.length > 0) {
|
|
81
|
+
decide.push(` behind ${plural(d.behindInteraction.length, 'element')} reached only by clicking changed — they may depend on the data the click lands on${d.gating ? '' : ' (not failing the tour)'}:`);
|
|
82
|
+
for (const f of d.behindInteraction.slice(0, 6))
|
|
83
|
+
decide.push(` ${f.page}: ${f.role} "${f.name}" ${f.status}, after ${f.via.map((v) => `"${v}"`).join(' → ')}`);
|
|
84
|
+
if (d.behindInteraction.length > 6)
|
|
85
|
+
decide.push(` …and ${d.behindInteraction.length - 6} more`);
|
|
86
|
+
}
|
|
87
|
+
const pages = [...new Set([...d.onLoad, ...d.behindInteraction].map((f) => f.page).concat(d.suitePages))];
|
|
88
|
+
if (pages.length > 0)
|
|
89
|
+
decide.push(` If these changes are intended: ia-qa-pal accept ${pages.slice(0, 4).join(' ')}${pages.length > 4 ? ' …' : ''}`);
|
|
90
|
+
}
|
|
91
|
+
const sf = r.drift?.suiteFindings;
|
|
92
|
+
if (sf && sf.names + sf.bindings > 0) {
|
|
93
|
+
decide.push(` tests ${[sf.names > 0 ? plural(sf.names, 'renamed label') + ' your tests locate by name' : '', sf.bindings > 0 ? plural(sf.bindings, 'selector') + ' your tests write changed what they reach' : ''].filter(Boolean).join(' · ')} — details: ia-qa-heal diff`);
|
|
66
94
|
}
|
|
67
95
|
if (r.check) {
|
|
68
96
|
const c = r.check;
|
|
@@ -78,14 +106,44 @@ function renderReport(r) {
|
|
|
78
106
|
decide.push(` new ${plural(c.newOrphans.length, 'page')} nothing links to — ${c.newOrphans.slice(0, 3).map((o) => o.page).join(', ')}${c.newOrphans.length > 3 ? ', …' : ''}`);
|
|
79
107
|
}
|
|
80
108
|
}
|
|
109
|
+
if (s && s.newDeadNames.length > 0) {
|
|
110
|
+
const e = s.newDeadNames[0];
|
|
111
|
+
const site = e.sites[0] ? ` at ${e.sites[0].file}:${e.sites[0].line}` : '';
|
|
112
|
+
decide.push(` new ${plural(s.newDeadNames.length, 'locator name')} in your tests match nothing on the mapped pages — e.g. "${e.name}"${site}` +
|
|
113
|
+
' (it may live on a page or a state not mapped)');
|
|
114
|
+
}
|
|
81
115
|
if (decide.length > 0) {
|
|
82
116
|
out.push('', '⛔ To decide', ...decide);
|
|
83
117
|
if (r.check && (r.check.newUnnamed.length > 0 || r.check.newAmbiguous.length > 0 || r.check.newOrphans.length > 0)) {
|
|
84
118
|
out.push(' Full list: ia-qa-heal check. Warnings never fail the tour.');
|
|
85
119
|
}
|
|
86
120
|
}
|
|
87
|
-
|
|
88
|
-
|
|
121
|
+
const knownWarnings = (r.check?.knownWarnings ?? 0) + (s?.knownDeadNames ?? 0);
|
|
122
|
+
if (knownWarnings > 0)
|
|
123
|
+
out.push(` ${plural(knownWarnings, 'warning')} already reported — not listed again.`);
|
|
124
|
+
const masks = (d?.maskSuggestions ?? []).filter((m) => m.pattern);
|
|
125
|
+
if (masks.length > 0) {
|
|
126
|
+
const n = masks.reduce((sum, m) => sum + m.count, 0);
|
|
127
|
+
out.push('', `💡 ${n === 1 ? '1 label differs' : `${n} labels differ`} only by a number — a counter or a clock that changes on its own${masks.some((m) => m.blocking > 0) ? ', and it is holding the verdict' : ''}.`, ` e.g. "${masks[0].example.from}" → "${masks[0].example.to}". To stop comparing those labels (the element stays under contract), add to .ia-qa/config.json:`, ` "nameMask": ${JSON.stringify(masks.map((m) => m.pattern))}`);
|
|
128
|
+
}
|
|
129
|
+
const repairs = s?.repairs;
|
|
130
|
+
if (repairs && repairs.total > 0) {
|
|
131
|
+
out.push('', `🔧 Ready to repair (${plural(repairs.total, 'replacement')} in ${plural(repairs.files.length, 'file')})`);
|
|
132
|
+
let shown = 0;
|
|
133
|
+
for (const f of repairs.files) {
|
|
134
|
+
for (const rep of f.replacements) {
|
|
135
|
+
if (shown++ >= 10)
|
|
136
|
+
break;
|
|
137
|
+
const lines = rep.lines.length > 0 ? `:${rep.lines.join(',')}` : '';
|
|
138
|
+
out.push(` ${f.file}${lines} ${rep.from} → ${rep.to}`);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (shown > 10)
|
|
142
|
+
out.push(` …and more`);
|
|
143
|
+
if (repairs.leftAlone > 0)
|
|
144
|
+
out.push(` ${plural(repairs.leftAlone, 'occurrence')} deliberately left alone — the command below says why.`);
|
|
145
|
+
out.push(` Apply after review: ${repairs.command} (pal never edits your tests)`);
|
|
146
|
+
}
|
|
89
147
|
const unseen = [];
|
|
90
148
|
if (p.notExplored.length > 0) {
|
|
91
149
|
const e = r.estimate;
|
|
@@ -93,22 +151,49 @@ function renderReport(r) {
|
|
|
93
151
|
(e ? ` — about ${duration(e.seconds)} (${e.clicks} controls × ${e.secondsPerClick} s, pace measured on ${e.measuredClicks} clicks)` : ''));
|
|
94
152
|
unseen.push(' ia-qa-pal tour --more explores the next batch');
|
|
95
153
|
}
|
|
96
|
-
|
|
154
|
+
const walled = p.notMapped.filter((m) => m.loginWall);
|
|
155
|
+
if (walled.length > 0) {
|
|
156
|
+
unseen.push(` ${plural(walled.length, 'page')} landed on a login page instead — the session expired or never took: ${walled.slice(0, 5).map((m) => m.page).join(', ')}${walled.length > 5 ? ', …' : ''}`, ` log in again (a person, at a browser): npx -p @ia-qa/self-healing ia-qa-heal login — then run the tour again`);
|
|
157
|
+
}
|
|
158
|
+
const otherFailures = p.notMapped.filter((m) => !m.loginWall);
|
|
159
|
+
for (const m of otherFailures.slice(0, 10))
|
|
97
160
|
unseen.push(` not mapped ${m.page} — ${m.reason}`);
|
|
98
|
-
if (
|
|
99
|
-
unseen.push(` …and ${
|
|
161
|
+
if (otherFailures.length > 10)
|
|
162
|
+
unseen.push(` …and ${otherFailures.length - 10} more pages not mapped`);
|
|
163
|
+
for (const u of p.unreadable)
|
|
164
|
+
unseen.push(` not compared ${u.page} — its contract file cannot be read: ${u.reason.replace(/^❌\s*/, '')}`);
|
|
165
|
+
if (d && d.olderCapture.length > 0) {
|
|
166
|
+
const pages = [...new Set(d.olderCapture.map((f) => f.page))];
|
|
167
|
+
unseen.push(` drift on ${plural(pages.length, 'page')} not re-captured this tour is from an older capture and not counted: ${pages.join(', ')}`);
|
|
168
|
+
}
|
|
100
169
|
if (p.partlyExplored.length > 0)
|
|
101
170
|
unseen.push(` partly explored (click budget reached): ${p.partlyExplored.join(', ')}`);
|
|
102
171
|
if (p.notInBaseline.length > 0)
|
|
103
172
|
unseen.push(` not in the baseline yet: ${p.notInBaseline.slice(0, 5).join(', ')}${p.notInBaseline.length > 5 ? ', …' : ''}`);
|
|
104
|
-
for (const
|
|
105
|
-
unseen.push(` not compared ${
|
|
173
|
+
for (const x of r.drift?.staleExcluded ?? [])
|
|
174
|
+
unseen.push(` not compared ${x} — same capture on both sides`);
|
|
106
175
|
if (r.drift?.depthMismatch)
|
|
107
176
|
unseen.push(` ${r.drift.depthMismatch}`);
|
|
108
177
|
if (r.check && r.check.unverified > 0)
|
|
109
178
|
unseen.push(` ${plural(r.check.unverified, 'link')} could not be verified (rate-limited or no answer)`);
|
|
110
|
-
for (const
|
|
111
|
-
unseen.push(` check skipped — ${
|
|
179
|
+
for (const k of r.check?.skipped ?? [])
|
|
180
|
+
unseen.push(` check skipped — ${k.check}: ${k.why}`);
|
|
181
|
+
if (s) {
|
|
182
|
+
if (s.inventory.missingPaths.length > 0)
|
|
183
|
+
unseen.push(` test paths not found: ${s.inventory.missingPaths.join(', ')}`);
|
|
184
|
+
if (s.inventory.filesScanned === 0)
|
|
185
|
+
unseen.push(' no test file found under your test paths — nothing of your suite was read');
|
|
186
|
+
if (!s.run) {
|
|
187
|
+
unseen.push(' which pages your suite visits is not measured yet — ia-qa-pal tour --suite runs it once to find out');
|
|
188
|
+
}
|
|
189
|
+
else if (s.notVisited === null) {
|
|
190
|
+
unseen.push(` your suite ran (${day(s.run.at)}, exit ${s.run.exitCode}) but recorded no page — its specs do not use the capture hook:`, ` ${suite_1.CAPTURE_IMPORT}`);
|
|
191
|
+
}
|
|
192
|
+
else if (s.notVisited.length > 0) {
|
|
193
|
+
unseen.push(` your suite never visits ${s.notVisited.length} of ${p.configured} pages (run of ${day(s.run.at)}): ` +
|
|
194
|
+
`${s.notVisited.slice(0, 6).join(', ')}${s.notVisited.length > 6 ? ', …' : ''}`);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
112
197
|
if (unseen.length > 0)
|
|
113
198
|
out.push('', '🔍 Not seen', ...unseen);
|
|
114
199
|
return out.join('\n') + '\n';
|
package/dist/report.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":";;AAiCA,oCA0EC;AAzGD;;;;;GAKG;AAEH,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,GAAW,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,E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GAAG,IAAI,CAAC;AAC/B,CAAC"}
|
package/dist/run.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { TourOptions, TourResult, TourEvent } from './tour';
|
|
2
|
+
/**
|
|
3
|
+
* One tour at a time per project, and a record anyone can read while it runs.
|
|
4
|
+
*
|
|
5
|
+
* Two tours over the same `.ia-qa/` would write the same contracts and promote the same baseline
|
|
6
|
+
* concurrently, so a second one is refused while the first is alive. The record is what
|
|
7
|
+
* `ia-qa-pal status` and the MCP server read: the phase, how far, and the report once it is done.
|
|
8
|
+
* A record whose process died before finishing is reported as interrupted, never as running.
|
|
9
|
+
*/
|
|
10
|
+
export interface RunRecord {
|
|
11
|
+
id: string;
|
|
12
|
+
pid: number;
|
|
13
|
+
status: 'running' | 'done' | 'failed';
|
|
14
|
+
startedAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
finishedAt?: string;
|
|
17
|
+
options: {
|
|
18
|
+
more: boolean;
|
|
19
|
+
suite: boolean;
|
|
20
|
+
batch?: number;
|
|
21
|
+
};
|
|
22
|
+
progress?: TourEvent;
|
|
23
|
+
exitCode?: number;
|
|
24
|
+
error?: string;
|
|
25
|
+
report?: TourResult;
|
|
26
|
+
}
|
|
27
|
+
export type RunView = (RunRecord & {
|
|
28
|
+
interrupted?: false;
|
|
29
|
+
}) | (Omit<RunRecord, 'status'> & {
|
|
30
|
+
status: 'interrupted';
|
|
31
|
+
interrupted: true;
|
|
32
|
+
});
|
|
33
|
+
export declare const runDir: (dir: string) => string;
|
|
34
|
+
export declare const runFile: (dir: string) => string;
|
|
35
|
+
export declare const logFile: (dir: string) => string;
|
|
36
|
+
export declare function isAlive(pid: number): boolean;
|
|
37
|
+
export declare function readRun(dir: string): RunView | null;
|
|
38
|
+
/** The running tour on this project, if one is alive. */
|
|
39
|
+
export declare function activeRun(dir: string): RunRecord | null;
|
|
40
|
+
export declare class TourAlreadyRunning extends Error {
|
|
41
|
+
readonly run: RunRecord;
|
|
42
|
+
constructor(run: RunRecord);
|
|
43
|
+
}
|
|
44
|
+
/** Run a tour with the lock held and the record kept current. */
|
|
45
|
+
export declare function trackedTour(opts: TourOptions & {
|
|
46
|
+
dir: string;
|
|
47
|
+
}): Promise<TourResult>;
|
|
48
|
+
export interface BackgroundStart {
|
|
49
|
+
started: boolean;
|
|
50
|
+
pid?: number;
|
|
51
|
+
log?: string;
|
|
52
|
+
/** Why it did not start. */
|
|
53
|
+
reason?: string;
|
|
54
|
+
run?: RunRecord;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Start a tour detached from the caller and return at once. The child is this package's own
|
|
58
|
+
* CLI with a fixed set of flags — never a command string from the caller.
|
|
59
|
+
*/
|
|
60
|
+
export declare function startBackground(dir: string, opts: {
|
|
61
|
+
more?: boolean;
|
|
62
|
+
suite?: boolean;
|
|
63
|
+
strict?: boolean;
|
|
64
|
+
batch?: number;
|
|
65
|
+
session?: string;
|
|
66
|
+
}, entry?: string): BackgroundStart;
|