Skip to content

Consolidate SyncPullStrategy implementation #28

@danieljsinclair

Description

@danieljsinclair

Issue Type

Implementation - Architecture Refactoring

Severity

High - Critical path for Option B implementation

Problem Statement

SyncPullAudioMode and SyncPullRenderer are separate coupled classes. Need to consolidate into single SyncPullStrategy that combines lifecycle + rendering.

Current State

  • SyncPullAudioMode (11 methods) - mode lifecycle
  • SyncPullRenderer (4 methods) - on-demand rendering
  • Tight coupling: SyncPullAudioMode creates SyncPullRenderer in createContext()
  • Cannot use SyncPullRenderer independently
  • SRP violation: Responsibility split across two classes

Target State

Single SyncPullStrategy class implementing IAudioStrategy:

  • Combines all SyncPullAudioMode + SyncPullRenderer functionality
  • Implements IAudioStrategy interface completely
  • Self-contained (no external renderer creation)
  • Maintains on-demand rendering behavior
  • Preserves all existing functionality

Implementation Tasks

  1. Create SyncPullStrategy.h implementing IAudioStrategy
  2. Merge SyncPullAudioMode + SyncPullRenderer into SyncPullStrategy
  3. Remove SyncPullAudioMode + SyncPullRenderer files
  4. Update AudioPlayer to use SyncPullStrategy
  5. Ensure all existing tests pass

Acceptance Criteria

  • SyncPullStrategy.h/.cpp created implementing IAudioStrategy
  • All SyncPullAudioMode functionality migrated to SyncPullStrategy
  • All SyncPullRenderer functionality migrated to SyncPullStrategy
  • Old SyncPullAudioMode + SyncPullRenderer files removed
  • AudioPlayer updated to use SyncPullStrategy
  • All existing SyncPullRenderer tests pass
  • No functionality lost (behavior preserved)

Testing Requirements

  • SyncPullRenderer unit tests pass (5 tests)
  • Integration tests pass
  • Baseline regression tests pass (output identical)
  • No test failures introduced

Related Issues

References

  • ARCHITECTURE_FILE_CLASS_AUDIT.md - Coupling violations
  • AUDIO_MODULE_ARCHITECTURE.md - Phase 6 consolidation plan
  • test/unit/SyncPullRendererTest.cpp - Existing test coverage

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions