Claude/instrument recognition v2 xy1mkj - #1891
Merged
Merged
Conversation
Make the v2 pipeline reactive to runtime configuration changes (docs/SYSEX_IDENTITY.md §4): a level-1 instrument can push F0 7D 00 11 02 <revision[5]> <change_flags> F7 when its profile changes. parseChangeNotification decodes the frame (32-bit revision + flags), and the sysex handler routes it ahead of the identity parse. When the identity, instruments, or timing changed, the descriptor is re-fetched and re-applied; a restart-only flag is logged without a re-fetch. Covered by tests/devicemanager-change-notification.test.js (5 tests). Full backend suite green (1207 tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZ7sHZ9pTnJMt6h9Cus5mn
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZ7sHZ9pTnJMt6h9Cus5mn
Implement the §7 step-4 ETag optimisation in-memory: track the last successfully-applied descriptor revision per device, and skip the block 0x10 transfer when a handshake or 0x11 notification carries a revision we already applied. A changed revision (or an unknown/null one) still fetches; the revision is recorded only when DescriptorService reports the descriptor applied, so a failed transfer/apply re-fetches next time. The handshake and change-notification triggers now pass their revision to _startDescriptorFetch. Covered by tests/devicemanager-descriptor-revision-skip.test.js (3 tests). Full backend suite green (1210 tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZ7sHZ9pTnJMt6h9Cus5mn
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZ7sHZ9pTnJMt6h9Cus5mn
Extend descriptor application to the strings family (§5.9): map a `physical` block onto the string_instruments columns (tuning, fret geometry, capo, CC string/fret selection) and upsert it. - descriptorToStringConfig — pure mapper, emits only declared fields (booleans as 0/1) so a partial update never clobbers user-set fields. - DescriptorService now takes a stringInstrumentRepository and, for a strings instrument, partial-updates an existing row (preserving fields the descriptor omits — scale length, bow CCs) or creates a new one. A string-config failure is isolated and never undoes the capability apply. - Register descriptorService after stringInstrumentRepository so both repositories it depends on are available at construction. Covered by tests/descriptor-strings.test.js (8 tests, mock string repo). Full backend suite green (1218 tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZ7sHZ9pTnJMt6h9Cus5mn
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.
No description provided.