Legacy Logic Audit
This matrix tracks whether the important Python/Haskell behavior was carried into the new codebase.
Serial Protocol
- Python
parse_linefromlegacy/arduino-audio-controller/audio_controller.py: implemented inpackages/shared/src/protocol.ts - Former Haskell
sanitizeSerialPayloadandparseSliderDatabehavior from the migration audit: implemented inpackages/shared/src/protocol.ts - Legacy
P1:512compatibility: preserved inparseSliderPacket
Slider Math
- Python
map_value: implemented inpackages/shared/src/mixer.ts - Haskell
calculateVolume: implemented assliderValueToNormalized - Haskell
applyNoiseReduction: implemented inpackages/shared/src/mixer.ts - Haskell first-packet behavior: preserved by treating missing previous values as immediately applicable
Runtime Snapshot And Demo
- Former Haskell
buildRuntimeSnapshot: implemented inpackages/shared/src/runtime.ts - Former Haskell
buildDemoFramebehavior: implemented inpackages/shared/src/runtime.ts - UI-facing knob summary, targets, outcomes, and diagnostics: exposed through the Zustand store in
apps/desktop/src/store/ioruba-store.ts
Persistence And Settings
- Former Haskell
UiSettingspersistence: migrated to whole-profile JSON persistence throughload_persisted_stateandsave_persisted_state - Old split model of YAML config plus UI state: replaced by one JSON payload managed by the desktop app
Audio Targets
- Former Haskell
MasterTarget: implemented in Rust viapactl set-sink-volume @DEFAULT_SINK@ - Former Haskell
ApplicationTarget: implemented in Rust by resolving sink inputs and setting matching stream volumes - Former Haskell
SourceTarget default_microphone: implemented in Rust with default-source handling and non-monitor fallback - Former Haskell
SinkTarget default_output: implemented in Rust with default-sink handling - Python
set_master_volumeandset_app_volume: preserved in the Rust Linux backend
Auto-Reconnect And Runtime Control
- Former Haskell serial reconnect loop: replaced by Tauri serial plugin auto-reconnect plus heartbeat timeout logic in
use-serial-runtime.ts - Demo mode toggle: implemented in the Zustand store and runtime hook
- Preferred port persistence: implemented in the persisted profile and connection hook
Test Coverage Added
- shared protocol and mixer tests in
packages/shared/tests/protocol.test.ts - desktop store tests in
apps/desktop/src/store/ioruba-store.test.ts - Rust parser tests in
apps/desktop/src-tauri/src/audio/linux.rs
Known Gaps
- The new Linux backend is implemented for real audio control.
- Windows and macOS installers are built by the tagged release workflow, but the platform-specific audio backend is currently an explicit stub. The desktop shell still runs there; real per-target audio control remains Linux-first in this migration.