Tidy up feedback_messages.py - #27
Open
peterbjohnson wants to merge 1 commit into
Open
Conversation
- Record the cut-offs each dict is keyed by. The labels live here but the thresholds live in compare_MIDI.py, so "excellent" gave no clue that it meant >= 0.90. - focus_messages -> focus_preamble_messages, keyed by what is being praised rather than by the focus area. focus_messages["pitch"] praised rhythm, which read backwards next to focus_advice_messages["pitch"]. - Move "Note Detail:" and "Chord Detail:" into detail_section_titles. They were the last student-facing strings left in compare_MIDI.py. - Strip the trailing spaces that do nothing (three messages that are joined with newlines) and note why the remaining ones are needed: the focus preambles and the chord suffixes are concatenated. - Pin the detail section titles by constant in the tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ada-jz7125
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #25.
Stacked on #26, which is itself stacked on #23. Both will retarget as the chain merges.
Thresholds are recorded next to the labels. Reading
feedback_messages.pyalone gave no hint that"excellent"meant>= 0.90. Each dict now says what it is keyed by, and points atcompare_MIDI.pyfor the constants that do the deciding.focus_messages→focus_preamble_messages. The old keys named the focus area but the values praised everything else —focus_messages["pitch"]was "You've got a good understanding of the rhythm.", sitting directly abovefocus_advice_messages["pitch"], which meant the opposite. Keys are nowrhythm/melody/melody_and_rhythm/developing, so the call site reads as what it does: when the focus is pitch, praise the rhythm.detail_section_titles."Note Detail:"and"Chord Detail:"were the last student-facing strings left incompare_MIDI.py, against what the module docstring claims. Only comments and docstrings mention them now.Trailing spaces. Three messages ended in a space and are joined with
"\n", so it did nothing — stripped. The rest are concatenated and the space matters, so there is now a comment saying so above the focus preambles and the chord suffixes. Stripping those would produce"…70% accurate.Missing note(s): C.".No message text changed apart from those three trailing spaces; I diffed the constants against #26 to confirm. 85 tests pass, and the lint count is unchanged at 213.
🤖 Generated with Claude Code