This commit is contained in:
2026-09-10 10:53:07 +08:00
parent bcb1304937
commit a9e2302f7c
14 changed files with 1335 additions and 66 deletions

View File

@@ -300,3 +300,16 @@
- **Owner**:基础设施负责人
- **最后验证日期**2026-08-07
- **更新触发条件**:新增配置或依赖升级
## ENG-TEST-001
- **状态**:生效
- **适用范围**Agent 执行的迁移、Redis、API/Worker、部署与集成 Smoke 验证。
- **规则**:维护者指定的测试 PostgreSQL `junhong_cmp_test`、Redis DB 6、`Iteration/8-11` 测试部署和 `cmp-test` 日志主机构成唯一测试验证面MUST 使用该环境不额外要求独立数据库、Redis DB 或 namespace。迁移从本地工作区以明确 `DB_*` 参数执行;测试 fixture 仅可创建、删除当前 Change 自己的记录MUST NOT 重置整个测试库。测试部署通过 Gitea 工作流完成SSH 仅用于日志、容器状态与受控 Smoke。
- **理由**:同一可控测试面避免每个 Change 重复索取环境,且保留可复现的迁移、缓存、并发和部署证据。
- **最小正例**:当前 Change 在 `junhong_cmp_test` 执行迁移 up/down/up清理自己的 fixture并在测试部署后读取 `cmp-test` 日志。
- **最小反例**:以未提供额外“隔离环境”为由暂停,或重置整个测试数据库。
- **机械检查/人工原因**记录显式目标、迁移命令、fixture 清理范围、Redis 操作与测试部署 SHA通过 API/Worker 日志和可观察状态核对。
- **例外条件**:真实支付渠道和外部审批系统不作自动验证;第三方协议变更以契约文档和维护者提供的证据为准。生产仍按生产运行说明由维护者执行。
- **Owner**:基础设施负责人
- **最后验证日期**2026-09-08
- **更新触发条件**测试库、Redis DB、部署分支、测试主机或验证授权变化

View File

@@ -210,7 +210,8 @@
"requirements": [
"agent-funds-commission::充值边界",
"identity-access::数据范围拒绝",
"order-payment-wallet::金额单位"
"order-payment-wallet::金额单位",
"agent-funds-commission::代理在线充值可用支付方式按支付配置判定"
],
"classification": "behavior"
},
@@ -330,7 +331,12 @@
"capability": "asset-device",
"requirements": [
"asset-device::资产业务状态",
"identity-access::数据范围拒绝"
"identity-access::数据范围拒绝",
"package-lifecycle::资产套餐层级投影",
"package-lifecycle::套餐历史整组筛选与分页",
"package-lifecycle::套餐历史稳定排序",
"package-lifecycle::物理缺失与不可展示关系区分",
"package-lifecycle::套餐历史读取范围与兼容边界"
],
"classification": "behavior"
},
@@ -390,7 +396,8 @@
"capability": "operations-audit",
"requirements": [
"identity-access::数据范围拒绝",
"operations-audit::审计时间线"
"operations-audit::审计时间线",
"operations-audit::审计调查留存边界连续"
],
"classification": "behavior"
},
@@ -470,7 +477,8 @@
"capability": "operations-audit",
"requirements": [
"identity-access::数据范围拒绝",
"operations-audit::审计时间线"
"operations-audit::审计时间线",
"operations-audit::审计调查留存边界连续"
],
"classification": "behavior"
},
@@ -1356,7 +1364,12 @@
"entry": "GET /api/c/v1/asset/package-history",
"capability": "personal-customer",
"requirements": [
"personal-customer::资产归属查询"
"personal-customer::资产归属查询",
"package-lifecycle::资产套餐层级投影",
"package-lifecycle::套餐历史整组筛选与分页",
"package-lifecycle::套餐历史稳定排序",
"package-lifecycle::物理缺失与不可展示关系区分",
"package-lifecycle::套餐历史读取范围与兼容边界"
],
"classification": "behavior"
},
@@ -1514,7 +1527,8 @@
"capability": "agent-open-api",
"requirements": [
"agent-open-api::开放接口数据范围",
"agent-open-api::开放接口认证"
"agent-open-api::开放接口认证",
"agent-open-api::代理开放接口查询不触发可靠卡观测"
],
"classification": "behavior"
},
@@ -1524,7 +1538,8 @@
"capability": "agent-open-api",
"requirements": [
"agent-open-api::开放接口数据范围",
"agent-open-api::开放接口认证"
"agent-open-api::开放接口认证",
"agent-open-api::代理开放接口查询不触发可靠卡观测"
],
"classification": "behavior"
},
@@ -1534,7 +1549,8 @@
"capability": "agent-open-api",
"requirements": [
"agent-open-api::开放接口数据范围",
"agent-open-api::开放接口认证"
"agent-open-api::开放接口认证",
"agent-open-api::代理开放接口查询不触发可靠卡观测"
],
"classification": "behavior"
},
@@ -1544,7 +1560,8 @@
"capability": "agent-open-api",
"requirements": [
"agent-open-api::开放接口数据范围",
"agent-open-api::开放接口认证"
"agent-open-api::开放接口认证",
"agent-open-api::代理开放接口查询不触发可靠卡观测"
],
"classification": "behavior"
},
@@ -1751,7 +1768,8 @@
"agent-funds-commission::充值边界",
"external-integration::富友调用超时兼容行为",
"identity-access::数据范围拒绝",
"order-payment-wallet::金额单位"
"order-payment-wallet::金额单位",
"external-integration::富友主扫统一下单与订单查询"
],
"classification": "behavior"
},
@@ -2304,7 +2322,10 @@
"capability": "order-refund-exchange",
"requirements": [
"identity-access::数据范围拒绝",
"order-refund-exchange::订单、退款与换货状态门禁"
"order-refund-exchange::订单、退款与换货状态门禁",
"refund-approval::零金额退款审批通过",
"refund-approval::零金额退款不产生资金回款",
"refund-approval::非法退款金额仍被拒绝"
],
"classification": "behavior"
},
@@ -3283,14 +3304,9 @@
"entry_type": "async",
"entry": "constants.TaskTypeAuditDailyArchive",
"capability": "infrastructure",
"requirements": [],
"classification": "route_index_or_infrastructure"
},
{
"entry_type": "async",
"entry": "constants.TaskTypeAuditMonthlyRetention",
"capability": "infrastructure",
"requirements": [],
"requirements": [
"operations-audit::审计归档与日留存受控执行"
],
"classification": "route_index_or_infrastructure"
},
{
@@ -3399,14 +3415,10 @@
"entry_type": "async",
"entry": "constants.TaskTypeIntegrationDailyArchive",
"capability": "infrastructure",
"requirements": [],
"classification": "route_index_or_infrastructure"
},
{
"entry_type": "async",
"entry": "constants.TaskTypeIntegrationMonthlyFinalize",
"capability": "infrastructure",
"requirements": [],
"requirements": [
"external-integration::外部交互日志归档与留存受控执行",
"external-integration::外部交互日志逐日物理留存"
],
"classification": "route_index_or_infrastructure"
},
{
@@ -3466,7 +3478,11 @@
"entry_type": "async",
"entry": "constants.TaskTypePackageQueueActivation",
"capability": "infrastructure",
"requirements": [],
"requirements": [
"package-queue-activation::当前主套餐过期后自动激活下一个",
"package-queue-activation::孤儿待生效套餐必须公平恢复",
"package-queue-activation::Asynq 激活结果必须准确且可重试"
],
"classification": "route_index_or_infrastructure"
},
{
@@ -3474,7 +3490,12 @@
"entry": "constants.TaskTypePollingCardStatus",
"capability": "polling-operations",
"requirements": [
"polling-operations::手工轮询任务状态"
"polling-operations::手工轮询任务状态",
"external-integration::高频轮询外部交互日志保留边界",
"operations-audit::轮询审计事实保留边界",
"polling-load-control::轮询全局并发与背压",
"polling-load-control::正常无变化观测的低写入处理",
"polling-load-control::业务变化与轮询异常仍可追溯"
],
"classification": "behavior"
},
@@ -3483,7 +3504,12 @@
"entry": "constants.TaskTypePollingCarddata",
"capability": "polling-operations",
"requirements": [
"polling-operations::手工轮询任务状态"
"polling-operations::手工轮询任务状态",
"external-integration::高频轮询外部交互日志保留边界",
"operations-audit::轮询审计事实保留边界",
"polling-load-control::轮询全局并发与背压",
"polling-load-control::正常无变化观测的低写入处理",
"polling-load-control::业务变化与轮询异常仍可追溯"
],
"classification": "behavior"
},
@@ -3492,7 +3518,9 @@
"entry": "constants.TaskTypePollingPackage",
"capability": "polling-operations",
"requirements": [
"polling-operations::手工轮询任务状态"
"polling-operations::手工轮询任务状态",
"polling-load-control::轮询全局并发与背压",
"polling-operations::停复机遵循实际生效实名策略"
],
"classification": "behavior"
},
@@ -3501,7 +3529,8 @@
"entry": "constants.TaskTypePollingProtect",
"capability": "polling-operations",
"requirements": [
"polling-operations::手工轮询任务状态"
"polling-operations::手工轮询任务状态",
"polling-load-control::轮询全局并发与背压"
],
"classification": "behavior"
},
@@ -3510,7 +3539,12 @@
"entry": "constants.TaskTypePollingRealname",
"capability": "polling-operations",
"requirements": [
"polling-operations::手工轮询任务状态"
"polling-operations::手工轮询任务状态",
"external-integration::高频轮询外部交互日志保留边界",
"operations-audit::轮询审计事实保留边界",
"polling-load-control::轮询全局并发与背压",
"polling-load-control::正常无变化观测的低写入处理",
"polling-load-control::业务变化与轮询异常仍可追溯"
],
"classification": "behavior"
},
@@ -3560,5 +3594,44 @@
"order-refund-exchange::历史待审批退款可主动接入企业微信审批"
],
"classification": "behavior"
},
{
"entry_type": "async",
"entry": "constants.TaskTypeAuditDailyRetention",
"capability": "operations-audit",
"requirements": [
"external-integration::外部交互日志归档与留存受控执行",
"external-integration::外部交互日志逐日物理留存",
"operations-audit::审计归档与日留存受控执行",
"operations-audit::审计在线数据逐日物理留存",
"operations-audit::日留存独立运行日志"
],
"classification": "behavior"
},
{
"entry_type": "cli",
"entry": "scripts/migration/migrate_runtime.py",
"capability": "qicheng-migration-package-lifecycle-overrides",
"requirements": [
"qicheng-migration-package-lifecycle-overrides::迁移配置支持逐卡套餐生命周期覆盖",
"qicheng-migration-package-lifecycle-overrides::覆盖必须完整且可验证",
"qicheng-migration-package-lifecycle-overrides::未覆盖资产维持严格冲突阻断",
"qicheng-migration-package-usage::迁移套餐使用记录保存计时条款快照",
"qicheng-migration-package-usage::迁移套餐使用 SQL 满足快照完整性约束"
],
"classification": "behavior"
},
{
"entry_type": "cli",
"entry": "scripts/migration/import_shops.py",
"capability": "shop-bulk-import",
"requirements": [
"shop-bulk-import::导入输入必须在生成 SQL 前完成全量预检",
"shop-bulk-import::生成的 SQL 必须在写入前校验目标库状态",
"shop-bulk-import::批量导入 SQL 必须创建完整的店铺初始事实",
"shop-bulk-import::导入执行必须由维护者审核后以单事务手工确认",
"shop-bulk-import::导入结果必须可审核和重跑定位"
],
"classification": "behavior"
}
]

File diff suppressed because one or more lines are too long