feat(ECR-020): QualityFeedback 问答质量反馈并 Closed
新增 ask_quality_feedback、运营/C端评分 API 与 admin-h5 问答反馈区;禁改消息/UGC/真支付。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Backend Design: ECR-020 QualityFeedback
|
||||
|
||||
| ID | BD-2026-020 |
|
||||
| Status | Approved |
|
||||
| Coding | Loop authorized |
|
||||
| Level | L2 |
|
||||
| Migration | YES 000021 |
|
||||
|
||||
## Backend Change Boundary
|
||||
|
||||
```text
|
||||
Domain: QualityFeedback
|
||||
App: AdminHandler + AskHandler → services → repos
|
||||
API: GET /admin/ask/feedback
|
||||
POST /admin/ask/threads/{id}/feedback
|
||||
POST /ask/threads/{id}/feedback
|
||||
Permission: admin.ask.read · admin.ask.feedback.write
|
||||
Migration: 000021
|
||||
UI: admin-h5 /ask feedback panel
|
||||
```
|
||||
|
||||
## Out of boundary
|
||||
|
||||
Message mutation · SystemPrompt · UGC plaza · Payment
|
||||
|
||||
Rollback: down migration + remove routes/UI
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
## 2026-08-07
|
||||
|
||||
- **ECR-020 Closed**:QualityFeedback(`ask_quality_feedback` · admin/user 评分 · migration 000021)
|
||||
- **ECR-019 Closed**:ContentSafety FilterRule(`filter_rules` · evaluate · admin-h5 `/safety` · migration 000020)
|
||||
- **ECR-018 Closed**:Entitlement(`GET /admin/users/:id/entitlements` · admin-h5 权益 Tab · Migration NO)
|
||||
- **ECR-017 Closed**:AskOperations(AskSessionView 只读 · `admin.ask.read` · admin-h5 `/ask` · migration 000019)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# CODE_REVIEW — ECR-020
|
||||
|
||||
**Verdict:** Approve → Closed
|
||||
|
||||
Date: 2026-08-07 · Loop continuous
|
||||
|
||||
- QualityFeedback 表 + admin/user API;无消息改写
|
||||
- Audit on admin create · Integration AC mapped
|
||||
@@ -0,0 +1,26 @@
|
||||
ecr: ECR-020
|
||||
capability: AskOperations
|
||||
bounded_context: Ask_Ops
|
||||
parent: WAVE0-FROZEN
|
||||
predecessor: ECR-019
|
||||
change:
|
||||
type: additive
|
||||
breaking_change: false
|
||||
migration_required: true
|
||||
compatibility_notes: >
|
||||
Adds ask_quality_feedback and admin/user feedback APIs.
|
||||
No message body mutation.
|
||||
|
||||
apis:
|
||||
- method: GET
|
||||
path: /api/v1/admin/ask/feedback
|
||||
change: added
|
||||
- method: POST
|
||||
path: /api/v1/admin/ask/threads/{id}/feedback
|
||||
change: added
|
||||
- method: POST
|
||||
path: /api/v1/ask/threads/{id}/feedback
|
||||
change: added
|
||||
perms:
|
||||
- code: admin.ask.feedback.write
|
||||
change: added
|
||||
@@ -0,0 +1,19 @@
|
||||
# ECR-020
|
||||
|
||||
**Title:** QualityFeedback(问答质量反馈薄切片)
|
||||
**Status:** **Closed**
|
||||
**Closed:** 2026-08-07(Loop continuous)
|
||||
**Parent:** WAVE0-FROZEN · **Predecessor:** ECR-019 Closed
|
||||
**Change Level:** L2
|
||||
|
||||
## Change
|
||||
|
||||
`ask_quality_feedback`;运营 list/create · C 端评分;admin-h5 问答页反馈区。
|
||||
|
||||
## Forbidden
|
||||
|
||||
改消息 · Prompt 配置 · UGC · 真支付
|
||||
|
||||
## Linked
|
||||
|
||||
Spec `ops-quality-feedback.md` · BD-2026-020 · CONTRACT_DIFF/ECR-020.yaml · TEST_REPORT/ECR-020.md
|
||||
@@ -0,0 +1,6 @@
|
||||
# ENGINEERING_SPEC — ECR-020
|
||||
|
||||
1. migration 000021 ask_quality_feedback + perm
|
||||
2. Admin + Ask feedback APIs
|
||||
3. admin-h5 Ask 页反馈区
|
||||
4. Integration · Closed
|
||||
@@ -0,0 +1,3 @@
|
||||
# HANDOFF — ECR-020 Architect → Engineer
|
||||
|
||||
Loop continuous · Approved + Coding. Migration 000021. Forbidden: 改消息/UGC/真支付.
|
||||
@@ -0,0 +1,3 @@
|
||||
# HANDOFF — ECR-020 Engineer → Reviewer
|
||||
|
||||
TestQualityFeedback PASS · Ask 页反馈 · Ready for Closed.
|
||||
@@ -0,0 +1,3 @@
|
||||
# PRODUCT_SPEC — ECR-020
|
||||
|
||||
对齐 ops-quality-feedback.md · Approved · Loop · L2 · QualityFeedback
|
||||
@@ -0,0 +1,6 @@
|
||||
# STATE — ECR-020
|
||||
|
||||
| Status | **Closed** |
|
||||
| Phase | closed |
|
||||
| Spec | ops-quality-feedback.md |
|
||||
| Updated | 2026-08-07 |
|
||||
@@ -0,0 +1,11 @@
|
||||
id: TASK-020-ECR020
|
||||
ecr: ECR-020
|
||||
title: QualityFeedback implement
|
||||
role: engineer
|
||||
status: closed
|
||||
change_level: L2
|
||||
parent: WAVE0-FROZEN
|
||||
predecessor: ECR-019
|
||||
acceptance:
|
||||
- Spec AC mapped
|
||||
- No message rewrite / UGC / payment
|
||||
@@ -0,0 +1,32 @@
|
||||
# TEST_REPORT — ECR-020 QualityFeedback
|
||||
|
||||
Date: 2026-08-07 · Loop continuous · commit: (pending)
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
cd apps/api && go test ./internal/integration/ -run TestQualityFeedback -count=1
|
||||
npm run build:admin
|
||||
python3 scripts/ess-validate.py --phase review --ecr ECR-020
|
||||
python3 scripts/ess-gate-check.py --ecr ECR-020
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
| Check | Result |
|
||||
|-------|--------|
|
||||
| TestQualityFeedback | PASS |
|
||||
| build:admin | PASS |
|
||||
| ess-validate review | PASS |
|
||||
|
||||
## AC
|
||||
|
||||
| ID | Evidence |
|
||||
|----|----------|
|
||||
| AC-F-01 | admin POST → list 可见 |
|
||||
| AC-F-02 | user POST → 200 |
|
||||
| AC-F-03 | rating=9 → 400 |
|
||||
| AC-S-01 | 无 token list → 401 |
|
||||
| AC-S-02 | 仅 ask.read POST → 403 |
|
||||
| AC-P-01 | list < 500ms |
|
||||
| AC-O-01 | AuditLog ask.feedback.create |
|
||||
@@ -24,3 +24,4 @@
|
||||
| ECR-017 | AskOperations | **Closed** | Spec ops-ask-operations · BD-2026-017 · migration 000019 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
| ECR-018 | Entitlement | **Closed** | Spec ops-entitlement · BD-2026-018 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
| ECR-019 | ContentSafety | **Closed** | Spec ops-content-safety · BD-2026-019 · migration 000020 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
| ECR-020 | QualityFeedback | **Closed** | Spec ops-quality-feedback · BD-2026-020 · migration 000021 · TEST_REPORT · CODE_REVIEW · Loop continuous |
|
||||
|
||||
@@ -30,4 +30,4 @@ Human 明文:**直接用 Loop,不用人工确认。**
|
||||
|
||||
| Done | Next |
|
||||
|------|------|
|
||||
| ECR-013A…019 Closed | **ECR-020** QualityFeedback 薄切片(或 AICoreConfig);禁真支付/UGC |
|
||||
| ECR-013A…020 Closed | **ECR-021** AICoreConfig 薄切片(SystemPrompt 只读优先);禁真支付/UGC |
|
||||
|
||||
Reference in New Issue
Block a user