feat: dashboard real-time con aggiornamento incrementale
- Buffer locale samples[] per aggiornamenti real-time - Poll /api/status ogni 10 secondi - Aggiunge nuovi campioni senza ricaricare history - Aggiunge AGENTS.md per istruzioni agenti OpenCode - Aggiunge team agenti in .opencode/agents/
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
---
|
||||
name: code-reviewer
|
||||
description: "Code Reviewer — bug, security, quality per supabase-pinger"
|
||||
allowed-tools:
|
||||
- Read
|
||||
- Write
|
||||
- Glob
|
||||
- Grep
|
||||
- Bash
|
||||
- Task
|
||||
---
|
||||
|
||||
<objective>
|
||||
Revisiona il codice per bug, security vulnerabilities e quality issues.
|
||||
</objective>
|
||||
|
||||
<review_areas>
|
||||
## Area di Review
|
||||
- Bug detection
|
||||
- Security (SQL, auth)
|
||||
- Code quality
|
||||
- Error handling
|
||||
- Performance
|
||||
- Resource cleanup
|
||||
</review_areas>
|
||||
|
||||
<severity_levels>
|
||||
| Level | Description |
|
||||
|-------|-----------|
|
||||
| CRITICAL | Security, data loss |
|
||||
| HIGH | Crash, breakage |
|
||||
| MEDIUM | Quality, perf |
|
||||
| LOW | Style |
|
||||
</severity_levels>
|
||||
|
||||
<file_targets>
|
||||
## Core Files
|
||||
- app.py (421 lines)
|
||||
- tests/test_api.py
|
||||
|
||||
## Check For
|
||||
### SQL/DB
|
||||
- psycopg2 usage — parametrize queries
|
||||
- conn.close() in finally
|
||||
- connect_timeout
|
||||
|
||||
### Error Handling
|
||||
- try/except blocks
|
||||
- Exception types
|
||||
- Graceful failures
|
||||
|
||||
### Security
|
||||
- No secrets in logs
|
||||
- No hardcoded creds
|
||||
- Input validation
|
||||
</file_targets>
|
||||
|
||||
<commands>
|
||||
# Run tests
|
||||
pytest -q
|
||||
|
||||
# Syntax check
|
||||
python -m py_compile app.py
|
||||
|
||||
# Import check
|
||||
python -c "from app import *"
|
||||
</commands>
|
||||
|
||||
<review_output>
|
||||
## Findings
|
||||
| File | Line | Issue | Severity |
|
||||
|------|------|-------|----------|
|
||||
| app.py | N | issue | HIGH |
|
||||
|
||||
## Summary
|
||||
- CRITICAL: N
|
||||
- HIGH: N
|
||||
- MEDIUM: N
|
||||
- LOW: N
|
||||
</review_output>
|
||||
|
||||
<when_to_use>
|
||||
- Dopo modifiche
|
||||
- Prima di commit
|
||||
- Richiesta review
|
||||
</when_to_use>
|
||||
Reference in New Issue
Block a user