feat(ECR-043): StarConfig 写面闭环并 Closed

加法权限 admin.explore.write、POST/PUT+审计、C端 GET /star/configs、
H5 无 active 空态/失败回退;migration 000052。ExploreConfig Loop STOP,禁自动 ECR-044。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-13 20:23:38 +08:00
co-authored by Cursor
parent 2b295472a4
commit 77907f79ee
32 changed files with 842 additions and 31 deletions
+1
View File
@@ -2,6 +2,7 @@
## 2026-08-13
- **ECR-043 Closed** ExploreConfig StarConfig 薄写面(`admin.explore.write` · POST/PUT · `GET /star/configs` · `/star` 空态/失败回退 · migration `000052`)· **Continuous Loop STOP** · 禁自动 ECR-044
- **ECR-043 Spec Ready** StarConfig 薄写面(Human 批准 Loop 仅 043)· Coding NOT STARTED · Closed 后禁自动 044
- **ECR-043 Candidate Review 收口:** 首刀 StarConfig;非 SystemPrompt
- **ECR-042 Closed** OpsCMS FeedSlot 薄写面(复用 `admin.cms.write` · `GET /home/feed-slots` · 首页槽位显隐)· 无新 migration
+3
View File
@@ -0,0 +1,3 @@
# CODE_REVIEW — ECR-043
**Verdict:** Approve · StarConfig write only · `admin.explore.write` 加法 · 下架仅 active=false · 无 Rhythm/Card/Scale/Prompt/Knowledge/Chunk · 无 soft-delete/支付/UGC/Crisis·Handoff · Closed 后 STOP(禁自动 ECR-044
+20
View File
@@ -0,0 +1,20 @@
ecr: ECR-043
capability: ExploreConfig
change:
type: additive
breaking_change: false
migration_required: true
apis:
- method: POST
path: /api/v1/admin/explore/star-configs
change: added
- method: PUT
path: /api/v1/admin/explore/star-configs/{id}
change: added
- method: GET
path: /api/v1/star/configs
change: added
perms:
- code: admin.explore.write
change: added
migration: 000052_ops_star_config_write
+5 -10
View File
@@ -1,9 +1,9 @@
# ECR-043
**Title:** ExploreConfig · StarConfig 薄写面
**Status:** **Approved**Human 2026-08-13· **Coding: NOT STARTED**
**Status:** **Closed**2026-08-13
**Change Level:** L2
**Auth:** ExploreConfig Continuous Loop · **仅本 ECR**
**Auth:** ExploreConfig Continuous Loop · **仅本 ECR** · Closed 后 STOP
**Predecessor:** ECR-035 · Candidate Review 通过
## Change
@@ -11,7 +11,7 @@
1. Spec `ops-star-config-write`
2. `admin.explore.write` + POST/PUT star-configs + 审计
3. C 端 `GET /star/configs``/star` 无 active 空态、失败回退
4. Migration `000052`(编码时)· OpenAPI · admin-h5
4. Migration `000052` · OpenAPI · admin-h5
## Forbidden
@@ -19,13 +19,8 @@ Rhythm · Card · ScaleDefinition · SystemPrompt/Knowledge/Chunk · soft-delete
## Acceptance
见 Spec §8
见 Spec §8 · TEST_REPORT/ECR-043 · CODE_REVIEW Approve.
## Coding gate
```text
Spec Active · BD Approved · repo-governance-check PASS
→ Human/Loop 开码口令后才改 apps/
```
本回合 **禁止业务代码**
Done · Closed.
@@ -1,6 +1,6 @@
# HANDOFF — Architect → Engineer · ECR-043
**Coding NOT STARTED** until explicit 开码.
**Coding STARTED / DONE** — Human「ECR-043 开码」.
Do only StarConfig write per Spec. Perm `admin.explore.write`. Migration 000052.
After Closed: STOP — no ECR-044.
After Closed: STOP — no ECR-044.
@@ -0,0 +1,4 @@
# HANDOFF — Engineer → Reviewer · ECR-043
TestExploreStarConfigWrite PASS · repo-governance-check PASS (max 000052) · Ready Closed.
禁止自动开 ECR-044 · ExploreConfig Loop STOP.
@@ -1,3 +1,3 @@
# PRODUCT_SPEC — ECR-043
对齐 `ops-star-config-write.md` · Human Approved · L2 · **仅 StarConfig** · Coding NOT STARTED.
对齐 `ops-star-config-write.md` · Human Approved · L2 · **仅 StarConfig** · **Closed**.
+5 -5
View File
@@ -53,19 +53,19 @@
- **本仓:** `ess_intake: strict` · Retro FAIL · 单 ECR Context
- **Ops foundation** `docs/WAVE0/` · `.ai/domain/boundary-rules.md` · `glossary.yaml` · Loop: `docs/WAVE0/LOOP_AUTHORIZATION.md`
- ECR: main 线 ECR-006016 ClosedOps 扩展 ECR-013A/B · 017040;分叉已固定为 `ECR-012-star` / `014-plan` / `015-code` / `016-insight`(见 TRACEABILITY
- **Next ECR / Max Migration** **Next=`ECR-044`(禁自动开)** · **Max=`000051`**043 编码→052
- **Next ECR / Max Migration** **Next=`ECR-044`(禁自动开)** · **Max=`000052`**
- **Write-Wave CMS** 041042 Closed · STOP
- **ExploreConfig** Auth Approved · **ECR-043 StarConfig Spec Ready · Coding NOT STARTED** · Closed 后 STOP
- **ExploreConfig** Auth Approved · **ECR-043 Closed · STOP** · 禁自动 ECR-044
- EXP: (无)
- STATE: `docs/STATE/`(含 ECR-041
- STATE: `docs/STATE/`(含 ECR-041…043
- TRACEABILITY: `docs/TRACEABILITY.md` · 门禁 `scripts/repo-governance-check.py`
- ADR: `.ai/adr/0007-ess-ai-dual-track.md`
- Product status: `.ai/product/p1-status.md`**P1 Complete**)· `.ai/product/p2-status.md`**P2 Complete**
- Active Spec: `account-auth` · `explore-test` · `home` · `star-profile` · `life-rhythm` · `input-compliance` · `ops-system` · `profile` · `ops-banner-write`
- Active Spec: `account-auth` · `explore-test` · `home` · `star-profile` · `life-rhythm` · `input-compliance` · `ops-system` · `profile` · `ops-banner-write` · `ops-star-config-write`
## WIP(尚未单独 ECR
- **ECR-043** StarConfig 写面:Spec/ECR/BD Approved · **禁止业务代码直至「ECR-043 开码」**
- (无 · ECR-043 Closed · Loop STOP
## Pointers
+7
View File
@@ -0,0 +1,7 @@
# STATE — ECR-043
| Status | **Closed** |
| Spec | ops-star-config-write |
| Migration | 000052_ops_star_config_write |
| Closed | 2026-08-13 |
| Next | STOP · ECR-044 禁自动开 |
+11
View File
@@ -0,0 +1,11 @@
# TEST_REPORT — ECR-043 StarConfig Write
**Commit:** (see git after Close)
```bash
go test ./internal/integration/ -count=1 -run TestExploreStarConfigWrite
python3 scripts/repo-governance-check.py
```
PASS · AC create/409/C-end hide inactive/empty-all/audit/403 read-only · migration 000052
REPO GOVERNANCE: PASS · max migration 000052 · suggested Next ECR-044(禁自动开)
+4 -4
View File
@@ -4,8 +4,8 @@
| Anchor | Value | Rule |
|--------|-------|------|
| **Next ECR** | `ECR-044` | **冻结:** 043 Closed 前勿占;043 Closed 后须重新 Candidate Review禁止自动开刀 |
| **Max Migration** | `000051` | ECR-043 编码时占 `000052`禁止凭记忆 |
| **Next ECR** | `ECR-044` | **冻结:** 须重新 Candidate Review + Human 单独拍板;**禁止自动开刀** |
| **Max Migration** | `000052` | 禁止凭记忆 |
- ECR identity **全局唯一**(含已 Closed);禁止同号双义。分叉只用 `ECR-NNN-suffix` / `ECR-NNNA`
- Migration **6 位版本号唯一**。撞号修复见 `docs/MIGRATION_RENUMBER.md`
@@ -67,7 +67,7 @@
| WRITE-WAVE | Ops CMS 写面(041042 | **CMS 段 Closed** | `WRITE_WAVE_AUTHORIZATION.md` |
| ECR-041 | OpsCMS · Banner 薄写面 | **Closed** | Spec ops-banner-write · BD-2026-041 · migration **000051** |
| ECR-042 | OpsCMS · FeedSlot 薄写面 | **Closed** | Spec ops-feed-slot-write · BD-2026-042 · 无新 migration · 复用 cms.write |
| EXPLORE-WRITE | ExploreConfig 写面授权 | **Approved · 仅 ECR-043** | `EXPLORE_CONFIG_WRITE_AUTHORIZATION.md` |
| ECR-043 | ExploreConfig · StarConfig 薄写面 | **Approved · Coding NOT STARTED** | Spec ops-star-config-write · BD-2026-043 · Closed 后 STOP |
| EXPLORE-WRITE | ExploreConfig 写面授权 | **Approved · 仅 ECR-043 · Closed 后 STOP** | `EXPLORE_CONFIG_WRITE_AUTHORIZATION.md` |
| ECR-043 | ExploreConfig · StarConfig 薄写面 | **Closed** | Spec ops-star-config-write · BD-2026-043 · migration **000052** · Closed 后 STOP · 禁自动 ECR-044 |
> **Migration** 合并后 `000015``000023` 曾撞号,已重编号至 `000050`。以 `apps/api/migrations/` 与 `docs/MIGRATION_RENUMBER.md` 为准(文档中旧号引用可能滞后)。
+1 -1
View File
@@ -1,6 +1,6 @@
# ECR-043 Candidate Review — ExploreConfig 写面
> **RESOLVED 2026-08-13** 首刀 = **StarConfig** · ExploreConfig Loop **仅 ECR-043** · Spec Ready · Coding NOT STARTED
> **RESOLVED 2026-08-13** 首刀 = **StarConfig** · ExploreConfig Loop **仅 ECR-043** · **Closed · STOP**
> 权威 Spec`.ai/product/feature-spec/ops-star-config-write.md` · Auth`EXPLORE_CONFIG_WRITE_AUTHORIZATION.md`
**Date:** 2026-08-13
@@ -4,9 +4,9 @@
|-------|-------|
| Date | 2026-08-13 |
| Authorizer | Human |
| Status | **Approved** |
| Status | **Approved · ECR-043 Closed · Loop STOP** |
| Scope | **ECR-043 · StarConfig 薄写面 ONLY** |
| Continuous Loop | **Allowed inside ECR-043 only** |
| Continuous Loop | **Finished · STOP** |
| After Closed | **STOP** · 禁止自动 ECR-044 |
## Human 拍板(2026-08-13