Restore granular feedback behind a show_detail parameter - #26
Open
peterbjohnson wants to merge 1 commit into
Open
Restore granular feedback behind a show_detail parameter#26peterbjohnson wants to merge 1 commit into
peterbjohnson wants to merge 1 commit into
Conversation
The per-note renderer was superseded rather than removed, leaving two renderers with no way to reach the detailed one. Reframe the pair as summary vs detail and let the caller ask for both. - generate_feedback_message -> detail_feedback, polished_feedback_message -> summary_feedback, and the same split in feedback_messages.py. - build_feedback composes them: the summary is always shown, the detail is appended when show_detail is on. SHOW_DETAIL defaults to False and is teacher-configurable through params. - detail_caveat_message introduces the detail section, so students know the per-note claims may not be accurate. - detail_feedback loses its Part 1 overview, which restated the summary. The overview_* messages go with it. - Fix the duration direction: duration_abs_diff was made absolute at the point of measurement, so the detail message always read "longer" and never "shorter". event_level_feedback now also records duration_signed_diff, and the threshold logic is unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ada-jz7125
reviewed
Sep 11, 2026
ada-jz7125
left a comment
Collaborator
There was a problem hiding this comment.
some text assertions, and the notebook may need to be rerun later
Comment on lines
+767
to
+768
| assert "Note 3: duration is" in result.feedback_message | ||
| assert "shorter than the reference" in result.feedback_message |
Collaborator
There was a problem hiding this comment.
this notebook may need to be rerun later to make sure the output is up-to-date
Comment on lines
+747
to
+750
| assert "Note Detail:" not in evaluation_function(self.RES, self.REF, {})["feedback"] | ||
| with_detail = evaluation_function(self.RES, self.REF, {"show_detail": True}) | ||
| assert "Note Detail:" in with_detail["feedback"] | ||
|
|
| if n["event_type"] == "note" and n.get("reference_index") == 3 | ||
| ] | ||
| assert note_three[0]["duration_signed_diff"] > 0 | ||
| assert "longer than the reference" in result.feedback_message |
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 #24.
Based on
22-organise-feedback-messages(#23) so the diff shows only this change; GitHub will retarget it tomainwhen #23 merges.Summary vs detail, not current vs old.
polished_feedback_message→summary_feedback,generate_feedback_message→detail_feedback, and the two blocks infeedback_messages.pyare relabelled to match.build_feedbackcomposes them: the summary is always shown, the detail is appended only whenshow_detailis on.SHOW_DETAIL = Falsesits with the other module-level defaults and is teacher-configurable viaparams["show_detail"], like the thresholds.The caveat.
detail_caveat_messageintroduces the detail section. It is worded to hold for MIDI submissions too — those aren't transcribed at all, so a flat "this came from a transcription" would be inaccurate about half the time:Duration direction bug.
event_level_feedbackstoredduration_abs_diff = abs(...), sodirection = "longer" if duration_abs_diff > 0was always true — a note held too short was reported as too long. Rather than make the existing key signed, which would have silently invertedduration_correct(the threshold comparesduration_relative_diff <= threshold, and a signed value would let badly short notes pass), the fix adds a separateduration_signed_diffand leaves the threshold logic untouched. Two tests cover both directions.Part 1 dropped from
detail_feedback. It restated the summary in the older voice. Theoverview_*constants went with it.Tests. Six new, in a section 11: detail off by default, appended below the summary when on, introduced by the caveat, reachable through
params, and the two duration-direction cases. 78 pass. Section titles and the caveat are asserted by constant, following 6121639.Notebook.
Phase1-1.5_summary.ipynbcells 3/40/42 are updated to the new names. Outputs are not re-run, so the printed detail output in that notebook still shows the old Part 1 overview.🤖 Generated with Claude Code