Skip to content

Claude/instrument recognition v2 xy1mkj - #1891

Merged
glloq merged 5 commits into
mainfrom
claude/instrument-recognition-v2-xy1mkj
Aug 5, 2026
Merged

Claude/instrument recognition v2 xy1mkj#1891
glloq merged 5 commits into
mainfrom
claude/instrument-recognition-v2-xy1mkj

Conversation

@glloq

@glloq glloq commented Aug 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

claude added 5 commits August 5, 2026 22:20
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
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
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
@glloq
glloq merged commit 220dbfc into main Aug 5, 2026
5 checks passed
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.

2 participants