feat(ECR-012–016): 合规、题库、时辰刷新、头像、MBTI OEJTS 与埋点
落地输入合规、探索题库、报告日/时辰刷新、账号头像、OEJTS 量表,并补齐 H5 埋点与 Admin 漏斗;同步 ESS 工件、切至自建 Git、清理 GitHub Actions。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# TEST_REPORT · ECR-012
|
||||
|
||||
**Date:** 2026-08-12
|
||||
**Result:** PASS(工程师自测)
|
||||
|
||||
## Unit
|
||||
|
||||
```bash
|
||||
cd apps/api && go test ./internal/textsafe/ -count=1
|
||||
# ok
|
||||
```
|
||||
|
||||
## Integration(本机 API :8080)
|
||||
|
||||
| Case | Endpoint | Expected | Actual |
|
||||
|---|---|---|---|
|
||||
| nickname 含「算命」 | POST /auth/register | 40060 | PASS |
|
||||
| nickname 合法「心语岛」 | POST /auth/register | 0 | PASS |
|
||||
| PATCH 昵称违规 | PATCH /auth/me | 40060 | PASS |
|
||||
| display_name「小愈」 | POST /profiles | 0 | PASS |
|
||||
| ask content `<script` | POST /ask/threads/:id/messages | 40060 | PASS |
|
||||
| note 刷屏「啊」×8 | POST /moods | 40060 | PASS |
|
||||
|
||||
## Frontend
|
||||
|
||||
- `@yuxingu/utils` `validateUserText` 镜像规则
|
||||
- 已挂:Login 注册昵称 · AccountNicknameCard · Ask 发送 · Profile 名 · Companion note · Growth title/focus · Synastry invite 称呼
|
||||
|
||||
## Notes
|
||||
|
||||
- 后端为权威;前端仅即时提示
|
||||
- OpenAPI description 已注明 40060
|
||||
@@ -0,0 +1,33 @@
|
||||
# TEST_REPORT · ECR-013
|
||||
|
||||
**Date:** 2026-08-13
|
||||
**Result:** PASS(工程师自测)
|
||||
|
||||
## Unit
|
||||
|
||||
```bash
|
||||
cd apps/api && go test ./internal/scalebank/ ./internal/integration/ -run 'TestCatalogCuratedASet|TestScaleBankResultRoundtrip' -count=1
|
||||
# ok
|
||||
```
|
||||
|
||||
## Vitest
|
||||
|
||||
```bash
|
||||
cd apps/user-h5 && npx vitest run src/pages/ScalePage.spec.ts
|
||||
# 3 passed(含 bank slug 结果回看)
|
||||
```
|
||||
|
||||
## Acceptance map
|
||||
|
||||
| Acceptance | Evidence |
|
||||
|------------|----------|
|
||||
| catalog 精选+四分类;无临床 | TestCatalogCuratedASet · Has("yyzcs") false |
|
||||
| bank Submit/Latest · R8 | TestScaleBankResultRoundtrip · ScalePage.spec bank case |
|
||||
| 精选图标互异 | TestCatalogCuratedASet seen[icon] |
|
||||
| `/explore` 返回 | AppHeader showBack 含 `/explore` |
|
||||
| OpenAPI | `proto/openapi.yaml` `/scale-bank/*` |
|
||||
|
||||
## Notes
|
||||
|
||||
- 题目 embed;DB 仅 EnsurePublished stub
|
||||
- 其它 WIP(时辰 tips / 星座日刷 / 头像)不在本 ECR
|
||||
@@ -0,0 +1,34 @@
|
||||
# TEST_REPORT · ECR-014
|
||||
|
||||
**Date:** 2026-08-13
|
||||
**Result:** PASS(工程师自测)
|
||||
**Retrospective:** true
|
||||
|
||||
## Unit
|
||||
|
||||
```bash
|
||||
cd apps/api && go test ./internal/service/home/ ./internal/service/report/ -count=1
|
||||
# ok
|
||||
```
|
||||
|
||||
## Migration
|
||||
|
||||
- `home_daily_tips` 表已存在于本地 Postgres(000023)
|
||||
|
||||
## Contract
|
||||
|
||||
- OpenAPI:`HomeDailyTips` + `EnvelopeHomeDailyTips`;`GrowthReport.summary` 注明 `as_of`/`valid_until` 换日原地刷新
|
||||
- 前端已消费:`useHomeDailyTips` · `scheduleRefresh` · star/rhythm composables
|
||||
|
||||
## Acceptance map
|
||||
|
||||
| Item | Evidence |
|
||||
|------|----------|
|
||||
| daily-tips 时辰字段 | service DailyTips JSON tags · OpenAPI schema |
|
||||
| star/rhythm 换日 | temporal.go + temporal_test · service Get/Latest 调用 |
|
||||
| OpenAPI | proto/openapi.yaml |
|
||||
| go test | home + report PASS |
|
||||
|
||||
## Process debt(必记)
|
||||
|
||||
实现早于 ECR;本报告不声称正序路径。
|
||||
@@ -0,0 +1,37 @@
|
||||
# TEST_REPORT · ECR-015
|
||||
|
||||
**Date:** 2026-08-13
|
||||
**Result:** PASS(工程师自测)
|
||||
**Retrospective:** true
|
||||
|
||||
## Wiring verified
|
||||
|
||||
| Item | Status |
|
||||
|------|--------|
|
||||
| migration `000018` · `users.avatar_url` | 本地 Postgres 列存在 |
|
||||
| UploadAvatar · MediaHandler · avatar.Store | 已接线 |
|
||||
| SDK `authUploadAvatar` · types `avatar_url` | 已有 |
|
||||
| H5 MinePage + `DEFAULT_AVATAR_SRC` | 已有 · `public/default-avatar.png` |
|
||||
| `apps/api/data/` gitignore | 已有 |
|
||||
|
||||
## Unit
|
||||
|
||||
```bash
|
||||
cd apps/api && go test ./internal/avatar/ -count=1
|
||||
# PASS · ResolveAbs traversal · bad type/size · store+overwrite
|
||||
```
|
||||
|
||||
## Contract
|
||||
|
||||
- OpenAPI:upload 400/401 说明 · media 路径约束说明
|
||||
|
||||
## Process debt
|
||||
|
||||
实现早于 ECR;本报告不声称正序路径。
|
||||
|
||||
## Manual smoke(建议 Reviewer / Human)
|
||||
|
||||
- [ ] 登录「我的」上传 JPG<2MB
|
||||
- [ ] 超限 / 非图片失败文案
|
||||
- [ ] 无头像显示 default-avatar
|
||||
- [ ] 直开 `/api/v1/media/avatars/{uuid}.ext`
|
||||
@@ -0,0 +1,24 @@
|
||||
# TEST_REPORT · ECR-016
|
||||
|
||||
**Date:** 2026-08-13
|
||||
**Result:** PASS
|
||||
**Retrospective:** true
|
||||
|
||||
## DB
|
||||
|
||||
- `mbti-lite` 32 题 · `mbti-full` 60 题 published
|
||||
|
||||
## Unit
|
||||
|
||||
```bash
|
||||
cd apps/api && go test ./internal/scale/ -count=1
|
||||
# ok · TestScoreJungian_ENFP
|
||||
```
|
||||
|
||||
## Contract
|
||||
|
||||
- OpenAPI:`scales/{slug}` 会员锁说明 · ScaleDetail access/locked · POST result 40310
|
||||
|
||||
## Process debt
|
||||
|
||||
实现早于 ECR。
|
||||
Reference in New Issue
Block a user