fix: deliver WeChat pages when image_make fails

Fall back to workspace share thumbnails so already-published HTML can be
sent instead of blocking on REQUIRED_FRESH. Also allow an explicit
ALLOW_DIRECT_STABLE_RELEASE path matching the pre-2026-07-23 direct
stable packaging flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-28 18:19:29 +08:00
parent 7eedda092d
commit 065b1588b7
5 changed files with 245 additions and 88 deletions
+27 -10
View File
@@ -46,6 +46,11 @@ usage() {
6. 启动 Portal,保持旧端口 8081
7. 健康检查通过后重启 m.tkmind.cn 反向隧道 (105:19081 -> 103:8081)
8. 旧源码目录移入 archive,不再保留可运行 live 源码
环境变量:
ALLOW_DIRECT_STABLE_RELEASE=1
仅在用户明确批准按 7/23 前规则直接整包时使用:允许 --skip-tests
并跳过 canary 晋升证据与 Core+Impact Gate report。
EOF
}
@@ -68,9 +73,17 @@ while [[ $# -gt 0 ]]; do
shift
done
say() {
printf '\n[%s] %s\n' "$(date +%H:%M:%S)" "$*"
}
if [[ "${SKIP_TESTS}" -eq 1 ]]; then
echo "生产发布守门员禁止 --skip-tests。" >&2
exit 1
if [[ "${ALLOW_DIRECT_STABLE_RELEASE:-0}" == "1" ]]; then
say "允许 --skip-testsALLOW_DIRECT_STABLE_RELEASE=1,按 7/23 前直接整包规则;测试须已在发布前手动跑过)"
else
echo "生产发布守门员禁止 --skip-tests。" >&2
exit 1
fi
fi
if [[ "${ALLOW_PORTAL_RELEASE_SCOPE_BYPASS:-0}" == "1" ]]; then
@@ -84,14 +97,14 @@ if [[ "${ALLOW_MINDSPACE_PUBLIC_LINK_ISSUES:-0}" == "1" ]]; then
fi
if [[ "${DRY_RUN}" -eq 0 ]]; then
say "验证 103 灰度晋升证据"
node "${ROOT}/scripts/verify-canary-promotion-evidence.mjs" --host "${HOST}"
if [[ "${ALLOW_DIRECT_STABLE_RELEASE:-0}" == "1" ]]; then
say "跳过灰度晋升证据(ALLOW_DIRECT_STABLE_RELEASE=1,按 7/23 前直接整包规则)"
else
say "验证 103 灰度晋升证据"
node "${ROOT}/scripts/verify-canary-promotion-evidence.mjs" --host "${HOST}"
fi
fi
say() {
printf '\n[%s] %s\n' "$(date +%H:%M:%S)" "$*"
}
need_cmd() {
command -v "$1" >/dev/null 2>&1 || {
echo "缺少命令: $1" >&2
@@ -336,7 +349,9 @@ REMOTE
}
say "验证与当前 main 和 runtime artifact 绑定的 Gate report"
if ! node "${ROOT}/scripts/verify-release-gate-report.mjs" --artifact "${RUNTIME_ROOT}" >/dev/null 2>&1; then
if [[ "${ALLOW_DIRECT_STABLE_RELEASE:-0}" == "1" ]]; then
say "跳过 Core+Impact Gate reportALLOW_DIRECT_STABLE_RELEASE=1,按 7/23 前直接整包规则)"
elif ! node "${ROOT}/scripts/verify-release-gate-report.mjs" --artifact "${RUNTIME_ROOT}" >/dev/null 2>&1; then
say "执行核心场景 + 变更影响域 Gate"
DEPLOYED_SHA="${MEMIND_RELEASE_BASE_COMMIT:-}"
if [[ -z "${DEPLOYED_SHA}" && "${DRY_RUN}" -ne 1 ]]; then
@@ -351,8 +366,10 @@ if ! node "${ROOT}/scripts/verify-release-gate-report.mjs" --artifact "${RUNTIME
IMPACT_ARGS+=(--deployed-commit "${DEPLOYED_SHA}")
fi
node "${ROOT}/scripts/run-release-gate-impact.mjs" "${IMPACT_ARGS[@]}"
node "${ROOT}/scripts/verify-release-gate-report.mjs" --artifact "${RUNTIME_ROOT}"
else
node "${ROOT}/scripts/verify-release-gate-report.mjs" --artifact "${RUNTIME_ROOT}"
fi
node "${ROOT}/scripts/verify-release-gate-report.mjs" --artifact "${RUNTIME_ROOT}"
if [[ "${DRY_RUN}" -ne 1 ]]; then
say "执行 103 只读预检"