Remove repo reports and add recurrence guard

This commit is contained in:
Code Queue Review
2026-05-24 02:23:27 +00:00
parent 0c53c94714
commit 4e302faee9
83 changed files with 1042 additions and 27077 deletions
+5 -3
View File
@@ -9,9 +9,10 @@ import {
buildM3IoControlSourceReport,
runM3IoControlLiveReport
} from "./m3-io-control-e2e.mjs";
import { ensureNotRepoReportsPath, tempReportPath } from "./report-paths.mjs";
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
const defaultReportPath = "reports/dev-gate/dev-runtime-postflight-report.json";
const defaultReportPath = tempReportPath("dev-runtime-postflight-report.json");
const issue = "pikasTech/HWLAB#311";
const defaultHealthUrl = `${DEV_ENDPOINT}/health/live`;
const defaultV1Url = `${DEV_ENDPOINT}/v1`;
@@ -149,7 +150,6 @@ export function parseArgs(argv = []) {
else if (arg === "--live") args.live = true;
else if (arg === "--confirm-dev") args.confirmDev = true;
else if (arg === "--confirmed-non-production") args.confirmedNonProduction = true;
else if (arg === "--write-report") args.writeReport = true;
else if (arg === "--pretty") args.pretty = true;
else if (arg === "--fail-on-blocked") args.failOnBlocked = true;
else if (arg === "--target") {
@@ -161,8 +161,10 @@ export function parseArgs(argv = []) {
} else if (arg === "--report") {
index += 1;
args.reportPath = requireArgValue(argv[index], "--report");
args.writeReport = true;
} else if (arg.startsWith("--report=")) {
args.reportPath = requireArgValue(arg.slice("--report=".length), "--report");
args.writeReport = true;
} else if (arg === "--help" || arg === "-h") {
args.help = true;
} else {
@@ -604,7 +606,7 @@ function sanitizeRedactedValue(value) {
}
async function writeReport(report, reportPath, root) {
const absolute = path.resolve(root, reportPath);
const absolute = ensureNotRepoReportsPath(root, reportPath, "--report");
await mkdir(path.dirname(absolute), { recursive: true });
await writeFile(absolute, `${JSON.stringify(report, null, 2)}\n`);
}