- compose-test-sync: fix 3 failing tests (NOTE_TO_MIDI, DrumLoopAnalyzer mock, section name) - generate-song: CLI wrapper + RPP validator (6 structural checks) + 4 e2e tests - reascript-hybrid: ReaScriptGenerator + command protocol + CLI + 16 unit tests - 110/110 tests passing - Full SDD cycle (propose→spec→design→tasks→apply→verify) for all 3 changes
1.6 KiB
1.6 KiB
Tasks: compose-test-sync
Phase 1: Fix test_root_to_midi (test_section_builder.py)
- 1.1 In
tests/test_section_builder.pyline 121–124, replacefrom scripts.compose import root_to_midiwithfrom scripts.compose import NOTE_TO_MIDI - 1.2 Change
root_to_midi("A", 4)toNOTE_TO_MIDI["A"] + 12 * (4 - 3)(transposes A4 up one octave) - 1.3 Change
root_to_midi("C", 4)toNOTE_TO_MIDI["C"] + 12 * (4 - 3)(transposes C4 up one octave)
Phase 2: Fix test_main_without_render_produces_rpp (test_render_cli.py)
- 2.1 In
tests/test_render_cli.pylines 44–80, removepatch("scripts.compose.DrumLoopAnalyzer")from thewithstatement (line 58) - 2.2 Remove the
DrumLoopAnalysisimport fromsrc.composer.drum_analyzer(line 46) — no longer needed - 2.3 Remove
fake_analysisfixture creation (lines 49–55) - 2.4 Remove
mock_a = MagicMock()and its.analyze.return_value = fake_analysisassignment (lines 68–69) - 2.5 Remove
mock_a_cls.return_value = mock_aassignment (line 70)
Phase 3: Fix test_melody_uses_pentatonic (test_compose_integration.py)
- 3.1 In
tests/test_compose_integration.pyline 204, remove theanalysis = _fake_analysis()line (dead code — function no longer takes analysis arg) - 3.2 Line 205: change
SectionDef(name="verse", ...)toSectionDef(name="chorus", ...)(build_lead_track only generates for chorus/chorus2/final)
Phase 4: Verification
- 4.1 Run
python -m pytest tests/ -q— confirm 90/90 tests pass - 4.2 Run
git diff --name-only scripts/— confirm no files in scripts/ were modified