# QA Report — [Feature Name] — [E2E / UAT]

> **This is a template.** Copy to `docs/qa/[feature]-[e2e|uat]-[YYYY-MM-DD].md` and fill in. Delete this intro section before publishing.
>
> 单功能完整链路通常会产出 2 份：E2E → UAT；SIT 证据由 dev 自跑写入 `progress/<role>.md`，不在本模板范围（详见 skill `agf-running-sit-tests`）。

- **Date**: YYYY-MM-DD
- **Stage**: E2E / UAT
- **Tester**: qa-engineer ([model name]) / 业务方姓名（UAT）
- **Branch**: [branch + commit hash]
- **Environment**: local docker-compose / staging / pre-prod
- **PRD**: `docs/prd/[feature]-[date].md`
- **Code review report**: `docs/reviews/[feature]-[date].md`

## Summary

- Total AC: N
- Passed: M
- Failed: K
- Blocked: J
- Verdict: ✅ Promote to next stage / ❌ Block / ⚠️ Conditional promote

## Pre-conditions Checked

- [ ] 单元测试 + lint + typecheck 全绿
- [ ] code-reviewer 报告已存在且 verdict ≠ Block
- [ ] PRD AC 可访问
- [ ] 环境就绪（DB 起来 / 迁移已 apply / 服务已启动）

## AC Results

### AC-1: [verbatim AC text from PRD]

- **Setup**: [起始状态：DB 行 / fixture / 用户登录态]
- **Action**: [触发步骤：UI 点击 / curl / SDK 调用]
- **Expected**: [复制 PRD AC 原文]
- **Actual**:
  ```
  HTTP/1.1 200 OK
  Content-Type: application/json
  {"id": 42, "status": "created"}
  ```
- **Verdict**: ✅ Pass / ❌ Fail / ⚠️ Blocked

(每个 AC 重复一节，**禁止合并写 'all passed'**)

## Defects Found

| ID | Severity | Title | Repro steps | Suspected file |
|---|---|---|---|---|
| DEF-1 | High | 登录后立即调用 /me 返回 401 | 1. POST /login 拿 token 2. GET /me with Bearer | backend/app/middleware/auth.py |

## Cross-stage notes

- E2E → UAT：UAT 由业务方主导，QA 协助准备数据 + 操作手册

## Cost (this QA session)

- Tokens consumed: [from /usage]
- Estimated cost: [CNY]
- 同 feature 累计（E2E + UAT 总和）：[CNY]

## Hand-off

- ✅ Promote → SendMessage product-lead 进下一阶段
- ❌ Block → SendMessage product-lead 列 critical defect，重新派回 dev
- ⚠️ Conditional → 列 P2 defect 单独建 issue，allow 进下一阶段
