test: deduplicate acceptance coverage gaps

This commit is contained in:
2026-09-06 11:41:46 +08:00
parent 54af43a99d
commit 42ddc19826
2 changed files with 10 additions and 1 deletions
+7 -1
View File
@@ -714,7 +714,13 @@ export class AcceptanceRun {
addCoverageGap(module, scenario, name, reason, category = 'not-implemented', metadata = {}) {
const nonBlocking = new Set(['device', 'external-third-party', 'visual'])
const blocking = metadata.blocking ?? !nonBlocking.has(category)
this.coverageGaps.push({ module, scenario, name, reason, category, blocking, ...metadata })
const gap = { module, scenario, name, reason, category, blocking, ...metadata }
const duplicate = this.coverageGaps.some((existing) => existing.module === gap.module
&& existing.scenario === gap.scenario && existing.name === gap.name
&& existing.reason === gap.reason && existing.category === gap.category
&& existing.blocking === gap.blocking)
if (duplicate) return
this.coverageGaps.push(gap)
if (blocking) {
this.addStep(module, `覆盖阻断:${name}`, null, false, reason,
{ scenario, deploymentBlocker: true })