# Tasks: compose-test-sync

## Phase 1: Fix test_root_to_midi (test_section_builder.py)

- [ ] 1.1 In `tests/test_section_builder.py` line 121–124, replace `from scripts.compose import root_to_midi` with `from scripts.compose import NOTE_TO_MIDI`
- [ ] 1.2 Change `root_to_midi("A", 4)` to `NOTE_TO_MIDI["A"] + 12 * (4 - 3)` (transposes A4 up one octave)
- [ ] 1.3 Change `root_to_midi("C", 4)` to `NOTE_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.py` lines 44–80, remove `patch("scripts.compose.DrumLoopAnalyzer")` from the `with` statement (line 58)
- [ ] 2.2 Remove the `DrumLoopAnalysis` import from `src.composer.drum_analyzer` (line 46) — no longer needed
- [ ] 2.3 Remove `fake_analysis` fixture creation (lines 49–55)
- [ ] 2.4 Remove `mock_a = MagicMock()` and its `.analyze.return_value = fake_analysis` assignment (lines 68–69)
- [ ] 2.5 Remove `mock_a_cls.return_value = mock_a` assignment (line 70)

## Phase 3: Fix test_melody_uses_pentatonic (test_compose_integration.py)

- [ ] 3.1 In `tests/test_compose_integration.py` line 204, remove the `analysis = _fake_analysis()` line (dead code — function no longer takes analysis arg)
- [ ] 3.2 Line 205: change `SectionDef(name="verse", ...)` to `SectionDef(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
