feat(ECR-024): OpsCMS Banner 只读并 Closed

运营横幅目录(ops_banners + admin /cms),锁定 024–040 全队列。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-08 03:05:55 +08:00
co-authored by Cursor
parent ac1aec857d
commit 32ac559385
30 changed files with 808 additions and 3 deletions
+23
View File
@@ -0,0 +1,23 @@
# Backend Design: ECR-024 Banner
| ID | BD-2026-024 |
| Status | Approved |
| Coding | Loop authorized |
| Level | L2 |
| Migration | YES 000025 |
## Backend Change Boundary
```text
Domain: Banner (read)
App: AdminHandler → admin.Service → AdminRepo
API: GET /admin/cms/banners; GET /admin/cms/banners/{id}
Permission: admin.cms.read
Migration: 000025
```
## Out of boundary
Banner 写发布 · FeedSlot · ScheduledPublication · UGC · 真支付
Rollback: down migration + remove routes/UI
+1
View File
@@ -2,6 +2,7 @@
## 2026-08-08
- **ECR-024 Closed**OpsCMS Banner`ops_banners` · admin-h5 `/cms` · migration 000025 · 只读)
- **ECR-023 Closed**AICoreConfig KnowledgeSource`knowledge_sources` · admin-h5 `/ai` · migration 000024 · 只读)
- **ECR-022 Closed**CrisisCare CrisisPolicy`crisis_policies` · evaluate · admin-h5 `/crisis` · migration 000023
- **ECR-021 Closed**AICoreConfig SystemPrompt`system_prompts` · admin-h5 `/ai` · migration 000022 · 只读)
+8
View File
@@ -0,0 +1,8 @@
# CODE_REVIEW — ECR-024
**Verdict:** Approve → Closed
Date: 2026-08-08 · Loop continuous
- Banner 只读;无 UGC/写发布
- Integration AC mapped · OpenAPI updated
+22
View File
@@ -0,0 +1,22 @@
ecr: ECR-024
capability: OpsCMS
bounded_context: Ops_CMS_NoUGC
parent: WAVE0-FROZEN
predecessor: ECR-023
change:
type: additive
breaking_change: false
migration_required: true
compatibility_notes: >
Adds Banner read catalog. Forbidden: UGC / real payment.
apis:
- method: GET
path: /api/v1/admin/cms/banners
change: added
- method: GET
path: /api/v1/admin/cms/banners/{id}
change: added
perms:
- code: admin.cms.read
change: added
+19
View File
@@ -0,0 +1,19 @@
# ECR-024
**Title:** OpsCMS · Banner(只读薄切片)
**Status:** **Closed**
**Closed:** 2026-08-08Loop continuous
**Parent:** WAVE0-FROZEN · **Predecessor:** ECR-023 Closed
**Change Level:** L2
## Change
`ops_banners` + `GET /admin/cms/banners*``admin.cms.read`admin-h5 `/cms`
## Forbidden
Banner 写发布 · FeedSlot · ScheduledPublication · UGC · 真支付
## Linked
Spec `ops-banner.md` · BD-2026-024 · CONTRACT_DIFF/ECR-024.yaml · TEST_REPORT/ECR-024.md
+6
View File
@@ -0,0 +1,6 @@
# ENGINEERING_SPEC — ECR-024
1. migration 000025
2. AdminRepo/Service/Handler
3. OpenAPI + admin-h5
4. Integration · Closed
@@ -0,0 +1,3 @@
# HANDOFF — ECR-024 Architect → Engineer
Loop continuous · Approved + Coding. Migration 000025. Forbidden: UGC/真支付.
@@ -0,0 +1,3 @@
# HANDOFF — ECR-024 Engineer → Reviewer
TestOpsCMSBanners PASS · /cms · Ready for Closed.
+3
View File
@@ -0,0 +1,3 @@
# PRODUCT_SPEC — ECR-024
对齐 ops-banner.md · Approved · Loop · L2 · Banner 只读
+6
View File
@@ -0,0 +1,6 @@
# STATE — ECR-024
| Status | **Closed** |
| Phase | closed |
| Spec | ops-banner.md |
| Updated | 2026-08-08 |
+12
View File
@@ -0,0 +1,12 @@
id: TASK-024-ECR024
ecr: ECR-024
title: OpsCMS Banner read
role: engineer
status: closed
change_level: L2
parent: WAVE0-FROZEN
predecessor: ECR-023
acceptance:
- Spec AC mapped
- Banner read only
- No UGC / payment
+33
View File
@@ -0,0 +1,33 @@
# TEST_REPORT — ECR-024 Banner
Date: 2026-08-08 · Loop continuous · commit: `PENDING`
## Commands
```bash
cd apps/api && go test ./internal/integration/ -run TestOpsCMSBanners -count=1
npm run build:admin
python3 scripts/ess-validate.py --phase review --ecr ECR-024
python3 scripts/ess-gate-check.py --ecr ECR-024
```
## Results
| Check | Result |
|-------|--------|
| TestOpsCMSBanners | PASS |
| build:admin | PASS |
| ess-validate review | PASS |
| ess-gate-check | PASS |
## AC
| ID | Evidence |
|----|----------|
| AC-F-01 | list 含 home_promo |
| AC-F-02 | get 200 |
| AC-F-03 | 未知 id → 404 |
| AC-S-01 | 401 |
| AC-S-02 | 403 |
| AC-P-01 | list &lt; 500ms |
| AC-O-01 | N/A 只读 |
+1
View File
@@ -28,3 +28,4 @@
| ECR-021 | AICoreConfig | **Closed** | Spec ops-ai-core-config · BD-2026-021 · migration 000022 · TEST_REPORT · CODE_REVIEW · Loop continuous |
| ECR-022 | CrisisCare | **Closed** | Spec ops-crisis-care · BD-2026-022 · migration 000023 · TEST_REPORT · CODE_REVIEW · Loop continuous |
| ECR-023 | AICoreConfig · KnowledgeSource | **Closed** | Spec ops-knowledge-source · BD-2026-023 · migration 000024 · TEST_REPORT · CODE_REVIEW · Loop continuous |
| ECR-024 | OpsCMS · Banner | **Closed** | Spec ops-banner · BD-2026-024 · migration 000025 · TEST_REPORT · CODE_REVIEW · Loop continuous |
+27 -2
View File
@@ -9,7 +9,8 @@
## Override
Human 明文:**直接用 Loop,不用人工确认。**
Human 明文:**直接用 Loop,不用人工确认。**
2026-08-08 追加:**把所有剩余 Ops 薄切片 ECR 做完再停**(见 Full queue)。
在本授权有效期内,对 Ops 薄切片允许 Agent:
@@ -26,8 +27,32 @@ Human 明文:**直接用 Loop,不用人工确认。**
- 跳过 Feature Spec / contract_diff / AC
- force-push / 改 git config
## Full queue024040 · 只读优先 · 完成后停)
| ECR | Concept | Capability |
|-----|---------|------------|
| 024 | Banner | OpsCMS |
| 025 | FeedSlot | OpsCMS |
| 026 | ScheduledPublication | OpsCMS |
| 027 | KnowledgeChunk | AICoreConfig |
| 028 | ToolDefinition | AICoreConfig |
| 029 | BlockPolicy | ContentSafety |
| 030 | ModerationCase | ContentSafety |
| 031 | CrisisEvent | CrisisCare |
| 032 | InterventionOutcome | CrisisCare |
| 033 | HandoffCase | AskOperations |
| 034 | PrivacyRequest | AdminGovernance |
| 035 | StarConfig | ExploreConfig |
| 036 | RhythmConfig | ExploreConfig |
| 037 | ImageCardDeck | ExploreConfig |
| 038 | ReportTemplate | GrowthInsights |
| 039 | FunnelDefinition | GrowthInsights |
| 040 | ScaleDefinition 只读投影 | ExploreConfig |
**Stop after ECR-040 Closed.** 不进入:Community/UGC · soft-delete · 真支付适配器。
## Active queue
| Done | Next |
|------|------|
| ECR-013A…023 Closed | **ECR-024** Banner/OpsCMS 薄切片(只读优先)或 KnowledgeChunk;禁真支付/UGC |
| ECR-013A…024 Closed | **ECR-025** FeedSlotOpsCMS |