Files
orca/cloud/dev/scripts/run-relay-recovery-wave-gate.mjs
T
Jinwoo Hong 3eec77c11a chore(cloud): add the relay fence broker, ops console, Terraform root, scripts, and 24 cloud-* workflows (#18413)
Phase 6 of the relay split: the relay's deploy/operate surface moves under cloud/ with 24 cloud-* workflows gated on ORCA_CLOUD_OPERATIONS_ENABLED, the Cloud SQL rollout lease action, the relay Terraform root (dual-accept identities for both repositories), scripts, docs, CODEOWNERS, and a terraform validate job in Cloud Verify.
2026-09-03 06:55:14 -04:00

20 lines
804 B
JavaScript

import { readFileSync, statSync } from 'node:fs'
import { evaluateRecoveryWaveReport } from './relay-recovery-wave-gate.mjs'
const args = process.argv.slice(2)
if (args.length !== 2 || args[0] !== '--report') {
process.stderr.write('usage: pnpm load:relay:recovery-gate -- --report <aggregate-report.json>\n')
process.exitCode = 1
} else {
try {
if (statSync(args[1]).size > 1024 * 1024) throw new Error('report exceeds 1 MiB')
const report = JSON.parse(readFileSync(args[1], 'utf8'))
const result = evaluateRecoveryWaveReport(report)
process.stdout.write(`${JSON.stringify(result)}\n`)
if (result.status !== 'PASS') process.exitCode = 1
} catch (error) {
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`)
process.exitCode = 1
}
}