Files
digital-psychology/docs/ECR/ECR-014-temporal-refresh.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

54 lines
2.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.
# ECR-014
**Title:** 时效刷新契约对齐(首页时辰贴士 · 星座/节律按日)
**Status:** Approved
**Date:** 2026-08-13
**Approved:** 2026-08-13(Human:后台按前端本次时效刷新改动对齐;走 ESS Intake)
**Change Level:** L2
**Retrospective:** true
## Retro(异常路径 — 不得伪装正序)
| Field | Content |
|-------|---------|
| Original drift | 前端已用 `valid_until` / `scheduleRefresh` / 时辰贴士;后台实现先进树,未先挂 Active ECR |
| Scope freeze | 仅本 ECR Allowed 所列;禁止扩到头像、题库、textsafe、Ops |
| Process debt | 倒序实现;CODE_REVIEW 须点名流程债;不得写成「一直按正序 Approved」 |
## Change
1. 对齐 Spec`home.md` R5R8 · `star-profile.md` R12R14 · `life-rhythm.md` R8R11
2. 后台:`home_daily_tips` 缓存 · `shichen`/`valid_until`star/rhythm GET 换日原地刷新 `as_of`/`valid_until`
3. OpenAPI / types 契约与前端 SDK 一致
4. 单测 + 必要 integration
## Motivation
前端静默刷新依赖后端时效字段;无契约收口则易漂移。
## Scope
### Allowed
- `internal/service/home`daily_tips · shichen)· `repository/home_tips_repo` · migration `000023`
- `internal/service/report/temporal*` · Get/Latest 换日刷新
- `proto/openapi.yaml` 相关 schema/描述
- `packages/types` HomeDailyTips / report summary 字段(若缺)
- Spec 已 Active 的上述规则;TEST_REPORT / HANDOFF
### Forbidden
- 头像上传(另 ECR)· scalebank / 临床题库 · textsafe · Admin CMS · 新支付
## Acceptance
- [x] GET `/home/daily-tips``shichen` · `shichen_name` · `valid_until`
- [x] GET star/rhythm latest|id:跨日原地更新 `as_of`,返回 `valid_until`;同日不重算本命层
- [x] OpenAPI 描述与字段一致
- [x] `go test` home + report/temporal PASS
- [x] ess-validate coding PASSCODE_REVIEW 记录 Retro
## Trace
Spec home / star-profile / life-rhythm · TASK-014 · BD-2026-014 · TEST_REPORT/ECR-014.md