Files
digital-psychology/docs/CODE_REVIEW/ECR-014.md
T
jackyu66gitandCursor 89756f65b4 feat(ECR-012–016): 合规、题库、时辰刷新、头像、MBTI OEJTS 与埋点
落地输入合规、探索题库、报告日/时辰刷新、账号头像、OEJTS 量表,并补齐 H5 埋点与 Admin 漏斗;同步 ESS 工件、切至自建 Git、清理 GitHub Actions。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 01:27:58 +08:00

64 lines
2.5 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.
# CODE_REVIEW — ECR-014 Temporal refresh (tips · star · rhythm)
**Date:** 2026-08-13
**Reviewer:** Agent (ESS REVIEWER)
**Verdict:** **Approve**
**Retrospective:** true
```text
ESS Mode: L2
Phase: REVIEWER
ECR: ECR-014
Action: CONTINUE
Forbidden: production code edits this turn
```
## Process debt(强制记录)
本变更 **实现早于 ECR**(倒序)。TEST_REPORT / HANDOFF 已标明 Retro。
**不得**解读为「正序 Approved → Coding」样板路径。Intake 门禁对后续 L2 仍适用。
## Acceptance ↔ Evidence
| Acceptance | Evidence | OK |
|------------|----------|----|
| daily-tips `shichen` / `shichen_name` / `valid_until` | `DailyTips` JSON + `decorateTips` · OpenAPI `HomeDailyTips` | ✓ |
| star/rhythm 跨日原地更新 + `valid_until` | `refreshTemporalIfNeeded` on Get/Latest · engines set fields · `temporal_test` | ✓ |
| OpenAPI 一致 | `EnvelopeHomeDailyTips` · GrowthReport.summary 说明 | ✓ |
| go test | 复跑 home + report **PASS** | ✓ |
| ess-validate coding | **PASS** | ✓ |
| CODE_REVIEW 记 Retro | 本文 | ✓ |
## Backend Review
```text
Backend Review:
☑ Design Compliance — 对齐 BD-2026-014cache 时辰 · GET 换日原地 UpdateContent · 不新开报告 id
☑ Layer boundary respected — Handler → Service → Repo
☑ Domain independent
☑ Repository used — HomeDailyTipsRepo · Reports.UpdateContent
☑ API contract — OpenAPI 已批契约扩展
☑ Migration exists — 000023 home_daily_tips(本地表已存在)
☑ Observability — tips db 错误 logrefresh 失败软回退旧报告
☑ Error handling defined
☑ Tests included — shichen · temporal as_of/valid_until
☑ Rollback considered — BD 已写
☑ No architecture regression
☑ Matches Change Boundary — 未见头像/scalebank/textsafe 并入本 ECR 交付叙述
☑ Trace — BD-2026-014 · TEST_REPORT/ECR-014.md · 本 Review
```
## Residual(接受,不阻断)
- `refreshTemporalIfNeeded` 在 UpdateContent 失败时静默返回旧报告(可用性优先;可后续加指标)
- 同日仅缺 `valid_until``stampValidUntil` 改内存、未必立刻落库(下次 GET 仍可装饰)
- 无独立 HTTP integration 冒烟(单元 + 契约足够本 L2 Risk=Low
## Out of scope(正确排除)
头像 → ECR-015 · scalebank → ECR-013 · textsafe → ECR-012
## Decision
**Approve** → ECR-014 可 **Closed** / 合入(勿带密钥、`test-results/`、未纳入 Scope 的刮题库原始大文件)