修复(08-08-production-deployment-execution): 保留生产预检真实错误码
ci-e2e / e2e (push) Canceled after 0s
ci-minimal / check-minimal (push) Canceled after 0s

这个提交包含在:
2026-08-08 20:14:36 +08:00
父节点 8892ca9e38
当前提交 83af7544c4
共修改 4 个文件,包含 116 行新增和 9 行删除
+14 -5
查看文件
@@ -234,6 +234,14 @@ export function validatePrismaStatusText(status) {
return status;
}
export function assertRemotePreflightResult({ status, stdout, stderr, rawStatus }) {
if (status !== 0) {
const remoteCode = `${stdout}\n${stderr || ""}`.match(/code=([A-Z0-9_]+)/u)?.[1];
fail(remoteCode || "PRODUCTION_PREFLIGHT_REMOTE_FAILED");
}
if (rawStatus == null) fail("PRISMA_STATUS_OUTPUT_MISSING");
}
function main() {
try {
const deployServer = String(process.env.DEPLOY_SERVER ?? "").trim();
@@ -337,11 +345,12 @@ function main() {
printStableRemoteSummary(stdout);
console.log(`[production-preflight] reportRef=${reportRef(reportDir)}`);
if (rawStatus == null) fail("PRISMA_STATUS_OUTPUT_MISSING");
if (result.status !== 0) {
const remoteCode = `${stdout}\n${result.stderr || ""}`.match(/code=([A-Z0-9_]+)/u)?.[1];
fail(remoteCode || "PRODUCTION_PREFLIGHT_REMOTE_FAILED");
}
assertRemotePreflightResult({
status: result.status,
stdout,
stderr: result.stderr,
rawStatus,
});
console.log("[production-preflight][PASS] 生产目标与迁移只读门禁通过");
} catch (error) {
const code = error instanceof ProductionPreflightError