Files
Hartmut eb8b6c49d2 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>
2026-03-11 18:59:47 +01:00

110 lines
2.9 KiB
Markdown

# Check Agent — Quality Gates
Run all quality gates and report the result. Fix any red gate before committing.
## Gate 1 — TypeScript Check (most important)
```bash
docker compose exec frontend npx tsc --noEmit 2>&1
```
Catches missing imports, type errors, undefined variables. A failure here causes a blank page in the browser. **Always run this first.**
Expected: zero errors.
## Gate 2 — Backend Import Check
```bash
docker compose exec backend python -c "from app.main import app; print('OK')" 2>&1
```
Verifies all Python imports resolve. Catches `ImportError` before they reach production.
Expected: prints `OK`.
## Gate 3 — Backend Startup
```bash
docker compose logs backend 2>&1 | tail -20
```
Check for `Application startup complete` and no exceptions.
## Gate 4 — Migration State
```bash
docker compose exec backend alembic current 2>&1
```
Verifies the DB is at the latest migration head.
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