合并远端主线并解决游戏创作冲突
Project CI / Repository checks (pull_request) Failing after 33s
Project CI / Frontend tests (pull_request) Successful in 3m1s
Project CI / Backend tests (pull_request) Successful in 3m45s
Project CI / Native shell tests (pull_request) Successful in 13m59s

融合主线 Runtime、安全修复与提示词资源
保留可运行版本、资源替换和数值微调能力
修复资源画布布局、焦点与依赖关系融合
补齐 manifest 并发保护与 Tetris 场景兼容
同步前端测试、Rust 回归测试与权威文档
This commit is contained in:
2026-08-07 12:15:12 +08:00
361 changed files with 94215 additions and 6306 deletions
+30 -1
View File
@@ -6,6 +6,36 @@ MAINTENANCE_FILE="${GENARRATIVE_MAINTENANCE_FILE:-/var/lib/genarrative/maintenan
MAINTENANCE_PAGE_FILE="${GENARRATIVE_MAINTENANCE_PAGE_FILE:-/var/lib/genarrative/maintenance/page.html}"
PAGE_SOURCE=""
REASON_PARTS=()
page_temp=""
marker_temp=""
cleanup_temps() {
if [[ -n "${page_temp}" ]]; then
rm -f -- "${page_temp}"
fi
if [[ -n "${marker_temp}" ]]; then
rm -f -- "${marker_temp}"
fi
}
trap cleanup_temps EXIT
replace_file_atomically() {
local source_file="$1"
local target_file="$2"
if [[ -L "${target_file}" ]]; then
echo "[maintenance] 原子替换目标不能是符号链接: ${target_file}" >&2
exit 1
fi
if [[ -d "${target_file}" ]]; then
echo "[maintenance] 原子替换目标不能是目录: ${target_file}" >&2
exit 1
fi
# 源文件与目标文件位于同一目录,POSIX rename 语义即可保证原子替换。
# 不使用 GNU mv 专属的 -T,确保 macOS/BSD 本地门禁也能执行。
mv -f "${source_file}" "${target_file}"
}
replace_file_atomically() {
local source_file="$1"
@@ -52,7 +82,6 @@ mkdir -p "$(dirname "${MAINTENANCE_FILE}")" "$(dirname "${MAINTENANCE_PAGE_FILE}
if [[ -n "${PAGE_SOURCE}" ]]; then
page_temp="$(mktemp "${MAINTENANCE_PAGE_FILE}.tmp.XXXXXX")"
trap 'rm -f "${page_temp:-}" "${marker_temp:-}"' EXIT
install -m 0644 -- "${PAGE_SOURCE}" "${page_temp}"
replace_file_atomically "${page_temp}" "${MAINTENANCE_PAGE_FILE}"
page_temp=""