@yasserkhanorg/e2e-agents 0.5.1 → 0.5.3
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/agent/ai_flow_analysis.d.ts +1 -0
- package/dist/agent/ai_flow_analysis.d.ts.map +1 -1
- package/dist/agent/ai_flow_analysis.js +7 -0
- package/dist/agent/plan.d.ts.map +1 -1
- package/dist/agent/plan.js +12 -78
- package/dist/agent/runner.d.ts.map +1 -1
- package/dist/agent/runner.js +12 -2
- package/dist/esm/agent/ai_flow_analysis.js +7 -0
- package/dist/esm/agent/plan.js +12 -78
- package/dist/esm/agent/runner.js +12 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai_flow_analysis.d.ts","sourceRoot":"","sources":["../../src/agent/ai_flow_analysis.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,YAAY,EAAE,UAAU,EAAe,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAkBpD,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,EAAE,UAAU,EAAE,CAAC;CACvB;AA2JD,wBAAsB,mBAAmB,CACrC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,YAAY,EAAE,EACrB,YAAY,EAAE,MAAM,EAAE,GACvB,OAAO,CAAC,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"ai_flow_analysis.d.ts","sourceRoot":"","sources":["../../src/agent/ai_flow_analysis.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,YAAY,EAAE,UAAU,EAAe,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAkBpD,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,EAAE,UAAU,EAAE,CAAC;CACvB;AA2JD,wBAAsB,mBAAmB,CACrC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,YAAY,EAAE,EACrB,YAAY,EAAE,MAAM,EAAE,GACvB,OAAO,CAAC,oBAAoB,CAAC,CAuM/B"}
|
|
@@ -154,6 +154,7 @@ async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, changedFil
|
|
|
154
154
|
return {
|
|
155
155
|
enabled: false,
|
|
156
156
|
used: false,
|
|
157
|
+
ran: false,
|
|
157
158
|
provider: providerName,
|
|
158
159
|
flowCount: 0,
|
|
159
160
|
warnings,
|
|
@@ -165,6 +166,7 @@ async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, changedFil
|
|
|
165
166
|
return {
|
|
166
167
|
enabled: true,
|
|
167
168
|
used: false,
|
|
169
|
+
ran: false,
|
|
168
170
|
provider: providerName,
|
|
169
171
|
flowCount: 0,
|
|
170
172
|
warnings,
|
|
@@ -194,6 +196,7 @@ async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, changedFil
|
|
|
194
196
|
return {
|
|
195
197
|
enabled: true,
|
|
196
198
|
used: false,
|
|
199
|
+
ran: false,
|
|
197
200
|
provider: providerName,
|
|
198
201
|
flowCount: 0,
|
|
199
202
|
warnings,
|
|
@@ -240,6 +243,7 @@ async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, changedFil
|
|
|
240
243
|
return {
|
|
241
244
|
enabled: true,
|
|
242
245
|
used: false,
|
|
246
|
+
ran: false,
|
|
243
247
|
provider: provider.name,
|
|
244
248
|
flowCount: 0,
|
|
245
249
|
warnings,
|
|
@@ -251,6 +255,7 @@ async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, changedFil
|
|
|
251
255
|
return {
|
|
252
256
|
enabled: true,
|
|
253
257
|
used: false,
|
|
258
|
+
ran: false,
|
|
254
259
|
provider: provider.name,
|
|
255
260
|
flowCount: 0,
|
|
256
261
|
warnings,
|
|
@@ -310,6 +315,7 @@ async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, changedFil
|
|
|
310
315
|
return {
|
|
311
316
|
enabled: true,
|
|
312
317
|
used: false,
|
|
318
|
+
ran: true, // AI was called and responded — no user-facing flows impacted
|
|
313
319
|
provider: provider.name,
|
|
314
320
|
flowCount: 0,
|
|
315
321
|
warnings,
|
|
@@ -319,6 +325,7 @@ async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, changedFil
|
|
|
319
325
|
return {
|
|
320
326
|
enabled: true,
|
|
321
327
|
used: true,
|
|
328
|
+
ran: true,
|
|
322
329
|
provider: provider.name,
|
|
323
330
|
flowCount: flows.length,
|
|
324
331
|
warnings,
|
package/dist/agent/plan.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/agent/plan.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;AAC9D,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc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,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;CACxB;AAqBD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAC,CAkE9G;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,SAAiC,GAAG,MAAM,CAMvH"}
|
package/dist/agent/plan.js
CHANGED
|
@@ -311,91 +311,25 @@ function writePlanReport(appRoot, plan) {
|
|
|
311
311
|
}
|
|
312
312
|
function renderCiSummaryMarkdown(plan) {
|
|
313
313
|
const lines = [];
|
|
314
|
-
|
|
314
|
+
const { p0Flows, p1Flows, uncoveredP0P1Flows, changedFiles, impactedFlows } = plan.metrics;
|
|
315
|
+
const mustAddTests = plan.decision.action === 'must-add-tests';
|
|
316
|
+
const statusEmoji = mustAddTests ? '🔴' : plan.decision.action === 'safe-to-merge' ? '🟢' : '🟡';
|
|
317
|
+
lines.push(`## ${statusEmoji} E2E Coverage: ${plan.decision.title}`);
|
|
315
318
|
lines.push('');
|
|
316
|
-
lines.push(
|
|
317
|
-
lines.push(
|
|
318
|
-
lines.push(
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
lines.push(`- Enforcement detail: ${plan.enforcement.summary}`);
|
|
322
|
-
if (plan.policy.triggeredRules.length > 0) {
|
|
323
|
-
lines.push(`- Policy triggers: ${plan.policy.triggeredRules.join(', ')}`);
|
|
324
|
-
}
|
|
325
|
-
if (plan.policy.riskyFiles.length > 0) {
|
|
326
|
-
lines.push(`- Risky files: ${plan.policy.riskyFiles.join(', ')}`);
|
|
327
|
-
}
|
|
328
|
-
if (plan.recommendedTests.length > 0) {
|
|
319
|
+
lines.push(`${plan.decision.summary}`);
|
|
320
|
+
lines.push('');
|
|
321
|
+
lines.push(`**${changedFiles}** files changed → **${impactedFlows}** flows impacted` +
|
|
322
|
+
(p0Flows > 0 || p1Flows > 0 ? ` (P0: ${p0Flows}, P1: ${p1Flows})` : ''));
|
|
323
|
+
if (mustAddTests && plan.requiredNewTests.length > 0) {
|
|
329
324
|
lines.push('');
|
|
330
|
-
lines.push('###
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
if (plan.requiredNewTests.length > 0) {
|
|
325
|
+
lines.push('### ⚠️ Add E2E tests for these uncovered P0/P1 flows');
|
|
326
|
+
lines.push('');
|
|
327
|
+
lines.push(`The following ${uncoveredP0P1Flows} flow(s) have no test coverage and must be covered before merge:`);
|
|
336
328
|
lines.push('');
|
|
337
|
-
lines.push('### Required New Tests');
|
|
338
329
|
for (const gap of plan.requiredNewTests) {
|
|
339
330
|
lines.push(`- ${gap}`);
|
|
340
331
|
}
|
|
341
332
|
}
|
|
342
|
-
if (plan.nextActions) {
|
|
343
|
-
lines.push('');
|
|
344
|
-
lines.push('### PR Actions');
|
|
345
|
-
if (plan.nextActions.runRecommendedTests) {
|
|
346
|
-
lines.push(`- Run recommended tests: \`${plan.nextActions.runRecommendedTests}\``);
|
|
347
|
-
}
|
|
348
|
-
else if (plan.nextActions.runSmokeSuite) {
|
|
349
|
-
lines.push(`- Run smoke fallback: \`${plan.nextActions.runSmokeSuite}\``);
|
|
350
|
-
}
|
|
351
|
-
if (plan.nextActions.approveAndGenerate || plan.nextActions.generateMissingTests) {
|
|
352
|
-
lines.push(`- Approve and generate missing tests: \`${plan.nextActions.approveAndGenerate || plan.nextActions.generateMissingTests}\``);
|
|
353
|
-
}
|
|
354
|
-
if (plan.nextActions.healGeneratedTests) {
|
|
355
|
-
lines.push(`- Heal generated tests: \`${plan.nextActions.healGeneratedTests}\``);
|
|
356
|
-
}
|
|
357
|
-
if (plan.nextActions.commitGeneratedTests) {
|
|
358
|
-
lines.push(`- Commit generated artifacts: \`${plan.nextActions.commitGeneratedTests}\``);
|
|
359
|
-
}
|
|
360
|
-
if (plan.nextActions.openPullRequest) {
|
|
361
|
-
lines.push(`- Open PR with generated updates: \`${plan.nextActions.openPullRequest}\``);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
if (plan.insights?.qualityGates) {
|
|
365
|
-
if (plan.insights.qualityGates.failed.length > 0) {
|
|
366
|
-
lines.push('');
|
|
367
|
-
lines.push('### Quality Gates Failed');
|
|
368
|
-
for (const gate of plan.insights.qualityGates.failed) {
|
|
369
|
-
lines.push(`- ${gate.name}${gate.details ? `: ${gate.details}` : ''}`);
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
if (plan.insights.qualityGates.warnings.length > 0) {
|
|
373
|
-
lines.push('');
|
|
374
|
-
lines.push('### Quality Gate Warnings');
|
|
375
|
-
for (const gate of plan.insights.qualityGates.warnings) {
|
|
376
|
-
lines.push(`- ${gate.name}${gate.details ? `: ${gate.details}` : ''}`);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
if (plan.insights?.flaky && plan.insights.flaky.highRiskRecommendedTests.length > 0) {
|
|
381
|
-
lines.push('');
|
|
382
|
-
lines.push('### Flaky Risk Alerts');
|
|
383
|
-
for (const item of plan.insights.flaky.highRiskRecommendedTests) {
|
|
384
|
-
const rate = item.flakeRate30d !== undefined ? item.flakeRate30d : item.flakeRate;
|
|
385
|
-
const trend = item.trend ? `, trend=${item.trend}` : '';
|
|
386
|
-
const subsystem = item.subsystem ? `, subsystem=${item.subsystem}` : '';
|
|
387
|
-
const qstate = item.quarantineState && item.quarantineState !== 'none' ? `, quarantine=${item.quarantineState}` : '';
|
|
388
|
-
lines.push(`- ${item.test} (flakeRate=${rate}${trend}${subsystem}${qstate})`);
|
|
389
|
-
}
|
|
390
|
-
if (plan.insights.flaky.ownerMentions && plan.insights.flaky.ownerMentions.length > 0) {
|
|
391
|
-
lines.push(`- Notify owners: ${plan.insights.flaky.ownerMentions.join(', ')}`);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
if (plan.insights?.calibration) {
|
|
395
|
-
lines.push('');
|
|
396
|
-
lines.push('### Historical Calibration');
|
|
397
|
-
lines.push(`- precision=${plan.insights.calibration.precision}, recall=${plan.insights.calibration.recall}, falseNegativeRate=${plan.insights.calibration.falseNegativeRate}`);
|
|
398
|
-
}
|
|
399
333
|
return lines.join('\n');
|
|
400
334
|
}
|
|
401
335
|
const PLAN_METRICS_EVENTS_PATH = '.e2e-ai-agents/metrics.jsonl';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/agent/runner.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AA+R7C,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,OAAO,CAAC;CAClB;AAYD,wBAAsB,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/agent/runner.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AA+R7C,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,OAAO,CAAC;CAClB;AAYD,wBAAsB,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAiTzF;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA8TtF"}
|
package/dist/agent/runner.js
CHANGED
|
@@ -181,8 +181,8 @@ function applyMattermostEvidencePolicy(config, state) {
|
|
|
181
181
|
testMappingSource: state.testMappingSource,
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
if (state.testMappingSource !== 'catalog' && !state.traceabilityStats?.manifestFound) {
|
|
185
|
-
throw new Error('Mattermost profile requires traceability evidence. Generate or refresh traceability manifest
|
|
184
|
+
if (state.testMappingSource !== 'catalog' && state.testMappingSource !== 'ai' && !state.traceabilityStats?.manifestFound) {
|
|
185
|
+
throw new Error('Mattermost profile requires traceability evidence or AI mapping. Generate or refresh traceability manifest, or enable impact.aiMapping in config.');
|
|
186
186
|
}
|
|
187
187
|
const traceabilityCoverageRatio = state.traceabilityStats?.coverageRatio ?? 0;
|
|
188
188
|
if (state.testMappingSource === 'traceability' && traceabilityCoverageRatio < 0.6) {
|
|
@@ -334,6 +334,11 @@ async function runImpact(_config, _options) {
|
|
|
334
334
|
flows = aiFlow.flows;
|
|
335
335
|
flowMappingSource = 'ai';
|
|
336
336
|
}
|
|
337
|
+
else if (aiFlow.ran) {
|
|
338
|
+
// AI ran successfully but found no user-facing flows — treat as zero impact.
|
|
339
|
+
flows = [];
|
|
340
|
+
flowMappingSource = 'ai';
|
|
341
|
+
}
|
|
337
342
|
else if (_config.impact.aiFlow.strict || _config.profile === 'mattermost') {
|
|
338
343
|
throw new Error('AI flow analysis is required but unavailable. Check Anthropic/LLM provider configuration.');
|
|
339
344
|
}
|
|
@@ -612,6 +617,11 @@ async function runGap(_config, _options) {
|
|
|
612
617
|
flows = aiFlow.flows;
|
|
613
618
|
flowMappingSource = 'ai';
|
|
614
619
|
}
|
|
620
|
+
else if (aiFlow.ran) {
|
|
621
|
+
// AI ran successfully but found no user-facing flows — treat as zero impact.
|
|
622
|
+
flows = [];
|
|
623
|
+
flowMappingSource = 'ai';
|
|
624
|
+
}
|
|
615
625
|
else if (_config.impact.aiFlow.strict || _config.profile === 'mattermost') {
|
|
616
626
|
throw new Error('AI flow analysis is required but unavailable. Check Anthropic/LLM provider configuration.');
|
|
617
627
|
}
|
|
@@ -151,6 +151,7 @@ export async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, cha
|
|
|
151
151
|
return {
|
|
152
152
|
enabled: false,
|
|
153
153
|
used: false,
|
|
154
|
+
ran: false,
|
|
154
155
|
provider: providerName,
|
|
155
156
|
flowCount: 0,
|
|
156
157
|
warnings,
|
|
@@ -162,6 +163,7 @@ export async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, cha
|
|
|
162
163
|
return {
|
|
163
164
|
enabled: true,
|
|
164
165
|
used: false,
|
|
166
|
+
ran: false,
|
|
165
167
|
provider: providerName,
|
|
166
168
|
flowCount: 0,
|
|
167
169
|
warnings,
|
|
@@ -191,6 +193,7 @@ export async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, cha
|
|
|
191
193
|
return {
|
|
192
194
|
enabled: true,
|
|
193
195
|
used: false,
|
|
196
|
+
ran: false,
|
|
194
197
|
provider: providerName,
|
|
195
198
|
flowCount: 0,
|
|
196
199
|
warnings,
|
|
@@ -237,6 +240,7 @@ export async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, cha
|
|
|
237
240
|
return {
|
|
238
241
|
enabled: true,
|
|
239
242
|
used: false,
|
|
243
|
+
ran: false,
|
|
240
244
|
provider: provider.name,
|
|
241
245
|
flowCount: 0,
|
|
242
246
|
warnings,
|
|
@@ -248,6 +252,7 @@ export async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, cha
|
|
|
248
252
|
return {
|
|
249
253
|
enabled: true,
|
|
250
254
|
used: false,
|
|
255
|
+
ran: false,
|
|
251
256
|
provider: provider.name,
|
|
252
257
|
flowCount: 0,
|
|
253
258
|
warnings,
|
|
@@ -307,6 +312,7 @@ export async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, cha
|
|
|
307
312
|
return {
|
|
308
313
|
enabled: true,
|
|
309
314
|
used: false,
|
|
315
|
+
ran: true, // AI was called and responded — no user-facing flows impacted
|
|
310
316
|
provider: provider.name,
|
|
311
317
|
flowCount: 0,
|
|
312
318
|
warnings,
|
|
@@ -316,6 +322,7 @@ export async function mapAIFlowsFromFiles(appRoot, testsRoot, config, files, cha
|
|
|
316
322
|
return {
|
|
317
323
|
enabled: true,
|
|
318
324
|
used: true,
|
|
325
|
+
ran: true,
|
|
319
326
|
provider: provider.name,
|
|
320
327
|
flowCount: flows.length,
|
|
321
328
|
warnings,
|
package/dist/esm/agent/plan.js
CHANGED
|
@@ -302,91 +302,25 @@ export function writePlanReport(appRoot, plan) {
|
|
|
302
302
|
}
|
|
303
303
|
export function renderCiSummaryMarkdown(plan) {
|
|
304
304
|
const lines = [];
|
|
305
|
-
|
|
305
|
+
const { p0Flows, p1Flows, uncoveredP0P1Flows, changedFiles, impactedFlows } = plan.metrics;
|
|
306
|
+
const mustAddTests = plan.decision.action === 'must-add-tests';
|
|
307
|
+
const statusEmoji = mustAddTests ? '🔴' : plan.decision.action === 'safe-to-merge' ? '🟢' : '🟡';
|
|
308
|
+
lines.push(`## ${statusEmoji} E2E Coverage: ${plan.decision.title}`);
|
|
306
309
|
lines.push('');
|
|
307
|
-
lines.push(
|
|
308
|
-
lines.push(
|
|
309
|
-
lines.push(
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
lines.push(`- Enforcement detail: ${plan.enforcement.summary}`);
|
|
313
|
-
if (plan.policy.triggeredRules.length > 0) {
|
|
314
|
-
lines.push(`- Policy triggers: ${plan.policy.triggeredRules.join(', ')}`);
|
|
315
|
-
}
|
|
316
|
-
if (plan.policy.riskyFiles.length > 0) {
|
|
317
|
-
lines.push(`- Risky files: ${plan.policy.riskyFiles.join(', ')}`);
|
|
318
|
-
}
|
|
319
|
-
if (plan.recommendedTests.length > 0) {
|
|
310
|
+
lines.push(`${plan.decision.summary}`);
|
|
311
|
+
lines.push('');
|
|
312
|
+
lines.push(`**${changedFiles}** files changed → **${impactedFlows}** flows impacted` +
|
|
313
|
+
(p0Flows > 0 || p1Flows > 0 ? ` (P0: ${p0Flows}, P1: ${p1Flows})` : ''));
|
|
314
|
+
if (mustAddTests && plan.requiredNewTests.length > 0) {
|
|
320
315
|
lines.push('');
|
|
321
|
-
lines.push('###
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
if (plan.requiredNewTests.length > 0) {
|
|
316
|
+
lines.push('### ⚠️ Add E2E tests for these uncovered P0/P1 flows');
|
|
317
|
+
lines.push('');
|
|
318
|
+
lines.push(`The following ${uncoveredP0P1Flows} flow(s) have no test coverage and must be covered before merge:`);
|
|
327
319
|
lines.push('');
|
|
328
|
-
lines.push('### Required New Tests');
|
|
329
320
|
for (const gap of plan.requiredNewTests) {
|
|
330
321
|
lines.push(`- ${gap}`);
|
|
331
322
|
}
|
|
332
323
|
}
|
|
333
|
-
if (plan.nextActions) {
|
|
334
|
-
lines.push('');
|
|
335
|
-
lines.push('### PR Actions');
|
|
336
|
-
if (plan.nextActions.runRecommendedTests) {
|
|
337
|
-
lines.push(`- Run recommended tests: \`${plan.nextActions.runRecommendedTests}\``);
|
|
338
|
-
}
|
|
339
|
-
else if (plan.nextActions.runSmokeSuite) {
|
|
340
|
-
lines.push(`- Run smoke fallback: \`${plan.nextActions.runSmokeSuite}\``);
|
|
341
|
-
}
|
|
342
|
-
if (plan.nextActions.approveAndGenerate || plan.nextActions.generateMissingTests) {
|
|
343
|
-
lines.push(`- Approve and generate missing tests: \`${plan.nextActions.approveAndGenerate || plan.nextActions.generateMissingTests}\``);
|
|
344
|
-
}
|
|
345
|
-
if (plan.nextActions.healGeneratedTests) {
|
|
346
|
-
lines.push(`- Heal generated tests: \`${plan.nextActions.healGeneratedTests}\``);
|
|
347
|
-
}
|
|
348
|
-
if (plan.nextActions.commitGeneratedTests) {
|
|
349
|
-
lines.push(`- Commit generated artifacts: \`${plan.nextActions.commitGeneratedTests}\``);
|
|
350
|
-
}
|
|
351
|
-
if (plan.nextActions.openPullRequest) {
|
|
352
|
-
lines.push(`- Open PR with generated updates: \`${plan.nextActions.openPullRequest}\``);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
if (plan.insights?.qualityGates) {
|
|
356
|
-
if (plan.insights.qualityGates.failed.length > 0) {
|
|
357
|
-
lines.push('');
|
|
358
|
-
lines.push('### Quality Gates Failed');
|
|
359
|
-
for (const gate of plan.insights.qualityGates.failed) {
|
|
360
|
-
lines.push(`- ${gate.name}${gate.details ? `: ${gate.details}` : ''}`);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
if (plan.insights.qualityGates.warnings.length > 0) {
|
|
364
|
-
lines.push('');
|
|
365
|
-
lines.push('### Quality Gate Warnings');
|
|
366
|
-
for (const gate of plan.insights.qualityGates.warnings) {
|
|
367
|
-
lines.push(`- ${gate.name}${gate.details ? `: ${gate.details}` : ''}`);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
if (plan.insights?.flaky && plan.insights.flaky.highRiskRecommendedTests.length > 0) {
|
|
372
|
-
lines.push('');
|
|
373
|
-
lines.push('### Flaky Risk Alerts');
|
|
374
|
-
for (const item of plan.insights.flaky.highRiskRecommendedTests) {
|
|
375
|
-
const rate = item.flakeRate30d !== undefined ? item.flakeRate30d : item.flakeRate;
|
|
376
|
-
const trend = item.trend ? `, trend=${item.trend}` : '';
|
|
377
|
-
const subsystem = item.subsystem ? `, subsystem=${item.subsystem}` : '';
|
|
378
|
-
const qstate = item.quarantineState && item.quarantineState !== 'none' ? `, quarantine=${item.quarantineState}` : '';
|
|
379
|
-
lines.push(`- ${item.test} (flakeRate=${rate}${trend}${subsystem}${qstate})`);
|
|
380
|
-
}
|
|
381
|
-
if (plan.insights.flaky.ownerMentions && plan.insights.flaky.ownerMentions.length > 0) {
|
|
382
|
-
lines.push(`- Notify owners: ${plan.insights.flaky.ownerMentions.join(', ')}`);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
if (plan.insights?.calibration) {
|
|
386
|
-
lines.push('');
|
|
387
|
-
lines.push('### Historical Calibration');
|
|
388
|
-
lines.push(`- precision=${plan.insights.calibration.precision}, recall=${plan.insights.calibration.recall}, falseNegativeRate=${plan.insights.calibration.falseNegativeRate}`);
|
|
389
|
-
}
|
|
390
324
|
return lines.join('\n');
|
|
391
325
|
}
|
|
392
326
|
const PLAN_METRICS_EVENTS_PATH = '.e2e-ai-agents/metrics.jsonl';
|
package/dist/esm/agent/runner.js
CHANGED
|
@@ -177,8 +177,8 @@ function applyMattermostEvidencePolicy(config, state) {
|
|
|
177
177
|
testMappingSource: state.testMappingSource,
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
if (state.testMappingSource !== 'catalog' && !state.traceabilityStats?.manifestFound) {
|
|
181
|
-
throw new Error('Mattermost profile requires traceability evidence. Generate or refresh traceability manifest
|
|
180
|
+
if (state.testMappingSource !== 'catalog' && state.testMappingSource !== 'ai' && !state.traceabilityStats?.manifestFound) {
|
|
181
|
+
throw new Error('Mattermost profile requires traceability evidence or AI mapping. Generate or refresh traceability manifest, or enable impact.aiMapping in config.');
|
|
182
182
|
}
|
|
183
183
|
const traceabilityCoverageRatio = state.traceabilityStats?.coverageRatio ?? 0;
|
|
184
184
|
if (state.testMappingSource === 'traceability' && traceabilityCoverageRatio < 0.6) {
|
|
@@ -330,6 +330,11 @@ export async function runImpact(_config, _options) {
|
|
|
330
330
|
flows = aiFlow.flows;
|
|
331
331
|
flowMappingSource = 'ai';
|
|
332
332
|
}
|
|
333
|
+
else if (aiFlow.ran) {
|
|
334
|
+
// AI ran successfully but found no user-facing flows — treat as zero impact.
|
|
335
|
+
flows = [];
|
|
336
|
+
flowMappingSource = 'ai';
|
|
337
|
+
}
|
|
333
338
|
else if (_config.impact.aiFlow.strict || _config.profile === 'mattermost') {
|
|
334
339
|
throw new Error('AI flow analysis is required but unavailable. Check Anthropic/LLM provider configuration.');
|
|
335
340
|
}
|
|
@@ -608,6 +613,11 @@ export async function runGap(_config, _options) {
|
|
|
608
613
|
flows = aiFlow.flows;
|
|
609
614
|
flowMappingSource = 'ai';
|
|
610
615
|
}
|
|
616
|
+
else if (aiFlow.ran) {
|
|
617
|
+
// AI ran successfully but found no user-facing flows — treat as zero impact.
|
|
618
|
+
flows = [];
|
|
619
|
+
flowMappingSource = 'ai';
|
|
620
|
+
}
|
|
611
621
|
else if (_config.impact.aiFlow.strict || _config.profile === 'mattermost') {
|
|
612
622
|
throw new Error('AI flow analysis is required but unavailable. Check Anthropic/LLM provider configuration.');
|
|
613
623
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yasserkhanorg/e2e-agents",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "Pluggable LLM provider library for AI-powered test automation. Use Claude, Ollama, or your own LLM. Integrate with Playwright, Jest, or any test framework. MCP server for test agents, cost tracking, and hybrid provider mode.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|