docs: de-DICE refactoring plan for the shared audio layer#77
Open
mhellevang wants to merge 3 commits into
Open
docs: de-DICE refactoring plan for the shared audio layer#77mhellevang wants to merge 3 commits into
mhellevang wants to merge 3 commits into
Conversation
Plan for extracting DICE names/types out of the shared audio layer so device families (DICE, BeBoB, OXFW) stop inheriting DICE plumbing transitively. Covers restart-vocabulary ownership, mechanical renames of shared machinery, neutral profile contract/fallback, recovery dispatch via IAudioBackend, and a CI family-boundary check with an explicit composition-root allowlist.
FW-73b (codex/fw-73-neutral-duplex-rename) already neutralizes the restart/session vocabulary, and refactor/BeBoB implements the BeBoB plan — neither is in main yet. Drop the completed work from the plan, make landing those branches Phase 0, and rebase the remaining leak inventory and phases on that baseline.
Owner
|
some nice catches here on unfinished work. |
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.
What
A written plan (
DEDICE_REFACTOR.md) for the boundary-leakage problem: DICE leaking into OXFW/BeBoB paths through the shared audio layer. No code changes — plan only, so we can agree on the approach before renames land.Baseline update
The first version was written against
main; it turns out a good chunk of the cleanup already exists on branches that haven't landed (no open PRs againstmain, so not visible from a plain pull). Rebased the plan on that work:codex/fw-73-neutral-duplex-rename(incl. PR FW-73b Neutral rename of the restart/session vocabulary #67 / FW-73b) already neutralizes the restart/session vocabulary (DuplexRestartReason& co. inDuplex/DuplexRestartSession.hpp, alias veneer gone,AVCAudioBackendclean). Note: FW-73b Neutral rename of the restart/session vocabulary #67 merged into the fw-73 branch, notmain— the branch itself hasn't landed.refactor/BeBoBimplements theBeBoB_REFACTOR.mdplan.mainas of 2026-07-11, so landing both means resolving mechanical conflicts inAudioDuplexCoordinator/AVCAudioBackend.Phase 0 of the plan is now: land those two branches. Everything else is scoped to what remains after that.
What remains (the actual plan)
notification/status/extStatus) on the neutral result structs become a protocol-opaque diag struct;DiceRecoveryPolicy→StreamRecoveryPolicy(RecoveryPolicyReason/RecoveryDisposition).DiceTxStreamEngine→AmdtpTxStreamEngine, neutral namespace (it's a generic AMDTP engine in all but name).BackendRecoveryEvent+IAudioBackend::HandleRecoveryEvent; the DICE branches inAudioCoordinatormove intoDiceAudioBackend. Scoped to recovery only, not full lifecycle.IDiceDeviceProfile(Apogee/BeBoB profiles stop inheriting it);DefaultAmdtpProfilefallback with byte-identical geometry toGenericDiceProfile.DiceAudioBackendmoves into the DICE family; CI boundary check with an explicit composition-root allowlist (factory/coordinator/registry may know all families; shared machinery may not).Three recovery types fall out:
DuplexRestartReason(session cause — done on fw-73b),RecoveryPolicyReason(policy explanation),BackendRecoveryEvent(external events).Zero wire-observable change intended; only the recovery-dispatch phase carries real regression risk and gets the HW smoke test.
Happy to adjust phases/naming — that's what this PR is for.