Playback Pipeline Audit
Audit playback changes with evidence from UI, state, data adapters, and lifecycle paths.
When To Use
Use when a task changes or reviews:
- Media3/ExoPlayer setup or adapters
- Playback controls, overlays, or TV remote behavior
- Casting, resume, retry, stream selection, or persistence
- Lifecycle handling around playback resources
Required Context
Read first:
AGENTS.md
- Relevant
app/AGENTS.md, business/AGENTS.md, and data/AGENTS.md
docs/ai/playbooks/playback-pipeline.md
- Nearby playback UI, state holders, adapters, repositories, and tests
Audit Checks
Verify with file evidence:
- UI state, playback engine state, and persistence concerns remain separated.
- Playback resources are created, observed, and released with lifecycle awareness.
- Side effects are not launched directly from composition without effect control.
- Playback overlays remain readable and do not block primary controls.
- TV remote and focus paths are preserved for TV playback surfaces.
- Resume, autoplay, retry, casting, and stream-selection changes are documented.
Process
- Map playback entry points, state holders, adapters, and UI surfaces.
- Trace one start, one stop/release, and one error/retry path.
- Inspect Compose effects and lifecycle observers involved in playback.
- Check phone and TV surfaces separately when both are affected.
- Cite file paths and line numbers for each finding.
Validation
Recommend:
./gradlew :app:smartphone:compileDebugKotlin
For TV playback changes also recommend:
./gradlew :app:tv:compileDebugKotlin
If manual playback checks cannot be run, state the remaining behavior risk.
Output
Return a concise Markdown report with:
- Scope and behavior paths reviewed
- Pass/fail table for each audit check
- Evidence-backed findings with file paths
- Behavior and lifecycle risks for PR notes
- Validation run or not run, with reason
1---2name: playback-pipeline-audit3description: Audit M3UAndroid playback flows for UI/engine/persistence boundaries, lifecycle cleanup, Media3 integration, casting, overlays, resume/autoplay behavior, and TV control risks.4---56# Playback Pipeline Audit78Audit playback changes with evidence from UI, state, data adapters, and lifecycle paths.910## When To Use1112Use when a task changes or reviews:1314- Media3/ExoPlayer setup or adapters15- Playback controls, overlays, or TV remote behavior16- Casting, resume, retry, stream selection, or persistence17- Lifecycle handling around playback resources1819## Required Context2021Read first:2223- `AGENTS.md`24- Relevant `app/AGENTS.md`, `business/AGENTS.md`, and `data/AGENTS.md`25- `docs/ai/playbooks/playback-pipeline.md`26- Nearby playback UI, state holders, adapters, repositories, and tests2728## Audit Checks2930Verify with file evidence:3132- UI state, playback engine state, and persistence concerns remain separated.33- Playback resources are created, observed, and released with lifecycle awareness.34- Side effects are not launched directly from composition without effect control.35- Playback overlays remain readable and do not block primary controls.36- TV remote and focus paths are preserved for TV playback surfaces.37- Resume, autoplay, retry, casting, and stream-selection changes are documented.3839## Process40411. Map playback entry points, state holders, adapters, and UI surfaces.422. Trace one start, one stop/release, and one error/retry path.433. Inspect Compose effects and lifecycle observers involved in playback.444. Check phone and TV surfaces separately when both are affected.455. Cite file paths and line numbers for each finding.4647## Validation4849Recommend:5051```bash52./gradlew :app:smartphone:compileDebugKotlin53```5455For TV playback changes also recommend:5657```bash58./gradlew :app:tv:compileDebugKotlin59```6061If manual playback checks cannot be run, state the remaining behavior risk.6263## Output6465Return a concise Markdown report with:6667- Scope and behavior paths reviewed68- Pass/fail table for each audit check69- Evidence-backed findings with file paths70- Behavior and lifecycle risks for PR notes71- Validation run or not run, with reason