Repository navigation
feat(events): richer notedetect:hit/miss payloads for stats plugins - #78
Closed
mattromano wants to merge 1 commit into
Closed
mattromano wants to merge 1 commit into
mattromano wants to merge 1 commit into
Conversation
A stats or scorecard plugin could only get per-string chord results,
technique names, latency or section by patching screen.js. Every
emitted judgment now also carries:
- key: the note id (same as getNoteState's popKey)
- strings: per-string verdicts { s, f, hit, centsError, snr?,
detectedAt? } for chords on every path (a missed browser chord
reports its best frame) and for engine-path single notes
- techniques: named techniques from the chart note's wire flags
- latencyMs / avOffsetMs, detector, section (by note time)
- counted, points, multiplier, streak, isDefault
All additive; existing fields are unchanged. README documents the
contract.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: mattromano <42412983+mattromano@users.noreply.github.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 10, 2026
Author
|
Consolidated into #84 (commits kept, rebased onto main, plus the review fixes). |
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.
What
Closes #77
Every emitted judgment (
notedetect:hit/notedetect:miss, both DOM copies, andnote:hit/note:misson the bus, which all share one detail object) now also carries:keygetNoteStatehands back aspopKey("<t>_<s>_<f>"/"<t>_chord")strings[{ s, f, hit, centsError, snr?, detectedAt? }]: every chord judgment (engine, scoreChord and browser paths; a missed browser chord reports the best frame the scorer saw in its window) and engine-path single notes (the raw engine verdict).nullwhen nothing was measuredtechniquesbend,slide,palmMute,hammerOn, …).[]for a plain notelatencyMs/avOffsetMstimingErrordetectordesktop-engine-verifier,web-yin, …,external)sectioncounted/points/multiplier/streak/isDefaultImplementation:
_ndEnrichJudgmentstamps the fields once inrecordJudgment, right before dispatch. It's best-effort and never changes scoring.stringsis built at the sites that have the data:_ndFinalizeChordVerdict(each member's engine verdict), the engine single-note drain, and thematchNoteschord hit. The_chordLastResultbest-frame snapshot now keeps per-string results forcheckMisses' miss and voicing-rescue judgments._ndTechniqueNames,_ndStringVerdictsand_ndSectionAtare top-level so tests can reach them.Existing fields are unchanged. README "Events" documents each field plus a small example, and CLAUDE.md's consumer table points to it.
Version bumped 1.32.0 → 1.33.0 in
plugin.json,package.jsonand_ND_VERSION. This collides with #72 and the other open note_detect PRs, which bump to the same version. Whichever merges later needs a one-line re-bump. It's independent of #72 functionally. It shares_ndFinalizeChordVerdictwith the fast-chord-runs fix, so expect a small textual conflict.Tests
test/judgment_events.test.js(4 tests, driving the real detector in the vm harness and capturing the dispatched events):_ndTechniqueNamesreads wire flags correctly (sl: -1/bn: 0→ none)key,stringswith each string's hit/cents/snr/detectedAt,techniques,latencyMs,avOffsetMs,detector,section,counted,points,multiplier,streak,isDefaultcheckMissesreports the best frame's stringsnpm test: 357/357 pass.node --check screen.jsis OK, andfeedBack-plugin-spec/tools/validate.pyreportsok.Checklist
version_sync.test.jsgreen)git commit -s)🤖 Generated with Claude Code