Files
memind/scripts/run-release-gate-incremental.mjs
T
john a6a9bb4eab feat(release): add incremental gate and auto CI status for 103 publish
When the runtime artifact is unchanged, carry forward prior gate results and
re-run only REL scenarios; resolve REL-02 from Gitea commit status and allow
stable promotion when canary matches the same artifact bundle.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 08:32:12 +08:00

35 lines
1.2 KiB
JavaScript

#!/usr/bin/env node
import { executeIncrementalReleaseGate, parseRunnerArgs } from '../release-gate/runner.mjs';
function usage() {
console.log(`Usage:
node scripts/run-release-gate-incremental.mjs --artifact .runtime/portal [--baseline-commit <sha>] [--deployed-commit <sha>]
Reuses a prior full Gate report when the runtime artifact SHA256 is unchanged,
then re-executes only REL-* release scenarios.`);
}
try {
const options = parseRunnerArgs(process.argv);
if (options.help) {
usage();
process.exit(0);
}
options.mode = 'incremental';
const { report, outputDir, baseline } = await executeIncrementalReleaseGate(options);
const summary = report.summary;
console.log(`Incremental release gate report: ${outputDir}`);
console.log(`baseline_commit=${baseline.report.commit_sha}`);
console.log(JSON.stringify(summary));
const passed = summary.failed === 0
&& summary.skipped === 0
&& summary.blocked === 0
&& summary.unknown === 0
&& summary.cleanup_failed === 0
&& summary.passed + summary.not_applicable === summary.required;
process.exit(passed ? 0 : 1);
} catch (error) {
console.error(`Incremental release gate failed: ${error.message}`);
process.exit(1);
}