feat(ops): ECR-007 行为分析与 ECR-008 内容运营后台
ci / h5 (push) Canceled after 0s
ci / api (push) Canceled after 0s
ci / ess-docs (push) Canceled after 0s

落地埋点 ingest/数据看板、首页宫格 CMS 与测评上下架;含账号引导、问答流式与免责声明去重,以及 review P1 审计同事务修复。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-07 02:26:16 +08:00
co-authored by Cursor
parent 7e9023f0a8
commit 7ab9add5dd
132 changed files with 8276 additions and 491 deletions
+27
View File
@@ -0,0 +1,27 @@
# CODE_REVIEW — ECR-007
**Verdict:** ApproveFeature Complete · Ops-B
Date: 2026-08-07
## Checklist
- [x] Handler → Service → Repositoryingest 挂 DeviceAuth;聚合挂 AdminAuth
- [x] Feature Spec Active + BD-2026-007 Approved
- [x] OpenAPI`POST /analytics/events` · `GET /admin/analytics/*`
- [x] Migration `000013_analytics_ops` · ERD 同步
- [x] 文件 ≤400integration + H5 单测绿
- [x] props 白名单;无 PII 采集
- [x] 未引入 Kafka/ClickHouse
## Architecture Regression
- [x] 无 Handler 直连 DB
- [x] Admin / Device 鉴权面隔离
- [x] 未简化分层
## Residual(不阻断)
- ingest 逐条 INSERT(量上来再批量 COPY / 日汇总表)
- admin「数据」未进 `@yuxingu/sdk`(与 Ops-A 一致用 thin client
- Ops-C/D/E 另开 ECR
+34
View File
@@ -0,0 +1,34 @@
# CODE_REVIEW — ECR-008
**Verdict:** ApproveFeature Complete · Ops-C · P1 已修)
Date: 2026-08-07 · Reviewer pass → P1 fixed
## Checklist
- [x] Handler → Service → Repositoryhome DeviceAuthadmin AdminAuth
- [x] Feature Spec Active + BD-2026-008 Approved
- [x] OpenAPI home/admin content paths
- [x] Migration `000014_ops_content` · ERD
- [x] path/icon 白名单;**审计与变更同事务**ReplaceAllWithAudit / UpdateStatusWithAudit
- [x] C 端 Get/Submit 仅 published scales
- [x] H5 静态回退;integration 绿(含 audit 断言 + tools restore
## P1 — resolved
| ID | Fix |
|----|-----|
| P1-1 审计非原子 | `HomeToolsRepo.ReplaceAllWithAudit` · `ScaleRepo.UpdateStatusWithAudit` |
| P1-2 ↑↓ 破坏 row_index | `ContentPage.move` 仅交换位置并按行重算 sort_order |
| P1-3 Analytics nil | `requireAnalytics` 统一守卫 |
## P2(可跟进)
- Scales 直连 ScaleRepoC 端多暴露字段;icon 白名单三处重复;OpenAPI schema 偏薄
## Architecture Regression
- [x] 无 Handler 直连 DB
- [x] Admin / Device 鉴权隔离
- [x] 未引入非默认中间件
- [x] 审计与写操作同事务