feat(release): add standard and fast 103 portal release modes

Formalize fast release as --mode fast so verified changes can skip canary promotion and full Gate reruns while keeping backups and health checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-15 08:03:44 +08:00
parent a9fe3d01a7
commit 835677a285
9 changed files with 222 additions and 76 deletions
+8 -5
View File
@@ -616,10 +616,13 @@ failed = skipped = blocked = unknown = cleanup_failed = 0
`release-gate/release-script.test.mjs`。测试通过不代表已经部署;103 灰度仍须绑定同一
commit、artifact 和 Gate report,并完成备份、只读预检及人工批准。
`scripts/release-portal-runtime-prod.sh` 会替换 8081 live 目录。它只用于同一候选完成灰度
验收后的全量晋升;在晋升证据校验完成前继续硬阻断非 dry-run,不能拿灰度入口替代晋升批准。
`scripts/release-portal-runtime-prod.sh` 会替换 8081 live 目录。
`scripts/release-portal-runtime-prod.sh` 必须按以下顺序执行:
**标准发布**(默认 `--mode standard`):只用于同一候选完成灰度验收后的全量晋升;在晋升证据校验完成前继续硬阻断非 dry-run。
**快速发布**`scripts/release-portal-fast-prod.sh``--mode fast`):跳过灰度晋升证据与完整 Gate 重跑;若已有有效 Gate report 则复用,否则只跑最小本地验证。仍须 `check-release-ready`、103 备份、goosed 预检、8081 健康检查与明确人工批准。manifest 记录 `release_mode=fast`
`scripts/release-portal-runtime-prod.sh` 标准模式必须按以下顺序执行:
1. `check-release-ready.sh`
2. 获取完整 `main` SHA 和远端 CI 状态
@@ -632,9 +635,9 @@ commit、artifact 和 Gate report,并完成备份、只读预检及人工批
以下情况必须直接退出:
- 使用 `--skip-tests`
- **标准发布**使用 `--skip-tests`
- 使用范围绕过变量
- report 不存在、过期或解析失败
- **标准发布**下 report 不存在、过期或解析失败
- commit 或 artifact SHA 不一致
- 任一被选场景失败、跳过、未知、未执行或清理失败
- 影响选择结果不可重现或存在未映射路径
+25 -5
View File
@@ -43,17 +43,37 @@ npm run check:mindspace-public-links
6. `public/*.html` 里的**下载/附件**相对链接(如 `report.docx`)必须在同目录真实存在。发版脚本默认只查这类链接(`--downloads-only`);全量资源检查用 `npm run check:mindspace-public-links:all`。失败会阻断发版;确知要带着已知坏链上线时,才可临时 `ALLOW_MINDSPACE_PUBLIC_LINK_ISSUES=1`
## 2. Portal runtime 发布唯一流程
## 2. Portal runtime 发布流程
生产发布守门员、Core + Impact Gate report 和本次明确人工批准全部满足后,首次生产动作只使用
103 整包替换提供两种模式
### 2.1 标准发布(默认)
生产发布守门员、Core + Impact Gate report、103 灰度晋升证据和本次明确人工批准全部满足后,首次生产动作使用灰度:
```bash
bash scripts/release-portal-canary-prod.sh --yes
```
生产 `103` 禁止使用 `--skip-tests` 或任何范围绕过变量。整包替换脚本
`release-portal-runtime-prod.sh` 只用于同一候选完成灰度验收后的全量晋升,在晋升证据
校验完成前仍会硬阻断。本文历史记录中的旧绕过命令只用于事故复盘,不构成当前发布授权。
灰度验收通过后,整包晋升:
```bash
bash scripts/release-portal-runtime-prod.sh --yes
```
标准发布禁止 `--skip-tests` 或任何范围绕过变量。
### 2.2 快速发布
变更已在本地/CI/Gate 充分验证、需尽快整包上线时使用:
```bash
bash scripts/release-portal-fast-prod.sh --yes
```
快速发布跳过灰度晋升证据、完整 Gate 重跑和 `publish-guards:full`;若当前 commit+artifact 已有有效 Gate report 则复用,否则只跑最小本地 smoke。仍执行 `check-release-ready`、103 备份、goosed 预检、8081 健康检查与明确人工批准。manifest 记录 `release_mode=fast`
快速发布不替代发布前测试(§1.5);禁止用 `--skip-tests` 代替未做的验证。
这个脚本必须完成这些动作: