@vibe-validate/extractors 0.17.0-rc2 → 0.17.0-rc4
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/extractor-registry.d.ts +72 -0
- package/dist/extractor-registry.d.ts.map +1 -0
- package/dist/extractor-registry.js +243 -0
- package/dist/extractor-registry.js.map +1 -0
- package/dist/extractors/ava/index.d.ts +23 -0
- package/dist/extractors/ava/index.d.ts.map +1 -0
- package/dist/extractors/ava/index.js +507 -0
- package/dist/extractors/ava/index.js.map +1 -0
- package/dist/extractors/ava/index.test.d.ts +7 -0
- package/dist/extractors/ava/index.test.d.ts.map +1 -0
- package/dist/extractors/ava/index.test.js +408 -0
- package/dist/extractors/ava/index.test.js.map +1 -0
- package/dist/extractors/eslint/index.d.ts +18 -0
- package/dist/extractors/eslint/index.d.ts.map +1 -0
- package/dist/extractors/eslint/index.js +206 -0
- package/dist/extractors/eslint/index.js.map +1 -0
- package/dist/extractors/eslint/index.test.d.ts +9 -0
- package/dist/extractors/eslint/index.test.d.ts.map +1 -0
- package/dist/extractors/eslint/index.test.js +191 -0
- package/dist/extractors/eslint/index.test.js.map +1 -0
- package/dist/extractors/generic/index.d.ts +30 -0
- package/dist/extractors/generic/index.d.ts.map +1 -0
- package/dist/extractors/generic/index.js +140 -0
- package/dist/extractors/generic/index.js.map +1 -0
- package/dist/extractors/generic/index.test.d.ts +7 -0
- package/dist/extractors/generic/index.test.d.ts.map +1 -0
- package/dist/extractors/generic/index.test.js +61 -0
- package/dist/extractors/generic/index.test.js.map +1 -0
- package/dist/extractors/jasmine/index.d.ts +17 -0
- package/dist/extractors/jasmine/index.d.ts.map +1 -0
- package/dist/extractors/jasmine/index.js +242 -0
- package/dist/extractors/jasmine/index.js.map +1 -0
- package/dist/extractors/jasmine/index.test.d.ts +7 -0
- package/dist/extractors/jasmine/index.test.d.ts.map +1 -0
- package/dist/extractors/jasmine/index.test.js +318 -0
- package/dist/extractors/jasmine/index.test.js.map +1 -0
- package/dist/extractors/jest/index.d.ts +17 -0
- package/dist/extractors/jest/index.d.ts.map +1 -0
- package/dist/extractors/jest/index.js +273 -0
- package/dist/extractors/jest/index.js.map +1 -0
- package/dist/extractors/jest/index.test.d.ts +9 -0
- package/dist/extractors/jest/index.test.d.ts.map +1 -0
- package/dist/extractors/jest/index.test.js +338 -0
- package/dist/extractors/jest/index.test.js.map +1 -0
- package/dist/extractors/junit/index.d.ts +18 -0
- package/dist/extractors/junit/index.d.ts.map +1 -0
- package/dist/extractors/junit/index.js +259 -0
- package/dist/extractors/junit/index.js.map +1 -0
- package/dist/extractors/junit/index.test.d.ts +7 -0
- package/dist/extractors/junit/index.test.d.ts.map +1 -0
- package/dist/extractors/junit/index.test.js +341 -0
- package/dist/extractors/junit/index.test.js.map +1 -0
- package/dist/extractors/maven-checkstyle/index.d.ts +23 -0
- package/dist/extractors/maven-checkstyle/index.d.ts.map +1 -0
- package/dist/extractors/maven-checkstyle/index.js +263 -0
- package/dist/extractors/maven-checkstyle/index.js.map +1 -0
- package/dist/extractors/maven-checkstyle/index.test.d.ts +2 -0
- package/dist/extractors/maven-checkstyle/index.test.d.ts.map +1 -0
- package/dist/extractors/maven-checkstyle/index.test.js +197 -0
- package/dist/extractors/maven-checkstyle/index.test.js.map +1 -0
- package/dist/extractors/maven-compiler/index.d.ts +23 -0
- package/dist/extractors/maven-compiler/index.d.ts.map +1 -0
- package/dist/extractors/maven-compiler/index.js +271 -0
- package/dist/extractors/maven-compiler/index.js.map +1 -0
- package/dist/extractors/maven-compiler/index.test.d.ts +2 -0
- package/dist/extractors/maven-compiler/index.test.d.ts.map +1 -0
- package/dist/extractors/maven-compiler/index.test.js +189 -0
- package/dist/extractors/maven-compiler/index.test.js.map +1 -0
- package/dist/extractors/maven-surefire/index.d.ts +23 -0
- package/dist/extractors/maven-surefire/index.d.ts.map +1 -0
- package/dist/extractors/maven-surefire/index.js +292 -0
- package/dist/extractors/maven-surefire/index.js.map +1 -0
- package/dist/extractors/maven-surefire/index.test.d.ts +2 -0
- package/dist/extractors/maven-surefire/index.test.d.ts.map +1 -0
- package/dist/extractors/maven-surefire/index.test.js +163 -0
- package/dist/extractors/maven-surefire/index.test.js.map +1 -0
- package/dist/extractors/mocha/index.d.ts +17 -0
- package/dist/extractors/mocha/index.d.ts.map +1 -0
- package/dist/extractors/mocha/index.js +241 -0
- package/dist/extractors/mocha/index.js.map +1 -0
- package/dist/extractors/mocha/index.test.d.ts +7 -0
- package/dist/extractors/mocha/index.test.d.ts.map +1 -0
- package/dist/extractors/mocha/index.test.js +300 -0
- package/dist/extractors/mocha/index.test.js.map +1 -0
- package/dist/extractors/playwright/index.d.ts +17 -0
- package/dist/extractors/playwright/index.d.ts.map +1 -0
- package/dist/extractors/playwright/index.js +320 -0
- package/dist/extractors/playwright/index.js.map +1 -0
- package/dist/extractors/playwright/index.test.d.ts +7 -0
- package/dist/extractors/playwright/index.test.d.ts.map +1 -0
- package/dist/extractors/playwright/index.test.js +274 -0
- package/dist/extractors/playwright/index.test.js.map +1 -0
- package/dist/extractors/tap/index.d.ts +23 -0
- package/dist/extractors/tap/index.d.ts.map +1 -0
- package/dist/extractors/tap/index.js +352 -0
- package/dist/extractors/tap/index.js.map +1 -0
- package/dist/extractors/tap/index.test.d.ts +7 -0
- package/dist/extractors/tap/index.test.d.ts.map +1 -0
- package/dist/extractors/tap/index.test.js +100 -0
- package/dist/extractors/tap/index.test.js.map +1 -0
- package/dist/extractors/typescript/index.d.ts +17 -0
- package/dist/extractors/typescript/index.d.ts.map +1 -0
- package/dist/extractors/typescript/index.js +150 -0
- package/dist/extractors/typescript/index.js.map +1 -0
- package/dist/extractors/typescript/index.test.d.ts +9 -0
- package/dist/extractors/typescript/index.test.d.ts.map +1 -0
- package/dist/extractors/typescript/index.test.js +177 -0
- package/dist/extractors/typescript/index.test.js.map +1 -0
- package/dist/extractors/vitest/index.d.ts +17 -0
- package/dist/extractors/vitest/index.d.ts.map +1 -0
- package/dist/extractors/vitest/index.js +564 -0
- package/dist/extractors/vitest/index.js.map +1 -0
- package/dist/extractors/vitest/index.test.d.ts +9 -0
- package/dist/extractors/vitest/index.test.d.ts.map +1 -0
- package/dist/extractors/vitest/index.test.js +373 -0
- package/dist/extractors/vitest/index.test.js.map +1 -0
- package/dist/index.d.ts +27 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -13
- package/dist/index.js.map +1 -1
- package/dist/maven-checkstyle-extractor.d.ts.map +1 -1
- package/dist/maven-checkstyle-extractor.js +2 -17
- package/dist/maven-checkstyle-extractor.js.map +1 -1
- package/dist/maven-compiler-extractor.d.ts +20 -0
- package/dist/maven-compiler-extractor.d.ts.map +1 -0
- package/dist/maven-compiler-extractor.js +218 -0
- package/dist/maven-compiler-extractor.js.map +1 -0
- package/dist/maven-utils.d.ts +24 -0
- package/dist/maven-utils.d.ts.map +1 -0
- package/dist/maven-utils.js +36 -0
- package/dist/maven-utils.js.map +1 -0
- package/dist/plugin-loader.d.ts +82 -0
- package/dist/plugin-loader.d.ts.map +1 -0
- package/dist/plugin-loader.js +200 -0
- package/dist/plugin-loader.js.map +1 -0
- package/dist/sandbox.d.ts +161 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +254 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/sandbox.test.d.ts +8 -0
- package/dist/sandbox.test.d.ts.map +1 -0
- package/dist/sandbox.test.js +395 -0
- package/dist/sandbox.test.js.map +1 -0
- package/dist/sandboxed-extractor.d.ts +51 -0
- package/dist/sandboxed-extractor.d.ts.map +1 -0
- package/dist/sandboxed-extractor.js +172 -0
- package/dist/sandboxed-extractor.js.map +1 -0
- package/dist/sandboxed-extractor.test.d.ts +5 -0
- package/dist/sandboxed-extractor.test.d.ts.map +1 -0
- package/dist/sandboxed-extractor.test.js +346 -0
- package/dist/sandboxed-extractor.test.js.map +1 -0
- package/dist/smart-extractor.d.ts +22 -10
- package/dist/smart-extractor.d.ts.map +1 -1
- package/dist/smart-extractor.js +116 -186
- package/dist/smart-extractor.js.map +1 -1
- package/dist/types.d.ts +94 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ava Error Extractor Tests
|
|
3
|
+
*
|
|
4
|
+
* @package @vibe-validate/extractors
|
|
5
|
+
*/
|
|
6
|
+
import { describe, it, expect } from 'vitest';
|
|
7
|
+
import avaExtractor from './index.js';
|
|
8
|
+
import { readFileSync } from 'node:fs';
|
|
9
|
+
import { join, dirname } from 'node:path';
|
|
10
|
+
import { fileURLToPath } from 'node:url';
|
|
11
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = dirname(__filename);
|
|
13
|
+
const { extract: extractAvaErrors, detect: detectAva } = avaExtractor;
|
|
14
|
+
describe('Ava Extractor Plugin', () => {
|
|
15
|
+
describe('Detection', () => {
|
|
16
|
+
it('should detect Ava output with high confidence', () => {
|
|
17
|
+
const input = `
|
|
18
|
+
✘ [fail]: Test › should fail
|
|
19
|
+
|
|
20
|
+
Test › should fail
|
|
21
|
+
|
|
22
|
+
tests/test.js:10
|
|
23
|
+
|
|
24
|
+
› file://tests/test.js:10:5
|
|
25
|
+
`;
|
|
26
|
+
const result = detectAva(input);
|
|
27
|
+
expect(result.confidence).toBeGreaterThanOrEqual(70);
|
|
28
|
+
expect(result.patterns).toContain('Ava failure marker (✘ [fail]:)');
|
|
29
|
+
});
|
|
30
|
+
it('should reject non-Ava output', () => {
|
|
31
|
+
const input = `
|
|
32
|
+
PASS tests/test.js
|
|
33
|
+
✓ test passes
|
|
34
|
+
`;
|
|
35
|
+
const result = detectAva(input);
|
|
36
|
+
expect(result.confidence).toBeLessThan(40);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
describe('Basic Extraction', () => {
|
|
40
|
+
it('should extract single test failure from Ava output', () => {
|
|
41
|
+
const input = `
|
|
42
|
+
✘ [fail]: Extractors › should extract TypeScript errors correctly should have 5 errors
|
|
43
|
+
|
|
44
|
+
Extractors › should extract TypeScript errors correctly
|
|
45
|
+
|
|
46
|
+
tests/ava/comprehensive-failures.test.js:28
|
|
47
|
+
|
|
48
|
+
27: // Expected: 1 error, but we assert 5 (INTENTIONAL FAILURE)
|
|
49
|
+
28: t.is(result.errors.length, 5, 'should have 5 errors');
|
|
50
|
+
29: });
|
|
51
|
+
|
|
52
|
+
should have 5 errors
|
|
53
|
+
|
|
54
|
+
Difference (- actual, + expected):
|
|
55
|
+
|
|
56
|
+
- 1
|
|
57
|
+
+ 5
|
|
58
|
+
|
|
59
|
+
› file://tests/ava/comprehensive-failures.test.js:28:5
|
|
60
|
+
`;
|
|
61
|
+
const result = extractAvaErrors(input);
|
|
62
|
+
expect(result.summary).toBe('1 test(s) failed');
|
|
63
|
+
expect(result.errors).toHaveLength(1);
|
|
64
|
+
expect(result.errors[0]).toMatchObject({
|
|
65
|
+
file: 'tests/ava/comprehensive-failures.test.js',
|
|
66
|
+
line: 28,
|
|
67
|
+
message: 'should have 5 errors',
|
|
68
|
+
});
|
|
69
|
+
expect(result.errors[0].context).toContain('Extractors › should extract TypeScript errors correctly');
|
|
70
|
+
});
|
|
71
|
+
it('should extract multiple test failures', () => {
|
|
72
|
+
const input = `
|
|
73
|
+
✘ [fail]: Test 1 › should fail first assertion error one
|
|
74
|
+
✘ [fail]: Test 2 › should fail second assertion error two
|
|
75
|
+
✘ [fail]: Test 3 › should fail third assertion error three
|
|
76
|
+
|
|
77
|
+
Test 1 › should fail first assertion
|
|
78
|
+
|
|
79
|
+
tests/ava/test.js:10
|
|
80
|
+
|
|
81
|
+
10: t.is(1, 2, 'error one');
|
|
82
|
+
|
|
83
|
+
error one
|
|
84
|
+
|
|
85
|
+
› file://tests/ava/test.js:10:5
|
|
86
|
+
|
|
87
|
+
Test 2 › should fail second assertion
|
|
88
|
+
|
|
89
|
+
tests/ava/test.js:20
|
|
90
|
+
|
|
91
|
+
20: t.is(2, 3, 'error two');
|
|
92
|
+
|
|
93
|
+
error two
|
|
94
|
+
|
|
95
|
+
› file://tests/ava/test.js:20:5
|
|
96
|
+
|
|
97
|
+
Test 3 › should fail third assertion
|
|
98
|
+
|
|
99
|
+
tests/ava/test.js:30
|
|
100
|
+
|
|
101
|
+
30: t.is(3, 4, 'error three');
|
|
102
|
+
|
|
103
|
+
error three
|
|
104
|
+
|
|
105
|
+
› file://tests/ava/test.js:30:5
|
|
106
|
+
`;
|
|
107
|
+
const result = extractAvaErrors(input);
|
|
108
|
+
expect(result.summary).toBe('3 test(s) failed');
|
|
109
|
+
expect(result.errors).toHaveLength(3);
|
|
110
|
+
expect(result.errors[0].line).toBe(10);
|
|
111
|
+
expect(result.errors[1].line).toBe(20);
|
|
112
|
+
expect(result.errors[2].line).toBe(30);
|
|
113
|
+
expect(result.errors[0].message).toBe('error one');
|
|
114
|
+
expect(result.errors[1].message).toBe('error two');
|
|
115
|
+
expect(result.errors[2].message).toBe('error three');
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
describe('Error Type Detection', () => {
|
|
119
|
+
it('should detect assertion errors', () => {
|
|
120
|
+
const input = `
|
|
121
|
+
✘ [fail]: should fail assertion error
|
|
122
|
+
|
|
123
|
+
tests/test.js:10
|
|
124
|
+
|
|
125
|
+
10: t.is(2 + 2, 5, '2+2 should equal 5');
|
|
126
|
+
|
|
127
|
+
2+2 should equal 5
|
|
128
|
+
|
|
129
|
+
Difference (- actual, + expected):
|
|
130
|
+
|
|
131
|
+
- 4
|
|
132
|
+
+ 5
|
|
133
|
+
|
|
134
|
+
› file://tests/test.js:10:5
|
|
135
|
+
`;
|
|
136
|
+
const result = extractAvaErrors(input);
|
|
137
|
+
expect(result.errors).toHaveLength(1);
|
|
138
|
+
expect(result.errors[0].message).toBe('2+2 should equal 5');
|
|
139
|
+
expect(result.errors[0].guidance).toContain('assertion');
|
|
140
|
+
});
|
|
141
|
+
it('should detect TypeError', () => {
|
|
142
|
+
const input = `
|
|
143
|
+
✘ [fail]: should fail with TypeError Error thrown in test
|
|
144
|
+
|
|
145
|
+
Error thrown in test:
|
|
146
|
+
|
|
147
|
+
TypeError {
|
|
148
|
+
message: 'Cannot read properties of null (reading "someProperty")',
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
TypeError: Cannot read properties of null (reading 'someProperty')
|
|
152
|
+
at file:///Users/jeff/project/test.js:118:21
|
|
153
|
+
`;
|
|
154
|
+
const result = extractAvaErrors(input);
|
|
155
|
+
expect(result.errors).toHaveLength(1);
|
|
156
|
+
expect(result.errors[0].message).toContain('Cannot read properties of null');
|
|
157
|
+
expect(result.errors[0].guidance).toContain('null/undefined');
|
|
158
|
+
});
|
|
159
|
+
it('should detect file not found errors (ENOENT)', () => {
|
|
160
|
+
const input = String.raw `
|
|
161
|
+
✘ [fail]: should fail when reading non-existent file Error thrown in test
|
|
162
|
+
|
|
163
|
+
Error thrown in test:
|
|
164
|
+
|
|
165
|
+
Error {
|
|
166
|
+
code: 'ENOENT',
|
|
167
|
+
errno: -2,
|
|
168
|
+
path: '/this/path/does/not/exist.txt',
|
|
169
|
+
syscall: 'open',
|
|
170
|
+
message: 'ENOENT: no such file or directory, open \'/this/path/does/not/exist.txt\'',
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
Error: ENOENT: no such file or directory, open '/this/path/does/not/exist.txt'
|
|
174
|
+
at readFileSync (node:fs:435:20)
|
|
175
|
+
at file:///Users/jeff/project/test.js:65:19
|
|
176
|
+
`;
|
|
177
|
+
const result = extractAvaErrors(input);
|
|
178
|
+
expect(result.errors).toHaveLength(1);
|
|
179
|
+
expect(result.errors[0].message).toContain('ENOENT');
|
|
180
|
+
expect(result.errors[0].guidance).toContain('file path');
|
|
181
|
+
});
|
|
182
|
+
it('should detect timeout errors', () => {
|
|
183
|
+
const input = `
|
|
184
|
+
✘ [fail]: should timeout waiting for operation Test timeout exceeded
|
|
185
|
+
|
|
186
|
+
Error: Test timeout exceeded
|
|
187
|
+
at Timeout.<anonymous> (file:///path/to/ava/lib/test.js:439:24)
|
|
188
|
+
at listOnTimeout (node:internal/timers:608:17)
|
|
189
|
+
`;
|
|
190
|
+
const result = extractAvaErrors(input);
|
|
191
|
+
expect(result.errors).toHaveLength(1);
|
|
192
|
+
expect(result.errors[0].message).toContain('timeout');
|
|
193
|
+
expect(result.errors[0].guidance).toContain('timeout');
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
describe('Location Extraction', () => {
|
|
197
|
+
it('should extract file location from file:// URL', () => {
|
|
198
|
+
const input = `
|
|
199
|
+
✘ [fail]: test error
|
|
200
|
+
|
|
201
|
+
tests/ava/test.js:96
|
|
202
|
+
|
|
203
|
+
› file://tests/ava/test.js:96:5
|
|
204
|
+
`;
|
|
205
|
+
const result = extractAvaErrors(input);
|
|
206
|
+
expect(result.errors).toHaveLength(1);
|
|
207
|
+
expect(result.errors[0].file).toBe('tests/ava/test.js');
|
|
208
|
+
expect(result.errors[0].line).toBe(96);
|
|
209
|
+
});
|
|
210
|
+
it('should extract file location from absolute path in file:// URL', () => {
|
|
211
|
+
const input = `
|
|
212
|
+
✘ [fail]: test error
|
|
213
|
+
|
|
214
|
+
Error: Something failed
|
|
215
|
+
at file:///Users/jeff/Workspaces/project/tests/ava/test.js:118:21
|
|
216
|
+
`;
|
|
217
|
+
const result = extractAvaErrors(input);
|
|
218
|
+
expect(result.errors).toHaveLength(1);
|
|
219
|
+
expect(result.errors[0].file).toBe('/Users/jeff/Workspaces/project/tests/ava/test.js');
|
|
220
|
+
expect(result.errors[0].line).toBe(118);
|
|
221
|
+
});
|
|
222
|
+
it('should extract file location from regular path format', () => {
|
|
223
|
+
const input = `
|
|
224
|
+
✘ [fail]: test error
|
|
225
|
+
|
|
226
|
+
tests/ava/comprehensive-failures.test.js:28
|
|
227
|
+
|
|
228
|
+
28: t.is(result.errors.length, 5, 'should have 5 errors');
|
|
229
|
+
`;
|
|
230
|
+
const result = extractAvaErrors(input);
|
|
231
|
+
expect(result.errors).toHaveLength(1);
|
|
232
|
+
expect(result.errors[0].file).toBe('tests/ava/comprehensive-failures.test.js');
|
|
233
|
+
expect(result.errors[0].line).toBe(28);
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
describe('Test Hierarchy', () => {
|
|
237
|
+
it('should preserve test hierarchy in context', () => {
|
|
238
|
+
const input = `
|
|
239
|
+
✘ [fail]: Extractors › Assertion Errors › should extract TypeScript errors correctly should have 5 errors
|
|
240
|
+
|
|
241
|
+
Extractors › Assertion Errors › should extract TypeScript errors correctly
|
|
242
|
+
|
|
243
|
+
tests/test.js:28
|
|
244
|
+
|
|
245
|
+
› file://tests/test.js:28:5
|
|
246
|
+
`;
|
|
247
|
+
const result = extractAvaErrors(input);
|
|
248
|
+
expect(result.errors).toHaveLength(1);
|
|
249
|
+
expect(result.errors[0].context).toContain('Extractors › Assertion Errors › should extract TypeScript errors correctly');
|
|
250
|
+
});
|
|
251
|
+
it('should preserve deep hierarchy with multiple levels', () => {
|
|
252
|
+
const input = `
|
|
253
|
+
✘ [fail]: Edge Cases › Nested describe blocks › Level 1 › Level 2 › should handle deep nesting 2+2 should equal 5
|
|
254
|
+
|
|
255
|
+
Edge Cases › Nested describe blocks › Level 1 › Level 2 › should handle deep nesting
|
|
256
|
+
|
|
257
|
+
tests/test.js:96
|
|
258
|
+
|
|
259
|
+
› file://tests/test.js:96:5
|
|
260
|
+
`;
|
|
261
|
+
const result = extractAvaErrors(input);
|
|
262
|
+
expect(result.errors).toHaveLength(1);
|
|
263
|
+
expect(result.errors[0].context).toContain('Edge Cases › Nested describe blocks › Level 1 › Level 2 › should handle deep nesting');
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
describe('Edge Cases', () => {
|
|
267
|
+
it('should return empty errors for output with no failures', () => {
|
|
268
|
+
// Has Ava patterns but no [fail] markers (all tests passed)
|
|
269
|
+
const input = `
|
|
270
|
+
✓ Test Suite › should pass
|
|
271
|
+
|
|
272
|
+
11 tests passed
|
|
273
|
+
`;
|
|
274
|
+
const result = extractAvaErrors(input);
|
|
275
|
+
// Detection should fail for passing tests (no ✘ [fail] marker)
|
|
276
|
+
expect(result.errors).toHaveLength(0);
|
|
277
|
+
expect(result.summary).toBe('Not Ava test output');
|
|
278
|
+
});
|
|
279
|
+
it('should handle empty output', () => {
|
|
280
|
+
const result = extractAvaErrors('');
|
|
281
|
+
expect(result.errors).toHaveLength(0);
|
|
282
|
+
expect(result.summary).toBe('Not Ava test output');
|
|
283
|
+
});
|
|
284
|
+
it('should handle malformed failure output gracefully', () => {
|
|
285
|
+
const input = `
|
|
286
|
+
✘ [fail]: malformed test
|
|
287
|
+
|
|
288
|
+
This is malformed output without proper structure
|
|
289
|
+
`;
|
|
290
|
+
const result = extractAvaErrors(input);
|
|
291
|
+
expect(result.errors).toHaveLength(1);
|
|
292
|
+
expect(result.errors[0].file).toBe('unknown');
|
|
293
|
+
expect(result.errors[0].line).toBeUndefined();
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
describe('Guidance Generation', () => {
|
|
297
|
+
it('should provide guidance for assertion errors', () => {
|
|
298
|
+
const input = `
|
|
299
|
+
✘ [fail]: assertion failure 2+2 should equal 5
|
|
300
|
+
|
|
301
|
+
Difference (- actual, + expected):
|
|
302
|
+
|
|
303
|
+
- 4
|
|
304
|
+
+ 5
|
|
305
|
+
|
|
306
|
+
› file://tests/test.js:10:5
|
|
307
|
+
`;
|
|
308
|
+
const result = extractAvaErrors(input);
|
|
309
|
+
expect(result.errors[0].guidance).toBeDefined();
|
|
310
|
+
expect(result.errors[0].guidance).toContain('assertion');
|
|
311
|
+
});
|
|
312
|
+
it('should provide guidance for timeout errors', () => {
|
|
313
|
+
const input = `
|
|
314
|
+
✘ [fail]: timeout Test timeout exceeded
|
|
315
|
+
|
|
316
|
+
Error: Test timeout exceeded
|
|
317
|
+
`;
|
|
318
|
+
const result = extractAvaErrors(input);
|
|
319
|
+
expect(result.errors[0].guidance).toBeDefined();
|
|
320
|
+
expect(result.errors[0].guidance).toContain('timeout');
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
describe('Quality Metadata', () => {
|
|
324
|
+
it('should include quality metadata in result', () => {
|
|
325
|
+
const input = `
|
|
326
|
+
✘ [fail]: test error
|
|
327
|
+
|
|
328
|
+
tests/test.js:10
|
|
329
|
+
|
|
330
|
+
› file://tests/test.js:10:5
|
|
331
|
+
`;
|
|
332
|
+
const result = extractAvaErrors(input);
|
|
333
|
+
expect(result.metadata).toBeDefined();
|
|
334
|
+
expect(result.metadata.confidence).toBeGreaterThan(0);
|
|
335
|
+
expect(result.metadata.completeness).toBeGreaterThan(0);
|
|
336
|
+
expect(result.metadata.issues).toBeInstanceOf(Array);
|
|
337
|
+
});
|
|
338
|
+
it('should report high confidence for well-formed output', () => {
|
|
339
|
+
const input = `
|
|
340
|
+
✘ [fail]: test error message
|
|
341
|
+
|
|
342
|
+
Test › should fail
|
|
343
|
+
|
|
344
|
+
tests/test.js:10
|
|
345
|
+
|
|
346
|
+
10: t.is(1, 2, 'error message');
|
|
347
|
+
|
|
348
|
+
error message
|
|
349
|
+
|
|
350
|
+
› file://tests/test.js:10:5
|
|
351
|
+
`;
|
|
352
|
+
const result = extractAvaErrors(input);
|
|
353
|
+
expect(result.metadata.confidence).toBeGreaterThanOrEqual(90);
|
|
354
|
+
expect(result.metadata.completeness).toBeGreaterThanOrEqual(90);
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
describe('Comprehensive Sample', () => {
|
|
358
|
+
it('should extract errors from real Ava comprehensive failure output', () => {
|
|
359
|
+
const samplePath = join(__dirname, 'samples', 'comprehensive-failures-001.txt');
|
|
360
|
+
const sampleOutput = readFileSync(samplePath, 'utf-8');
|
|
361
|
+
const result = extractAvaErrors(sampleOutput);
|
|
362
|
+
// Should extract 11 failures from comprehensive test suite
|
|
363
|
+
expect(result.errors.length).toBeGreaterThanOrEqual(10);
|
|
364
|
+
expect(result.errors.length).toBeLessThanOrEqual(13);
|
|
365
|
+
// Verify quality metadata
|
|
366
|
+
expect(result.metadata.confidence).toBeGreaterThanOrEqual(85);
|
|
367
|
+
expect(result.metadata.completeness).toBeGreaterThanOrEqual(70); // 8/11 failures have complete data
|
|
368
|
+
// Spot check some specific failures
|
|
369
|
+
const assertionErrors = result.errors.filter((e) => e.guidance?.includes('assertion'));
|
|
370
|
+
expect(assertionErrors.length).toBeGreaterThan(0);
|
|
371
|
+
const typeErrors = result.errors.filter((e) => e.guidance?.includes('null/undefined'));
|
|
372
|
+
expect(typeErrors.length).toBeGreaterThan(0);
|
|
373
|
+
// Verify all errors have required fields
|
|
374
|
+
for (const error of result.errors) {
|
|
375
|
+
expect(error.message).toBeDefined();
|
|
376
|
+
expect(error.message.length).toBeGreaterThan(0);
|
|
377
|
+
if (error.file !== 'unknown') {
|
|
378
|
+
expect(error.file).toBeTruthy();
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
describe('Plugin Samples', () => {
|
|
384
|
+
it('should pass all registered samples', () => {
|
|
385
|
+
for (const sample of avaExtractor.samples) {
|
|
386
|
+
const input = sample.input ?? readFileSync(join(__dirname, sample.inputFile), 'utf-8');
|
|
387
|
+
const result = extractAvaErrors(input);
|
|
388
|
+
if (sample.expected.totalErrors !== undefined) {
|
|
389
|
+
expect(result.totalErrors).toBe(sample.expected.totalErrors);
|
|
390
|
+
}
|
|
391
|
+
if (sample.expected.errors) {
|
|
392
|
+
expect(result.errors).toHaveLength(sample.expected.errors.length);
|
|
393
|
+
for (let i = 0; i < sample.expected.errors.length; i++) {
|
|
394
|
+
const expectedError = sample.expected.errors[i];
|
|
395
|
+
const actualError = result.errors[i];
|
|
396
|
+
if (expectedError.file)
|
|
397
|
+
expect(actualError.file).toBe(expectedError.file);
|
|
398
|
+
if (expectedError.line)
|
|
399
|
+
expect(actualError.line).toBe(expectedError.line);
|
|
400
|
+
if (expectedError.message)
|
|
401
|
+
expect(actualError.message).toContain(expectedError.message);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
//# sourceMappingURL=index.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/extractors/ava/index.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,YAAY,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,YAAY,CAAC;AAEtE,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;QACzB,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;YACvD,MAAM,KAAK,GAAG;;;;;;;;CAQnB,CAAC;YAEI,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;YAChC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;YACrD,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,gCAAgC,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;YACtC,MAAM,KAAK,GAAG;;;CAGnB,CAAC;YAEI,MAAM,M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7
|
+
*/
|
|
8
|
+
import type { ExtractorPlugin } from '../../types.js';
|
|
9
|
+
/**
|
|
10
|
+
* ESLint Error Extractor Plugin
|
|
11
|
+
*
|
|
12
|
+
* Extracts ESLint errors with good confidence (85%).
|
|
13
|
+
* Supports both modern (file:line:col:) and stylish (indented) formats.
|
|
14
|
+
* Deduplicates errors at same location, preferring @typescript-eslint rules.
|
|
15
|
+
*/
|
|
16
|
+
declare const eslintPlugin: ExtractorPlugin;
|
|
17
|
+
export default eslintPlugin;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/extractors/eslint/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,eAAe,EAKhB,MAAM,gBAAgB,CAAC;AAkMxB;;;;;;GAMG;AACH,QAAA,MAAM,YAAY,EAAE,eAiBnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESLint Error Extractor Plugin
|
|
3
|
+
*
|
|
4
|
+
* Parses and formats ESLint error output for LLM consumption.
|
|
5
|
+
*
|
|
6
|
+
* @package @vibe-validate/extractors
|
|
7
|
+
*/
|
|
8
|
+
import { MAX_ERRORS_IN_ARRAY } from '../../result-schema.js';
|
|
9
|
+
/**
|
|
10
|
+
* Deduplicate ESLint errors by file:line:column
|
|
11
|
+
*
|
|
12
|
+
* When multiple rules report the same error at the same location,
|
|
13
|
+
* prefer @typescript-eslint/* rules over base ESLint rules.
|
|
14
|
+
*
|
|
15
|
+
* @param errors - Array of parsed ESLint errors
|
|
16
|
+
* @returns Deduplicated array of errors
|
|
17
|
+
*/
|
|
18
|
+
function deduplicateESLintErrors(errors) {
|
|
19
|
+
// Group errors by file:line:column
|
|
20
|
+
const errorMap = new Map();
|
|
21
|
+
for (const error of errors) {
|
|
22
|
+
const key = `${error.file}:${error.line}:${error.column}`;
|
|
23
|
+
if (!errorMap.has(key)) {
|
|
24
|
+
errorMap.set(key, []);
|
|
25
|
+
}
|
|
26
|
+
const locationErrors = errorMap.get(key);
|
|
27
|
+
if (locationErrors) {
|
|
28
|
+
locationErrors.push(error);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// For each location, pick the best error
|
|
32
|
+
const deduplicated = [];
|
|
33
|
+
for (const locationErrors of errorMap.values()) {
|
|
34
|
+
if (locationErrors.length === 1) {
|
|
35
|
+
deduplicated.push(locationErrors[0]);
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
// Prefer @typescript-eslint/* rules over base ESLint rules
|
|
39
|
+
const typescriptEslintError = locationErrors.find(e => e.code?.startsWith('@typescript-eslint/'));
|
|
40
|
+
if (typescriptEslintError) {
|
|
41
|
+
deduplicated.push(typescriptEslintError);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
// No typescript-eslint rule, just take the first one
|
|
45
|
+
deduplicated.push(locationErrors[0]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return deduplicated;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Generate ESLint-specific guidance based on rule violations
|
|
52
|
+
*
|
|
53
|
+
* @param errors - Parsed ESLint errors
|
|
54
|
+
* @returns Actionable guidance string
|
|
55
|
+
*/
|
|
56
|
+
function getESLintGuidance(errors) {
|
|
57
|
+
const rules = new Set(errors.map(e => e.code));
|
|
58
|
+
const guidance = [];
|
|
59
|
+
if (rules.has('@typescript-eslint/no-unused-vars')) {
|
|
60
|
+
guidance.push('Remove or prefix unused variables with underscore');
|
|
61
|
+
}
|
|
62
|
+
if (rules.has('no-console')) {
|
|
63
|
+
guidance.push('Replace console.log with logger');
|
|
64
|
+
}
|
|
65
|
+
if (guidance.length === 0) {
|
|
66
|
+
return 'Fix ESLint errors - run with --fix to auto-fix some issues';
|
|
67
|
+
}
|
|
68
|
+
return guidance.join('. ');
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Extract ESLint errors from output
|
|
72
|
+
*
|
|
73
|
+
* Parses ESLint output format: `file:line:col - severity message [rule-name]`
|
|
74
|
+
*
|
|
75
|
+
* @param output - Raw ESLint command output
|
|
76
|
+
* @returns Structured error information with ESLint-specific guidance
|
|
77
|
+
*/
|
|
78
|
+
function extract(output) {
|
|
79
|
+
const errors = [];
|
|
80
|
+
const lines = output.split('\n');
|
|
81
|
+
let currentFile = '';
|
|
82
|
+
for (const line of lines) {
|
|
83
|
+
// Try modern format first: file:line:col: severity message [rule-name]
|
|
84
|
+
// eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses ESLint output (controlled linter output), not user input
|
|
85
|
+
const modernMatch = /^(.+?):(\d+):(\d+):\s+(error|warning)\s+(.+?)\s+(\S+)$/.exec(line);
|
|
86
|
+
if (modernMatch) {
|
|
87
|
+
const ruleMessage = modernMatch[5].trim();
|
|
88
|
+
const ruleName = modernMatch[6].replace(/[[\]]/g, ''); // Remove brackets if present
|
|
89
|
+
errors.push({
|
|
90
|
+
file: modernMatch[1].trim(),
|
|
91
|
+
line: Number.parseInt(modernMatch[2]),
|
|
92
|
+
column: Number.parseInt(modernMatch[3]),
|
|
93
|
+
severity: modernMatch[4],
|
|
94
|
+
message: `${ruleMessage} (${ruleName})`,
|
|
95
|
+
code: ruleName
|
|
96
|
+
});
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
// Stylish format: spaces + line:col + spaces + severity + spaces + message + spaces + rule
|
|
100
|
+
// eslint-disable-next-line sonarjs/slow-regex -- Safe: only parses ESLint output (controlled linter output), not user input
|
|
101
|
+
const stylishMatch = /^\s+(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)\s*$/.exec(line);
|
|
102
|
+
if (stylishMatch && currentFile) {
|
|
103
|
+
const ruleMessage = stylishMatch[4].trim();
|
|
104
|
+
const ruleName = stylishMatch[5];
|
|
105
|
+
errors.push({
|
|
106
|
+
file: currentFile,
|
|
107
|
+
line: Number.parseInt(stylishMatch[1]),
|
|
108
|
+
column: Number.parseInt(stylishMatch[2]),
|
|
109
|
+
severity: stylishMatch[3],
|
|
110
|
+
message: `${ruleMessage} (${ruleName})`,
|
|
111
|
+
code: ruleName
|
|
112
|
+
});
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
// Check if this is a file path line for stylish format (no colons, just a path)
|
|
116
|
+
if (line && !line.includes(':') && !line.startsWith(' ') && !line.startsWith('\t') && (line.includes('/') || line.includes('\\'))) {
|
|
117
|
+
// Potential file path for stylish format
|
|
118
|
+
currentFile = line.trim();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// Deduplicate errors (prefer @typescript-eslint/* rules over base ESLint rules)
|
|
122
|
+
const deduplicatedErrors = deduplicateESLintErrors(errors);
|
|
123
|
+
const errorCount = deduplicatedErrors.filter(e => e.severity === 'error').length;
|
|
124
|
+
const warningCount = deduplicatedErrors.filter(e => e.severity === 'warning').length;
|
|
125
|
+
// Build clean output (limit to MAX_ERRORS_IN_ARRAY for token efficiency)
|
|
126
|
+
const errorSummary = deduplicatedErrors
|
|
127
|
+
.slice(0, MAX_ERRORS_IN_ARRAY)
|
|
128
|
+
.map(e => `${e.file}:${e.line}:${e.column} - ${e.message} [${e.code}]`)
|
|
129
|
+
.join('\n');
|
|
130
|
+
return {
|
|
131
|
+
errors: deduplicatedErrors.slice(0, MAX_ERRORS_IN_ARRAY),
|
|
132
|
+
summary: `${errorCount} ESLint error(s), ${warningCount} warning(s)`,
|
|
133
|
+
totalErrors: deduplicatedErrors.length,
|
|
134
|
+
guidance: getESLintGuidance(deduplicatedErrors),
|
|
135
|
+
errorSummary
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Detect if output is from ESLint
|
|
140
|
+
*
|
|
141
|
+
* @param output - Command output to analyze
|
|
142
|
+
* @returns Detection result with confidence and patterns
|
|
143
|
+
*/
|
|
144
|
+
function detect(output) {
|
|
145
|
+
// Look for ESLint error/warning patterns
|
|
146
|
+
// Check for line:col format (distinctive for ESLint, not TypeScript)
|
|
147
|
+
const modernMatch = /:\d+:\d+:\s*(?:error|warning)/.test(output);
|
|
148
|
+
// Optimized: Use [ \t]+ instead of \s+ to avoid backtracking on newlines
|
|
149
|
+
const stylishMatch = /^[ \t]+\d+:\d+[ \t]+(?:error|warning)[ \t]+/m.test(output);
|
|
150
|
+
if (modernMatch || stylishMatch) {
|
|
151
|
+
return {
|
|
152
|
+
confidence: 85,
|
|
153
|
+
patterns: ['file:line:col: error/warning rule-name'],
|
|
154
|
+
reason: 'ESLint error format detected',
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
return { confidence: 0, patterns: [], reason: '' };
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Sample test cases for ESLint extractor
|
|
161
|
+
*/
|
|
162
|
+
const samples = [
|
|
163
|
+
{
|
|
164
|
+
name: 'single-no-console-error',
|
|
165
|
+
description: 'Single ESLint no-console error',
|
|
166
|
+
input: `src/index.ts:10:5: error Unexpected console statement no-console`,
|
|
167
|
+
expectedErrors: 1,
|
|
168
|
+
expectedPatterns: ['no-console', 'Replace console.log with logger'],
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'multiple-errors-with-warning',
|
|
172
|
+
description: 'Multiple ESLint errors with one warning',
|
|
173
|
+
input: `src/index.ts:10:5: error Unexpected console statement no-console
|
|
174
|
+
src/config.ts:25:12: warning 'unusedVar' is defined but never used @typescript-eslint/no-unused-vars
|
|
175
|
+
src/utils.ts:100:3: error Missing semicolon semi`,
|
|
176
|
+
expectedErrors: 3,
|
|
177
|
+
expectedPatterns: ['no-console', '@typescript-eslint/no-unused-vars', 'semi'],
|
|
178
|
+
},
|
|
179
|
+
];
|
|
180
|
+
/**
|
|
181
|
+
* ESLint Error Extractor Plugin
|
|
182
|
+
*
|
|
183
|
+
* Extracts ESLint errors with good confidence (85%).
|
|
184
|
+
* Supports both modern (file:line:col:) and stylish (indented) formats.
|
|
185
|
+
* Deduplicates errors at same location, preferring @typescript-eslint rules.
|
|
186
|
+
*/
|
|
187
|
+
const eslintPlugin = {
|
|
188
|
+
metadata: {
|
|
189
|
+
name: 'eslint',
|
|
190
|
+
version: '1.0.0',
|
|
191
|
+
author: 'vibe-validate',
|
|
192
|
+
description: 'Extracts ESLint linting errors and warnings',
|
|
193
|
+
repository: 'https://github.com/jdutton/vibe-validate',
|
|
194
|
+
tags: ['eslint', 'linter', 'javascript', 'typescript'],
|
|
195
|
+
},
|
|
196
|
+
hints: {
|
|
197
|
+
required: [],
|
|
198
|
+
anyOf: ['error', 'warning'],
|
|
199
|
+
},
|
|
200
|
+
priority: 85,
|
|
201
|
+
detect,
|
|
202
|
+
extract,
|
|
203
|
+
samples,
|
|
204
|
+
};
|
|
205
|
+
export default eslintPlugin;
|
|
206
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/extractors/eslint/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D;;;;;;;;GAQG;AACH,SAAS,uBAAuB,CAAC,MAAwB;IACvD,mCAAmC;IACnC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA4B,CAAC;IAErD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACvB,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACxB,CAAC;QACD,MAAM,cAAc,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,C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