Skip to content

StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.

Add comprehensive pre-publish audit documentation

Davidonaf025bf9701fa
diff --git a/docs/audit/01_CRITICAL_BLOCKERS.md b/docs/audit/01_CRITICAL_BLOCKERS.md
new file mode 100644
index 00000000..3af5c007
--- /dev/null
+++ b/docs/audit/01_CRITICAL_BLOCKERS.md
@@ -0,0 +1,399 @@
+# 01 — Critical Blockers
+
+All ship-blocking issues that will cause crashes, data loss, or security vulnerabilities in production.
+
+---
+
+## 1. Missing `proguard-rules.pro` — Release Builds Will Fail
+
+**Module:** Build Configuration
+**File:** `app/build.gradle.kts`
+**Severity:** 🔴 SHIP BLOCKER
+
+The release build type enables minification and resource shrinking but references a ProGuard rules file that does not exist:
+
+```kotlin
+buildTypes {
+ release {
+ isMinifyEnabled = true
+ isShrinkResources = true
+ proguardFiles(
+ getDefaultProguardFile("proguard-android-optimize.txt"),
+ "proguard-rules.pro" // ← FILE DOES NOT EXIST
+ )
+ }
+}
+```
+
+**Impact:** R8 will strip critical classes (Hilt components, Retrofit interfaces, Room entities, GSON models) causing runtime crashes in release builds.
+
+**Fix:** Create `app/proguard-rules.pro` with keep rules for:
+- Hilt-generated components
+- Retrofit service interfaces and GSON-serialized models
+- Room database entities and DAOs
+- Media3/ExoPlayer decoder internals
+- Domain model data classes used in serialization
+
+---
+
+## 2. Decoder Mode Logic Is Reversed
+
+**Module:** Player
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt` (lines 81–86)
+**Severity:** 🔴 SHIP BLOCKER
+
+```kotlin
+when (currentDecoderMode) {
+ DecoderMode.AUTO -> DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER
+ DecoderMode.HARDWARE -> DefaultRenderersFactory.EXTENSION_RENDERER_MODE_OFF // ← WRONG
+ DecoderMode.SOFTWARE -> DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER // ← WRONG
+}
+```
+
+- Selecting **HARDWARE** actually *disables* extension renderers (software path used)
+- Selecting **SOFTWARE** *enables* extension renderers (hardware path used)
+- The user-facing setting does the opposite of what it claims
+
+**Fix:**
+```kotlin
+DecoderMode.HARDWARE -> DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER
+DecoderMode.SOFTWARE -> DefaultRenderersFactory.EXTENSION_RENDERER_MODE_OFF
+```
+
+---
+
+## 3. No MediaSession Integration — TV Remote Won't Work
+
+**Module:** Player
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt`
+**Severity:** 🔴 SHIP BLOCKER
+
+The `media3-session` library is declared as a dependency but never used. No `MediaSession` is created. This means:
+
+- Android TV remote control buttons (play/pause/stop) won't control playback
+- Fire TV Stick voice commands won't work
+- System media notifications are absent
+- Violates Android TV app quality guidelines
+
+**Fix:** Create a `MediaSession` in the player engine and expose it for the UI to bind:
+```kotlin
+private var mediaSession: MediaSession? = null
+
+// In player initialization:
+mediaSession = MediaSession.Builder(context, exoPlayer).build()
+
+// In release():
+mediaSession?.release()
+```
+
+---
+
+## 4. `pixelWidthHeightRatio` Stored as Frame Rate
+
+**Module:** Player
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt` (line 180)
+**Severity:** 🔴 CRITICAL
+
+```kotlin
+override fun onVideoSizeChanged(videoSize: VideoSize) {
+ _videoFormat.value = VideoFormat(
+ width = videoSize.width,
+ height = videoSize.height,
+ frameRate = videoSize.pixelWidthHeightRatio // ← THIS IS ASPECT RATIO, NOT FPS
+ )
+}
+```
+
+`pixelWidthHeightRatio` is typically 1.0 (square pixels) and has nothing to do with frame rate. The diagnostics/stats overlay will show completely wrong frame rate data.
+
+**Fix:** Capture frame rate from `onVideoInputFormatChanged` callback instead:
+```kotlin
+override fun onVideoInputFormatChanged(eventTime: EventTime, format: Format, ...) {
+ lastFrameRate = format.frameRate
+}
+```
+
+---
+
+## 5. EPG Staging Uses Negative Provider IDs — Data Corruption Risk
+
+**Module:** Data
+**File:** `data/src/main/java/com/streamvault/data/repository/EpgRepositoryImpl.kt` (lines 48–49)
+**Severity:** 🔴 CRITICAL
+
+```kotlin
+val stagingProviderId = -providerId
+programDao.deleteByProvider(stagingProviderId)
+// ... insert programs with staging ID ...
+programDao.moveToProvider(stagingProviderId, providerId)
+```
+
+Using negative provider IDs as a staging mechanism creates a race condition: if sync is interrupted between insert and move, orphaned programs with negative IDs remain permanently. Concurrent syncs for different providers could also collide.
+
+**Fix:** Add a `sync_status` column (`STAGING` / `ACTIVE`) to the programs table instead of manipulating provider IDs.
+
+---
+
+## 6. M3U Category ID Collision Across Providers
+
+**Module:** Data
+**File:** `data/src/main/java/com/streamvault/data/sync/SyncManager.kt` (lines 419–430)
+**Severity:** 🔴 CRITICAL
+
+```kotlin
+class CategoryAccumulator(providerId: Long, type: String, startId: Long) {
+ private val categoryIds = LinkedHashMap<String, Long>()
+ fun idFor(name: String): Long {
+ return categoryIds.getOrPut(name) { startId + categoryIds.size }
+ }
+}
+```
+
+Category IDs are allocated sequentially (1–9999 for LIVE, 10000+ for MOVIE) without provider scoping. If two providers have categories, IDs will collide, causing channels from Provider A to appear under Provider B's categories.
+
+**Fix:** Scope IDs per provider: `providerId * 1_000_000 + index` or use truly unique auto-generated IDs.
+
+---
+
+## 7. Database Migration 8→9 ID Remapping Can Corrupt References
+
+**Module:** Data
+**File:** `data/src/main/java/com/streamvault/data/local/StreamVaultDatabase.kt` (lines 180–290)
+**Severity:** 🔴 CRITICAL
+
+The migration rebuilds tables and attempts to remap IDs via JOIN:
+
+```sql
+INSERT INTO channel_id_map(old_id, new_id)
+SELECT old.id, new.id FROM channels old
+JOIN channels_new new
+ ON new.provider_id = old.provider_id
+ AND new.stream_id = old.stream_id
+```
+
+If duplicate `(provider_id, stream_id)` pairs exist in source data (which M3U imports don't prevent), the JOIN produces multiple matches. Favorites, history, and other references will point to wrong channels.
+
+**Fix:** Add `DISTINCT` or `LIMIT 1` per old_id, and validate uniqueness constraints before the JOIN.
+
+---
+
+## 8. ViewModels Never Cancel Background Jobs — Memory Leaks
+
+**Module:** App
+**Files:** Multiple ViewModels
+**Severity:** 🔴 CRITICAL
+
+`PlayerViewModel`, `HomeViewModel`, and `MultiViewViewModel` all create long-running `Job` references that are never cancelled in `onCleared()`:
+
+**PlayerViewModel:**
+```kotlin
+private var channelInfoHideJob: Job? = null
+private var liveOverlayHideJob: Job? = null
+private var diagnosticsHideJob: Job? = null
+private var numericInputCommitJob: Job? = null
+private var epgJob: Job? = null
+private var playlistJob: Job? = null
+// None cancelled in onCleared()
+```
+
+**HomeViewModel:**
+```kotlin
+private var epgJob: Job? = null
+private var loadChannelsJob: Job? = null
+private var categoriesJob: Job? = null
+private var recentChannelsJob: Job? = null
+private var previewPlaybackJob: Job? = null
+// None cancelled in onCleared()
+```
+
+**MultiViewViewModel:**
+```kotlin
+private var borderHideJob: Job? = null
+private var telemetryJob: Job? = null
+private val playerEngines = mutableMapOf<Int, PlayerEngine>()
+// PlayerEngine instances may not release on back press
+```
+
+**Impact:** When the user navigates away, Jobs keep running, player engines keep buffering, and memory is never reclaimed. On low-RAM TV devices this will cause ANR or OOM.
+
+**Fix:** Cancel all Jobs and release all resources in `onCleared()`:
+```kotlin
+override fun onCleared() {
+ listOf(epgJob, playlistJob, channelInfoHideJob, ...).forEach { it?.cancel() }
+ playerEngine.release()
+}
+```
+
+---
+
+## 9. Credentials Can Leak Into Crash Logs
+
+**Module:** Data
+**File:** `data/src/main/java/com/streamvault/data/sync/SyncManager.kt` (lines 738–753)
+**Severity:** 🔴 CRITICAL
+
+While `redactUrlForLogs()` exists, it is not consistently applied. Exception messages from OkHttp/Retrofit often embed the full URL including credentials:
+
+```kotlin
+Log.e(TAG, "Sync failed for provider $providerId: ${e.message}", e)
+// e.message → "Failed to reach http://user:pass@server:8080/get.php?..."
+```
+
+**Impact:** Credentials exposed in logcat, crash reporters (Firebase Crashlytics, etc.), and analytics.
+
+**Fix:** Always sanitize before logging:
+```kotlin
+val safeMessage = redactUrlForLogs(e.message ?: "unknown error")
+Log.e(TAG, "Sync failed for provider $providerId: $safeMessage")
+```
+
+---
+
+## 10. No Signing Configuration for Release
+
+**Module:** Build
+**File:** `app/build.gradle.kts`
+**Severity:** 🔴 SHIP BLOCKER
+
+No `signingConfigs` block exists. Cannot generate a signed APK/AAB for Google Play without manual configuration.
+
+**Fix:** Add a signing configuration that reads from environment variables or a local keystore properties file (not committed to VCS):
+```kotlin
+signingConfigs {
+ create("release") {
+ storeFile = file(keystoreProperties["storeFile"] as String)
+ storePassword = keystoreProperties["storePassword"] as String
+ keyAlias = keystoreProperties["keyAlias"] as String
+ keyPassword = keystoreProperties["keyPassword"] as String
+ }
+}
+```
+
+---
+
+## 11. ParentalControlManager Has Race Condition and No Persistence
+
+**Module:** Domain
+**File:** `domain/src/main/java/com/streamvault/domain/manager/ParentalControlManager.kt` (lines 21–28)
+**Severity:** 🔴 CRITICAL
+
+```kotlin
+fun unlockCategory(providerId: Long, categoryId: Long) {
+ val current = _unlockedCategoriesByProvider.value.toMutableMap() // ← Non-atomic read
+ val providerSet = (current[providerId] ?: emptySet()).toMutableSet()
+ providerSet.add(categoryId)
+ current[providerId] = providerSet
+ _unlockedCategoriesByProvider.value = current // ← Race window
+}
+```
+
+**Issue 1:** Between `.value` read and `.value = current`, another coroutine can modify state → lost updates.
+**Issue 2:** All unlock state is held only in memory. App restart resets all parental control unlocks — parental controls are essentially useless.
+**Issue 3:** No PIN/password is required to unlock a category.
+
+---
+
+## 12. No Foreign Key Constraints in Room Database
+
+**Module:** Data
+**File:** `data/src/main/java/com/streamvault/data/local/entity/Entities.kt`
+**Severity:** 🔴 CRITICAL
+
+Room entities have no `@ForeignKey` annotations. Deleting a provider leaves behind orphaned channels, movies, series, favorites, EPG data, and playback history. Over time, the database accumulates ghost records consuming storage and degrading query performance.
+
+**Fix:** Add cascading foreign keys:
+```kotlin
+@Entity(
+ foreignKeys = [ForeignKey(
+ entity = ProviderEntity::class,
+ parentColumns = ["id"],
+ childColumns = ["provider_id"],
+ onDelete = ForeignKey.CASCADE
+ )]
+)
+```
+
+---
+
+## 13. XML Date Parsing Returns Epoch 0 Silently
+
+**Module:** Data
+**File:** `data/src/main/java/com/streamvault/data/parser/XmltvParser.kt` (lines 184–200)
+**Severity:** 🔴 CRITICAL
+
+```kotlin
+try {
+ val cleaned = dateStr.replace("""[^\d]""".toRegex(), "")
+ if (cleaned.length >= 14) {
+ val basicFormat = SimpleDateFormat("yyyyMMddHHmmss", Locale.US)
+ return basicFormat.parse(cleaned.substring(0, 14))?.time ?: 0
+ }
+} catch (_: Exception) { }
+return 0 // ← Programs marked as starting at Jan 1, 1970
+```
+
+Any XMLTV program with an unparseable date gets `startTime = 0`, placing it in the distant past. These programs are silently lost from the EPG display. No warning is logged.
+
+---
+
+## 14. M3U Input Not Length-Bounded (DoS Vector)
+
+**Module:** Data
+**File:** `data/src/main/java/com/streamvault/data/parser/M3uParser.kt` (lines 299–330)
+**Severity:** 🔴 CRITICAL
+
+Channel names, group titles, and other strings from M3U files have no maximum length validation. A malicious or malformed M3U with megabyte-length strings will:
+1. Be stored in Room → database bloat
+2. Rendered in UI → ANR during text layout
+3. Occupy heap → OOM on low-RAM TV devices
+
+**Fix:** Truncate all parsed strings: `name = extinf.name.take(500)`, `groupTitle = group.take(200)`.
+
+---
+
+## 15. `file://` URI Exposure
+
+**Module:** App
+**File:** `app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupScreen.kt` (line 91)
+**Severity:** 🔴 CRITICAL
+
+```kotlin
+m3uUrl = "file://${outFile.absolutePath}"
+```
+
+Direct `file://` URIs are forbidden on Android 7+ (API 24) for cross-process sharing and violate security best practices. On API 29+, scoped storage further restricts raw file access.
+
+**Fix:** Use `FileProvider` to serve local M3U files with `content://` URIs.
+
+---
+
+## 16. No Error Recovery Strategy in Player
+
+**Module:** Player
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt` (lines 172–173)
+**Severity:** 🔴 CRITICAL
+
+```kotlin
+override fun onPlayerError(error: PlaybackException) {
+ _error.tryEmit(PlayerError.fromException(error))
+ _playbackState.value = PlaybackState.ERROR
+}
+```
+
+When a stream fails, the player transitions to `ERROR` state and stays there permanently. IPTV streams frequently experience transient network issues — the player should auto-retry with exponential backoff. Currently the only recovery path is manual user intervention (selecting a different channel and coming back).
+
+**Fix:** Implement retry logic:
+```kotlin
+private var retryCount = 0
+private val maxRetries = 3
+
+override fun onPlayerError(error: PlaybackException) {
+ if (retryCount < maxRetries && error.isRecoverable()) {
+ retryCount++
+ handler.postDelayed({ prepare(lastStreamInfo) }, retryCount * 2000L)
+ } else {
+ _error.tryEmit(PlayerError.fromException(error))
+ _playbackState.value = PlaybackState.ERROR
+ }
+}
+```
diff --git a/docs/audit/02_PLAYER_ENGINE.md b/docs/audit/02_PLAYER_ENGINE.md
new file mode 100644
index 00000000..96462032
--- /dev/null
+++ b/docs/audit/02_PLAYER_ENGINE.md
@@ -0,0 +1,256 @@
+# 02 — Player Engine Issues
+
+All issues related to media playback, decoding, buffering, and streaming.
+
+---
+
+## 1. Decoder Mode Logic Is Reversed
+
+> See [01_CRITICAL_BLOCKERS.md #2](01_CRITICAL_BLOCKERS.md#2-decoder-mode-logic-is-reversed)
+
+---
+
+## 2. Buffer Configuration Too Low for IPTV
+
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt` (lines 90–97)
+**Severity:** 🟠 HIGH
+
+```kotlin
+val loadControl = DefaultLoadControl.Builder()
+ .setBufferDurationsMs(
+ 15000, // min buffer — 15s
+ 30000, // max buffer — 30s
+ 2500, // playback start threshold
+ 5000 // rebuffer threshold
+ )
+ .build()
+```
+
+- 15-second minimum buffer is inadequate for live IPTV streams over variable-quality networks
+- 30-second max buffer doesn't provide enough runway for network jitter
+- Users will experience frequent rebuffering
+
+**Recommendation:** Make buffer sizes configurable per use case:
+- **Single-stream playback:** 30s min / 60s max / 5s start / 10s rebuffer
+- **Multi-view (4 streams):** Keep current 15s/30s to manage memory
+- Expose as a user-facing setting (Low/Medium/High buffer)
+
+---
+
+## 3. No MediaSession Integration
+
+> See [01_CRITICAL_BLOCKERS.md #3](01_CRITICAL_BLOCKERS.md#3-no-mediasession-integration--tv-remote-wont-work)
+
+---
+
+## 4. No Network Error Recovery
+
+> See [01_CRITICAL_BLOCKERS.md #16](01_CRITICAL_BLOCKERS.md#16-no-error-recovery-strategy-in-player)
+
+---
+
+## 5. Video Format Frame Rate Is Wrong
+
+> See [01_CRITICAL_BLOCKERS.md #4](01_CRITICAL_BLOCKERS.md#4-pixelwidthheightratio-stored-as-frame-rate)
+
+---
+
+## 6. Error Classification Is Fragile (String Matching)
+
+**File:** `player/src/main/java/com/streamvault/player/PlayerEngine.kt` (lines 44–56)
+**Severity:** 🟠 HIGH
+
+```kotlin
+fun fromException(e: Throwable): PlayerError {
+ val msg = e.message ?: "Unknown playback error"
+ return when {
+ msg.contains("Unable to connect", ignoreCase = true) -> NetworkError(msg)
+ msg.contains("timeout", ignoreCase = true) -> NetworkError(msg)
+ msg.contains("Response code: 4", ignoreCase = true) -> SourceError(msg)
+ msg.contains("Response code: 5", ignoreCase = true) -> NetworkError(msg)
+ msg.contains("decoder", ignoreCase = true) -> DecoderError(msg)
+ msg.contains("codec", ignoreCase = true) -> DecoderError(msg)
+ else -> UnknownError(msg)
+ }
+}
+```
+
+String-matching error messages is fragile — messages change across Media3 versions. This also misclassifies:
+- 401/403 as generic `SourceError` (should be `AuthError`)
+- DRM failures as `UnknownError`
+- Manifest parse errors as `UnknownError`
+
+**Fix:** Use `PlaybackException.errorCode` for reliable classification:
+```kotlin
+fun fromException(e: Throwable): PlayerError = when (e) {
+ is PlaybackException -> when (e.errorCode) {
+ ERROR_CODE_IO_NETWORK_CONNECTION_FAILED,
+ ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT -> NetworkError(e.message ?: "Network error")
+ ERROR_CODE_DECODER_INIT_FAILED,
+ ERROR_CODE_DECODER_QUERY_FAILED -> DecoderError(e.message ?: "Decoder error")
+ ERROR_CODE_IO_BAD_HTTP_STATUS -> SourceError(e.message ?: "Source error")
+ else -> UnknownError(e.message ?: "Unknown error")
+ }
+ else -> UnknownError(e.message ?: "Unknown error")
+}
+```
+
+---
+
+## 7. No Explicit Network Timeout on Data Source
+
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt` (lines 218–237)
+**Severity:** 🟠 HIGH
+
+The `OkHttpDataSource.Factory` relies on the injected OkHttpClient's timeouts. If that client has generous defaults (e.g., 30s connect, 60s read), live streams stuck in buffering won't timeout for a very long time. Users will see an infinite spinner.
+
+**Fix:** Set explicit timeouts appropriate for live streaming:
+```kotlin
+OkHttpDataSource.Factory(okHttpClient)
+ .setDefaultRequestProperties(headers)
+ .setConnectTimeoutMs(10_000)
+ .setReadTimeoutMs(15_000)
+```
+
+---
+
+## 8. No Background/Foreground Lifecycle Handling
+
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt`
+**Severity:** 🟠 HIGH
+
+The player has no awareness of app lifecycle transitions. When the user presses the Home button on the TV remote:
+- Player continues buffering and decoding in the background
+- Battery/power drain on TV devices
+- Network bandwidth consumed unnecessarily
+- No pause-on-background for provider connection limits
+
+**Fix:** Make the player lifecycle-aware or ensure the hosting ViewModel/Activity pauses playback on `ON_STOP`.
+
+---
+
+## 9. Track Selection Has Redundant API Calls
+
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt` (lines 347–413)
+**Severity:** 🟡 MEDIUM
+
+Both `selectAudioTrack()` and `selectSubtitleTrack()` first disable-then-enable track types in separate `trackSelectionParameters` assignments, causing two parameter updates when one would suffice.
+
+```kotlin
+// Step 1: Enable type (unnecessary extra update)
+player.trackSelectionParameters = player.trackSelectionParameters
+ .buildUpon()
+ .setTrackTypeDisabled(C.TRACK_TYPE_AUDIO, false)
+ .build()
+
+// Step 2: Then set override
+player.trackSelectionParameters = player.trackSelectionParameters
+ .buildUpon()
+ .setOverrideForType(...)
+ .build()
+```
+
+These should be combined into a single parameter update to avoid an intermediate track selection state.
+
+---
+
+## 10. Polling Redundant with Position Discontinuity Listener
+
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt` (lines 427–437)
+**Severity:** 🟡 MEDIUM
+
+A 500ms polling loop updates `_currentPosition` and `_duration`, but `onPositionDiscontinuity()` already updates position. This creates redundant StateFlow emissions.
+
+For multi-view (4 players), this means 4 × 2Hz = 8 position updates per second on the main thread, plus redundant emissions from the discontinuity listener.
+
+**Recommendation:** Either remove polling and rely on the listener (less smooth) or reduce polling to 1Hz and sync with listener events.
+
+---
+
+## 11. No Bitrate / Quality Metrics for Diagnostics
+
+**File:** `player/src/main/java/com/streamvault/player/PlayerEngine.kt` (PlayerStats data class)
+**Severity:** 🟡 MEDIUM
+
+```kotlin
+data class PlayerStats(
+ val videoCodec: String = "Unknown",
+ val audioCodec: String = "Unknown",
+ val videoBitrate: Int = 0,
+ val droppedFrames: Int = 0,
+ val width: Int = 0,
+ val height: Int = 0
+)
+```
+
+Missing for premium diagnostics:
+- Current bandwidth estimate
+- Buffered duration percentage
+- Adaptive bitrate switching events
+- Rebuffering count and cumulative time
+- Audio sample rate and channel count
+- Latency (for live streams)
+
+---
+
+## 12. Stream Type Detection Incomplete
+
+**File:** `player/src/main/java/com/streamvault/player/StreamTypeDetector.kt` (lines 14–32)
+**Severity:** 🟡 MEDIUM
+
+The URL-based detection misses:
+- Smooth Streaming (`.ism` / `.isml`)
+- WebRTC streams
+- RTSP/RTMP (common in IPTV)
+- URLs with query parameters masking the extension (e.g., `http://x.com/stream?token=abc`)
+
+The fallback `StreamType.UNKNOWN` delegates to ExoPlayer's content-type sniffing, which works but adds startup latency for the first chunk download.
+
+---
+
+## 13. Audio Content Type Not Stream-Aware
+
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt` (lines 106–110)
+**Severity:** 🔵 LOW
+
+```kotlin
+.setAudioAttributes(
+ AudioAttributes.Builder()
+ .setUsage(C.USAGE_MEDIA)
+ .setContentType(C.CONTENT_TYPE_MOVIE)
+ .build(),
+ true
+)
+```
+
+`CONTENT_TYPE_MOVIE` is always used regardless of whether the content is live TV, music, or a movie. While functionally fine, the Android audio system can optimize audio routing differently for `CONTENT_TYPE_MUSIC` vs `CONTENT_TYPE_MOVIE`.
+
+---
+
+## 14. No Chromecast / Cast Support
+
+**Severity:** 🟡 MEDIUM (for premium release)
+
+No Google Cast integration exists. Premium IPTV apps typically support casting from a phone/tablet to a Chromecast or TV. While this app targets Android TV directly, the Media3 Cast extension could enable cross-device scenarios.
+
+---
+
+## 15. Decoder Reuse Evaluation Not Logged
+
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt` (lines 117–130)
+**Severity:** 🔵 LOW
+
+The `DecoderReuseEvaluation` parameter in `onVideoInputFormatChanged` is never inspected. On some TV chipsets, decoder reuse failures are the root cause of black screens between channel switches. Logging this would aid debugging.
+
+---
+
+## 16. Coroutine Scope Cleanup Not Guaranteed
+
+**File:** `player/src/main/java/com/streamvault/player/Media3PlayerEngine.kt` (line 46)
+**Severity:** 🔵 LOW
+
+```kotlin
+private val scope = CoroutineScope(Dispatchers.Main + SupervisorJob())
+```
+
+If `release()` is never called (e.g., due to a leak in the hosting ViewModel), the coroutine scope runs indefinitely. Consider using `LifecycleCoroutineScope` or adding a finalizer.
diff --git a/docs/audit/03_DATA_LAYER.md b/docs/audit/03_DATA_LAYER.md
new file mode 100644
index 00000000..c552fbee
--- /dev/null
+++ b/docs/audit/03_DATA_LAYER.md
@@ -0,0 +1,233 @@
+# 03 — Data Layer Issues
+
+Database, parsing, sync, data integrity, and repository implementation issues.
+
+---
+
+## 1. EPG Date Parsing Silently Returns Epoch 0
+
+> See [01_CRITICAL_BLOCKERS.md #13](01_CRITICAL_BLOCKERS.md#13-xml-date-parsing-returns-epoch-0-silently)
+
+---
+
+## 2. M3U Input Not Length-Bounded
+
+> See [01_CRITICAL_BLOCKERS.md #14](01_CRITICAL_BLOCKERS.md#14-m3u-input-not-length-bounded-dos-vector)
+
+---
+
+## 3. EPG Staging Uses Negative Provider IDs
+
+> See [01_CRITICAL_BLOCKERS.md #5](01_CRITICAL_BLOCKERS.md#5-epg-staging-uses-negative-provider-ids--data-corruption-risk)
+
+---
+
+## 4. Category ID Collision Across Providers
+
+> See [01_CRITICAL_BLOCKERS.md #6](01_CRITICAL_BLOCKERS.md#6-m3u-category-id-collision-across-providers)
+
+---
+
+## 5. Database Migration 8→9 Unsafe ID Remapping
+
+> See [01_CRITICAL_BLOCKERS.md #7](01_CRITICAL_BLOCKERS.md#7-database-migration-89-id-remapping-can-corrupt-references)
+
+---
+
+## 6. Credentials Can Leak in Logs
+
+> See [01_CRITICAL_BLOCKERS.md #9](01_CRITICAL_BLOCKERS.md#9-credentials-can-leak-into-crash-logs)
+
+---
+
+## 7. No Foreign Key Constraints
+
+> See [01_CRITICAL_BLOCKERS.md #12](01_CRITICAL_BLOCKERS.md#12-no-foreign-key-constraints-in-room-database)
+
+---
+
+## 8. M3U URL Validation Insufficient
+
+**File:** `data/src/main/java/com/streamvault/data/parser/M3uParser.kt` (lines 312–320)
+**File:** `data/src/main/java/com/streamvault/data/sync/SyncManager.kt` (lines 448–451)
+**Severity:** 🟠 HIGH
+
+While `UrlSecurityPolicy.isAllowedImportedUrl()` exists, M3U entries can still contain:
+- Encoded newlines (`%0A`, `%0D%0A`) for HTTP header injection
+- `file:///` protocol for local file access
+- `javascript:` or `data:` URIs (if rendered in any UI context)
+
+**Fix:** After URL parsing, validate with `URI.create()` and explicitly reject non-`http`/`https` schemes:
+```kotlin
+val uri = try { URI.create(url) } catch (_: Exception) { return null }
+if (uri.scheme !in listOf("http", "https")) return null
+```
+
+---
+
+## 9. FTS Search Results Silently Truncated at 300
+
+**File:** `data/src/main/java/com/streamvault/data/local/dao/Daos.kt` (lines 83–100)
+**Severity:** 🟠 HIGH
+
+All search queries use `LIMIT 300` with no indication to the user that more results exist. If a provider has 10,000 channels and the search matches 2,000, the user only sees 300 with no "load more" or "showing X of Y" indicator.
+
+**Fix:** Either implement paginated search or return the total count alongside results:
+```sql
+SELECT COUNT(*) FROM channels_fts WHERE channels_fts MATCH :query
+```
+
+---
+
+## 10. Large EPG Files Can Cause OOM
+
+**File:** `data/src/main/java/com/streamvault/data/sync/SyncManager.kt` (lines 561–576)
+**Severity:** 🟠 HIGH
+
+The EPG download uses a 64KB `GZIPInputStream` buffer, but for very large EPG files (500MB+ compressed, common with large IPTV providers), the full decompressed XML can exhaust the Java heap on memory-constrained TV devices.
+
+**Mitigation:** The XMLTV parser does use streaming (XmlPullParser), which is good. But the download response body itself may buffer significant amounts. Add:
+1. A file size check before download (HEAD request)
+2. A maximum file size limit (e.g., 200MB compressed)
+3. Progress reporting during EPG parse
+
+---
+
+## 11. PlaybackHistory Restore Uses N+1 Query Pattern
+
+**File:** `data/src/main/java/com/streamvault/data/local/dao/Daos.kt` (lines 248–264)
+**Severity:** 🟠 HIGH
+
+```sql
+UPDATE movies SET watch_progress = (
+ SELECT resume_position_ms FROM playback_history
+ WHERE playback_history.content_id = movies.id
+ AND playback_history.content_type = 'MOVIE'
+ AND playback_history.provider_id = :providerId
+) WHERE id IN (...)
+```
+
+The correlated subquery executes once per matched movie row. With 10,000+ movies, this query can take several seconds on low-end TV hardware.
+
+**Fix:** Use a JOIN-based UPDATE or batch the operation with explicit chunking.
+
+---
+
+## 12. RecordingManager Race Condition
+
+**File:** `data/src/main/java/com/streamvault/data/manager/RecordingManagerImpl.kt` (lines 50–52)
+**Severity:** 🟠 HIGH
+
+The `stateMutex` protects `itemsState` but `activeJobs` is accessed from multiple coroutines without consistent mutex protection. Multiple concurrent recording operations could cause `ConcurrentModificationException` or lost updates.
+
+---
+
+## 13. M3U Parser Unquoted Attribute Values
+
+**File:** `data/src/main/java/com/streamvault/data/parser/M3uParser.kt` (lines 309–330)
+**Severity:** 🟡 MEDIUM
+
+If an M3U file uses unquoted attribute values with spaces:
+```
+#EXTINF:-1 group-title=My Group Name,Channel Name
+```
+
+The parser will extract only "My" as the group title because whitespace terminates unquoted value parsing. This causes channels to be placed in fragmented/wrong categories.
+
+---
+
+## 14. Adult Content Classifier Is English-Only
+
+**File:** `data/src/main/java/com/streamvault/data/util/AdultContentClassifier.kt` (lines 6–19)
+**Severity:** 🟡 MEDIUM
+
+The classifier uses a hardcoded English keyword list. Content in Spanish, German, French, Russian, Arabic, etc. will bypass classification entirely. For an app with 26 language locales, this is a significant gap in parental controls.
+
+---
+
+## 15. XMLTV Date Format Support Limited
+
+**File:** `data/src/main/java/com/streamvault/data/parser/XmltvParser.kt` (lines 39–43)
+**Severity:** 🟡 MEDIUM
+
+Only 3 date patterns are supported. Real-world XMLTV files use many more formats:
+- `20240315` (date only, no time)
+- `2024-03-15T15:30:00+01:00` (ISO 8601)
+- Timezone offsets with minutes (`+0530`)
+
+Missing formats cause programs to fall through to the epoch-0 fallback.
+
+---
+
+## 16. Backup File Has No Integrity Check
+
+**File:** `data/src/main/java/com/streamvault/data/manager/BackupManagerImpl.kt` (lines 53–101)
+**Severity:** 🟡 MEDIUM
+
+Exported and imported backup files have no checksum, signature, or version validation. A corrupted backup will import corrupted data silently. A backup from an incompatible version could break the database.
+
+**Fix:** Add a CRC32 checksum and a schema version header to backup files.
+
+---
+
+## 17. SimpleDateFormat Thread Safety
+
+**File:** `data/src/main/java/com/streamvault/data/parser/XmltvParser.kt` (lines 39–43)
+**Severity:** 🔵 LOW
+
+```kotlin
+private val dateFormats = listOf(
+ SimpleDateFormat("yyyyMMddHHmmss Z", Locale.US),
+)
+```
+
+`SimpleDateFormat` is not thread-safe. While each parser instance creates its own, if shared or reused across coroutines, date parsing will silently produce wrong results. Consider using `java.time.DateTimeFormatter`.
+
+---
+
+## 18. No Pagination Metadata in Repositories
+
+**File:** `data/src/main/java/com/streamvault/data/repository/MovieRepositoryImpl.kt` (lines 150–162)
+**Severity:** 🟡 MEDIUM
+
+Movie/Series pagination queries don't return the total count. The UI has no way to know if more pages exist, so it either loads too many pages or shows no "load more" option.
+
+---
+
+## 19. PIN Hashing - RNG Initialization
+
+**File:** `data/src/main/java/com/streamvault/data/preferences/PreferencesRepository.kt` (lines 28–31)
+**Severity:** 🔵 LOW
+
+```kotlin
+val salt = ByteArray(PIN_SALT_BYTES).also { SecureRandom().nextBytes(it) }
+```
+
+Creating a new `SecureRandom()` instance per call may use a weaker default provider on some older Android versions. Using `SecureRandom.getInstanceStrong()` or caching the instance would be more robust.
+
+---
+
+## 20. Migration 2→3 Lacks Data Validation
+
+**File:** `data/src/main/java/com/streamvault/data/local/StreamVaultDatabase.kt` (lines 47–57)
+**Severity:** 🔵 LOW
+
+ALTER TABLE migrations add columns but don't validate whether existing data satisfies any new constraints or defaults that the code expects. This could leave the database in an inconsistent state after upgrade.
+
+---
+
+## 21. Unused Extra Attributes in M3U Entries
+
+**File:** `data/src/main/java/com/streamvault/data/parser/M3uParser.kt` (line 40)
+**Severity:** 🔵 LOW
+
+The parser captures unknown M3U attributes into an `extraAttributes` map that is never consumed anywhere. This adds memory overhead per entry for no benefit. Either remove it or document intended future use.
+
+---
+
+## 22. Xtream Unknown Status Not Logged
+
+**File:** `data/src/main/java/com/streamvault/data/remote/xtream/XtreamProvider.kt` (lines 82–90)
+**Severity:** 🔵 LOW
+
+When the Xtream API returns an unknown account status, it maps to `UNKNOWN` without logging. This makes it difficult to diagnose provider compatibility issues.
diff --git a/docs/audit/04_DOMAIN_LAYER.md b/docs/audit/04_DOMAIN_LAYER.md
new file mode 100644
index 00000000..c50fb6ae
--- /dev/null
+++ b/docs/audit/04_DOMAIN_LAYER.md
@@ -0,0 +1,267 @@
+# 04 — Domain Layer Issues
+
+Architecture, models, use cases, and validation issues.
+
+---
+
+## 1. Domain Model Contains UI Logic
+
+**File:** `domain/src/main/java/com/streamvault/domain/model/Program.kt` (lines 15–25)
+**Severity:** 🟠 HIGH
+
+```kotlin
+val progressPercent: Float
+ get() {
+ if (!isNowPlaying) return 0f
+ val now = System.currentTimeMillis() // ← Domain accessing system clock
+ if (now < startTime || endTime <= startTime) return 0f
+ return ((now - startTime).toFloat() / (endTime - startTime).toFloat()).coerceIn(0f, 1f)
+ }
+```
+
+This violates Clean Architecture — the domain model directly calls `System.currentTimeMillis()`. This makes unit testing non-deterministic and couples the domain to the Android runtime.
+
+**Fix:** Move progress calculation to a utility function that accepts `currentTimeMs` as a parameter, or compute in the ViewModel.
+
+---
+
+## 2. Severely Under-Developed Use Case Layer
+
+**File:** `domain/src/main/java/com/streamvault/domain/usecase/`
+**Severity:** 🟠 HIGH
+
+Only **1 use case** exists: `GetCustomCategories`. An IPTV app of this scope should have 15–20+ use cases to properly encapsulate business logic. Without them, business logic is scattered across repositories and ViewModels.
+
+**Missing use cases:**
+| Use Case | Purpose |
+|----------|---------|
+| `GetLiveChannels` | Filter, sort, paginate channels |
+| `GetMovies` / `GetSeries` | Browse content with filters |
+| `SearchContent` | Cross-content-type search |
+| `ToggleFavorite` | Add/remove with validation |
+| `ManageProvider` | Add/update/delete with auth |
+| `GetEpgForChannel` | EPG with timezone handling |
+| `RecordPlaybackHistory` | Track with dedup logic |
+| `ValidateStreamUrl` | URL validation and type detection |
+| `ExportBackup` / `ImportBackup` | Data backup with integrity |
+| `SetParentalControls` | PIN management and category locking |
+
+**Impact:** Business logic duplication, harder to test, harder to maintain.
+
+---
+
+## 3. ParentalControlManager — Race Condition and No Persistence
+
+> See [01_CRITICAL_BLOCKERS.md #11](01_CRITICAL_BLOCKERS.md#11-parentalcontrolmanager-has-race-condition-and-no-persistence)
+
+---
+
+## 4. No Data Validation Across Domain Models
+
+**Severity:** 🟠 HIGH
+
+Multiple domain models accept semantically invalid values without validation:
+
+### PlaybackHistory
+```kotlin
+val resumePositionMs: Long = 0 // Could be negative
+val totalDurationMs: Long = 0 // Could be negative
+val watchCount: Int = 1 // Could be 0 or negative
+val seasonNumber: Int? = null // Could be 0 (seasons start at 1)
+val episodeNumber: Int? = null // Could be 0
+```
+No invariant: `resumePositionMs ≤ totalDurationMs`
+
+### Movie
+```kotlin
+val duration: String? = null // Ambiguous format
+val durationSeconds: Int = 0 // Could be negative
+val rating: Float = 0f // No range (0–10? 0–100?)
+```
+Two duration fields with no documented precedence.
+
+### Channel
+```kotlin
+val streamUrl: String = "" // Empty string useless — should be nullable
+val errorCount: Int = 0 // View concern in domain model
+```
+
+### Series / Season / Episode
+```kotlin
+val seasonNumber: Int // No positive validation
+val episodeNumber: Int // No positive validation
+val durationSeconds: Int = 0 // Could be negative
+val airDate: String? = null // Format not specified
+```
+
+### VideoFormat
+```kotlin
+val width: Int // Could be negative
+val height: Int // Could be negative
+val frameRate: Float = 0f // Could be negative
+val bitrate: Int = 0 // Could be negative
+```
+
+### RecordingRequest
+```kotlin
+val scheduledStartMs: Long // Could be in the past
+val scheduledEndMs: Long // Could be ≤ scheduledStartMs
+```
+
+**Fix:** Add `init` blocks with `require()` for invariants, or validate at the creation site (mapper/repository).
+
+---
+
+## 5. Repository API Design Issues
+
+### 5a. FavoriteRepository — Ambiguous API
+
+**File:** `domain/src/main/java/com/streamvault/domain/repository/FavoriteRepository.kt`
+
+```kotlin
+fun getFavorites(contentType: ContentType? = null): Flow<List<Favorite>>
+fun getAllFavorites(contentType: ContentType): Flow<List<Favorite>>
+```
+
+What's the difference? `getFavorites(null)` vs `getAllFavorites(type)` — the naming is confusing and the behavior overlap is unclear. Consolidate into one method.
+
+### 5b. ChannelRepository — Wrong Return Type
+
+**File:** `domain/src/main/java/com/streamvault/domain/repository/ChannelRepository.kt`
+
+```kotlin
+suspend fun getStreamUrl(channel: Channel): Result<String>
+```
+
+Returns a bare URL string, but `StreamInfo` data class already exists with `url`, `headers`, `userAgent`, and `streamType`. This method should return `Result<StreamInfo>`.
+
+### 5c. EpgRepository — "Now Playing" Returns Lists
+
+**File:** `domain/src/main/java/com/streamvault/domain/repository/EpgRepository.kt`
+
+```kotlin
+fun getNowPlayingForChannels(...): Flow<Map<String, List<Program>>>
+```
+
+Why `List<Program>` per channel? "Now playing" should be a single program: `Map<String, Program?>`.
+
+### 5d. MovieRepository — Asymmetric Progress API
+
+```kotlin
+suspend fun updateWatchProgress(movieId: Long, progress: Long)
+// Missing: getWatchProgress()
+```
+
+Can update progress but can't read it back through the repository.
+
+### 5e. ProviderRepository — Callback vs Flow Inconsistency
+
+```kotlin
+suspend fun loginXtream(
+ ...,
+ onProgress: ((String) -> Unit)? = null // ← Callback
+): Result<Provider>
+```
+
+All other repositories use `Flow` for streaming data. Provider operations use callbacks, breaking the reactive pattern.
+
+### 5f. PlaybackHistoryRepository — No Result Wrapper
+
+```kotlin
+suspend fun recordPlayback(history: PlaybackHistory) // ← No Result<>
+suspend fun updateResumePosition(history: PlaybackHistory) // ← No Result<>
+```
+
+These can fail (database full, constraint violation) but the caller has no way to detect failure.
+
+---
+
+## 6. ChannelNormalizer Algorithm Flawed
+
+**File:** `domain/src/main/java/com/streamvault/domain/util/ChannelNormalizer.kt` (lines 12–40)
+**Severity:** 🟡 MEDIUM
+
+The normalizer strips quality tags (HD, FHD, SD, 4K) to group "same" channels together, but:
+
+1. **False merges:** "BBC One HD" and "BBC One SD" map to the same ID — these are distinct channels with different stream qualities the user may want to choose between
+2. **No accent normalization:** "Télé" and "Tele" are treated as different
+3. **Doesn't handle:** bitrate indicators, server names, timezone suffixes
+4. **Numbers mishandled:** "HBO 2" stripped differently than "HBO2"
+
+---
+
+## 7. Category Model Has Redundant Protection Fields
+
+**File:** `domain/src/main/java/com/streamvault/domain/model/Category.kt`
+**Severity:** 🟡 MEDIUM
+
+```kotlin
+data class Category(
+ val isAdult: Boolean = false,
+ val isUserProtected: Boolean = false // ← Redundant with ParentalControlManager
+)
+```
+
+Parental protection is tracked in two places: the `Category` model and the `ParentalControlManager`. These can get out of sync — one says protected, the other says unlocked.
+
+---
+
+## 8. Missing Domain Features for Premium IPTV
+
+**Severity:** 🟡 MEDIUM
+
+No domain models or repository interfaces exist for:
+
+| Feature | Impact |
+|---------|--------|
+| Subtitle track selection | Users can't select subtitles |
+| Audio track metadata | No language labels in track picker |
+| Adaptive bitrate preferences | No quality control |
+| Watch history search/filter | Can't find previously watched content |
+| Cross-device sync | No resume across devices |
+| Content recommendations | No discovery beyond categories |
+| Provider health/status model | No way to show connection quality |
+
+---
+
+## 9. `GetCustomCategories` Swallows Exceptions
+
+**File:** `domain/src/main/java/com/streamvault/domain/usecase/GetCustomCategories.kt`
+**Severity:** 🟡 MEDIUM
+
+```kotlin
+}.getOrElse {
+ emptyList() // ← Exception silently discarded
+}
+```
+
+If the categories query fails, the UI shows "no categories" with no error indication. The user has no way to know something went wrong.
+
+---
+
+## 10. Provider Model Stores Credentials in Plain Data Class
+
+**File:** `domain/src/main/java/com/streamvault/domain/model/Provider.kt`
+**Severity:** 🟡 MEDIUM
+
+```kotlin
+data class Provider(
+ val username: String = "",
+ val password: String = "",
+ val m3uUrl: String = "",
+ val epgUrl: String = "",
+)
+```
+
+While credentials are encrypted at the storage layer (`CredentialCrypto`), the domain model carries plaintext credentials in memory. Any memory dump, debug log, or crash report that serializes this object will expose them.
+
+**Mitigation:** The `toString()` auto-generated by `data class` will include username and password in any log statement. Consider overriding `toString()` to redact sensitive fields.
+
+---
+
+## 11. `StreamInfo` Model Exists but Underutilized
+
+**File:** `domain/src/main/java/com/streamvault/domain/model/StreamInfo.kt`
+**Severity:** 🔵 LOW
+
+A comprehensive `StreamInfo` data class exists with `url`, `headers`, `userAgent`, `streamType`, etc. But `ChannelRepository.getStreamUrl()` returns `Result<String>` instead of `Result<StreamInfo>`, bypassing all the rich metadata.
diff --git a/docs/audit/05_UI_UX.md b/docs/audit/05_UI_UX.md
new file mode 100644
index 00000000..8fca8f73
--- /dev/null
+++ b/docs/audit/05_UI_UX.md
@@ -0,0 +1,321 @@
+# 05 — UI & UX Issues
+
+Screens, navigation, accessibility, focus management, and presentation issues.
+
+---
+
+## 1. D-Pad Focus Trap Scenarios
+
+**Severity:** 🔴 CRITICAL
+
+Multiple screens have scenarios where the D-Pad focus can become trapped or lost:
+
+### PlayerScreen — Overlay Focus Loss
+**File:** `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt` (lines 280–290)
+
+Complex nested overlay state (channel list, category list, EPG, channel info, track selection, program history, split dialog, diagnostics) makes it easy for focus to become lost when overlays are dismissed. No "default focus" fallback exists when the target of `FocusRequester.requestFocus()` is no longer in the composition.
+
+### HomeScreen — Category-Channel Focus Hand-off
+**File:** `app/src/main/java/com/streamvault/app/ui/screens/home/HomeScreen.kt` (lines 350–400)
+
+```kotlin
+var shouldRestoreCategoryFocus by remember { mutableStateOf(false) }
+var shouldRestoreChannelFocus by remember { mutableStateOf(false) }
+```
+
+When a user selects a category, focus moves to the first channel. Pressing D-Pad left should return to the category sidebar. But if the category list has scrolled, the target category may not be visible, and `requestFocus()` fails silently.
+
+### MultiViewScreen — Grid Escape
+**File:** `app/src/main/java/com/streamvault/app/ui/screens/multiview/MultiViewScreen.kt` (lines 120–140)
+
+If the user navigates out of the 2×2 player grid, there's no safe path back in. No focus restoration is attempted.
+
+### Modal Dialogs — Post-Delete Focus
+**PinDialog** and **CategoryOptionsDialog** can dismiss after deleting the underlying content (e.g., deleting a category group). Focus restoration tries to focus the deleted item — fails silently.
+
+---
+
+## 2. Missing Error State UI on Content Screens
+
+**Severity:** 🔴 CRITICAL
+
+### MoviesScreen
+**File:** `app/src/main/java/com/streamvault/app/ui/screens/movies/MoviesScreen.kt` (lines 90–110)
+
+```kotlin
+if (uiState.isLoading) { /* loading */ }
+else if (uiState.moviesByCategory.isEmpty()) { /* empty */ }
+else { /* content */ }
+// ← No error state branch
+```
+
+If the API call fails, the user sees a blank screen with no retry option. Same issue in **SeriesScreen**.
+
+### HomeScreen
+No error state if category load fails. No timeout indicator for slow EPG loads. No skeleton loading for the category sidebar.
+
+### FavoritesScreen
+No UI for:
+- Empty favorites (blank screen)
+- All items filtered out by parental controls
+- Favorite content that became unavailable
+
+### SearchScreen
+When query is under 2 characters, shows blank instead of a search hint or suggestion.
+
+---
+
+## 3. Accessibility — Missing Content Descriptions
+
+**Severity:** 🔴 CRITICAL
+
+### FocusableCard — No Semantics
+**File:** `app/src/main/java/com/streamvault/app/ui/components/Cards.kt`
+
+The primary card component used throughout the app has no `contentDescription` parameter and no `Modifier.semantics` block. TalkBack announces "button" with no context for every card.
+
+### ChannelCard — Image Not Labeled
+Channel logos have no `contentDescription`. TalkBack cannot announce what channel is focused.
+
+### CategoryRow — No Heading Semantics
+```kotlin
+Text(text = title, style = MaterialTheme.typography.titleMedium)
+```
+Missing `Modifier.semantics { heading() }` — TalkBack won't navigate by section headings.
+
+### CustomKeyboard — Keys Not Announced
+```kotlin
+KeyboardButton(text = key, onClick = { onKeyPress(key) })
+```
+TalkBack says "button" for every key instead of announcing the letter.
+
+### PinDialog — No Input Feedback
+No announcement of current PIN length, no feedback on invalid PIN.
+
+### Player Controls — No State Announcements
+Control buttons lack descriptions. No announcement when playback state changes (play/pause/buffering).
+
+---
+
+## 4. RTL Layout Not Fully Mirrored
+
+**Severity:** 🟠 HIGH
+
+While `MainActivity` correctly sets `LayoutDirection.Rtl` based on locale, several components don't respond:
+
+### HomeScreen Sidebar
+```kotlin
+Row(modifier = Modifier.fillMaxSize()) {
+ Column(modifier = Modifier.width(280.dp)) { /* sidebar - always left */ }
+ Column(modifier = Modifier.weight(1f)) { /* content - always right */ }
+}
+```
+In RTL locales (Arabic, Hebrew), the sidebar should be on the right. Currently hardcoded to the left.
+
+### SearchInput Icon
+```kotlin
+Icon(imageVector = Icons.Default.Search, modifier = Modifier.padding(end = 6.dp))
+```
+Search icon is always on the left side, should be on the right in RTL.
+
+### CategoryRow
+Row header (title on left, "See All" on right) doesn't flip in RTL.
+
+---
+
+## 5. ViewModel Memory Leaks — Jobs Not Cancelled
+
+> See [01_CRITICAL_BLOCKERS.md #8](01_CRITICAL_BLOCKERS.md#8-viewmodels-never-cancel-background-jobs--memory-leaks)
+
+---
+
+## 6. LazyRow/LazyColumn Missing Stable Keys
+
+**Severity:** 🟠 HIGH
+
+### CategoryRow
+**File:** `app/src/main/java/com/streamvault/app/ui/components/CategoryRow.kt` (lines 30–50)
+
+```kotlin
+LazyRow(...) {
+ items(items = items, key = { it.hashCode() }) { // ← WRONG
+ itemContent(it)
+ }
+}
+```
+
+`hashCode()` is not a stable unique key. On data refresh, even identical items get different hash codes → entire row re-composes, causing visible flicker and dropped frames.
+
+**Fix:** Use item's stable ID: `key = { it.id }`
+
+### HomeScreen Channel Grid
+```kotlin
+LazyVerticalGrid(columns = GridCells.Adaptive(180.dp)) {
+ items(channels) { channel ->
+ ChannelCard(channel = channel)
+ }
+}
+```
+No `key` specified — any data change causes full re-composition of the grid.
+
+### FavoritesScreen
+No keys during reorder operations → full re-compose on every reorder step.
+
+---
+
+## 7. Hardcoded English Strings in UI Code
+
+**Severity:** 🟠 HIGH
+
+| File | String | Should Be |
+|------|--------|-----------|
+| `HomeScreen.kt:1119` | `"Save"` | `stringResource(R.string.action_save)` |
+| `HomeScreen.kt:1128` | `"Cancel"` | `stringResource(R.string.action_cancel)` |
+| `HomeScreen.kt:405,1190` | `"SPLIT"`, `"MOVE"` | `stringResource(R.string.action_split)` |
+| `ReorderTopBar.kt:82` | `"Cancel"` | `stringResource(R.string.action_cancel)` |
+| `CustomKeyboard.kt:62` | `"Delete"` | `stringResource(R.string.action_delete)` |
+| `SettingsViewModel.kt:195+` | `"Watch history and recents cleared"` | `R.string.settings_cleared_history` |
+| `SettingsViewModel.kt` | `"PIN changed successfully"` | `R.string.settings_pin_changed` |
+| `PlayerViewModel.kt:210+` | `"The stream stopped responding..."` | `R.string.player_error_*` |
+
+These strings are visible to users and will appear in English regardless of locale, breaking the localization for 25 non-English languages.
+
+---
+
+## 8. Player Error Recovery Not Visible to User
+
+**Severity:** 🟠 HIGH
+
+**File:** `app/src/main/java/com/streamvault/app/ui/screens/player/PlayerScreen.kt`
+
+When playback errors occur:
+1. Error is silently logged
+2. Decoder mode may be silently switched (software fallback)
+3. Channel may be silently changed (stall recovery)
+4. User notification (`PlayerNoticeBanner`) may not be visible if controls are hidden
+
+Users have no idea why their stream quality changed, why the channel switched, or what recovery was attempted. A premium app should provide clear, non-intrusive feedback.
+
+---
+
+## 9. DashboardScreen Missing States
+
+**Severity:** 🟡 MEDIUM
+
+**File:** `app/src/main/java/com/streamvault/app/ui/screens/dashboard/DashboardScreen.kt` (lines 90–120)
+
+- No indicator for provider sync in progress
+- No warning banners for provider sync errors
+- No "coming soon" placeholder for empty content shelves
+- No last-sync-time indicator
+
+---
+
+## 10. String Concatenation Pattern Breaks RTL
+
+**Severity:** 🟡 MEDIUM
+
+**File:** `app/src/main/java/com/streamvault/app/ui/screens/favorites/FavoritesScreen.kt` (lines 718–719)
+
+```kotlin
+stringResource(R.string.favorites_continue_short) + " ${summary.continueWatchingCount}"
+```
+
+String concatenation doesn't respect RTL text direction. In Arabic, the number should appear on the left, but concatenation always puts it on the right. Use parameterized strings: `"Continue (%1$d)"`.
+
+---
+
+## 11. HomeScreen Back Handler Missing
+
+**Severity:** 🟡 MEDIUM
+
+**File:** `app/src/main/java/com/streamvault/app/ui/screens/home/HomeScreen.kt`
+
+No `BackHandler` composable. When user presses back:
+- If channel list overlay is open → should close overlay first
+- If in reorder mode → should exit reorder first
+- If sidebar is focused → should move to channel grid
+- Otherwise → navigate back
+
+Currently relies on system default back behavior which may cause premature exit from the screen.
+
+---
+
+## 12. Focus Restoration Uses `remember` Instead of `rememberSaveable`
+
+**Severity:** 🟡 MEDIUM
+
+```kotlin
+var shouldRestoreCategoryFocus by remember { mutableStateOf(false) }
+```
+
+Using `remember` means focus state is lost on configuration changes (language change, screen rotation). Should be `rememberSaveable` for robust focus restoration.
+
+---
+
+## 13. No Responsive Layout for Sidebar Width
+
+**Severity:** 🟡 MEDIUM
+
+**File:** `app/src/main/java/com/streamvault/app/ui/screens/home/HomeScreen.kt` (lines 220–280)
+
+```kotlin
+Column(modifier = Modifier.width(280.dp)) { /* sidebar */ }
+```
+
+Hardcoded 280dp sidebar width. On large TV screens (65"+) this is too narrow; on smaller screens or tablets it may be too wide. Should scale based on screen dimensions.
+
+---
+
+## 14. No Animation on Category/Content Transitions
+
+**Severity:** 🟡 MEDIUM
+
+When selecting a category in HomeScreen, the channel grid content changes instantly with no animation. For premium polish, a crossfade or slide transition would create smoother experience. Player controls do have proper `AnimatedVisibility` — this pattern should be extended to content screens.
+
+---
+
+## 15. Missing Numeric Channel Switching in All Contexts
+
+**Severity:** 🟡 MEDIUM
+
+Quick channel switching via numeric pad (0-9) exists in the player but may not work consistently:
+- Works during full-screen playback
+- Missing during overlay (EPG, channel list, category list)
+- Not available from HomeScreen for direct channel entry
+
+---
+
+## 16. No Loading Skeleton for Category Sidebar
+
+**Severity:** 🔵 LOW
+
+Channel grid has skeleton loading, but the category sidebar shows nothing while loading. Premium apps show shimmer/skeleton placeholders for all loading sections.
+
+---
+
+## 17. No Wrapping Navigation in Horizontal Lists
+
+**Severity:** 🔵 LOW
+
+When the user reaches the last item in a LazyRow and presses D-Pad right, nothing happens. Premium TV apps typically wrap to the first item or provide a subtle "end of list" indicator.
+
+---
+
+## 18. Search Needs Minimum Query Length Hint
+
+**Severity:** 🔵 LOW
+
+```kotlin
+if (query.length < 2) { /* blank UI */ }
+```
+
+When the user types a single character, show a hint: "Type at least 2 characters to search" instead of showing nothing.
+
+---
+
+## 19. Multi-View Has No Slot Status Indicators
+
+**Severity:** 🔵 LOW
+
+In multi-view mode (4 players), there's no per-slot buffering indicator, no per-slot error state, and no way to see which slot is currently active without the border highlight.
diff --git a/docs/audit/06_SECURITY.md b/docs/audit/06_SECURITY.md
new file mode 100644
index 00000000..9a31b7bb
--- /dev/null
+++ b/docs/audit/06_SECURITY.md
@@ -0,0 +1,121 @@
+# 06 — Security Issues
+
+Credential handling, network security, file access, and data protection.
+
+---
+
+## Overall Security Posture: ✅ GOOD with exceptions
+
+StreamVault's security foundation is solid — credentials are encrypted with AES-GCM via Android Keystore, cleartext traffic is disabled, permissions are minimal, and there are no WebViews or exported services. The issues below are the remaining gaps.
+
+---
+
+## 1. `file://` URI Exposure
+
+> See [01_CRITICAL_BLOCKERS.md #15](01_CRITICAL_BLOCKERS.md#15-file-uri-exposure)
+
+---
+
+## 2. Credentials Can Leak Into Crash Logs
+
+> See [01_CRITICAL_BLOCKERS.md #9](01_CRITICAL_BLOCKERS.md#9-credentials-can-leak-into-crash-logs)
+
+---
+
+## 3. M3U URL Injection Vectors
+
+**File:** `data/src/main/java/com/streamvault/data/parser/M3uParser.kt`
+**Severity:** 🟠 HIGH
+
+While `UrlSecurityPolicy.isAllowedImportedUrl()` exists, the following attack vectors are not fully mitigated:
+
+| Vector | Risk |
+|--------|------|
+| CRLF injection (`%0D%0A`) | HTTP request smuggling if URLs are used in raw HTTP |
+| `file:///` protocol entries | Local filesystem reads |
+| `javascript:` / `data:` URIs | XSS if ever rendered in WebView (currently no WebView) |
+| Extremely long URLs (>8KB) | Buffer overflow in HTTP clients |
+
+**Fix:** After parsing, validate all entry URLs with `URI.create()` and whitelist only `http`/`https` schemes.
+
+---
+
+## 4. Provider Credentials in Domain Model `toString()`
+
+**File:** `domain/src/main/java/com/streamvault/domain/model/Provider.kt`
+**Severity:** 🟡 MEDIUM
+
+```kotlin
+data class Provider(
+ val username: String = "",
+ val password: String = "",
+ ...
+)
+```
+
+Kotlin `data class` auto-generates `toString()` that includes all fields. Any log statement, debug output, or crash report that calls `provider.toString()` will expose credentials in plaintext.
+
+**Fix:** Override `toString()`:
+```kotlin
+override fun toString(): String = "Provider(id=$id, name=$name, type=$type)"
+```
+
+---
+
+## 5. M3U Input Not Length-Bounded
+
+> See [01_CRITICAL_BLOCKERS.md #14](01_CRITICAL_BLOCKERS.md#14-m3u-input-not-length-bounded-dos-vector)
+
+---
+
+## 6. No Certificate Pinning
+
+**Severity:** 🟡 MEDIUM
+
+No SSL/TLS certificate pinning is implemented for API communications. This is typical for IPTV apps (which connect to diverse user-provided servers), but if there are any first-party API endpoints (analytics, updates, license checks), they should use certificate pinning.
+
+**Note:** Certificate pinning for user-provided IPTV servers is impractical since each provider has different certificates. This is acceptable.
+
+---
+
+## 7. Backup File Not Encrypted
+
+**File:** `data/src/main/java/com/streamvault/data/manager/BackupManagerImpl.kt`
+**Severity:** 🟡 MEDIUM
+
+Exported backup files contain:
+- Provider configurations (server URLs, potentially with embedded credentials in M3U URLs)
+- Favorites and watch history
+- Settings
+
+These are stored as plain JSON. If a user shares the backup file, their IPTV provider credentials could be exposed.
+
+**Fix:** Either encrypt the backup file or strip credentials before export, with an option to re-enter them on import.
+
+---
+
+## 8. PIN Stored as Hash Without Iteration Count
+
+**File:** `data/src/main/java/com/streamvault/data/preferences/PreferencesRepository.kt`
+**Severity:** 🔵 LOW
+
+The PIN hash uses a single-round hash (assumed from the code pattern). For a 4-digit PIN (only 10,000 possible values), even SHA-256 with salt is brute-forceable in milliseconds.
+
+**Fix:** Use PBKDF2 with high iterations or bcrypt. A 4-digit PIN should have at least 100,000 iterations of PBKDF2 to add meaningful delay.
+
+**Mitigation:** This is a parental control PIN, not a financial credential. The threat model is a child trying to bypass it, not a sophisticated attacker — so the current implementation is acceptable but could be stronger.
+
+---
+
+## ✅ Strong Security Practices (No Action Needed)
+
+| Practice | Status |
+|----------|--------|
+| **AES-GCM encryption via Keystore** | ✅ Properly implemented in CredentialCrypto |
+| **Cleartext traffic disabled** | ✅ `network_security_config.xml` enforces HTTPS |
+| **Minimal permissions** | ✅ Only INTERNET + ACCESS_NETWORK_STATE |
+| **No exported services** | ✅ Only MainActivity exported with LAUNCHER filter |
+| **No WebView** | ✅ Zero WebView attack surface |
+| **No clipboard access** | ✅ Credentials never in clipboard |
+| **No hardcoded secrets** | ✅ No API keys, tokens, or passwords in source |
+| **Content provider safety** | ✅ Only AndroidX startup provider (framework-managed) |
diff --git a/docs/audit/07_TESTING_LOCALIZATION.md b/docs/audit/07_TESTING_LOCALIZATION.md
new file mode 100644
index 00000000..489c2045
--- /dev/null
+++ b/docs/audit/07_TESTING_LOCALIZATION.md
@@ -0,0 +1,163 @@
+# 07 — Testing & Localization Issues
+
+Test coverage, test quality, translations, and resource issues.
+
+---
+
+## Testing
+
+### 1. Domain & Player Modules Have Zero Test Coverage
+
+**Severity:** 🔴 CRITICAL
+
+| Module | Unit Tests | Instrumented Tests | Status |
+|--------|-----------|-------------------|--------|
+| `:app` | 4 files | 6 files | ⚠️ Partial |
+| `:data` | 7 files | 3 files | ⚠️ Partial |
+| `:domain` | **0 files** | **0 files** | ❌ None |
+| `:player` | **0 files** | **0 files** | ❌ None |
+
+**Impact:** The most critical modules — business logic (domain) and media playback (player) — have zero automated tests. All bugs are found only through manual testing.
+
+**Untested critical code:**
+- `ParentalControlManager` (has known race condition — no test validates this)
+- `GetCustomCategories` use case (untested business logic)
+- `Media3PlayerEngine` (decoder switching, track selection, error recovery)
+- `StreamTypeDetector` (URL-based stream type detection)
+- All domain model invariants
+- `ChannelNormalizer` algorithm
+
+---
+
+### 2. Existing Tests Are Surface-Level
+
+**Severity:** 🟠 HIGH
+
+**App module ViewModels:**
+- `HomeViewModelTest` — Only tests basic state initialization, not user interactions
+- `EpgViewModelTest` — Minimal coverage of EPG state machine
+- `SearchViewModelTest` — Tests search query update, not search results
+
+**Missing ViewModel tests:**
+- `SettingsViewModel` (contains hardcoded strings, PIN management, sync operations)
+- `MoviesViewModel` / `SeriesViewModel` (pagination, filtering)
+- `PlayerViewModel` (error recovery, channel switching, multi-view)
+- `MultiViewViewModel` (slot management, focus, engine lifecycle)
+
+---
+
+### 3. No Integration Tests for Critical Flows
+
+**Severity:** 🟠 HIGH
+
+Missing end-to-end scenarios:
+- Provider setup → sync → channel display flow
+- M3U import → parse → store → display flow
+- Parental control PIN → lock → unlock → verify flow
+- Backup export → corrupt → import → verify failure handling
+- Provider delete → verify cascade cleanup flow
+- EPG sync → timezone handling → program display
+
+---
+
+### 4. No Performance/Stress Tests
+
+**Severity:** 🟡 MEDIUM
+
+No tests for:
+- Large M3U files (50,000+ channels)
+- Large EPG files (500MB+)
+- Rapid channel switching (100 switches in 30 seconds)
+- Low-memory conditions
+- Concurrent sync for multiple providers
+
+---
+
+### 5. Data Layer Tests Have Good Patterns
+
+**Severity:** ✅ POSITIVE
+
+- `SyncManagerTest` — Tests state machine transitions with fakes
+- `M3uParserTest` — Covers edge cases and assertions
+- `EntityMappersTest` — Validates round-trip mapping
+- `ProgramDaoTest` — Room integration tests
+
+These serve as good templates for expanding coverage.
+
+---
+
+## Localization
+
+### 3. Hardcoded English Strings in Code
+
+> See [05_UI_UX.md #7](05_UI_UX.md#7-hardcoded-english-strings-in-ui-code)
+
+**Count:** 15+ hardcoded English strings across ViewModels and Composables that will appear un-translated for 25 non-English locales.
+
+---
+
+### 4. 26 Languages Supported — Coverage Appears Good
+
+**Severity:** ✅ POSITIVE
+
+Supported locales:
+`ar`, `cs`, `da`, `de`, `el`, `es`, `fi`, `fr`, `hu`, `in`, `it`, `iw`, `ja`, `ko`, `nb`, `nl`, `pl`, `pt`, `ro`, `ru`, `sv`, `tr`, `uk`, `vi`, `zh`
+
+Spot-check of key strings across English, Spanish, French, and German shows proper translations. Parameterized strings use correct `%1$s` / `%1$d` format markers.
+
+---
+
+### 5. String Concatenation Breaks RTL
+
+> See [05_UI_UX.md #10](05_UI_UX.md#10-string-concatenation-pattern-breaks-rtl)
+
+---
+
+## Resources
+
+### 6. App Icon Missing Density Variants
+
+**Severity:** 🟠 HIGH
+
+| Density | Resolution | Present? |
+|---------|-----------|----------|
+| ldpi | 36×36 | ❌ |
+| mdpi | 48×48 | ❌ |
+| hdpi | 72×72 | ❌ |
+| xhdpi | 96×96 | ❌ |
+| xxhdpi | 144×144 | ❌ |
+| xxxhdpi | 192×192 | ✅ |
+
+Only the highest density icon is provided. On lower-density screens, the icon is downscaled from xxxhdpi, resulting in artifacts and an unprofessional appearance. While Android TV devices are typically hdpi/xhdpi, the Play Store listing shows the icon at various sizes.
+
+**Fix:** Use Android Studio's Image Asset Studio to generate all density variants from a source SVG/PNG.
+
+**Note:** The adaptive icon (`mipmap-anydpi-v26/ic_launcher.xml`) is properly configured with foreground/background separation, which is good.
+
+---
+
+### 7. Missing ProGuard Rules File
+
+> See [01_CRITICAL_BLOCKERS.md #1](01_CRITICAL_BLOCKERS.md#1-missing-proguard-rulespro--release-builds-will-fail)
+
+---
+
+### 8. No Release Signing Configuration
+
+> See [01_CRITICAL_BLOCKERS.md #10](01_CRITICAL_BLOCKERS.md#10-no-signing-configuration-for-release)
+
+---
+
+## Test Coverage Improvement Priority
+
+| Priority | Area | Estimated Tests | Impact |
+|----------|------|----------------|--------|
+| 🔴 P0 | `Media3PlayerEngine` | 15–20 tests | Prevents playback regressions |
+| 🔴 P0 | `ParentalControlManager` | 10–12 tests | Verifies thread safety, persistence |
+| 🔴 P0 | `StreamTypeDetector` | 10 tests | Validates all URL patterns |
+| 🟠 P1 | `ChannelNormalizer` | 8–10 tests | Validates grouping algorithm |
+| 🟠 P1 | Domain model validation | 15–20 tests | Ensures data integrity |
+| 🟠 P1 | `PlayerViewModel` | 12–15 tests | Error recovery, channel switching |
+| 🟠 P1 | `SettingsViewModel` | 8–10 tests | PIN, sync, export |
+| 🟡 P2 | Navigation integration | 5–8 tests | Back stack, deep links |
+| 🟡 P2 | Backup/restore | 5–8 tests | Data integrity |
diff --git a/docs/audit/PRE_PUBLISH_AUDIT.md b/docs/audit/PRE_PUBLISH_AUDIT.md
new file mode 100644
index 00000000..a83db627
--- /dev/null
+++ b/docs/audit/PRE_PUBLISH_AUDIT.md
@@ -0,0 +1,70 @@
+# StreamVault — Pre-Publish Comprehensive Audit
+
+**Date:** March 15, 2026
+**Branch:** `review/pre-publish-audit-2026-03-15`
+**Auditor:** Automated Code Audit
+**Verdict:** ❌ NOT READY — Critical blockers must be resolved before release
+
+---
+
+## Executive Summary
+
+StreamVault is a well-architected Android TV IPTV player built with Kotlin, Compose for TV, Media3, Room, and Hilt. The overall code quality is high, dependencies are modern, and the Clean Architecture modular design is sound. However, this audit uncovered **76 issues** across all layers that must be triaged before a premium production release.
+
+| Severity | Count | Description |
+|----------|-------|-------------|
+| 🔴 CRITICAL | 16 | Ship blockers — will cause crashes, data loss, or security issues |
+| 🟠 HIGH | 22 | Major defects — significant UX degradation or functional gaps |
+| 🟡 MEDIUM | 20 | Notable — polish items for premium quality |
+| 🔵 LOW | 18 | Minor — nice-to-have improvements |
+
+### Detailed Finding Reports
+
+| Report | Contents |
+|--------|----------|
+| [01_CRITICAL_BLOCKERS.md](01_CRITICAL_BLOCKERS.md) | All Critical/Ship-blocker issues |
+| [02_PLAYER_ENGINE.md](02_PLAYER_ENGINE.md) | Media playback, decoder, buffering issues |
+| [03_DATA_LAYER.md](03_DATA_LAYER.md) | Database, parsing, sync, and data integrity |
+| [04_DOMAIN_LAYER.md](04_DOMAIN_LAYER.md) | Architecture, models, use cases, validation |
+| [05_UI_UX.md](05_UI_UX.md) | Screens, navigation, accessibility, focus management |
+| [06_SECURITY.md](06_SECURITY.md) | Credentials, network, file access |
+| [07_TESTING_LOCALIZATION.md](07_TESTING_LOCALIZATION.md) | Test coverage, translations, resources |
+
+---
+
+## Architecture Overview
+
+```
+┌──────────────────────────────────────────────────────┐
+│ :app (UI Layer) │
+│ Compose for TV · ViewModels · Navigation · Hilt │
+├──────────────────────────────────────────────────────┤
+│ :domain (Business Logic) │
+│ Pure Kotlin · Models · Repository Interfaces │
+├──────────┬───────────────────────────────────────────┤
+│ :data │ :player │
+│ Room │ Media3 / ExoPlayer │
+│ Retrofit│ HLS / DASH / MPEG-TS │
+│ OkHttp │ Track Selection │
+│ Workers │ Buffering │
+└──────────┴───────────────────────────────────────────┘
+```
+
+**SDK:** Compile/Target 35 · Min 28 · Java 17 · Kotlin 2.1.0
+
+---
+
+## Top 10 Must-Fix Before Release
+
+| # | Issue | Module | Severity | Reference |
+|---|-------|--------|----------|-----------|
+| 1 | Missing `proguard-rules.pro` — release builds will crash | Build | 🔴 CRITICAL | [01](01_CRITICAL_BLOCKERS.md#1) |
+| 2 | Decoder mode mapping is reversed — HARDWARE disables hardware | Player | 🔴 CRITICAL | [02](02_PLAYER_ENGINE.md#1) |
+| 3 | `pixelWidthHeightRatio` stored as frame rate — wrong metric | Player | 🔴 CRITICAL | [02](02_PLAYER_ENGINE.md#5) |
+| 4 | No MediaSession — TV remote controls won't work | Player | 🔴 CRITICAL | [02](02_PLAYER_ENGINE.md#3) |
+| 5 | EPG staging uses negative IDs — race-prone data corruption | Data | 🔴 CRITICAL | [03](03_DATA_LAYER.md#3) |
+| 6 | M3U category ID collision across providers | Data | 🔴 CRITICAL | [03](03_DATA_LAYER.md#4) |
+| 7 | PlayerViewModel Jobs never cancelled in `onCleared()` — memory leak | App | 🔴 CRITICAL | [05](05_UI_UX.md#5) |
+| 8 | Multiple focus trap scenarios on TV D-Pad navigation | App | 🔴 CRITICAL | [05](05_UI_UX.md#1) |
+| 9 | Domain & Player modules have zero test coverage | Testing | 🔴 CRITICAL | [07](07_TESTING_LOCALIZATION.md#1) |
+| 10 | Hardcoded English strings in UI ("Save", "Cancel", "Delete") | Localization | 🟠 HIGH | [07](07_TESTING_LOCALIZATION.md#3) |