Skip to content

feat: optional local music recommendations and DJ beta with bounded playback workloads - #547

Draft
QuietForge7294 wants to merge 9 commits into
henriquesebastiao:mainfrom
QuietForge7294:feat/local-music-ai-dj-beta
Draft

QuietForge7294 wants to merge 9 commits into
henriquesebastiao:mainfrom
QuietForge7294:feat/local-music-ai-dj-beta

Conversation

@QuietForge7294

@QuietForge7294 QuietForge7294 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem and behavior

I fix late DJ responses controlling newer classic playback and remove repeated full-library work from interactive home requests. Mode/account/selection generations fence old work; local play/pause intent is independent of rendering, and leaving DJ restores the dominant original track and position.

Four daily selections appear below favorite playlists. A dedicated DJ studio and distinct seed actions use the same player. Continuous mixes select fresh authorized local files without radio fallback.

Architecture and beta defaults

  • Stored home summaries, account-private ETags, point ACL checks and a resumable incremental analysis feed.
  • Current DJ deck plus three following occurrences, a 24-second committed horizon and one encoder.
  • One cancellable preparation slot isolates deck analysis/decoding from HLS production. Only the owner publishes plans, snapshots and decoded files. It keeps transport commands and lease renewal responsive during work, including while paused or at the render horizon.
  • PCM lookup does no decoding. The complete next block is checked before advancing the mixer or EQ state. Shutdown cancels and joins preparation before cleanup; stale source/plan results are discarded.
  • One staged plan edit waits for its audio and rebases against the actual rendered cursor before commit. A temporary union of two four-occurrence PCM windows shares the same disk budget; files are memory mapped and superseded variants are released.
  • Shared compute lease gives DJ priority and yields analysis under native work or resource pressure. Live speed conservatively includes preparation time.
  • Cached analysis identity is preserved across one precisely normalized import-formatting change. Analysis logic, models and dependencies still invalidate profiles; changed renderer/helpers invalidate live qualification.
  • Every module and the unqualified-engine trial default off for new accounts/installations; existing explicit preferences remain.
  • Starting configured caps: analysis 0.5 CPU / 1.5 GiB, DJ 1 CPU / 2 GiB, separate 5 GiB disk cache. These are budgets, not minimum requirements.
  • HLS program dates locate a late join once, then the audio clock owns progress. Refreshed fragment timestamps cannot move the listener cursor. Genuine seeks, stalls and interruption events remain visible to strict validation.
  • Administrator validation diagnostics are bounded, owner/generation fenced and omit URLs, session/track identifiers, titles and raw errors.

Android companion: henriquesebastiao/downtify-android#49. Its optional device beta provides short dual-deck fades; on-device beat inference remains unimplemented and unqualified.

Evidence and remaining gates

  • Latest isolated Linux DJ suite: 100 passed, using the real FFmpeg/model runtime under 1 CPU / 2 GiB, no network and read-only root. Includes blocked preparation, stale results, cancellation/join, cache rotation, live controls and continuous renewal.
  • Targeted Windows preparation/cache tests:25 passed, one explicit symlink-privilege skip; two additional analysis-identity regressions passed. Broader Windows AI suite collected before the final additions:213 passed,20 explicit skips. Groups overlap.
  • Complete music-AI source/test lint passed. Latest full web run:779 passed,one existing skipped, production build passed. Six diagnostics regressions include a simulated wall-clock jump and stale-generation fencing. Validation samples now carry monotonic and wall timestamps, and the administrator test remains available while an unqualified trial is enabled. Qualification thresholds and playback transport are unchanged.
  • Earlier native/server:3375 passed plus ten subtests. These counts are not subjective music-quality evidence.
  • Synthetic 50,000-entry home fixture: p50 46.49ms / p95 51.81ms over25 requests, at most160 point ids, zero full-catalog calls. Reconstructed previous p50 was2812.538ms overthree requests. This is not LAN/NAS/phone performance.
  • Candidate checks verified model pins, exact source correspondence, unchanged analysis identity and changed engine identity before replacement.

An earlier real live trial exhausted its audio buffer after about12 minutes despite fast segment loads. It failed; its speed figure did not establish continuity. The fresh asynchronous-engine trial also failed continuity on clock drift and reader events; long segment loads and an unresponsive test browser were observed without establishing a single cause. It was stopped and its temporary trial preference restored. No successful one-hour qualification is claimed. The thresholds remain3600 real uninterrupted seconds, zero interruptions and sustained render speed above1.5x.

I keep this PR in draft pending real continuity, comparative listening and physical Android lifecycle/latency/thermal/battery checks. Full explicit ranking still reads the derived snapshot and needs cached background jobs later.

README distinguishes configured caps from an earlier uncontrolled Docker snapshot: web283.9MiB/0.24% CPU, analysis78.05MiB/1.20%, DJ21.18MiB/1.36%, zero restarts/OOM observed. These are neither active-render throughput nor controlled before/after measurements.

@github-actions github-actions Bot added the ci label Nov 6, 2026
@QuietForge7294 QuietForge7294 changed the title feat: opt-in local music AI, mood playlists and queue DJ beta feat: optional local music recommendations and DJ beta with bounded playback workloads Nov 6, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend ci dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation frontend tests

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant