musiclink/WORKLOG.md

1.9 KiB

MusicLink Worklog

2026-01-22

Current Status

  • Backend: Go (v1.24.0) Matrix-native bot.
  • Deployment: NixOS based (flake.nix), managed on ops-jrz1.
  • Notes: Matterbridge has been deprecated and removed from the runtime.

Recent Changes

  • Matrix-native routing implemented with allowlisted rooms.
  • Link preview suppression via com.beeper.linkpreviews = [].
  • Health endpoint bound to localhost (matrix.healthAddr).

Next Steps

  • Keep worklog up to date with operational changes.

2026-01-20 (Historical)

Current Status

  • Backend: Go (v1.22.8) bot using Matterbridge WebSocket API.
  • Deployment: NixOS based (flake.nix), currently managed on ops-jrz1.
  • Issues:
    1. Crash Loop: musiclink.service is failing with panic: repeated read on failed websocket connection.
    2. API Instability: idonthavespotify API reported to be returning 500s.
    3. Environment: matterbridge.service not found on local system (likely running elsewhere or under a different name).

Actions Taken

  1. Investigation:
    • Verified musiclink.service status and read bot-crash.log.
    • Confirmed the panic location in internal/bot/bot.go:186.
    • Verified idonthavespotify API status: Currently responsive (200 OK) for specific Spotify album links. Intermittent 500s may still occur.
    • Tested Odesli (song.link) API as a potential fallback.
  2. Analysis:
    • Identified that readLoop in bot.go needs to handle connection closures more gracefully to avoid the "repeated read" panic.
    • Verified that secrets (Matterbridge token) are handled via sops-nix by the platform team.

Next Steps

  • Implement fix for WebSocket panic in internal/bot/bot.go.
  • Finalize investigation into idonthavespotify 500 errors.
  • If 500s persist, implement Odesli (song.link) as an alternative service provider.
  • Coordinate with platform team regarding matterbridge service status.