@aplaytest/core 0.1.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.
Files changed (112) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/config/schema.d.ts +247 -0
  3. package/dist/config/schema.d.ts.map +1 -0
  4. package/dist/config/schema.js +279 -0
  5. package/dist/config/schema.js.map +1 -0
  6. package/dist/evidence/id.d.ts +17 -0
  7. package/dist/evidence/id.d.ts.map +1 -0
  8. package/dist/evidence/id.js +20 -0
  9. package/dist/evidence/id.js.map +1 -0
  10. package/dist/evidence/redact.d.ts +22 -0
  11. package/dist/evidence/redact.d.ts.map +1 -0
  12. package/dist/evidence/redact.js +97 -0
  13. package/dist/evidence/redact.js.map +1 -0
  14. package/dist/evidence/store.d.ts +51 -0
  15. package/dist/evidence/store.d.ts.map +1 -0
  16. package/dist/evidence/store.js +148 -0
  17. package/dist/evidence/store.js.map +1 -0
  18. package/dist/evidence/types.d.ts +183 -0
  19. package/dist/evidence/types.d.ts.map +1 -0
  20. package/dist/evidence/types.js +21 -0
  21. package/dist/evidence/types.js.map +1 -0
  22. package/dist/history/ingest-playwright.d.ts +26 -0
  23. package/dist/history/ingest-playwright.d.ts.map +1 -0
  24. package/dist/history/ingest-playwright.js +73 -0
  25. package/dist/history/ingest-playwright.js.map +1 -0
  26. package/dist/history/ingest.d.ts +29 -0
  27. package/dist/history/ingest.d.ts.map +1 -0
  28. package/dist/history/ingest.js +86 -0
  29. package/dist/history/ingest.js.map +1 -0
  30. package/dist/history/memory-index.d.ts +88 -0
  31. package/dist/history/memory-index.d.ts.map +1 -0
  32. package/dist/history/memory-index.js +236 -0
  33. package/dist/history/memory-index.js.map +1 -0
  34. package/dist/history/playwright-report.d.ts +102 -0
  35. package/dist/history/playwright-report.d.ts.map +1 -0
  36. package/dist/history/playwright-report.js +274 -0
  37. package/dist/history/playwright-report.js.map +1 -0
  38. package/dist/history/store.d.ts +73 -0
  39. package/dist/history/store.d.ts.map +1 -0
  40. package/dist/history/store.js +243 -0
  41. package/dist/history/store.js.map +1 -0
  42. package/dist/history/types.d.ts +69 -0
  43. package/dist/history/types.d.ts.map +1 -0
  44. package/dist/history/types.js +18 -0
  45. package/dist/history/types.js.map +1 -0
  46. package/dist/history/url.d.ts +79 -0
  47. package/dist/history/url.d.ts.map +1 -0
  48. package/dist/history/url.js +121 -0
  49. package/dist/history/url.js.map +1 -0
  50. package/dist/index.d.ts +39 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +31 -0
  53. package/dist/index.js.map +1 -0
  54. package/dist/locator/stability.d.ts +63 -0
  55. package/dist/locator/stability.d.ts.map +1 -0
  56. package/dist/locator/stability.js +127 -0
  57. package/dist/locator/stability.js.map +1 -0
  58. package/dist/taxonomy/classify.d.ts +63 -0
  59. package/dist/taxonomy/classify.d.ts.map +1 -0
  60. package/dist/taxonomy/classify.js +344 -0
  61. package/dist/taxonomy/classify.js.map +1 -0
  62. package/dist/taxonomy/kinds.d.ts +49 -0
  63. package/dist/taxonomy/kinds.d.ts.map +1 -0
  64. package/dist/taxonomy/kinds.js +139 -0
  65. package/dist/taxonomy/kinds.js.map +1 -0
  66. package/dist/taxonomy/parse-error.d.ts +85 -0
  67. package/dist/taxonomy/parse-error.d.ts.map +1 -0
  68. package/dist/taxonomy/parse-error.js +179 -0
  69. package/dist/taxonomy/parse-error.js.map +1 -0
  70. package/dist/version.d.ts +10 -0
  71. package/dist/version.d.ts.map +1 -0
  72. package/dist/version.js +10 -0
  73. package/dist/version.js.map +1 -0
  74. package/dist-cjs/.tsbuildinfo +1 -0
  75. package/dist-cjs/config/schema.js +283 -0
  76. package/dist-cjs/config/schema.js.map +1 -0
  77. package/dist-cjs/evidence/id.js +24 -0
  78. package/dist-cjs/evidence/id.js.map +1 -0
  79. package/dist-cjs/evidence/redact.js +103 -0
  80. package/dist-cjs/evidence/redact.js.map +1 -0
  81. package/dist-cjs/evidence/store.js +156 -0
  82. package/dist-cjs/evidence/store.js.map +1 -0
  83. package/dist-cjs/evidence/types.js +25 -0
  84. package/dist-cjs/evidence/types.js.map +1 -0
  85. package/dist-cjs/history/ingest-playwright.js +76 -0
  86. package/dist-cjs/history/ingest-playwright.js.map +1 -0
  87. package/dist-cjs/history/ingest.js +89 -0
  88. package/dist-cjs/history/ingest.js.map +1 -0
  89. package/dist-cjs/history/memory-index.js +242 -0
  90. package/dist-cjs/history/memory-index.js.map +1 -0
  91. package/dist-cjs/history/playwright-report.js +277 -0
  92. package/dist-cjs/history/playwright-report.js.map +1 -0
  93. package/dist-cjs/history/store.js +247 -0
  94. package/dist-cjs/history/store.js.map +1 -0
  95. package/dist-cjs/history/types.js +23 -0
  96. package/dist-cjs/history/types.js.map +1 -0
  97. package/dist-cjs/history/url.js +127 -0
  98. package/dist-cjs/history/url.js.map +1 -0
  99. package/dist-cjs/index.js +88 -0
  100. package/dist-cjs/index.js.map +1 -0
  101. package/dist-cjs/locator/stability.js +134 -0
  102. package/dist-cjs/locator/stability.js.map +1 -0
  103. package/dist-cjs/package.json +3 -0
  104. package/dist-cjs/taxonomy/classify.js +348 -0
  105. package/dist-cjs/taxonomy/classify.js.map +1 -0
  106. package/dist-cjs/taxonomy/kinds.js +145 -0
  107. package/dist-cjs/taxonomy/kinds.js.map +1 -0
  108. package/dist-cjs/taxonomy/parse-error.js +186 -0
  109. package/dist-cjs/taxonomy/parse-error.js.map +1 -0
  110. package/dist-cjs/version.js +13 -0
  111. package/dist-cjs/version.js.map +1 -0
  112. package/package.json +39 -0
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ /**
3
+ * Parse Playwright's error prose into structured signals.
4
+ *
5
+ * Playwright reports failures as formatted human text, not structured data —
6
+ * `TestError` carries `message` and `stack`, but not the matcher name, the
7
+ * locator, or the expected/received pair. Everything downstream (the
8
+ * classifier, candidate generation, the heal ledger) needs those as fields, so
9
+ * exactly one module does the string work and is tested against real output.
10
+ *
11
+ * When a field cannot be found the answer is `null`, never a guess. A wrong
12
+ * locator here would send the healing engine after the wrong element.
13
+ *
14
+ * ── Why this lives in core, next to the classifier ──────────────────────────
15
+ * It parses Playwright's OUTPUT TEXT; it imports nothing from Playwright, the
16
+ * same way `classify` matches on message strings without depending on the
17
+ * runner. Two consumers need it and only one of them can see the runner: the
18
+ * reporter (inside the test process, with a live `TestResult`) and the
19
+ * Playwright-JSON history adapter (in CI, with only a merged report on disk).
20
+ * Leaving it in `@aplaytest/runner-playwright` would have forced core to depend on
21
+ * the runner — inverting the dependency — or forced the adapter to reimplement
22
+ * the regexes, which is how two parsers drift into disagreeing about the same
23
+ * error. `@aplaytest/runner-playwright` re-exports it, so its public API is
24
+ * unchanged.
25
+ */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.stripAnsi = stripAnsi;
28
+ exports.joinErrors = joinErrors;
29
+ exports.parsePlaywrightError = parsePlaywrightError;
30
+ exports.stripCodeFrame = stripCodeFrame;
31
+ exports.splitCallLog = splitCallLog;
32
+ const MATCHER_PATTERNS = [
33
+ // expect(locator).toBeVisible() failed
34
+ /expect\((?:locator|page|received|apiResponse)\)\.(?:not\.)?(\w+)\(/,
35
+ // Timed out 5000ms waiting for expect(locator).toHaveText(expected)
36
+ /waiting for expect\([^)]*\)\.(?:not\.)?(\w+)\(/,
37
+ ];
38
+ const LOCATOR_PATTERNS = [
39
+ // "Locator: getByTestId('gym-card-name')"
40
+ /^\s*Locator:\s*(.+?)\s*$/m,
41
+ // " - waiting for getByTestId('search-clear-button')"
42
+ /waiting for (getBy\w+\([^\n]*?\)|locator\([^\n]*?\)|frameLocator\([^\n]*?\))/,
43
+ // "strict mode violation: getByTestId('gyms-list-item') resolved to 12 elements"
44
+ /strict mode violation:\s*(.+?)\s+resolved to/,
45
+ // "locator.click: ..." with a call-log resolution line
46
+ /locator resolved to\s+(<[^\n]+>)/,
47
+ ];
48
+ const EXPECTED_PATTERN = /^\s*Expected(?:\s+(?:string|pattern|value|array|object))?:\s*(.+?)\s*$/m;
49
+ const RECEIVED_PATTERN = /^\s*Received(?:\s+(?:string|value|array|object))?:\s*(.+?)\s*$/m;
50
+ const TIMEOUT_PATTERNS = [
51
+ /Timeout:\s*(\d+)ms/,
52
+ /Timeout\s+(\d+)ms exceeded/,
53
+ /Test timeout of\s+(\d+)ms exceeded/,
54
+ /Timed out\s+(\d+)ms waiting/,
55
+ ];
56
+ /**
57
+ * Playwright colourises `error.message` with ANSI escapes, even when stdout is
58
+ * not a TTY. Left in place they defeat every pattern here (the matcher name is
59
+ * split by escapes mid-word) and they are pure waste in a token budget when a
60
+ * bundle reaches a model. Strip once, at the boundary.
61
+ */
62
+ // eslint-disable-next-line no-control-regex
63
+ const ANSI_PATTERN = /\u001B\[[0-9;]*m/g;
64
+ function stripAnsi(input) {
65
+ return input.replace(ANSI_PATTERN, '');
66
+ }
67
+ /**
68
+ * Flatten an attempt's errors into the single message/stack pair the parser and
69
+ * the classifier read.
70
+ *
71
+ * Shared rather than duplicated: the reporter and the Playwright-JSON adapter
72
+ * both start from an array of errors, and two copies of "join, then strip
73
+ * ANSI" is two chances to strip in only one of them — which shows up much
74
+ * later as a classifier that mysteriously fails to match on one code path.
75
+ */
76
+ function joinErrors(errors) {
77
+ const join = (pick) => stripAnsi((errors ?? [])
78
+ .map(error => pick(error) ?? '')
79
+ .filter(text => text !== '')
80
+ .join('\n\n'));
81
+ return { message: join(e => e.message), stack: join(e => e.stack) };
82
+ }
83
+ function firstCapture(text, patterns) {
84
+ for (const re of patterns) {
85
+ const captured = re.exec(text)?.[1];
86
+ if (captured !== undefined && captured.trim() !== '')
87
+ return captured.trim();
88
+ }
89
+ return null;
90
+ }
91
+ /**
92
+ * Modern Playwright reports the received side as a trailing `Error: <reason>`
93
+ * line rather than `Received: …`:
94
+ *
95
+ * Error: expect(locator).toBeVisible() failed
96
+ * Locator: getByTestId('gym-card-name')
97
+ * Expected: visible
98
+ * Timeout: 1000ms
99
+ * Error: element(s) not found ← this is the "received"
100
+ *
101
+ * The FIRST `Error:` line is always the header, whatever it says — so the
102
+ * reason is a subsequent one. A message with a single `Error:` line has no
103
+ * separate received value and must return null rather than echoing its own
104
+ * header back as if it were the observed result.
105
+ */
106
+ function reasonLine(message) {
107
+ const errorLines = message
108
+ .split('\n')
109
+ .map(line => /^\s*Error:\s*(.+?)\s*$/.exec(line)?.[1])
110
+ .filter((value) => value !== undefined && value !== '');
111
+ return errorLines.slice(1).find(line => !line.includes('expect(')) ?? null;
112
+ }
113
+ function parsePlaywrightError(rawMessage, rawStack = '') {
114
+ const message = stripAnsi(rawMessage);
115
+ const stack = stripAnsi(rawStack);
116
+ const text = `${message}\n${stack}`;
117
+ const timeoutRaw = firstCapture(text, TIMEOUT_PATTERNS);
118
+ const timeoutMs = timeoutRaw === null ? null : Number.parseInt(timeoutRaw, 10);
119
+ // A `Timeout: Nms` line is an OUTCOME, not configuration: Playwright emits
120
+ // it only when the assertion actually consumed its budget. A failure that
121
+ // resolves immediately — a strict-mode violation, say — carries no such
122
+ // line. Verified against real 1.62 output.
123
+ const exhaustedBudget = /^\s*Timeout:\s*\d+ms\s*$/m.test(message);
124
+ return {
125
+ matcher: firstCapture(message, MATCHER_PATTERNS),
126
+ expected: firstCapture(message, [EXPECTED_PATTERN]),
127
+ actual: firstCapture(message, [RECEIVED_PATTERN]) ?? reasonLine(message),
128
+ locator: firstCapture(text, LOCATOR_PATTERNS),
129
+ timedOut: exhaustedBudget || /exceeded|Timed out/i.test(text),
130
+ timeoutMs: Number.isNaN(timeoutMs) ? null : timeoutMs,
131
+ };
132
+ }
133
+ // A Playwright code frame, as embedded in `error.message`:
134
+ //
135
+ // 13 | await page.goto('/about');
136
+ // 14 |
137
+ // > 15 | await page.getByTestId(mobileToggle).click();
138
+ // | ^
139
+ // at /repo/tests/layout/mobile-nav.ui.acceptance.spec.ts:15:44
140
+ //
141
+ const CODE_FRAME_LINE = /^\s*>?\s*\d+\s*\|/;
142
+ const CODE_FRAME_CARET = /^\s*\|\s*\^+\s*$/;
143
+ const CODE_FRAME_LOCATION = /^\s*at\s+\S+:\d+:\d+\s*$/;
144
+ /**
145
+ * Remove the source snippet Playwright embeds in an error message.
146
+ *
147
+ * This is not cosmetic. The frame is the USER'S OWN SOURCE, quoted with a few
148
+ * lines of context either side, and anything matching against the message will
149
+ * happily match against it. A real case from a live run: a `locator.click`
150
+ * timeout was classified `navigation_failure` because two lines above the
151
+ * failing call the spec happened to read `await page.goto('/about')`. The
152
+ * verdict routed on a line that had already succeeded.
153
+ *
154
+ * That is not a rare shape. In the acceptance run this was measured against,
155
+ * every failing attempt carried a frame — so in a UI suite, where nearly every
156
+ * test navigates somewhere, the contamination is the norm rather than the
157
+ * exception. And the cost is asymmetric: `navigation_failure` is `heal: never`,
158
+ * so a false match silently withdraws a genuinely healable failure from the
159
+ * healing engine and gives no indication it did so.
160
+ *
161
+ * Only classification input is stripped. Evidence bundles keep the full
162
+ * message, because the frame is exactly what a human wants to see first.
163
+ */
164
+ function stripCodeFrame(message) {
165
+ const kept = message
166
+ .split('\n')
167
+ .filter(line => !CODE_FRAME_LINE.test(line) &&
168
+ !CODE_FRAME_CARET.test(line) &&
169
+ !CODE_FRAME_LOCATION.test(line));
170
+ // Removing interior lines leaves runs of blanks where the frame used to be.
171
+ return kept.join('\n').replace(/\n{3,}/g, '\n\n').trim();
172
+ }
173
+ /**
174
+ * Playwright prints a trailing "Call log:" block that is invaluable for a
175
+ * human and pure noise for a token budget. Split it so the caller decides.
176
+ */
177
+ function splitCallLog(message) {
178
+ const index = message.indexOf('Call log:');
179
+ if (index === -1)
180
+ return { summary: message.trim(), callLog: null };
181
+ return {
182
+ summary: message.slice(0, index).trim(),
183
+ callLog: message.slice(index).trim(),
184
+ };
185
+ }
186
+ //# sourceMappingURL=parse-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-error.js","sourceRoot":"","sources":["../../src/taxonomy/parse-error.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;AAmDH,8BAEC;AAi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IAC5E,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3D,CAAC;AAED;;;GAGG;AACH,SAAgB,YAAY,CAAC,OAAe;IAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,KAAK,KAAK,CAAC,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACpE,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE;QACvC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE;KACrC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ATEST_VERSION = void 0;
4
+ /**
5
+ * Library version written into evidence bundles, run records, and MCP
6
+ * handshake metadata.
7
+ *
8
+ * Must match `packages/core/package.json` — the unit test in `config.test.ts`
9
+ * enforces that, because a drift here is how a consumer's `aplaytest doctor`
10
+ * reports a version nobody published.
11
+ */
12
+ exports.ATEST_VERSION = '0.1.0';
13
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACU,QAAA,aAAa,GAAG,OAAO,CAAC"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@aplaytest/core",
3
+ "version": "0.1.0",
4
+ "description": "Core types, failure taxonomy, and configuration for atest. No Playwright, no network, no LLM.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist-cjs/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist-cjs/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "dist-cjs"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsc --build",
22
+ "test": "vitest run"
23
+ },
24
+ "dependencies": {
25
+ "zod": "^4.3.6"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/ianoflynnautomation/aplaytest.git",
33
+ "directory": "packages/core"
34
+ },
35
+ "homepage": "https://github.com/ianoflynnautomation/aplaytest#readme",
36
+ "bugs": {
37
+ "url": "https://github.com/ianoflynnautomation/aplaytest/issues"
38
+ }
39
+ }