完成 M002 V3 CP6 P0 fixtures 回归基线

This commit is contained in:
andy
2026-07-11 22:23:19 +08:00
parent 25dfa33f45
commit 3ae3fea6bc
33 changed files with 4600 additions and 75 deletions

View File

@@ -114,15 +114,16 @@ SuperAgent 不应知道或依赖内部 SourceMessage Inbox ID。任务结果通
- 后端会完整保存 AI 三元组、`route_code` 和系统处理分类;`S10/S99` 仍以只读源邮件通知卡展示,任务列表可见,订单列表不可见。
-`S000/S999` 数据继续兼容展示,语义上分别映射到 `S10/S99`
当前后端已完成 M002 V3 CP1-CP2
当前后端已完成 M002 V3 CP1-CP6
- 已建立 42 条 P0 路由枚举 / 稳定配置。
- 已支持结构化 `S10/S99` 入站,创建只读 `SOURCE_MESSAGE_ONLY` 任务。
- 已支持 V3 业务根 `source_message + message_events[]` 的基础解析;可派生到现有任务模型的 event 会创建业务任务,无法派生、显式契约错误或基础 manual_review / parent split 结构不完整的 event 只落 `adapter_contract_error` transition不创建业务任务。
- 已支持 `unhandled_current_intents[]` 最小落库:只写 `UNHANDLED_CURRENT_INTENT` transition不创建业务任务也不按 adapter 契约错误返回。
- 已在 `workflow_reservation_ai_transition` 保存 `route_code``system_process_category``adapter_error_code``adapter_error_message`
- 已支持 type-known manual review 同卡解阻、当前订单归属确认、P0 fixtures 回归测试和 V3 typed `infrastructure_input_error` 响应。
尚未完成:type-known manual review 同卡解阻、`manual_review.missing_fields[]` 到任务卡可编辑字段白名单的完整映射校验、typed `infrastructure_input_error` 响应、复核场景订单归属确认、真实 OPERA / OHIP、普通任务切换订单、任务列表 / 详情接口完整透出所有 V3 路由字段
尚未完成:真实 OPERA / OHIP、普通任务切换订单、字段矩阵从当前扁平结构整体迁移到 0711 P0 新结构
## 4. 接口 1查询订单上下文
@@ -481,7 +482,8 @@ S10 示例:
"required": true,
"notification_type": "source_message_review",
"show_source_message": true,
"requires_user_decision": true
"requires_user_decision": true,
"visible_message": "未匹配到当前 Agent 支持的业务事件类型,请查看原邮件并决定是否需要回复或进行其他处理。"
},
"manual_review": null
}
@@ -544,6 +546,20 @@ V3 字段说明:
- 业务 event 能派生到稳定路由时,复用现有订单 / 任务 / 任务卡创建链路。
- event 判别字段不完整、显式携带 `contract_errors`、根 `missing_fields`、不完整 `manual_review` 或不完整 parent split 候选时,写入 `adapter_contract_error` transition不创建订单和任务同一邮件其他 sibling event 继续处理。
- `unhandled_current_intents[]` 写入 `UNHANDLED_CURRENT_INTENT` transition不返回 `adapter_error_code`
- type-known manual review 第一版在同一业务任务卡解阻;当前字段矩阵仍使用扁平字段,`/extracted_fields/room_items/{index}/pms_room_type_code` 会兼容映射到 `extracted_fields.pms_room_type_code`
`source_message.source_message_id` 缺失时返回 `HTTP 400`,响应体不使用通用错误包装:
```json
{
"result_type": "infrastructure_input_error",
"error_code": "missing_source_message_id",
"retryable": true,
"missing_fields": [
"source_message.source_message_id"
]
}
```
### 8.4 V2 JSON 兼容请求体
@@ -755,6 +771,7 @@ V3 `adapter_contract_error` 响应中的 `items[]` 不会包含 `order_id` / `ta
| `SYSTEM_HOTEL_AMBIGUOUS` | 409 | 单酒店阶段平台酒店表存在多家 `ACTIVE` 酒店 |
| `HOTEL_ACCESS_DENIED` | 403 | 显式传入的 `hotel_id` 与系统酒店或当前用户授权酒店不一致 |
| `SOURCE_MESSAGE_NOT_FOUND` | 404 | 任务结果通知或会话锚点引用的外部来源消息尚未写入 SourceMessage Inbox |
| `missing_source_message_id` | 400 | V3 请求缺少 `source_message.source_message_id`,响应体为 typed `infrastructure_input_error` |
## 10. HMAC 上线配置