mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-02-01 15:03:36 +00:00
fix: Address CodeRabbit review feedback
- Fix math error in category totals (155→165, 255→265) - Fix example JSON to include [0,1,2,3,4] dependencies for all features - Add more robust server shutdown (SIGTERM then SIGKILL) - Add health check after server restart - Align grep patterns between templates (add .js, testData, TODO/STUB/MOCK) - Add package.json check for mock backend libraries - Reference STEP 5.6 instead of duplicating grep commands Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -217,16 +217,24 @@ grep -r "new Map()\|new Set()" --include="*.ts" --include="*.tsx" src/lib/ src/s
|
|||||||
|
|
||||||
3. **STOP the server completely:**
|
3. **STOP the server completely:**
|
||||||
```bash
|
```bash
|
||||||
|
# Send SIGTERM first, then SIGKILL if needed
|
||||||
pkill -f "node" || pkill -f "npm" || pkill -f "next"
|
pkill -f "node" || pkill -f "npm" || pkill -f "next"
|
||||||
sleep 5
|
sleep 3
|
||||||
|
pkill -9 -f "node" 2>/dev/null || true
|
||||||
|
sleep 2
|
||||||
# Verify server is stopped
|
# Verify server is stopped
|
||||||
pgrep -f "node" && echo "ERROR: Server still running!" && exit 1
|
if pgrep -f "node" > /dev/null; then
|
||||||
|
echo "ERROR: Server still running!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **RESTART the server:**
|
4. **RESTART the server:**
|
||||||
```bash
|
```bash
|
||||||
./init.sh &
|
./init.sh &
|
||||||
sleep 15 # Allow server to fully start
|
sleep 15 # Allow server to fully start
|
||||||
|
# Verify server is responding
|
||||||
|
curl -f http://localhost:3000/api/health || curl -f http://localhost:3000 || echo "WARNING: Health check failed"
|
||||||
```
|
```
|
||||||
|
|
||||||
5. **Query for test data - it MUST still exist**
|
5. **Query for test data - it MUST still exist**
|
||||||
@@ -234,8 +242,8 @@ grep -r "new Map()\|new Set()" --include="*.ts" --include="*.tsx" src/lib/ src/s
|
|||||||
- Via API: `curl http://localhost:PORT/api/items` - verify data in response
|
- Via API: `curl http://localhost:PORT/api/items` - verify data in response
|
||||||
|
|
||||||
6. **If data is GONE:** Implementation uses in-memory storage → CRITICAL FAIL
|
6. **If data is GONE:** Implementation uses in-memory storage → CRITICAL FAIL
|
||||||
- Search for: `grep -r "globalThis\|devStore\|dev-store" src/`
|
- Run all grep commands from STEP 5.6 to identify the mock pattern
|
||||||
- You MUST fix the mock data implementation before proceeding
|
- You MUST fix the in-memory storage implementation before proceeding
|
||||||
- Replace in-memory storage with real database queries
|
- Replace in-memory storage with real database queries
|
||||||
|
|
||||||
7. **Clean up test data** after successful verification
|
7. **Clean up test data** after successful verification
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ Use the feature_create_bulk tool to add all features at once. You can create fea
|
|||||||
|
|
||||||
- Feature count must match the `feature_count` specified in app_spec.txt
|
- Feature count must match the `feature_count` specified in app_spec.txt
|
||||||
- Reference tiers for other projects:
|
- Reference tiers for other projects:
|
||||||
- **Simple apps**: ~155 tests (includes 5 infrastructure)
|
- **Simple apps**: ~165 tests (includes 5 infrastructure)
|
||||||
- **Medium apps**: ~255 tests (includes 5 infrastructure)
|
- **Medium apps**: ~265 tests (includes 5 infrastructure)
|
||||||
- **Complex apps**: ~405+ tests (includes 5 infrastructure)
|
- **Complex apps**: ~405+ tests (includes 5 infrastructure)
|
||||||
- Both "functional" and "style" categories
|
- Both "functional" and "style" categories
|
||||||
- Mix of narrow tests (2-5 steps) and comprehensive tests (10+ steps)
|
- Mix of narrow tests (2-5 steps) and comprehensive tests (10+ steps)
|
||||||
@@ -98,17 +98,17 @@ Create WIDE dependency graphs, not linear chains:
|
|||||||
// AUTH TIER (indices 8-10, depend on foundation + infrastructure)
|
// AUTH TIER (indices 8-10, depend on foundation + infrastructure)
|
||||||
{ "name": "User can register", "depends_on_indices": [0, 1, 2, 3, 4, 5] },
|
{ "name": "User can register", "depends_on_indices": [0, 1, 2, 3, 4, 5] },
|
||||||
{ "name": "User can login", "depends_on_indices": [0, 1, 2, 3, 4, 5, 8] },
|
{ "name": "User can login", "depends_on_indices": [0, 1, 2, 3, 4, 5, 8] },
|
||||||
{ "name": "User can logout", "depends_on_indices": [9] },
|
{ "name": "User can logout", "depends_on_indices": [0, 1, 2, 3, 4, 9] },
|
||||||
|
|
||||||
// CORE CRUD TIER (indices 11-14) - WIDE GRAPH: all 4 depend on login
|
// CORE CRUD TIER (indices 11-14) - WIDE GRAPH: all 4 depend on login
|
||||||
{ "name": "User can create todo", "depends_on_indices": [9] },
|
{ "name": "User can create todo", "depends_on_indices": [0, 1, 2, 3, 4, 9] },
|
||||||
{ "name": "User can view todos", "depends_on_indices": [9] },
|
{ "name": "User can view todos", "depends_on_indices": [0, 1, 2, 3, 4, 9] },
|
||||||
{ "name": "User can edit todo", "depends_on_indices": [9, 11] },
|
{ "name": "User can edit todo", "depends_on_indices": [0, 1, 2, 3, 4, 9, 11] },
|
||||||
{ "name": "User can delete todo", "depends_on_indices": [9, 11] },
|
{ "name": "User can delete todo", "depends_on_indices": [0, 1, 2, 3, 4, 9, 11] },
|
||||||
|
|
||||||
// ADVANCED TIER (indices 15-16) - both depend on view, not each other
|
// ADVANCED TIER (indices 15-16) - both depend on view, not each other
|
||||||
{ "name": "User can filter todos", "depends_on_indices": [12] },
|
{ "name": "User can filter todos", "depends_on_indices": [0, 1, 2, 3, 4, 12] },
|
||||||
{ "name": "User can search todos", "depends_on_indices": [12] }
|
{ "name": "User can search todos", "depends_on_indices": [0, 1, 2, 3, 4, 12] }
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -167,12 +167,15 @@ Steps:
|
|||||||
**Feature 3 - No mock data patterns in codebase:**
|
**Feature 3 - No mock data patterns in codebase:**
|
||||||
```
|
```
|
||||||
Steps:
|
Steps:
|
||||||
1. Run: grep -r "globalThis\." --include="*.ts" --include="*.tsx" src/
|
1. Run: grep -r "globalThis\." --include="*.ts" --include="*.tsx" --include="*.js" src/
|
||||||
2. Run: grep -r "dev-store\|devStore\|DevStore\|mock-db\|mockDb" --include="*.ts" src/
|
2. Run: grep -r "dev-store\|devStore\|DevStore\|mock-db\|mockDb" --include="*.ts" --include="*.tsx" src/
|
||||||
3. Run: grep -r "mockData\|fakeData\|sampleData\|dummyData" --include="*.ts" src/
|
3. Run: grep -r "mockData\|testData\|fakeData\|sampleData\|dummyData" --include="*.ts" --include="*.tsx" src/
|
||||||
4. Run: grep -r "new Map()\|new Set()" --include="*.ts" src/lib/ src/store/ src/data/
|
4. Run: grep -r "TODO.*real\|TODO.*database\|TODO.*API\|STUB\|MOCK" --include="*.ts" --include="*.tsx" src/
|
||||||
5. ALL grep commands must return empty (exit code 1)
|
5. Run: grep -r "isDevelopment\|isDev\|process\.env\.NODE_ENV.*development" --include="*.ts" --include="*.tsx" src/
|
||||||
6. If any returns results → investigate and fix before passing
|
6. Run: grep -r "new Map()\|new Set()" --include="*.ts" --include="*.tsx" src/lib/ src/store/ src/data/ 2>/dev/null
|
||||||
|
7. Run: grep -E "json-server|miragejs|msw" package.json
|
||||||
|
8. ALL grep commands must return empty (exit code 1)
|
||||||
|
9. If any returns results → investigate and fix before passing
|
||||||
```
|
```
|
||||||
|
|
||||||
**Feature 4 - Backend API queries real database:**
|
**Feature 4 - Backend API queries real database:**
|
||||||
@@ -216,7 +219,7 @@ The feature_list.json **MUST** include tests from ALL 20 categories. Minimum cou
|
|||||||
| R. Concurrency & Race Conditions | 5 | 8 | 15 |
|
| R. Concurrency & Race Conditions | 5 | 8 | 15 |
|
||||||
| S. Export/Import | 5 | 6 | 10 |
|
| S. Export/Import | 5 | 6 | 10 |
|
||||||
| T. Performance | 5 | 5 | 10 |
|
| T. Performance | 5 | 5 | 10 |
|
||||||
| **TOTAL** | **155** | **255** | **405+** |
|
| **TOTAL** | **165** | **265** | **405+** |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user