fix(plan): P4 时间线后移2周 + 前置条件检查 + SSE验证 + 契约更新步骤
This commit is contained in:
parent
eceaaedf35
commit
0b9b8cb4b0
@ -12,8 +12,33 @@
|
||||
|
||||
## Phase 1: 集成切换
|
||||
|
||||
### 时间线总览
|
||||
|
||||
| 阶段 | 内容 | 周次 |
|
||||
|------|------|------|
|
||||
| Switch S1 | content + account 集成切换 | Week 11-12 |
|
||||
| Switch S2 | meta 集成切换 | Week 13 |
|
||||
| Switch S3 | ai + knowledge 集成切换 | Week 14-15 |
|
||||
| Switch S4 | market 集成切换 | Week 16-17 |
|
||||
| Quality G1-G4 | 质量加固 | Week 18-19 |
|
||||
|
||||
### 各模块 API 数量(OpenAPI SSOT)
|
||||
|
||||
| 模块 | App 接口 | Admin 接口 | 总计 |
|
||||
|------|----------|-----------|------|
|
||||
| Content | ~35 | ~15 | ~50 |
|
||||
| AI | ~25 | ~15 | ~40 |
|
||||
| Knowledge | ~34 | ~23 | ~57 |
|
||||
| Market | ~21 | ~11 | ~32 |
|
||||
| Account | ~20 | ~13 | ~33 |
|
||||
| Meta | 0 | ~16 | ~16 |
|
||||
| **总计** | **~135** | **~93** | **~228** |
|
||||
|
||||
### Switch S1: content + account 集成切换
|
||||
|
||||
**前置条件检查:**
|
||||
- P1 content+account API 全部集成测试通过 → 可开始 S1
|
||||
|
||||
**依赖:** muse-cloud content + account API 自测通过
|
||||
|
||||
- [ ] **Step 1: 后端契约测试通过**
|
||||
@ -100,26 +125,80 @@ git add docs/api-contracts/
|
||||
git commit -m "fix(api): content+account 联调后契约修正"
|
||||
```
|
||||
|
||||
- [ ] **Step 8: 更新 OpenAPI 契约(如有不一致)**
|
||||
|
||||
```bash
|
||||
# 编辑对应的 openapi.yaml 修正
|
||||
git add docs/api-contracts/
|
||||
git commit -m "fix(api): content+account 联调后契约修正"
|
||||
# 重新生成 TypeScript 类型
|
||||
npx openapi-typescript docs/api-contracts/content/openapi.yaml --output docs/api-contracts/generated/typescript/content.ts
|
||||
npx openapi-typescript docs/api-contracts/account/openapi.yaml --output docs/api-contracts/generated/typescript/account.ts
|
||||
```
|
||||
|
||||
### Switch S2: meta API 集成切换
|
||||
|
||||
**前置条件检查:**
|
||||
- P1 meta API 全部集成测试通过 → 可开始 S2
|
||||
|
||||
**依赖:** muse-cloud meta API 自测通过
|
||||
|
||||
1. MetaSchema 管理页面切换到真实 API
|
||||
2. 验证 CRUD + 草稿/发布/版本管理流程
|
||||
3. 修正不一致,更新 OpenAPI
|
||||
|
||||
- [ ] **更新 OpenAPI 契约(如有不一致)**
|
||||
|
||||
```bash
|
||||
# 编辑对应的 openapi.yaml 修正
|
||||
git add docs/api-contracts/
|
||||
git commit -m "fix(api): meta 联调后契约修正"
|
||||
# 重新生成 TypeScript 类型
|
||||
npx openapi-typescript docs/api-contracts/meta/openapi.yaml --output docs/api-contracts/generated/typescript/meta.ts
|
||||
```
|
||||
|
||||
### Switch S3: ai + knowledge API 集成切换
|
||||
|
||||
**前置条件检查:**
|
||||
- P1 ai+knowledge API 全部集成测试通过 → 可开始 S3
|
||||
|
||||
**依赖:** muse-cloud ai + knowledge API 自测通过
|
||||
|
||||
1. AI 生成 SSE 流验证(断线重连、超时)
|
||||
2. 候选接受/拒绝流程验证
|
||||
3. 知识库文档上传/解析/确认流程
|
||||
4. 知识绑定/解绑跨模块测试
|
||||
5. 修正不一致,更新 OpenAPI
|
||||
5. SSE 端点专项验证:
|
||||
- [ ] **AI 生成 SSE 流**
|
||||
- 连接 AI 生成 SSE 端点,接收完整 chunk 序列
|
||||
- 模拟断线后使用 lastEventId 重连,验证断点续传
|
||||
- 验证超时处理(服务端无响应时客户端行为)
|
||||
- [ ] **事件流 SSE**
|
||||
- 连接事件流端点,接收通知事件
|
||||
- 使用 lastEventId 验证断线后事件不丢失
|
||||
- 验证心跳保活机制
|
||||
- [ ] **错误状态处理**
|
||||
- 网络断开时客户端降级提示
|
||||
- 服务端 5xx 错误时重试策略
|
||||
- 超时后的自动重连
|
||||
6. 修正不一致,更新 OpenAPI
|
||||
|
||||
- [ ] **更新 OpenAPI 契约(如有不一致)**
|
||||
|
||||
```bash
|
||||
# 编辑对应的 openapi.yaml 修正
|
||||
git add docs/api-contracts/
|
||||
git commit -m "fix(api): ai+knowledge 联调后契约修正"
|
||||
# 重新生成 TypeScript 类型
|
||||
npx openapi-typescript docs/api-contracts/ai/openapi.yaml --output docs/api-contracts/generated/typescript/ai.ts
|
||||
npx openapi-typescript docs/api-contracts/knowledge/openapi.yaml --output docs/api-contracts/generated/typescript/knowledge.ts
|
||||
```
|
||||
|
||||
### Switch S4: market API 集成切换
|
||||
|
||||
**前置条件检查:**
|
||||
- P1 market API 全部集成测试通过 + S1/S2/S3 全部完成 → 可开始 S4
|
||||
|
||||
**依赖:** 前面所有模块已切换
|
||||
|
||||
1. 市场浏览/推荐验证
|
||||
@ -127,6 +206,16 @@ git commit -m "fix(api): content+account 联调后契约修正"
|
||||
3. 发布/审核流程验证
|
||||
4. 修正不一致,更新 OpenAPI
|
||||
|
||||
- [ ] **更新 OpenAPI 契约(如有不一致)**
|
||||
|
||||
```bash
|
||||
# 编辑对应的 openapi.yaml 修正
|
||||
git add docs/api-contracts/
|
||||
git commit -m "fix(api): market 联调后契约修正"
|
||||
# 重新生成 TypeScript 类型
|
||||
npx openapi-typescript docs/api-contracts/market/openapi.yaml --output docs/api-contracts/generated/typescript/market.ts
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Phase 2: 质量加固
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user