refactor(ECR-004): Synastry 再拆、Scale 测、Membership 守卫、OpenAPI 与 CI
压合盘贴线文件;补选答单测与 nil 守卫;对齐关键 OpenAPI schemas;加 GitHub Actions 门禁。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -12,3 +12,4 @@
|
||||
- **ECR-001 Phase F + H5**:types/sdk 对齐 OpenAPI;拆分 8 个超标页(均 ≤400);test:h5 35/35 绿
|
||||
- QA:修 Playwright `/psy/` 路径与过时断言;e2e 2/2 绿(见 TEST_REPORT/ECR-001-phaseF-qa.md)
|
||||
- **ECR-001 Closed**;**ECR-002 Closed**;**ECR-003**:删 JSON `fortune` 双写,`lucky`→`boost`,H5 改读 `outlook`
|
||||
- **ECR-004**:Synastry 再拆 · Scale vitest · Membership nil 守卫 · OpenAPI schemas · GitHub CI
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# CODE_REVIEW — ECR-004
|
||||
|
||||
**Decision: PASS / Approve**
|
||||
|
||||
## Blockers
|
||||
无
|
||||
|
||||
## Nits
|
||||
- OpenAPI 仍有大量 path 仅 `description: OK`(关键 schema 已补;可后续全挂 `$ref`)
|
||||
- CI `ess-validate` 依赖仓库变量 `ESS_ROOT`;未配置时仅跑文档存在性门禁
|
||||
|
||||
## Gate
|
||||
PASS
|
||||
@@ -0,0 +1,35 @@
|
||||
# ECR-004
|
||||
|
||||
**Title:** 结构卫生跟进(Synastry 再拆 · Scale 测 · Membership 守卫 · OpenAPI · CI)
|
||||
**Status:** Approved
|
||||
**Date:** 2026-08-05
|
||||
**Change Level:** L2(结构 / 契约文档 / 工程门禁;无产品扩行为)
|
||||
|
||||
## Change
|
||||
|
||||
1. 拆分贴线合盘:`useSynastryPage` / `SynastryLanding`
|
||||
2. Scale 选答交互 vitest
|
||||
3. `ReportHandler` Membership nil 守卫
|
||||
4. OpenAPI 补关键 schemas(对齐 `packages/types`)并挂关键 path `$ref`
|
||||
5. GitHub Actions CI:build/test H5 · API unit · ESS 文档门禁
|
||||
|
||||
## Forbidden
|
||||
|
||||
- 改公共 URL / 计分算法 / 产品文案改版
|
||||
- Docker-only 本地工作流
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [x] SynastryLanding / useSynastryPage ≤300 行
|
||||
- [x] ScalePage.spec 覆盖选答→提交
|
||||
- [x] Membership nil → 500 信封而非 panic
|
||||
- [x] OpenAPI 含 Profile / GrowthReport / MembershipMe / Scale* / AskQuota 等
|
||||
- [x] `.github/workflows/ci.yml` 存在
|
||||
- [x] `test:h5` · star/handler 相关 go test 绿
|
||||
|
||||
**Status:** coding/review PASS · awaiting Human commit
|
||||
|
||||
## Linked
|
||||
|
||||
- ENGINEERING_SPEC / TASK / STATE / TEST_REPORT under ECR-004
|
||||
- Successor of ECR-001 residual nits
|
||||
@@ -0,0 +1,11 @@
|
||||
# ENGINEERING_SPEC — ECR-004 Hygiene Follow-up
|
||||
|
||||
Move/extract only. See ECR-004.
|
||||
|
||||
## Steps done in coding
|
||||
|
||||
1. Synastry: `lib/synastryChart.ts` · `synastryPageActions.ts` · Landing 子组件
|
||||
2. `ScalePage.spec.ts`
|
||||
3. `handler/report.go` `requireMembership`
|
||||
4. `proto/openapi.yaml` schemas + key `$ref`
|
||||
5. `.github/workflows/ci.yml`
|
||||
@@ -45,9 +45,9 @@
|
||||
|
||||
## Active anchors
|
||||
|
||||
- ECR: **ECR-003** outlook JSON hygiene(Approved · coding);ECR-001/002 **Closed**
|
||||
- ECR: **ECR-004** hygiene follow-up(Approved);ECR-001/002/003 Closed / shipped
|
||||
- EXP: (无)
|
||||
- STATE: `docs/STATE/ECR-003.md`
|
||||
- STATE: `docs/STATE/ECR-004.md`
|
||||
- TRACEABILITY: `docs/TRACEABILITY.md`
|
||||
- ADR: `.ai/adr/0007-ess-ai-dual-track.md`
|
||||
- Product status: `.ai/product/p1-status.md`(**P1 Complete**)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# STATE — ECR-004
|
||||
|
||||
| Field | Value |
|
||||
|-------|--------|
|
||||
| ECR | ECR-004 |
|
||||
| Title | Hygiene follow-up |
|
||||
| Phase | review PASS · awaiting commit |
|
||||
| Owner | human |
|
||||
| Updated | 2026-08-05 |
|
||||
@@ -0,0 +1,28 @@
|
||||
# docs/TASKS/TASK-20260805-ECR004.yaml
|
||||
task_id: ECR-004-hygiene
|
||||
role: engineer
|
||||
phase: coding
|
||||
tool: cursor
|
||||
status: coded
|
||||
|
||||
input:
|
||||
- docs/ECR/ECR-004-hygiene-followup.md
|
||||
- .ai/coding.md
|
||||
|
||||
output:
|
||||
- apps/user-h5/src/components/synastry/**
|
||||
- apps/user-h5/src/composables/useSynastryPage.ts
|
||||
- apps/user-h5/src/pages/ScalePage.spec.ts
|
||||
- apps/api/internal/handler/report.go
|
||||
- proto/openapi.yaml
|
||||
- .github/workflows/ci.yml
|
||||
- docs/TEST_REPORT/ECR-004.md
|
||||
|
||||
forbidden:
|
||||
- redesign_scope
|
||||
- api_url_change
|
||||
- behavior_change
|
||||
|
||||
next_agent: reviewer
|
||||
notes: >
|
||||
Synastry split, Scale vitest, membership nil guard, OpenAPI schemas, CI. Tests green.
|
||||
@@ -0,0 +1,13 @@
|
||||
# Test Report — ECR-004
|
||||
|
||||
## Cases
|
||||
- [x] SynastryLanding 165 · useSynastryPage 213(≤300)
|
||||
- [x] ScalePage.spec 选答→提交 PASS
|
||||
- [x] SynastryPage.spec PASS
|
||||
- [x] Membership `requireMembership` nil 守卫
|
||||
- [x] OpenAPI schemas + key path `$ref`
|
||||
- [x] CI workflow `.github/workflows/ci.yml`
|
||||
- [x] `npm run test:h5` · `go test ./internal/handler/... ./internal/star/...` · `build:h5`
|
||||
|
||||
## Gate
|
||||
coding PASS · awaiting review/commit
|
||||
@@ -9,3 +9,4 @@
|
||||
| ECR-001-F/H5 | types/sdk + 8 超标页拆分 | Closed | TEST_REPORT · CODE_REVIEW/ECR-001-phaseF-h5.md |
|
||||
| ECR-002 | fortune→outlook package | **Closed** | `docs/ECR/ECR-002-fortune-hygiene.md` |
|
||||
| ECR-003 | outlook JSON hygiene(删 fortune / lucky→boost) | review PASS | TEST_REPORT · CODE_REVIEW/ECR-003.md |
|
||||
| ECR-004 | Synastry 再拆 · Scale 测 · Membership 守卫 · OpenAPI · CI | review PASS | TEST_REPORT · CODE_REVIEW/ECR-004.md |
|
||||
|
||||
Reference in New Issue
Block a user