build: add repeatable local release gates

This commit is contained in:
2026-09-20 20:12:17 +08:00
parent a557ba5af0
commit 0f95ca4997
4 changed files with 29 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
GO ?= go
.PHONY: fmt test vet build image integration mysql-replication mysql-compatibility sdk-check protocol-check docs-check schedule-backlog
.PHONY: fmt test vet build image integration mysql-replication mysql-compatibility sdk-check protocol-check docs-check schedule-backlog release-local-check
fmt:
$(GO) fmt ./...
cd sdk/go && $(GO) fmt ./...
@@ -47,6 +47,9 @@ protocol-check:
docs-check:
./scripts/check-doc-links.sh
release-local-check:
./scripts/check-release-local.sh
# Runs the bounded, intentionally incomplete persistent backlog rehearsal in an isolated MySQL.
schedule-backlog:
./scripts/test-schedule-backlog.sh

View File

@@ -8,6 +8,8 @@
完成标准包括服务端、SDK、迁移及运行工具、Markdown 接口手册、可运行场景示例,以及实际正确性/故障/性能验证记录。完成设计、单机运行或展示一条正常路径,均不等同于完成首版交付。
仓库内的开发回归统一入口为 `make release-local-check`,它只负责可重复的本地门禁;真实 MySQL 全量回归使用 `make integration`,目标拓扑生产验收仍按交付清单单独留证。
## 1.1 当前交付快照(2026-09-20)
当前不是“还剩一半代码”的状态,而是核心平台已经进入生产验收阶段。为避免把代码完成度和上线完成度混在一起,按三层记录:

View File

@@ -4,6 +4,14 @@
## 1. 发布前检查
仓库内的可重复门禁可以一次执行:
```sh
make release-local-check
```
该命令覆盖服务端/SDK/独立示例的竞态测试、静态检查、构建、当前协议门禁和文档链接检查,并验证 SDK 不依赖服务端或数据库包。它不会替代 `make integration` 的真实 MySQL 回归,也不会替代目标拓扑的容量、故障切换、RPO/RTO 和生产审批。
服务端不会在启动时自动修改数据库。发布人员先准备与当前版本匹配的 `orbit-migrate`、`orbit-admin` 和 `orbit`,再用迁移账户执行一次迁移;运行账户只需要服务运行所需的数据库权限。
```sh

15
scripts/check-release-local.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
# Run the repository-local release gates. This does not claim production HA,
# capacity, failover, RPO/RTO, or target-environment approval.
set -eu
TASK_MAKE=${MAKE:-make}
"$TASK_MAKE" test
"$TASK_MAKE" vet
"$TASK_MAKE" build
"$TASK_MAKE" protocol-check
"$TASK_MAKE" docs-check
"$TASK_MAKE" sdk-check
printf '%s\n' '{"status":"local_release_gates_passed","mysql_integration":"run make integration separately","production_acceptance":"target environment evidence still required"}'