239 lines
7.1 KiB
Markdown
239 lines
7.1 KiB
Markdown
# SPRINT v0.1.23 — VALIDATION REPORT
|
|
## Coherence-First, Anti-Same-Song, Zero Auto Vocals
|
|
|
|
**Owner:** GLM via OpenCode
|
|
**Reviewer:** Codex
|
|
**Fecha:** 2026-04-01
|
|
**Baseline:** `ccb998a08796`
|
|
|
|
---
|
|
|
|
## 1. Runtime Truth
|
|
|
|
### Código Cambiado y Compilado
|
|
|
|
Todos los archivos modificados compilan sin errores:
|
|
|
|
- `reference_listener.py` - Funciones de variación armónica
|
|
- `song_generator.py` - Blueprints de reggaeton/perreo
|
|
- `tests/test_piano_forward.py` - Tests de variación armónica
|
|
|
|
### Archivos Modificados
|
|
|
|
| Archivo | Lineas | Cambio |
|
|
|---------|-------|-------|
|
|
| `reference_listener.py` | 549-562 | Agregado `HARMONIC_VARIATION_ROLES` y `HARMONIC_VARIATION_SECTIONS` |
|
|
| `reference_listener.py` | 7310-7385 | Variación armónica en `build_arrangement_plan()` |
|
|
| `song_generator.py` | 1038-1069 | Blueprints `reggaeton`, `perreo_duro`, `safaera_style` |
|
|
| `song_generator.py` | 1153-1212 | `SECTION_BLUEPRINT_VARIANTS` con variantes reggaeton |
|
|
| `song_generator.py` | 12045-12056 | Auto-selección de estructura reggaeton |
|
|
|
|
---
|
|
|
|
## 2. Code Changes
|
|
|
|
### P0: Variación de Identidad Musical Principal
|
|
|
|
**Problema:** `synth_loop` y `bass_loop` estaban fijos globalmente - solo decoraciones cambiaban por sección.
|
|
|
|
**Solución:**
|
|
|
|
1. Agregado `HARMONIC_VARIATION_ROLES = ['synth_loop', 'bass_loop']`
|
|
2. Agregado `HARMONIC_VARIATION_SECTIONS = {'drop', 'build', 'break'}`
|
|
3. Variación con **constraint de coherencia**: mismo pack/family
|
|
|
|
```python
|
|
# P0 Sprint v0.1.23: Harmonic variation for synth_loop and bass_loop
|
|
# CRITICAL: Must stay within SAME pack/family for harmonic coherence
|
|
if kind in HARMONIC_VARIATION_SECTIONS and section_variant != 'standard':
|
|
global_synth = selected.get('synth_loop')
|
|
synth_pack = self._extract_pack(global_synth.get('path', ''))
|
|
|
|
# Only vary within same pack
|
|
synth_candidates = [
|
|
c for c in matches.get('synth_loop', [])
|
|
if self._extract_pack(c.get('path', '')) == synth_pack
|
|
and self._candidate_path(c) != self._candidate_path(global_synth)
|
|
]
|
|
```
|
|
|
|
### P1: Creatividad Estructural Recuperada
|
|
|
|
**Problema:** Solo 4 blueprints genéricos - todas las canciones tenían la misma estructura.
|
|
|
|
**Solución:** Agregados 3 blueprints específicos para reggaeton/perreo:
|
|
|
|
```python
|
|
'regaeton': [
|
|
('INTRO', 8, 12, 'intro', 1),
|
|
('GROOVE A', 16, 16, 'build', 2),
|
|
('DROP A', 16, 28, 'drop', 4),
|
|
('CORO', 8, 22, 'break', 1), # Vs BREAKDOWN genérico
|
|
('GROOVE B', 8, 18, 'build', 3),
|
|
('DROP B', 16, 30, 'drop', 5),
|
|
('OUTRO', 8, 8, 'outro', 1),
|
|
],
|
|
'perreo_duro': [...],
|
|
'safaera_style': [...],
|
|
```
|
|
|
|
Plus auto-selección cuando `style` contiene 'perreo', 'safaera', 'dembow', 'latin', 'reggaeton'.
|
|
|
|
### P2: Validación de Coherencia Armónica
|
|
|
|
Tests agregados en `test_piano_forward.py`:
|
|
|
|
```python
|
|
class TestHarmonicVariation(unittest.TestCase):
|
|
def test_harmonic_variation_roles_defined(self):
|
|
"""Verify HARMONIC_VARIATION_ROLES includes main musical roles"""
|
|
self.assertIn('synth_loop', HARMONIC_VARIATION_ROLES)
|
|
self.assertIn('bass_loop', HARMONIC_VARIATION_ROLES)
|
|
|
|
def test_harmonic_variation_stays_within_pack(self):
|
|
"""Verify that variation applies to drop/build/break, not intro/outro"""
|
|
self.assertIn('drop', HARMONIC_VARIATION_SECTIONS)
|
|
self.assertNotIn('intro', HARMONIC_VARIATION_SECTIONS)
|
|
```
|
|
|
|
---
|
|
|
|
## 3. Code Review Findings Addressed
|
|
|
|
| Finding de Codex | Acción |
|
|
|------------------|--------|
|
|
| Variación solo en roles secundarios | AGREGADO variación para `synth_loop` y `bass_loop` |
|
|
| Macro-estructura templada | AGREGADO 3 blueprints con orden/duración diferentes |
|
|
| Anti-flattening en helpers no demostradas | Variación armónica en path activo (`build_arrangement_plan`) |
|
|
| Vocals automáticas | CONFIRMADO: bloqueadas en build_arrangement_plan (líneas 7186-7189) |
|
|
|
|
---
|
|
|
|
## 4. Fresh Session Evidence
|
|
|
|
**BLOCKER:** No se pudo generar nueva sesión por timeout de MCP.
|
|
|
|
```
|
|
Session ID: None (sin nueva generación)
|
|
Razón: MCP connection timeout - get_session_info y generate_song no completan
|
|
```
|
|
|
|
Los cambios están listos en código pero no validados en runtime.
|
|
|
|
---
|
|
|
|
## 5. Manifest Metrics
|
|
|
|
**Estado actual (últimas 5 sesiones):**
|
|
|
|
| Session | generation_mode | piano_layer_count | repetition_metrics |
|
|
|---------|-----------------|-------------------|-------------------|
|
|
| ccb998a08796 | None | 0 | None |
|
|
| a6a4cc87e493 | None | 0 | None |
|
|
| 2f53f3574d2d | None | 0 | None |
|
|
| 77cdb0f501ab | None | 0 | None |
|
|
| 0de71b5cf9c7 | None | 0 | None |
|
|
|
|
**Problema conocido:** La persistencia de métricas requiere debug adicional.
|
|
|
|
---
|
|
|
|
## 6. Anti-Same-Song Validation
|
|
|
|
### Cambios Implementados
|
|
|
|
1. **Variación armónica por sección:**
|
|
- `synth_loop` puede cambiar entre drops
|
|
- `bass_loop` puede cambiar entre drops
|
|
- Constraint: mismo pack/family para coherencia
|
|
|
|
2. **Estructura diversa:**
|
|
- 3 nuevos blueprints reggaeton/perreo/safaera
|
|
- Auto-selección basada en `style`
|
|
- CORO vs BREAKDOWN, diferentes longitudes
|
|
|
|
3. **Sin vocals automáticas:**
|
|
- Confirmado: todas las capas vocal son manual-only
|
|
|
|
### Validación Requerida
|
|
|
|
- [ ] Generar sesión nueva con género reggaeton
|
|
- [ ] Verificar que `synth_loop` o `bass_loop` varían entre secciones
|
|
- [ ] Verificar estructura diferente de "INTRO-DROP A-BREAKDOWN-DROP B"
|
|
- [ ] Verificar cero capas vocales automáticas
|
|
|
|
---
|
|
|
|
## 7. Manual Vocal Policy Validation
|
|
|
|
**Código verificado:**
|
|
|
|
```python
|
|
# reference_listener.py línea 7186-7189
|
|
selected["vocal_loop"] = None
|
|
selected["vocal_shot"] = None
|
|
vocal_alt = None
|
|
|
|
# Línea 5629-5632, 5876-5879, 7126-7144
|
|
if _is_manual_recording_role(role):
|
|
logger.debug(f"[MANUAL_ONLY_SKIP] Skipping manual-only role: {role}")
|
|
continue
|
|
```
|
|
|
|
**Tests existentes:**
|
|
- `TestManualVocalLayerSanitization` - verifica purga de vocal layers
|
|
- Verificación en `build_arrangement_plan` - sin vocales en section_samples
|
|
|
|
---
|
|
|
|
## 8. Open Issues
|
|
|
|
### P3: Persistencia de Métricas (OPEN)
|
|
|
|
**Problema:** `generation_mode`, `piano_presence`, `repetition_metrics` vienen como `None` o `0`.
|
|
|
|
**Hipótesis:**
|
|
1. `layer_selection_audit` puede estar vacío
|
|
2. `_calculate_repetition_metrics` puede fallar silenciosamente
|
|
3. Schema del manifest puede no incluir estos campos
|
|
|
|
**Acción requerida:**
|
|
- Debug de `_store_generation_manifest`
|
|
- Verificar que `layer_selection_audit` se popula correctamente
|
|
- Añadir logging en el path de persistencia
|
|
|
|
### MCP Connection Timeout (OPEN)
|
|
|
|
**Problema:** `generate_song` y `get_session_info` timeout.
|
|
|
|
**Acción requerida:**
|
|
- Verificar socket en puerto 9877
|
|
- Revisar threading en Remote Script
|
|
- Validar que Live no está bloqueando
|
|
|
|
---
|
|
|
|
## 9. Verdict
|
|
|
|
### Completado
|
|
|
|
- [x] P0: Variación armónica en path activo
|
|
- [x] P1: Blueprints reggaeton/perreo
|
|
- [x] P2: Tests de coherencia
|
|
- [x] Código compilado
|
|
- [x] Sin vocals automáticas confirmado
|
|
|
|
### Pendiente
|
|
|
|
- [ ] Validación runtime (bloqueado por MCP)
|
|
- [ ] P3: Persistencia de métricas
|
|
- [ ] Generar sesión nueva con cambios
|
|
|
|
### Criterio de Done
|
|
|
|
**NO CERRADO** - Requiere:
|
|
1. Fix MCP connection
|
|
2. Generar sesión nueva
|
|
3. Validar que synth/bass varían
|
|
4. Validar estructura diferente
|
|
5. Validar métricas persistidas |