Files
ai-ticket-platform/docs/product/acceptance/blueprint-readiness.md
2026-07-27 19:08:08 +08:00

65 lines
2.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 产品蓝图统一验收
## 目的
`report_blueprint_readiness` 将产品蓝图阶段 2~6 的最终退出条件收敛为一个机器可读报告。
报告不会因为工程测试通过而替代真实案例或真实环境证据,也不会把合成案例计入阶段退出。
当前共检查 9 个门槛:
1. 阶段 2 脱敏真实案例智能建单指标。
2. 阶段 3 脱敏真实案例支持闭环指标。
3. 阶段 3 PostgreSQL、Embedding 与重排基准。
4. 阶段 4 真实模型知识蒸馏、独立审核、发布与重新检索。
5. 阶段 4 MinIO、ClamAV、PostgreSQL、Embedding 和六类文档导入。
6. 阶段 6 企业渠道签名、收发、回执与幂等。
7. 阶段 6 OIDC、组织声明、故障降级与 LDAP 目录同步。
8. 阶段 6 真实告警、备份调度与异地加密副本。
9. 阶段 6 数据库与对象存储隔离一致性恢复。
## 准备证据
阶段 2、3 的业务指标从平台评审记录实时计算。先按对应说明导入案例并逐案评审:
- `stage2-evaluation.md`
- `stage3-evaluation.md`
其余真实环境验收从以下模板开始:
```powershell
Copy-Item `
docs/product/acceptance/blueprint-external-evidence.template.json `
docs/product/acceptance/blueprint-external-evidence.json
```
只能填写验收结果、环境代号、指标和证据文件引用。清单会递归拒绝字段名包含
`password`、`secret`、`token` 或 `credential` 的内容,不得在其中保存任何真实凭据。
每个通过项必须包含带时区的 `verified_at`、`reviewer` 和至少一个 `artifact_refs`。
## 运行
目标数据库必须先应用当前迁移:
```powershell
cd backend
python manage.py migrate
python manage.py report_blueprint_readiness `
--evidence ../docs/product/acceptance/blueprint-external-evidence.json `
--output ../docs/product/acceptance/blueprint-readiness.current.json
```
CI 或正式退出评审使用非零退出码阻断未满足项:
```powershell
python manage.py report_blueprint_readiness `
--evidence ../docs/product/acceptance/blueprint-external-evidence.json `
--format json `
--fail-on-not-ready
```
若数据库未迁移、证据文件缺失、契约字段不完整、恢复记录无效或任一业务指标未达标,
命令都会输出 `not_ready`。只有 9 个门槛全部通过时,顶层 `exit_ready` 才会为 `true`。
仓库中的 `blueprint-readiness.current.json` 是当前环境快照,不是永久通过证明;每次正式
验收都应重新生成,并保留它引用的原始指标、运行日志、截图或审批记录。