You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DJ can fix a PROVISIONAL value for their unit without a new build, and typos are caught before they play.
Acceptance criteria
Import goes through the open panel, and the file is copied into the app container. Export writes the current merged mapping. Reset returns to the default. This needs the user-selected read-write entitlement.
The check runs on the merged mapping. It finds unknown keys, wrong types, out-of-range numbers (notes and CCs 0–127, channels 1–16, decks 1–4) and duplicate assignments. Every error is listed at once, with the key and what was expected.
A rejected import leaves the working mapping unchanged. An accepted import calls release-all, then resync.
Written test-first with /tdd, at the agreed seams (the Coordinator with fakes, and OSC packet bytes). The check is tested as a mapping document going in and readable errors coming out.
From the #31 review (#32, item 4): Mapping.Notes.init(from:) turns every notes key except pads into a button, so a typo like "paly": 11 in an override is accepted and does nothing. The mapping check here should reject unknown notes keys (and unknown keys in every section). #32 adds MappingError.invalid([String]) and Mapping.problems (MIDI channel 1-16 only for now). Extend that list rather than adding a second error path.
From #43: mapping import now imports a controller profile, not a bare mapping. A profile file is { "id", "name", "device_hints": [...], "mapping": { ...today's mapping body... } }, decoded by ControllerProfile(decoding:), which already runs Mapping.problems on the body. The bundled one is Resources/Profiles/denon-lc6000-prime.json. The override merge (Mapping.bundledDefault(overriddenBy:)) still applies to the mapping body. Whether an imported file may change id/device_hints, or only override the body of an existing profile, is a decision for this ticket.
Post-merge review of PR #74 (agent1). Most of it matches the plan: unknown keys with paths, kinds, ranges, namespaced duplicates, document order, release-all followed by one Resend, deck, channel and LEDs kept, the container copy plus the entitlement, and the export round-trip. Real problems are filed as #92 (files that crash the app), #93 (values that silently do nothing) and #94 (schema per profile, and missing tests). Smaller notes:
Double-reported values: an out-of-range value is also reported as a duplicate (notes.play: 200, notes.cue: 200 gives 3 problems). known() should drop out-of-range values, as it drops wrong-kind ones.
Duplicate JSON keys aren't refused. Two "mapping" keys are both checked, but only the first is applied. Report "duplicate key".
The number grammar is lax:+5 and 0005 are accepted.
null on an optional key gives "expected true or false, got null". Treating null as absent would be friendlier.
Problem sorting splits on the first :, so a key like "a:b" sorts in the wrong place.
Two merge implementations:Mapping.bundledDefault(overriddenBy:) still uses a JSONSerialization merge next to OrderedJSON's. Consolidate them.
MappingStore.remove() swallows errors. If the delete fails, the window says "Bundled default", but the import comes back at the next launch.
importMapping reads the chosen file on the main thread with no size cap. Cap it, for example at 1 MB.
Activity
Skeyelab commentedon Nov 16, 2026
From the #31 review (#32, item 4):
Mapping.Notes.init(from:)turns everynoteskey exceptpadsinto a button, so a typo like"paly": 11in an override is accepted and does nothing. The mapping check here should reject unknownnoteskeys (and unknown keys in every section). #32 addsMappingError.invalid([String])andMapping.problems(MIDI channel 1-16 only for now). Extend that list rather than adding a second error path.Skeyelab commentedon Nov 16, 2026
From #43: mapping import now imports a controller profile, not a bare mapping. A profile file is
{ "id", "name", "device_hints": [...], "mapping": { ...today's mapping body... } }, decoded byControllerProfile(decoding:), which already runsMapping.problemson the body. The bundled one isResources/Profiles/denon-lc6000-prime.json. The override merge (Mapping.bundledDefault(overriddenBy:)) still applies to themappingbody. Whether an imported file may changeid/device_hints, or only override the body of an existing profile, is a decision for this ticket.Merge pull request #74 from ericdahl-dev/mapping-io-24
Skeyelab commentedon Nov 16, 2026
Post-merge review of PR #74 (agent1). Most of it matches the plan: unknown keys with paths, kinds, ranges, namespaced duplicates, document order, release-all followed by one Resend, deck, channel and LEDs kept, the container copy plus the entitlement, and the export round-trip. Real problems are filed as #92 (files that crash the app), #93 (values that silently do nothing) and #94 (schema per profile, and missing tests). Smaller notes:
notes.play: 200, notes.cue: 200gives 3 problems).known()should drop out-of-range values, as it drops wrong-kind ones."mapping"keys are both checked, but only the first is applied. Report "duplicate key".+5and0005are accepted.nullon an optional key gives "expected true or false, got null". Treating null as absent would be friendlier.:, so a key like"a:b"sorts in the wrong place.Mapping.bundledDefault(overriddenBy:)still uses aJSONSerializationmerge next toOrderedJSON's. Consolidate them.MappingStore.remove()swallows errors. If the delete fails, the window says "Bundled default", but the import comes back at the next launch.importMappingreads the chosen file on the main thread with no size cap. Cap it, for example at 1 MB.