1.7 KiB
1.7 KiB
id, title, status, assignee, created_date, labels, dependencies, references, parent_task_id, priority
| id | title | status | assignee | created_date | labels | dependencies | references | parent_task_id | priority | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ML-169.3 | Phase 2: PubSub subscription lifecycle audit | To Do | 2026-05-08 08:59 |
|
|
ML-169 | medium |
Description
Audit all PubSub subscribe/unsubscribe pairs for correctness. Verify no stale subscriptions or double-subscription risks.
Pre-flagged concern: ListeningStats.subscribe() is called in mount by StatsLive.Index and ScrobbledTracksLive.Index but never unsubscribed. Phoenix.PubSub monitors PID for auto-cleanup, but double-subscription on LiveView reconnect is possible and needs verification.
Acceptance Criteria
- #1 Records.subscribe/1 and Records.unsubscribe/1 call sites audited — confirmed only called via manage_subscription/2 in Show LiveViews
- #2 manage_subscription/2 verified correct across all navigation paths (direct URL, browser back/forward, push_navigate, push_patch)
- #3 ListeningStats.subscribe() double-subscription risk on reconnect evaluated — either confirmed safe by PID monitoring or flagged with fix
- #4 Termination cleanup verified: Phoenix.PubSub auto-cleans on PID death confirmed; any manual unsubscribe gaps documented
- #5 Records.notify_update/1 broadcast sites audited against intended behavior (coordinates with Phase 3 worker audit)
- #6 Findings report written as a Backlog.md document with file:line references, severity ratings, and fix recommendations