v2-exece-docs

This commit is contained in:
IGNY8 VPS (Salman)
2026-03-23 10:30:51 +00:00
parent b94d41b7f6
commit e78a41f11c
15 changed files with 2218 additions and 707 deletions

View File

@@ -1,5 +1,9 @@
# IGNY8 Phase 1: SAG Health Monitoring (Doc 01G)
> **Version:** 1.1 (codebase-verified)
> **Source of Truth:** Codebase at `/data/app/igny8/backend/`
> **Last Verified:** 2025-07-14
**Document ID:** 01G
**Module:** SAG Health Monitoring
**Phase:** Phase 1 - Core Implementation
@@ -599,7 +603,7 @@ def check_blueprint_evolution_triggers(site_id: int):
5. Trigger notification to user
#### Step 2.2: Configure Celery Beat Schedule
**File:** `config/celery.py` or `config/celery_beat_schedule.py`
**File:** `igny8_core/celery.py`
```python
CELERY_BEAT_SCHEDULE = {
@@ -802,7 +806,7 @@ Test scenarios:
### Phase 4: Dashboard Widget & Frontend (Week 4)
#### Step 4.1: Create Dashboard Widget Component
**File:** `frontend/components/SAGHealthWidget.jsx`
**File:** `frontend/src/components/SAGHealthWidget.tsx`
Display:
```
@@ -848,7 +852,7 @@ Display:
- Add 4-week trend chart
#### Step 4.2: Create Health History Chart
**File:** `frontend/components/SAGHealthChart.jsx`
**File:** `frontend/src/components/SAGHealthChart.tsx`
Line chart showing:
- X-axis: Last 4 weeks (Monday to Monday)
@@ -858,7 +862,7 @@ Line chart showing:
- Hover: Show detailed scores for week
#### Step 4.3: Create Recommendations Page
**File:** `frontend/pages/SAGRecommendations.jsx`
**File:** `frontend/src/pages/SAGRecommendations.tsx`
Page showing:
- All recommendations (20+)
@@ -869,7 +873,7 @@ Page showing:
- Status tracking (completed/in-progress/pending)
#### Step 4.4: Create Blueprint Version History Page
**File:** `frontend/pages/BlueprintVersionHistory.jsx`
**File:** `frontend/src/pages/BlueprintVersionHistory.tsx`
Display:
- Timeline of all versions
@@ -881,7 +885,7 @@ Display:
- Activate/rollback buttons for archived versions
#### Step 4.5: Create Evolution Trigger Review Page
**File:** `frontend/pages/EvolutionTriggerReview.jsx`
**File:** `frontend/src/pages/EvolutionTriggerReview.tsx`
Display detected triggers:
- New product categories (with suggestion)
@@ -891,7 +895,7 @@ Display detected triggers:
- Preview new blueprint structure before creation
#### Step 4.6: Frontend Tests
**File:** `tests/frontend/SAGHealthWidget.test.js`
**File:** `frontend/src/__tests__/SAGHealthWidget.test.tsx`
Test:
- Widget renders with health score
@@ -1118,7 +1122,7 @@ Follow Phase 1 → Phase 5 sequentially. Do not skip phases.
#### 6.5 Code Style & Standards
- Follow PEP 8 for Python
- Follow ESLint rules for JavaScript/React
- Follow ESLint rules for TypeScript/React
- Comment complex calculations (especially health score components)
- Use meaningful variable names (not `x`, `y`, `temp`)
- Docstrings on all public methods
@@ -1134,7 +1138,7 @@ Follow Phase 1 → Phase 5 sequentially. Do not skip phases.
**Celery task not running:**
- Verify Celery Beat schedule is configured
- Check task is registered (`celery -A project inspect active_queues`)
- Check task is registered (`celery -A igny8_core inspect active_queues`)
- Check for errors in Celery worker logs
- Test task manually via shell: `run_blueprint_health_check.delay(site_id=1)`
@@ -1147,7 +1151,7 @@ Follow Phase 1 → Phase 5 sequentially. Do not skip phases.
**Frontend chart not rendering:**
- Inspect network tab for API response
- Verify response format matches serializer schema
- Check console for JavaScript errors
- Check console for TypeScript/runtime errors
- Test with mock data first
#### 6.7 Version Control Workflow
@@ -1211,8 +1215,8 @@ Create/update these files:
**Staging deployment:**
1. Deploy code to staging server
2. Run migrations: `python manage.py migrate sag`
3. Start Celery worker: `celery -A project worker -l info`
4. Start Celery Beat: `celery -A project beat -l info`
3. Start Celery worker: `celery -A igny8_core worker -l info`
4. Start Celery Beat: `celery -A igny8_core beat -l info`
5. Run smoke tests against staging API
6. Manual QA: test all UI flows
7. Monitor logs for errors