Files
digital-psychology/docs/ECR/ECR-008-ops-content.md
T
jackyu66gitandCursor d33c8fdfe9 feat(ECR-012): 星座对齐收口,并 Closed ECR-007/008
对齐 outlook/分享 type=star/报告页运势面板与测试;流程上关闭 Ops-B/C 两张 ECR。真支付仍后置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 15:48:19 +08:00

70 lines
2.3 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-008
**Title:** 运营内容配置 Ops-C(首页宫格 CRUD · 测评上下架)
**Status:** Closed
**Date:** 2026-08-07
**Approved:** 2026-08-07Human
**Closed:** 2026-08-07Reviewer · Approve + ess-validate review PASS
**Change Level:** L2(新能力;栈与分层不变)
## Change
1. Active Feature Spec`.ai/product/feature-spec/ops-content.md`Ops-C
2.`home_tools` + migration `000014_ops_content`(种子=现网宫格)
3. User`GET /api/v1/home/tools`DeviceAuth,仅 enabled
4. Admin`GET|PUT /api/v1/admin/home/tools``GET /api/v1/admin/scales``PATCH /api/v1/admin/scales/:id`
5. `user-h5`:首页宫格改为 API 优先 + 静态回退
6. `admin-h5`:侧栏「内容」页(宫格 + 测评)
7. 变更写 `admin_audit_logs`
## Motivation
首页 12 宫格与测评可见性写死/仅靠库改;运营无法自助调入口与上下架。
## Scope
### Allowed
- 上列 Spec / 表 / API / H5 / admin「内容」
- path/icon 白名单;审计
- OpenAPI · ERD · feature-map §7
### ForbiddenNon-goals
- 首页 Feeds CMS · 探索目录全量 CMS · 量表题目编辑器
- 外链/上传图标 · Ops-D/E · UGC
## Risk
| Risk | Mitigation |
|------|------------|
| 错误 path 打穿站外 | 仅允许以 `/` 开头的站内相对路径,长度上限 |
| 空宫格 | PUT 校验至少 1 个 enabled;或允许空但 H5 回退静态 |
| icon 非法 | 服务端白名单对齐 `HomeToolIconName` |
| 误下架全量表 | PATCH 单条;审计可追溯 |
## Acceptance Criteria
- [x] Spec `ops-content.md` §验收通过
- [x] IntegrationPUT tools → GET home/toolsPATCH scale draft → ListPublished 不含
- [x] `go test` · `build:h5` · `build:admin` 绿
- [x] OpenAPI / TRACEABILITY / STATE / TEST_REPORT / CODE_REVIEW
- [x] `python3 scripts/ess-validate.py --phase review --ecr ECR-008`PASS
- [x] Docs + CHANGELOG
- [x] Reviewer ClosedSTATE · TRACEABILITY
## Rollback
- 关 admin 路由;H5 回退静态 catalog
- down migration(非生产可)
## Risk Review
- Path: N/A
## Linked
- Feature Spec: `.ai/product/feature-spec/ops-content.md`
- PRODUCT / ENGINEERING / BACKEND_DESIGN / HANDOFF / TASK / STATE:同号前缀
- 前序:ECR-006 Ops-A · ECR-007 Ops-B