feat: 清理示例数据并统一空态体验
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
|
||||
|
||||
**Goal:** Stop development initialization from auto-creating any demo study or fee data.
|
||||
**Goal:** Stop development initialization from auto-creating any placeholder study or fee data.
|
||||
|
||||
**Architecture:** Remove the application startup hook that seeds demo fee data, while keeping schema setup and protected admin initialization intact. Add a regression test that proves the lifespan startup no longer calls the demo seed helper.
|
||||
**Architecture:** Remove the application startup hook that seeds placeholder fee data, while keeping schema setup and protected admin initialization intact. Add a regression test that proves the lifespan startup no longer calls the old seed helper.
|
||||
|
||||
**Tech Stack:** FastAPI, pytest, unittest.mock
|
||||
|
||||
@@ -19,18 +19,18 @@
|
||||
**Step 1: Write the failing test**
|
||||
|
||||
```python
|
||||
async def test_development_startup_does_not_seed_demo_fees():
|
||||
async def test_development_startup_does_not_seed_business_data():
|
||||
...
|
||||
```
|
||||
|
||||
**Step 2: Run test to verify it fails**
|
||||
|
||||
Run: `pytest backend/tests/test_app_startup.py -q`
|
||||
Expected: FAIL because startup still calls `seed_demo_fees`.
|
||||
Expected: FAIL because startup still calls the old seed helper.
|
||||
|
||||
**Step 3: Write minimal implementation**
|
||||
|
||||
Remove the `seed_demo_fees` import and startup call from `backend/app/main.py`.
|
||||
Remove the obsolete seed hook from `backend/app/main.py`.
|
||||
|
||||
**Step 4: Run test to verify it passes**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user