Skip to content

Fix Nord Lead MIDI import and remaining PR #559 review findings - #570

Merged
christofmuc merged 1 commit into
masterfrom
codex/pr559-review-followup
Sep 4, 2026
Merged

Fix Nord Lead MIDI import and remaining PR #559 review findings#570
christofmuc merged 1 commit into
masterfrom
codex/pr559-review-followup

Conversation

@christofmuc

@christofmuc christofmuc commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Nord Lead MIDI imports could silently return only earlier valid patches when an F7 escape contained an explicitly framed SysEx message with an embedded status byte. Validate those messages before collecting them and raise ValueError for the malformed file.

Addresses the three outstanding CodeRabbit findings from #559:

  • Reject malformed escaped SysEx, with ten regression cases covering five status bytes and valid patches in the same or an earlier event.
  • Rename both test parameters from format to smf_format, including all callers.
  • Clarify model/memory-card-dependent live-bank availability in both device tables, preserving ten-bank 2X file import/export support.

The earlier request-ID finding was already settled in #559; the documented 0x0B-0x0E range remains correct.

Validation: Python 3.12, Nord Lead generic and dedicated tests: 125 passed, 10 expected skips for unsupported optional adaptation capabilities. All ten new cases failed before the parser fix and pass afterward. Existing valid escaped, fragmented, and official MIDI fixture imports pass. git diff --check is clean. Hardware behavior was not tested.

Summary by CodeRabbit

  • Bug Fixes

    • Malformed MIDI SysEx messages containing embedded status bytes are now rejected with a clear error instead of producing incomplete patch data.
  • Documentation

    • Updated Clavia Nord Lead compatibility information to describe four documented live-request banks.
    • Clarified that memory-card availability depends on the specific model and installed memory card.

@christofmuc christofmuc added the Ready for release Will be part of the next release label Sep 4, 2026
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: cf2211e1-5093-45cf-880d-40fdc1a62dc4

📥 Commits

Reviewing files that changed from the base of the PR and between d53a90c and 9366f01.

📒 Files selected for processing (4)
  • README.md
  • adaptations/Clavia_Nord_Lead.py
  • adaptations/test_Clavia_Nord_Lead.py
  • docs/README.md

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Nord Lead MIDI parser now rejects embedded status bytes in escaped SysEx messages. Tests cover malformed dumps and rename the SMF helper parameter. Project documentation clarifies live-request bank availability.

Changes

Nord Lead updates

Layer / File(s) Summary
Escaped SysEx validation and regression coverage
adaptations/Clavia_Nord_Lead.py, adaptations/test_Clavia_Nord_Lead.py
The parser raises ValueError("Embedded status byte in MIDI SysEx") when escaped SysEx data contains a high-bit byte. Tests cover malformed dumps and use the renamed smf_format parameter.
Nord Lead compatibility notes
README.md, docs/README.md
The documentation identifies four documented live-request banks and states that availability depends on the model and installed memory card.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 9366f

Nord Lead MIDI imports now fail cleanly for malformed escaped SysEx data rather than returning partial patches, while compatibility notes clarify supported live-request banks. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: fixing Nord Lead MIDI import handling and addressing remaining review findings from PR #559.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/pr559-review-followup

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.

@christofmuc
christofmuc merged commit 5671813 into master Sep 4, 2026
5 checks passed
@christofmuc
christofmuc deleted the codex/pr559-review-followup branch September 4, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for release Will be part of the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant