Files
digital-psychology/docs/TEST_REPORT/ECR-007.md
T
jackyu66gitandCursor 7ab9add5dd
ci / h5 (push) Canceled after 0s
ci / api (push) Canceled after 0s
ci / ess-docs (push) Canceled after 0s
feat(ops): ECR-007 行为分析与 ECR-008 内容运营后台
落地埋点 ingest/数据看板、首页宫格 CMS 与测评上下架;含账号引导、问答流式与免责声明去重,以及 review P1 审计同事务修复。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 02:26:16 +08:00

37 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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`