feat(ops): ECR-007 行为分析与 ECR-008 内容运营后台
落地埋点 ingest/数据看板、首页宫格 CMS 与测评上下架;含账号引导、问答流式与免责声明去重,以及 review P1 审计同事务修复。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# TEST_REPORT — ECR-007 Ops-B Analytics
|
||||
|
||||
Date: 2026-08-07
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
export PATH="$HOME/.local/go/bin:$PATH"
|
||||
cd apps/api && go test ./internal/service/analytics/ -count=1
|
||||
cd apps/api && go test ./internal/integration/ -run TestAnalyticsOpsB -count=1
|
||||
npm run test:h5 -- --run src/lib/analytics.spec.ts
|
||||
npm run build:h5 && npm run build:admin
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
| Check | Result |
|
||||
|-------|--------|
|
||||
| `TestScrubDwellNonNeg` / `TestParseDayRange` | PASS |
|
||||
| `TestAnalyticsOpsB`(ingest → overview/pages/exits) | PASS |
|
||||
| `analytics.spec.ts`(6) | PASS |
|
||||
| `build:h5` / `build:admin` | PASS |
|
||||
|
||||
## Spec mapping
|
||||
|
||||
| Spec | Evidence |
|
||||
|------|----------|
|
||||
| page_view×2 + page_leave(dwell) + session_end.exit_page | TestAnalyticsOpsB ingest |
|
||||
| Admin overview/pages/exits 非空 | same |
|
||||
| props 截断 / dwell 非负 | service_test |
|
||||
| H5 队列 session / leave | analytics.spec |
|
||||
|
||||
## Notes
|
||||
|
||||
- DeviceAuth 空 key 时写入 request header,便于 ingest 读 `X-Device-Key`
|
||||
- 非法批次整批 400(`ErrInvalidBatch`)
|
||||
@@ -0,0 +1,28 @@
|
||||
# TEST_REPORT — ECR-008 Ops-C Content
|
||||
|
||||
Date: 2026-08-07
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
export PATH="$HOME/.local/go/bin:$PATH"
|
||||
cd apps/api && go test ./internal/service/home/ -count=1
|
||||
cd apps/api && go test ./internal/integration/ -run TestOpsContentPhaseC -count=1
|
||||
npm run build:h5 && npm run build:admin
|
||||
```
|
||||
|
||||
## Results
|
||||
|
||||
| Check | Result |
|
||||
|-------|--------|
|
||||
| `TestNormalizeTool*` | PASS |
|
||||
| `TestOpsContentPhaseC` | PASS |
|
||||
| `build:h5` / `build:admin` | PASS |
|
||||
|
||||
## Follow-up(review P1)
|
||||
|
||||
- Replace/Patch 与 audit 同事务
|
||||
- ContentPage `move` 保留 `row_index`
|
||||
- Analytics `requireAnalytics`
|
||||
- Integration 断言 `home_tools.replace` + restore tools
|
||||
|
||||
Reference in New Issue
Block a user