test(web): enforce one-pass smoke execution
This commit is contained in:
@@ -42,6 +42,14 @@ if (!execute) {
|
||||
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 smokeReport = {
|
||||
schemaVersion: 1,
|
||||
|
||||
Reference in New Issue
Block a user