Skip to content

fix(techniques): read bend/slide flags off the wire format - #80

Closed
mattromano wants to merge 1 commit into
got-feedBack:mainfrom
mattromano:fix/79-technique-flags-misread
Closed

mattromano wants to merge 1 commit into
got-feedBack:mainfrom
mattromano:fix/79-technique-flags-misread

Conversation

@mattromano

Copy link
Copy Markdown

What

Closes #79

Core sends slides as sl/slu (the slide-to fret, -1 = none) and bends as bn (the amount). note_detect read !!cn.sl / cn.b, so every plain note counted as a slide and got the wider pitch window or lenient pitch gate, and real bends were never seen.

  • New top-level helpers _ndHasSlide(n) and _ndHasBend(n). A slide is sl >= 0, slu >= 0 or sl === true. A bend is bn > 0 or b truthy. They accept the wire numbers and also the booleans note_detect's own payloads use (calibration lab notes, setVerifyTarget targets, the engine chart), so they work on either shape.
  • Every reader now uses them: _ndScoreChord, the engine chart push and its signature hash, the engine scoreChord payloads, the contained-chart and verify-target payloads, the calibration-lab probe flags and _calLabEffectivePitchTol, the two lenientPitch gates in the engine verdict drain, and _diagTechFlags, which was already correct and now also counts slu.
  • Desktop engine: no change to the contract. ChordScorer / NoteVerifier still get booleans b/sl and widen on either. They now get the right values instead of sl: true on every note.
  • An unpitched slide (slu) counts as a slide. Its pitch is also moving, and treating it as plain would be stricter than today's behaviour, which widens every note.

No version bump: there's no stylesheet change, so the ?v= cache-buster doesn't need one. #72, #74, #76 and #78 all bump to 1.33.0. If the maintainer wants a bump here anyway, it's a one-line re-bump after those land. This branch merges cleanly with all four (checked with git merge-tree).

Note: #78 (richer judgment events) adds its own technique-name reader with the same semantics. Once both land, it could reuse _ndHasBend / _ndHasSlide.

Tests

  • New test/technique_flags.test.js (6 tests):
    • the helpers on wire-format and boolean notes (sl: -1 means no slide; sl: 0, sl: 7 and slu: 3 are slides; bn: 1 and b: true are bends)
    • _ndScoreChord: a plain wire-format note played 70 cents sharp now misses at a 50-cent tolerance, while sl: 2, bn: 1 and legacy b: true still get the 100-cent window
    • end to end: the chart pushed to the desktop engine has sl: false / b: false for plain notes and chord members, and true only for the real slide and bend
    • Before the fix, 5 of the 6 tests fail. The "slides/bends still widened" test passes both ways.
  • test/_loader.js now exposes hasSlide / hasBend.
  • npm test: 358/359 pass. The one failure is queue_set_summary.test.js › "last-song Exit retires the log even without viewing the summary". It fails the same way on unmodified main on Windows, so it isn't caused by this change. node --check screen.js is OK, and feedBack-plugin-spec/tools/validate.py reports ok.

Checklist

🤖 Generated with Claude Code

Core's highway sends `sl`/`slu` as the slide-to fret (-1 = no slide) and
the bend amount as `bn`. note_detect read `!!cn.sl` / `cn.b`, so every
plain note looked like a slide (widened pitch window / lenient pitch
gate) and real bends were never seen. Read both through new
_ndHasSlide/_ndHasBend helpers that accept the wire numbers and the
booleans note_detect's own payloads carry, including the chart pushed
to the desktop engine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: mattromano <42412983+mattromano@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3bf529c5-46d7-449c-bf73-05a83751733e

📥 Commits

Reviewing files that changed from the base of the PR and between 412433d and e5266db.


📒 Files selected for processing (3)
  • screen.js
  • test/_loader.js
  • test/technique_flags.test.js


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mattromano

Copy link
Copy Markdown
Author

Consolidated into #84 (commits kept, rebased onto main, plus the review fixes).

@mattromano mattromano closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Every note is scored as a slide, and bends are never detected (technique flags misread)

1 participant