feat(reply-quality): 👎 keeps a snapshot of the turn; admin 对话质量记录
A 👎 now saves, server side, the rated turn plus the context window the model read for it (reconstructed from the stored session with the same consultationHistoryWindow the consult route uses), model and run facts. 👍 is only counted. Switching to 👍 or clearing deletes the snapshot. Bodies are blanked after 90 days; the row cascades on session delete and on account deletion. - Optional 不满意原因 panel under the answer after a 👎 (five reasons, 200-char note, "会把这一轮对话发给我们排查"). - Admin 对话质量记录: 👍/👎 stats by day and model, list without text, audited snapshot open, 处理状态 + note (support.quality.read/write). - Privacy draft: what a 👎 keeps, why, 90 days, deletion. - Migration 20260930050000 is add-only; set_reply_rating() replaced with the same signature. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c1b4868cd9
commit
12e315a9bb
@@ -11,6 +11,13 @@
|
||||
- 产物隐私补扫未通过:tracked 守卫 63 passed 不覆盖本轮未跟踪文件。显式复用隐私规则扫描新增产物时,M0 baseline JSON 的时刻数组 R003 命中 3 次;旧 baseline quick 日志混合编码无法以 UTF-8 或 GB18030 严格解码。未打印标记原值、未改既有隐私例外、未删除命中数据;需独立核查精确字段碰撞及完成日志保真扫描后,才可考虑纳入提交。证据 `artifacts/varga-resolution/closure-explicit-privacy.log`。
|
||||
- M0 两次字节复跑未完成、M2/M3 not_started 是研究欠项,**不是上述环境失败的推断后果**。不得据此关单或宣称已交付。
|
||||
|
||||
## 对话质量记录(2026-09-30,PROGRESS-reply-quality-20260930):真实 PostgreSQL 与真机待验
|
||||
|
||||
- 缺什么:本机无 Docker,`npm run test:db` 跑不了;迁移 `20260930050000_reply_quality_snapshots.sql`(👎 才能存快照、👍/取消删快照、90 天清空正文、后台查看与改状态写审计、按天/按模型统计)只有源码合同测试。无受控登录账号与实体手机,点 👎 后的原因面板与后台页面未在真实环境点过。
|
||||
- 替代证据:`frontend/tests/reply-quality-20260930.test.tsx`(快照只取服务器存的那条回答且哈希一致、上下文窗口与摘要截点、原因规范化、面板选填提交、SQL 与 RBAC 合同、保留期任务);部署到 staging 时迁移会被真实执行一次。
|
||||
- 解除条件:staging 迁移成功后,用受控账号对一条咨询回答点 👎 并选原因,在后台「对话质量记录」看到这一条、点「查看」能看到问答与上下文并在审计日志出现 `reply_quality.open`;改成 👍 后该记录消失;统计卡的 👍 / 👎 数与操作一致。
|
||||
- 校正会话里的 👍 / 👎 目前只在页面状态里,没有保存,因此不进对话质量记录(本轮不改)。
|
||||
|
||||
## 合规 A:用户协议 / 隐私政策 / 登录同意(2026-09-30)
|
||||
|
||||
- **律师审定**:`frontend/src/lib/legal-documents.ts` 是依据代码写的初稿,页面顶部标「草稿 · 待律师审定」。其中 【待确认】 事实点共 13 条(`pendingLegalConfirmations()` 可列出),定稿前逐条确认;定稿后改 `legal-entity.ts` 的 `legalDocumentsVersion` 与 `legalDocumentsDraft: false`,老用户会在下次登录后看到一次「协议已更新」确认。
|
||||
|
||||
Reference in New Issue
Block a user