完善 readiness、发布追溯与敏感治理(07-15-production-trust-closeout-cleanup)

这个提交包含在:
2026-07-16 05:17:38 +08:00
父节点 abb6a22f5c
当前提交 28e8e746b7
共修改 29 个文件,包含 1849 行新增和 233 行删除
+6
查看文件
@@ -11,6 +11,11 @@ function requiredEnv(name) {
return value;
}
function normalizeBuildSha(value) {
const sha = String(value || "").trim().toLowerCase();
return /^[0-9a-f]{7,64}$/.test(sha) ? sha.slice(0, 12) : "unknown";
}
function getConfig() {
const nodeEnv = process.env.NODE_ENV ?? "development";
const serverRoot = path.resolve(__dirname, "..");
@@ -21,6 +26,7 @@ function getConfig() {
nodeEnv,
port: Number(process.env.PORT ?? 3000),
host: process.env.HOST ?? "0.0.0.0",
buildSha: normalizeBuildSha(process.env.BUILD_SHA),
metricsEnabled: process.env.METRICS_ENABLED !== "false",