feat(acceptance): 增加生产同构媒体压力验收模式

引入动态流量门禁、隔离验收身份与协议级 Gemini/Volces 模拟器,覆盖双站点 API、Worker、PostgreSQL、River、账务、回调和媒体物化链路。

新增 P24/P28/P32 容量阶梯、Worker 强杀恢复、真实小流量 canary、CAS 放量和失败保持 validation 的生产编排;Worker 执行槽、连接池、媒体并发和双站点副本数改为环境配置。

验证:Go 全量测试、真实 PostgreSQL 迁移集成测试、迁移安全检查、OpenAPI 生成、ShellCheck、Kustomize、gofmt 和 git diff --check。
This commit is contained in:
2026-07-30 23:06:19 +08:00
parent f33d6d64e0
commit 3053ba4925
45 changed files with 5214 additions and 45 deletions
+288
View File
@@ -1993,6 +1993,47 @@ definitions:
userId:
type: string
type: object
store.AcceptanceRun:
properties:
apiImageDigest:
type: string
apiKeyId:
type: string
callbackUrl:
type: string
capacityProfile:
type: string
config:
additionalProperties: {}
type: object
createdAt:
type: string
emulatorBaseUrl:
type: string
failureReason:
type: string
finishedAt:
type: string
id:
type: string
promotedAt:
type: string
releaseSha:
type: string
report:
additionalProperties: {}
type: object
startedAt:
type: string
status:
type: string
updatedAt:
type: string
userId:
type: string
workerImageDigest:
type: string
type: object
store.AccessRule:
properties:
conditions:
@@ -2087,6 +2128,8 @@ definitions:
type: object
store.AdminGatewayTask:
properties:
acceptanceRunId:
type: string
adminContext:
$ref: '#/definitions/store.AdminTaskContext'
apiKeyId:
@@ -2562,6 +2605,30 @@ definitions:
type: string
type: array
type: object
store.CreateAcceptanceRunInput:
properties:
apiImageDigest:
type: string
apiKeyId:
type: string
callbackUrl:
type: string
capacityProfile:
type: string
config:
additionalProperties: {}
type: object
emulatorBaseUrl:
type: string
releaseSha:
type: string
token:
type: string
userId:
type: string
workerImageDigest:
type: string
type: object
store.CreatePlatformInput:
properties:
authType:
@@ -2760,8 +2827,20 @@ definitions:
resultUploadPolicy:
type: string
type: object
store.FinishAcceptanceRunInput:
properties:
failureReason:
type: string
passed:
type: boolean
report:
additionalProperties: {}
type: object
type: object
store.GatewayTask:
properties:
acceptanceRunId:
type: string
apiKeyId:
type: string
apiKeyName:
@@ -2970,6 +3049,23 @@ definitions:
tenantKey:
type: string
type: object
store.GatewayTrafficMode:
properties:
apiImageDigest:
type: string
mode:
type: string
releaseSha:
type: string
revision:
type: integer
runId:
type: string
updatedAt:
type: string
workerImageDigest:
type: string
type: object
store.GatewayUser:
properties:
authProfile:
@@ -3642,6 +3738,17 @@ definitions:
taskId:
type: string
type: object
store.PromoteAcceptanceRunInput:
properties:
apiImageDigest:
type: string
releaseSha:
type: string
revision:
type: integer
workerImageDigest:
type: string
type: object
store.RateLimitMetricStatus:
properties:
currentValue:
@@ -5645,6 +5752,187 @@ paths:
summary: 更新 Runner 策略
tags:
- runtime
/api/admin/system/acceptance/runs:
post:
consumes:
- application/json
parameters:
- description: 验收 Run
in: body
name: body
required: true
schema:
$ref: '#/definitions/store.CreateAcceptanceRunInput'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/store.AcceptanceRun'
security:
- BearerAuth: []
summary: 创建生产同构验收 Run
tags:
- acceptance
/api/admin/system/acceptance/runs/{runID}:
get:
parameters:
- description: 验收 Run ID
in: path
name: runID
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/store.AcceptanceRun'
security:
- BearerAuth: []
summary: 获取生产同构验收 Run
tags:
- acceptance
/api/admin/system/acceptance/runs/{runID}/abort:
post:
consumes:
- application/json
parameters:
- description: 验收 Run ID
in: path
name: runID
required: true
type: string
- description: 线上 release 与 digest CAS
in: body
name: body
required: true
schema:
$ref: '#/definitions/store.PromoteAcceptanceRunInput'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/store.GatewayTrafficMode'
security:
- BearerAuth: []
summary: 人工 CAS 中止验收并切回 live
tags:
- acceptance
/api/admin/system/acceptance/runs/{runID}/activate:
post:
parameters:
- description: 验收 Run ID
in: path
name: runID
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/store.GatewayTrafficMode'
security:
- BearerAuth: []
summary: 切换到 validation 并激活 Run
tags:
- acceptance
/api/admin/system/acceptance/runs/{runID}/finish:
post:
consumes:
- application/json
parameters:
- description: 验收 Run ID
in: path
name: runID
required: true
type: string
- description: 门禁结果
in: body
name: body
required: true
schema:
$ref: '#/definitions/store.FinishAcceptanceRunInput'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/store.AcceptanceRun'
security:
- BearerAuth: []
summary: 记录验收门禁结果
tags:
- acceptance
/api/admin/system/acceptance/runs/{runID}/promote:
post:
consumes:
- application/json
parameters:
- description: 验收 Run ID
in: path
name: runID
required: true
type: string
- description: 线上 release 与 digest CAS
in: body
name: body
required: true
schema:
$ref: '#/definitions/store.PromoteAcceptanceRunInput'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/store.GatewayTrafficMode'
security:
- BearerAuth: []
summary: 通过 CAS 切回 live
tags:
- acceptance
/api/admin/system/acceptance/runs/{runID}/retry:
post:
parameters:
- description: 验收 Run ID
in: path
name: runID
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/store.AcceptanceRun'
security:
- BearerAuth: []
summary: 在 validation 关闭正式流量的状态下重试失败 Run
tags:
- acceptance
/api/admin/system/acceptance/traffic-mode:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/store.GatewayTrafficMode'
security:
- BearerAuth: []
summary: 获取 Gateway 流量模式
tags:
- acceptance
/api/admin/system/client-customization/settings:
get:
description: 返回客户端名称、英文名称、平台名和图标路径;数据库对象尚未创建时返回默认设置。