petstore-docs/qa-reports/phase1-follow-up-task-rebook-2026-08-02.md

55 lines
3.2 KiB
Markdown
Raw 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.

# Phase 1 FollowUpTask 与真实再次预约交付证据
> 日期2026-08-02
> 范围Backend + Admin + Docs/Ontology
> 状态Code Complete / Local Gates Passed / Production Not Migrated
## 1. 交付结果
- `ReportLead` 收口为宠主同意与来源事实;新增 `FollowUpTask` 作为门店可执行回访对象。
- 状态机支持领取、未接通/稍后联系改期、无意向/无效联系方式关闭,以及退订取消。
- Admin `/leads` 已切换为任务池;同店员工可实际联系、读取真实号源并代客创建预约。
- `rebooked` 只由真实 Appointment 保存成功触发;容量、客户归属或状态校验失败时不闭环。
- 工作台到期回访改读 FollowUpTask报告漏斗的回访后预约改读 `rebook_created`
- 客户事实时间线新增回访创建/领取/改期/完成/取消/再次预约的低敏投影。
## 2. 自动化证据
| Gate | 结果 |
|------|------|
| Backend full test | PASS217 tests0 failures0 errors0 skipped |
| Admin production build | PASSVue type-check + Vite1671 modules transformed |
| Ontology validation | PASS290 entries引用完整 |
| Endpoint drift | PASS70/70 HTTPcode-only=0ontology-only=0 |
| Entity drift | PASS16/16 JPAmissing=0extra=0 |
| Diff whitespace | PASSbackend/admin/docs `git diff --check` |
关键新增覆盖:`FollowUpTaskMigrationTest`、`FollowUpTaskServiceTest`、`AdminFollowUpTaskControllerTest`,以及 Appointment/BusinessEvent/Workbench/Timeline 的回归用例。反例包含跨店 404、他人领取冲突、未领取关闭拒绝、退订不虚增联系次数、跨店预约拒绝、容量不足不触碰任务。
## 3. Data Model Review
结论PASS代码与迁移层面
- `t_follow_up_task` 使用随机 `task_id` 对外、自增 ID 内部关联、`@Version` 与悲观锁处理竞争。
- 生产迁移只回填可靠的历史 `pending` 留资;不猜测其他历史结果。
- 31 项生产只读预检中新增五项,覆盖客户 canonical 范围、状态/领取/回执、开放唯一性、真实 Appointment 与 BusinessEvent 引用。
- 迁移为向前兼容新增表;常规应用回滚不得删除表或覆盖已产生任务/事件。
## 4. Privacy Review
结论PASS静态契约与自动化层面
- 完整手机号仅在本店已认证 boss/staff 的开放回访任务中返回,目的限定为实际联系;终态任务只返回脱敏手机号。
- Workbench、CustomerTimeline、BusinessEvent、AuditLog 不保存或返回完整手机号。
- 事件 metadata 白名单不含手机号、token、openid/unionid、IP、备注、媒体 URL 或原始请求。
- 跨店任务使用 404降低可枚举性customer 无任务接口权限。
## 5. 尚未完成的外部证据
- 未在生产或真实试点库执行第八个迁移 `20260802_create_follow_up_task.sql`
- 未以最终 production 环境运行 schema validate + 31 项只读预检。
- 未完成 boss/staff/customer 三角色真实环境 smoke尤其是双员工抢领、退订与无号源再次预约。
- 未在 35 家试点门店验证任务领取习惯、接通率、再次预约率和约 200 单完整服务样本。
上述项目进入试点 RC 门禁,不因本地自动化通过而标记为上线完成。