Fast-follow to #3759 (DAX RX audio routing cache). Two items the review flagged, neither blocking the merged fix.
1. Clear the routing cache on the disconnect-teardown path
#3759 added m_channelTrx (the channel→TRX routing cache) and clears it in rearmDaxForProfileLoad() and releaseDaxForTci() — but not in the third teardown path: the connectionStateChanged(false) disconnect handler (TciServer.cpp ~lines 219–227), which already clears the three sibling maps (m_tciDaxStreamIds, m_tciDaxBorrowedChannels, m_tciDaxSlices).
By the PR's own invariant — "routing cache stale once the channel→stream map is torn down" — this path should clear it too. On a disconnect→reconnect where the slice topology differs, the cached channel→trx (a slice index) can be stale and consulted for the transient window before the first dax!=0 re-resolves. Low impact (self-heals; channels bounded 1–4), but it's an inconsistency: 2 of the 3 identical teardown sites were handled.
Fix: add m_channelTrx.clear(); alongside the sibling clears in the disconnect handler. One line.
2. No test covers onDaxAudioReady routing
There's no unit test for the DAX channel→TRX routing in onDaxAudioReady (noted in the PR). A focused test for the multi-receiver fallback (scan-miss → cached trx vs cold-start channel-1) would lock in the #3669 behavior and catch regressions. Larger than item 1; can be its own change.
Scope: src/core/TciServer.cpp. Refs #3759, #3669.
🤖 Generated with Claude Code
Fast-follow to #3759 (DAX RX audio routing cache). Two items the review flagged, neither blocking the merged fix.
1. Clear the routing cache on the disconnect-teardown path
#3759 added
m_channelTrx(the channel→TRX routing cache) and clears it inrearmDaxForProfileLoad()andreleaseDaxForTci()— but not in the third teardown path: theconnectionStateChanged(false)disconnect handler (TciServer.cpp~lines 219–227), which already clears the three sibling maps (m_tciDaxStreamIds,m_tciDaxBorrowedChannels,m_tciDaxSlices).By the PR's own invariant — "routing cache stale once the channel→stream map is torn down" — this path should clear it too. On a disconnect→reconnect where the slice topology differs, the cached
channel→trx(a slice index) can be stale and consulted for the transient window before the firstdax!=0re-resolves. Low impact (self-heals; channels bounded 1–4), but it's an inconsistency: 2 of the 3 identical teardown sites were handled.Fix: add
m_channelTrx.clear();alongside the sibling clears in the disconnect handler. One line.2. No test covers
onDaxAudioReadyroutingThere's no unit test for the DAX channel→TRX routing in
onDaxAudioReady(noted in the PR). A focused test for the multi-receiver fallback (scan-miss → cached trx vs cold-startchannel-1) would lock in the #3669 behavior and catch regressions. Larger than item 1; can be its own change.Scope:
src/core/TciServer.cpp. Refs #3759, #3669.🤖 Generated with Claude Code