test(web): enforce one-pass smoke execution
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-09-07 06:52:11 +08:00
parent 0bc56836c5
commit b088b792a8
3 changed files with 12 additions and 3 deletions

View File

@@ -25,6 +25,7 @@
- 第一轮全部按计划执行一次;失败项记录在 `tests/golden/WBV2/feature-smoke-report.json`。 - 第一轮全部按计划执行一次;失败项记录在 `tests/golden/WBV2/feature-smoke-report.json`。
- 失败项标记为 `FAILED_FOCUSED_FIX_REQUIRED`,不伪造通过,也不在同一轮重复执行。 - 失败项标记为 `FAILED_FOCUSED_FIX_REQUIRED`,不伪造通过,也不在同一轮重复执行。
- 修复必须建立新的聚焦任务和新的烟测批次;已通过功能不重跑。 - 修复必须建立新的聚焦任务和新的烟测批次;已通过功能不重跑。
- 同一 `planId` 已存在尝试记录时,运行器会拒绝再次执行;必须更换批次 ID 或使用独立的聚焦修复入口。
## 执行命令 ## 执行命令

View File

@@ -16,7 +16,7 @@
}, },
"planDocument": { "planDocument": {
"path": "docs/WEB_FEATURE_SMOKE_PLAN.md", "path": "docs/WEB_FEATURE_SMOKE_PLAN.md",
"sha256": "d3f6391efa860c7f9be2bbd5ff4ff9dad8477b1e92cd7c9d618743a0cfbe92ec" "sha256": "fd3f4966351051b8feb518c898a9f9cfdf9bcfbbca17194ca41098256cabc65b"
}, },
"summary": { "summary": {
"totalFeatures": 34, "totalFeatures": 34,

View File

@@ -42,6 +42,14 @@ if (!execute) {
process.exit(0); process.exit(0);
} }
if (fs.existsSync(reportPath)) {
const previous = JSON.parse(fs.readFileSync(reportPath, "utf8"));
if (previous.planId === plan.planId && Array.isArray(previous.cases) && previous.cases.some((item) => Number(item.attempts ?? 0) > 0)) {
process.stderr.write(`feature-smoke-once-only: plan ${plan.planId} already has recorded attempts; create a new focused-fix batch instead of rerunning\n`);
process.exit(2);
}
}
const startedAt = new Date().toISOString(); const startedAt = new Date().toISOString();
const smokeReport = { const smokeReport = {
schemaVersion: 1, schemaVersion: 1,