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,80 @@
|
||||
---
|
||||
name: test-runner
|
||||
description: "Test Runner — esegue test e verifica per supabase-pinger"
|
||||
allowed-tools:
|
||||
- Read
|
||||
- Write
|
||||
- Bash
|
||||
- Glob
|
||||
---
|
||||
|
||||
<objective>
|
||||
Esegue test e verifica l'implementazione del progetto supabase-pinger.
|
||||
</objective>
|
||||
|
||||
<test_framework>
|
||||
Framework: pytest
|
||||
Test file: tests/test_api.py (3 test functions)
|
||||
Config: tests/conftest.py
|
||||
</test_framework>
|
||||
|
||||
<test_functions>
|
||||
| Test | Funzione |
|
||||
|------|----------|
|
||||
| test_swagger_and_openapi_available | Verifica /docs, /openapi.json |
|
||||
| test_history_api_window_and_ring_buffer | Test buffer circolare |
|
||||
| test_status_api_when_no_samples | Test stato iniziale |
|
||||
</test_functions>
|
||||
|
||||
<test_commands>
|
||||
## Run all tests
|
||||
pytest -q
|
||||
|
||||
## Run verbose
|
||||
pytest -v
|
||||
|
||||
## Run specific
|
||||
pytest tests/test_api.py::test_name -v
|
||||
|
||||
## Run with coverage
|
||||
pytest --cov=app
|
||||
</test_commands>
|
||||
|
||||
<test_config>
|
||||
## Configurazione test (in conftest.py)
|
||||
config_override in create_app()
|
||||
start_collector=False
|
||||
|
||||
## No DB richiesto
|
||||
SQLite in temp directories
|
||||
</test_config>
|
||||
|
||||
<verification_commands>
|
||||
# Verify imports
|
||||
python -c "from app import create_app, app, Settings"
|
||||
|
||||
# Syntax check
|
||||
python -m py_compile app.py
|
||||
|
||||
# Docker build
|
||||
docker build -t supabase-pinger .
|
||||
</verification_commands>
|
||||
|
||||
<output_format>
|
||||
## Test Results
|
||||
```
|
||||
pytest -q
|
||||
... 3 passed
|
||||
```
|
||||
|
||||
## Verification
|
||||
- Syntax: OK
|
||||
- Imports: OK
|
||||
- Tests: N/N passed
|
||||
</output_format>
|
||||
|
||||
<when_to_use>
|
||||
- Dopo codice modificato
|
||||
- Prima di commit
|
||||
- Verifica funzionalità
|
||||
</when_to_use>
|
||||
Reference in New Issue
Block a user