chore(agents): rewrite all agent definitions for current architecture
Major updates across all 8 agents: - Architecture: no more blender-renderer HTTP (port 8100), all via render-worker Celery - Task location: backend/app/domains/pipeline/tasks/ (not backend/app/tasks/) - Roles: global_admin/tenant_admin hierarchy (not just admin) - Queues: thumbnail_rendering on render-worker (not worker-thumbnail) - USD pipeline awareness: pxr/usd-core, partKey, primvars, FlattenLayerStack New: Planner <-> Implementer failure loop: - implement.md: Failure Protocol — [BLOCKED] tag + report to planner, stop - plan.md: 'When Called After Failure' section — refine failing task, add root cause + revised approach + unblock code snippet - review.md: on blocking issues, also update plan.md with [BLOCKED] tag Agent-specific updates: - plan.md: ROADMAP.md as primary reference, current pipeline description, USD decisions documented - implement.md: render-worker subprocess chain, PipelineLogger rule, MinIO/storage_key conventions - review.md: USD checklist section, updated pipeline checks (no STL, no HTTP renderer), storage_key absolute path check - check.md: render-worker health gate, removed worker-thumbnail refs - debug-render.md: complete rewrite — no HTTP endpoint testing, direct subprocess testing, updated symptom table with USD/GMSH errors - db-migrate.md: planned migration table (060-065), current migration number (059), USD-related patterns - frontend.md: role hierarchy, sceneManifest.ts reference, X-Tenant-ID interceptor note - excel-import.md: minor cleanup, consistent format Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+93
-65
@@ -1,81 +1,109 @@
|
||||
Führe alle Quality Gates aus und berichte das Ergebnis:
|
||||
# Check Agent — Quality Gates
|
||||
|
||||
## Frontend Quality Gates
|
||||
Run all quality gates and report the result. Fix any red gate before committing.
|
||||
|
||||
1. **TypeScript-Check** (wichtigster Gate!):
|
||||
```bash
|
||||
docker compose exec frontend npx tsc --noEmit 2>&1
|
||||
```
|
||||
Prüft auf fehlende Imports, Typfehler, undefinierte Variablen.
|
||||
→ Fehler hier = Blank Page im Browser. Immer als erstes prüfen.
|
||||
## Gate 1 — TypeScript Check (most important)
|
||||
|
||||
2. **Vite Build** (optional, langsamer):
|
||||
```bash
|
||||
docker compose exec frontend npm run build 2>&1 | tail -20
|
||||
```
|
||||
```bash
|
||||
docker compose exec frontend npx tsc --noEmit 2>&1
|
||||
```
|
||||
|
||||
3. **Tests**:
|
||||
```bash
|
||||
docker compose exec frontend npm test 2>&1 | tail -20
|
||||
```
|
||||
Hinweis: `npm run lint` existiert nicht — TypeScript-Check ersetzt es.
|
||||
Catches missing imports, type errors, undefined variables. A failure here causes a blank page in the browser. **Always run this first.**
|
||||
|
||||
## Backend Quality Gates
|
||||
Expected: zero errors.
|
||||
|
||||
4. **Python Import-Check**:
|
||||
```bash
|
||||
docker compose exec backend python -c "from app.main import app; print('OK')" 2>&1
|
||||
```
|
||||
Prüft ob alle Python-Imports auflösbar sind.
|
||||
## Gate 2 — Backend Import Check
|
||||
|
||||
5. **Backend Startup-Logs**:
|
||||
```bash
|
||||
docker compose logs backend 2>&1 | tail -20
|
||||
```
|
||||
Auf `Application startup complete` prüfen, keine Exceptions.
|
||||
```bash
|
||||
docker compose exec backend python -c "from app.main import app; print('OK')" 2>&1
|
||||
```
|
||||
|
||||
## Daten-Integrität Gates
|
||||
Verifies all Python imports resolve. Catches `ImportError` before they reach production.
|
||||
|
||||
7. **Keine absoluten storage_key-Pfade in media_assets**:
|
||||
```bash
|
||||
docker compose exec backend python -c "
|
||||
import asyncio
|
||||
from sqlalchemy import text
|
||||
from app.database import AsyncSessionLocal
|
||||
async def main():
|
||||
async with AsyncSessionLocal() as db:
|
||||
r = await db.execute(text(\"SELECT COUNT(*) FROM media_assets WHERE storage_key LIKE '/%' AND is_archived=false\"))
|
||||
n = r.scalar()
|
||||
print(f'Absolute storage_keys: {n}')
|
||||
if n > 0:
|
||||
print('WARNUNG: Absolute Pfade brechen bei Volume-Umzug / Infrastruktur-Änderung!')
|
||||
print('Fix: UPDATE media_assets SET storage_key = replace(storage_key, ...) WHERE ...')
|
||||
asyncio.run(main())
|
||||
"
|
||||
```
|
||||
→ Erwartet: `Absolute storage_keys: 0`
|
||||
Expected: prints `OK`.
|
||||
|
||||
8. **Config-Attribute prüfen** (nach config.py-Änderungen):
|
||||
```bash
|
||||
docker compose exec backend python -c "from app.config import settings; print('upload_dir:', settings.upload_dir)"
|
||||
```
|
||||
## Gate 3 — Backend Startup
|
||||
|
||||
## Übersicht
|
||||
```bash
|
||||
docker compose logs backend 2>&1 | tail -20
|
||||
```
|
||||
|
||||
9. **Geänderte Dateien**:
|
||||
```bash
|
||||
git diff --stat
|
||||
```
|
||||
Check for `Application startup complete` and no exceptions.
|
||||
|
||||
## Ergebnis
|
||||
## Gate 4 — Migration State
|
||||
|
||||
Wenn alle Gates grün: committe mit passendem Conventional-Commit-Message.
|
||||
Wenn ein Gate rot: Problem zuerst beheben, dann erneut prüfen.
|
||||
```bash
|
||||
docker compose exec backend alembic current 2>&1
|
||||
```
|
||||
|
||||
## Warum diese Gates?
|
||||
Verifies the DB is at the latest migration head.
|
||||
|
||||
- `tsc --noEmit` fängt fehlende React-Imports (`useEffect`, `useCallback` etc.) ab, die zur Laufzeit zu einer Blank Page führen — das wichtigste Gate.
|
||||
- `npm run lint` existiert in diesem Projekt nicht (kein ESLint konfiguriert).
|
||||
- `npm test` prüft nur Test-Dateien, nicht Production-Komponenten auf Importfehler.
|
||||
- Backend-Import-Check fängt Python `ImportError` ab bevor sie in Produktion auftauchen.
|
||||
- Absolute storage_key-Pfade brechen bei jedem Volume-Umzug oder Infrastruktur-Änderung (Flamenco-Entfernung hat 396 Blender-Renders unzugänglich gemacht).
|
||||
Expected: shows current revision with `(head)`.
|
||||
|
||||
## Gate 5 — Render Worker Health
|
||||
|
||||
```bash
|
||||
docker compose exec render-worker python3 -c "
|
||||
import subprocess, sys
|
||||
result = subprocess.run(['/opt/blender/blender', '--version'], capture_output=True, text=True)
|
||||
print(result.stdout.strip().split('\n')[0])
|
||||
" 2>&1
|
||||
```
|
||||
|
||||
Expected: `Blender 5.0.1` or later.
|
||||
|
||||
## Gate 6 — Data Integrity: No Absolute storage_keys
|
||||
|
||||
```bash
|
||||
docker compose exec backend python -c "
|
||||
import asyncio
|
||||
from sqlalchemy import text
|
||||
from app.database import AsyncSessionLocal
|
||||
async def main():
|
||||
async with AsyncSessionLocal() as db:
|
||||
r = await db.execute(text(\"SELECT COUNT(*) FROM media_assets WHERE storage_key LIKE '/%' AND is_archived=false\"))
|
||||
n = r.scalar()
|
||||
print(f'Absolute storage_keys: {n}')
|
||||
if n > 0:
|
||||
print('WARNING: absolute paths break on volume changes!')
|
||||
asyncio.run(main())
|
||||
" 2>&1
|
||||
```
|
||||
|
||||
Expected: `Absolute storage_keys: 0`
|
||||
|
||||
## Gate 7 — Changed Files
|
||||
|
||||
```bash
|
||||
git diff --stat HEAD
|
||||
```
|
||||
|
||||
Review what changed. Confirm no accidental files included (`.env`, secrets, large binaries).
|
||||
|
||||
## Gate 8 — Vite Build (optional, slow)
|
||||
|
||||
```bash
|
||||
docker compose exec frontend npm run build 2>&1 | tail -20
|
||||
```
|
||||
|
||||
Run this only when preparing for a release or after large frontend changes.
|
||||
|
||||
---
|
||||
|
||||
## Result
|
||||
|
||||
**All gates green** → commit with a Conventional Commit message:
|
||||
```
|
||||
feat|fix|refactor|docs|chore: short description
|
||||
|
||||
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
||||
```
|
||||
|
||||
**Any gate red** → fix the issue first, then re-run the failing gate.
|
||||
|
||||
## Why These Gates
|
||||
|
||||
- **tsc --noEmit**: catches missing React hook imports (`useEffect`, `useCallback`) that cause blank pages at runtime
|
||||
- **Python import check**: catches `ImportError` before they surface in production
|
||||
- **Absolute storage_key check**: absolute paths break on every volume move or infrastructure change (Flamenco removal made 396 renders inaccessible this way)
|
||||
- **Migration state**: ensures the running DB matches the code's expected schema
|
||||
|
||||
Reference in New Issue
Block a user