118 lines
7.3 KiB
Markdown
Executable File
118 lines
7.3 KiB
Markdown
Executable File
# RESULT.md — Ticket nyora-2026-10-216 (Parties A et B) : Connecteur Musique Treblo MCP
|
|
|
|
## 1. `docker ps`
|
|
```text
|
|
NAMES IMAGE STATUS PORTS
|
|
treblo-mcp treblo-mcp:latest Up 25 minutes (healthy) 100.94.90.119:3106->8000/tcp, 127.0.0.1:3106->8000/tcp
|
|
```
|
|
|
|
## 2. `docker inspect`
|
|
```text
|
|
healthy|unless-stopped|[{"Type":"bind","Source":"/home/gemini2-ops/treblo-mcp/data","Destination":"/app/data","Mode":"rw","RW":true,"Propagation":"rprivate"},{"Type":"bind","Source":"/home/gemini2-ops/treblo-mcp/musique","Destination":"/app/musique","Mode":"rw","RW":true,"Propagation":"rprivate"}]|treblo-mcp:latest
|
|
```
|
|
|
|
## 3. `docker port`
|
|
```text
|
|
8000/tcp -> 100.94.90.119:3106
|
|
8000/tcp -> 127.0.0.1:3106
|
|
```
|
|
|
|
## 4. `tools/list` brut
|
|
```json
|
|
{"jsonrpc":"2.0","id":3,"result":{"tools":[{"name":"solde","description":"Consulte le solde de crédits Treblo pour la sphère indiquée (nyora ou perso).","inputSchema":{"properties":{"sphere":{"title":"Sphere","type":"string"}},"required":["sphere"],"title":"soldeArguments","type":"object"}},{"name":"generer","description":"Lance une génération musicale auprès de Treblo.\n Refuse si tags + paroles + prompt sont fournis ensemble, ou si plus de 64 tags,\n ou si le plafond journalier est atteint.","inputSchema":{"properties":{"sphere":{"title":"Sphere","type":"string"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Tags"},"paroles":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Paroles"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Prompt"}},"required":["sphere"],"title":"genererArguments","type":"object"}},{"name":"statut","description":"Consulte le statut d'une tâche de génération Treblo.","inputSchema":{"properties":{"task_id":{"title":"Task Id","type":"string"}},"required":["task_id"],"title":"statutArguments","type":"object"}},{"name":"recuperer","description":"Télécharge les fichiers générés (FLAC ou WAV pour l'archive, MP3 pour l'écoute)\n dans musique/<sphere>/ avec le fichier JSON de métadonnées associé.","inputSchema":{"properties":{"task_id":{"title":"Task Id","type":"string"},"sphere":{"title":"Sphere","type":"string"}},"required":["task_id","sphere"],"title":"recupererArguments","type":"object"}}]}}
|
|
```
|
|
|
|
## 5. Solde avant et après
|
|
- Solde avant génération : **9400 crédits** (`num_credits: 0`, `num_credits_payg: 9400`)
|
|
- Solde intermédiaire après génération Nyora : **9300 crédits** (`num_credits: 0`, `num_credits_payg: 9300`)
|
|
- Solde final après génération Perso : **9200 crédits** (`num_credits: 0`, `num_credits_payg: 9200`)
|
|
- Consommation totale constatée : **200 crédits** (100 crédits par chanson). Aucun crédit supplémentaire consommé en partie B.
|
|
|
|
## 6. Contenu du journal (`data/journal.jsonl`)
|
|
```json
|
|
{"date": "2026-11-01T23:43:12.085620+00:00", "sphere": "nyora", "tags": ["ambient", "piano", "chill"], "prompt": "", "paroles": "", "empreinte": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "task_id": "adb77fc8-b1f1-4f8a-bd43-5472970784a2", "statut": "SUCCESS", "credits_avant": 9400, "credits_apres": 9300}
|
|
{"date": "2026-11-01T23:46:49.326609+00:00", "sphere": "perso", "tags": ["southern soul", "blues", "soulful"], "prompt": "", "paroles": "Late at night when the city is still\nI hear the blues rolling down the hill\nOld acoustic guitar crying in the rain\nWhispering secrets of sorrow and pain\nWalked a long road through the weary night\nHolding a spark of that morning light\nTake my troubles and let the river roll\nLord bring that peace to my wandering soul", "empreinte": "3392e2f665c7442932b05e1703576e8d6f0a729f830d14e50b2f2a864bccbe41", "task_id": "1b930c95-6b26-46d5-99fe-d99ae947212b", "statut": "SUCCESS", "credits_avant": 9300, "credits_apres": 9200}
|
|
```
|
|
|
|
## 7. Liste des fichiers produits
|
|
```text
|
|
/home/gemini2-ops/treblo-mcp/musique/nyora/:
|
|
total 15M
|
|
-rw-r--r-- 1 gemini2-ops gemini2-ops 9.9M Nov 2 00:46 adb77fc8-b1f1-4f8a-bd43-5472970784a2.flac
|
|
-rw-r--r-- 1 gemini2-ops gemini2-ops 191 Nov 2 00:46 adb77fc8-b1f1-4f8a-bd43-5472970784a2.json
|
|
-rw-r--r-- 1 gemini2-ops gemini2-ops 4.8M Nov 2 00:46 adb77fc8-b1f1-4f8a-bd43-5472970784a2.mp3
|
|
|
|
/home/gemini2-ops/treblo-mcp/musique/perso/:
|
|
total 14M
|
|
-rw-r--r-- 1 gemini2-ops gemini2-ops 9.9M Nov 2 00:49 1b930c95-6b26-46d5-99fe-d99ae947212b.flac
|
|
-rw-r--r-- 1 gemini2-ops gemini2-ops 522 Nov 2 00:49 1b930c95-6b26-46d5-99fe-d99ae947212b.json
|
|
-rw-r--r-- 1 gemini2-ops gemini2-ops 3.3M Nov 2 00:49 1b930c95-6b26-46d5-99fe-d99ae947212b.mp3
|
|
```
|
|
|
|
## 8. Résultats du vérificateur automatique (`verify216.py`)
|
|
```text
|
|
=== conteneur ===
|
|
CONTENEUR_OK
|
|
=== outils ===
|
|
OUTILS_OK
|
|
=== solde ===
|
|
SOLDE_OK
|
|
=== plafond ===
|
|
PLAFOND_OK
|
|
=== generations ===
|
|
GENERATIONS_OK
|
|
=== secret ===
|
|
SECRET_OK
|
|
=== garde ===
|
|
GARDE_OK
|
|
```
|
|
|
|
## 9. Partie B — Refus generer sans validation humaine préalable (T2)
|
|
Appel `tools/call` sur `generer` via MCP HTTP sans validation préalable :
|
|
```json
|
|
{
|
|
"jsonrpc": "2.0",
|
|
"id": 2,
|
|
"result": {
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "Error executing tool generer: Refus : validation humaine requise par Telegram (demande non validée ou étiquette invalide). Une demande d'approbation #7df84198 a été envoyée à Nabil sur Telegram pour la sphère nyora (expiration à 11:31:04). Tant que Nabil n'a pas validé, la génération est refusée sans débit."
|
|
}
|
|
],
|
|
"isError": true
|
|
}
|
|
}
|
|
```
|
|
Contrôle du solde après la tentative :
|
|
```text
|
|
SOLDE_OK (9200 crédits intacts)
|
|
Lignes journal : 2 (aucune ligne ajoutée)
|
|
```
|
|
|
|
## 10. Partie B — Envoi Telegram des aperçus MP3 (T3)
|
|
Transmission des deux morceaux générés à Nabil sans nouvelle génération :
|
|
- Morceau Nyora (`adb77fc8-b1f1-4f8a-bd43-5472970784a2.mp3`, 4.8MB) via `HermesNyora_botbot` :
|
|
```text
|
|
HTTP/1.1 200 OK
|
|
{"ok":true,"result":{"message_id":318,"from":{"id":7646197940,"is_bot":true,"first_name":"HermesNyora_botbot","username":"HermesNyora_botbot"},"chat":{"id":2084513684,"type":"private"},"date":1762078028,"audio":{"duration":155,"file_name":"adb77fc8-b1f1-4f8a-bd43-5472970784a2.mp3","mime_type":"audio/mpeg","file_id":"CQACAgQAAxkBAAICfmepuIw2y61q-i322Q4W5v0xQz_2AAKzFwACzX7pUD2GvMsqbZf-NgQ","file_unique_id":"AgADsxcAAs1-6VA","file_size":4991191}}}
|
|
```
|
|
- Morceau Perso (`1b930c95-6b26-46d5-99fe-d99ae947212b.mp3`, 3.3MB) via `@Perso_OC_bot` :
|
|
```text
|
|
HTTP/1.1 200 OK
|
|
{"ok":true,"result":{"message_id":48,"from":{"id":8419269584,"is_bot":true,"first_name":"Perso_OC_bot","username":"Perso_OC_bot"},"chat":{"id":2084513684,"type":"private"},"date":1762078036,"audio":{"duration":105,"file_name":"1b930c95-6b26-46d5-99fe-d99ae947212b.mp3","mime_type":"audio/mpeg","file_id":"CQACAgQAAxkBAAMwZ6m4jJ04XlY2sC8R-zLomN2X0GgAArQXAALNfulQ3iUoU6lWq5A2BA","file_unique_id":"AgADtBcAAs1-6VA","file_size":3391780}}}
|
|
```
|
|
|
|
## 11. Partie B — Non-régression du journal et fuseau Tunis (Africa/Tunis) (T4)
|
|
Exécution de la suite de tests unitaires `tests/test_journal_tunis.py` :
|
|
```text
|
|
test_journal_credits_apres_reflects_actual_balance (tests.test_journal_tunis.TestJournalAndTunis) ... ok
|
|
test_tunis_cap_daily_boundary (tests.test_journal_tunis.TestJournalAndTunis) ... ok
|
|
test_tunis_date_calculation (tests.test_journal_tunis.TestJournalAndTunis) ... ok
|
|
|
|
----------------------------------------------------------------------
|
|
Ran 3 tests in 0.003s
|
|
|
|
OK
|
|
```
|