perf(storage): 极简化任务历史并增加保留治理

停止持久化 provider 原始响应、兼容响应快照、attempt/event/outbox 重复 JSON,并由标准任务结果动态生成 Kling/Keling/Volces 兼容响应。

增加事件去重与预算、极简 callback 投递、7/30 天分批清理、安全删除条件、并发迁移索引及可实际恢复的任务域排除备份。历史清理默认关闭,待兼容协议和异步恢复在线验证后单独启用。

验证:Go 全量测试与 go vet、PostgreSQL 18 集成与实际备份恢复、迁移安全测试、bash -n、ShellCheck、Compose 配置和人工发布脚本测试均通过。
This commit is contained in:
2026-07-24 18:23:22 +08:00
parent 09375bfae7
commit 810dcfeee6
46 changed files with 2246 additions and 458 deletions
+6 -1
View File
@@ -126,7 +126,7 @@ node "$root/scripts/release-manifest.mjs" validate "$manifest" >/dev/null
[[ $(node "$root/scripts/release-manifest.mjs" get "$manifest" images.api) == "$api_image" ]]
bootstrap_manifest=$tmp/bootstrap.json
RELEASE_SOURCE_SHA=$source_sha \
RELEASE_BASE_SHA= \
RELEASE_BASE_SHA='' \
RELEASE_COMPONENTS=api \
RELEASE_MIGRATIONS_CHANGED=true \
RELEASE_API_IMAGE=$api_image \
@@ -270,6 +270,11 @@ if find "$root/.gitea/workflows" -type f -print -quit 2>/dev/null | grep -q .; t
exit 1
fi
grep -Fq 'stale release manifest' "$root/deploy/manual/easyai-ai-gateway-release"
grep -Fq -- "--exclude-table-data=\$table" "$root/deploy/manual/easyai-ai-gateway-release"
grep -Fq -- "pg_restore -U \"\$POSTGRES_USER\" -d \"\$restore_database\" --section=post-data" "$root/deploy/manual/easyai-ai-gateway-release"
grep -Fq 'gateway_tasks' "$root/deploy/manual/easyai-ai-gateway-release"
grep -Fq 'gateway_task_attempts' "$root/deploy/manual/easyai-ai-gateway-release"
grep -Fq 'gateway_task_events' "$root/deploy/manual/easyai-ai-gateway-release"
grep -Fq 'production_changed=false' "$root/scripts/publish-release-images.sh"
echo 'manual_release_tests=PASS'