Skip to content

feat(cli): hard-fail backup/apply on unsupported Spotify versions#3894

Closed
afonsojramos wants to merge 1 commit into
mainfrom
feat/spotify-version-support-gate
Closed

feat(cli): hard-fail backup/apply on unsupported Spotify versions#3894
afonsojramos wants to merge 1 commit into
mainfrom
feat/spotify-version-support-gate

Conversation

@afonsojramos

Copy link
Copy Markdown
Member

Summary

  • Add supported-versions.json (seed allowlist: Spotify 1.2.86–1.2.93) shipped with releases
  • Gate backup, apply, and auto so unknown Spotify versions fail closed with a clear message
  • Escape hatches: --force-unsupported-spotify and spotify_version_check=0
  • Version helpers normalize prefs strings (1.2.93.x…1.2.93) and encode classmap keys for later phases

Why

Spicetify currently fails late (regex mismatch) on new Spotify builds. This is the first step toward only applying to known versions, with the support list as the source of truth.

Overrides

Mechanism Effect
Default Hard-fail when version is outside the list
--force-unsupported-spotify One-shot bypass (warns)
spotify_version_check=0 Persistent bypass in config

restore / clear / config commands stay ungated so recovery always works.

Test plan

  • go test ./src/utils/
  • go build
  • On a supported Spotify: spicetify backup proceeds past the gate
  • Temporarily shrink the range so current Spotify is excluded: backup/apply exit 1 with support summary
  • Same case with --force-unsupported-spotify continues after a warning
  • spicetify config spotify_version_check 0 then backup continues after a warning
  • restore still works when version is unsupported
  • Release archives include supported-versions.json (build.yml)

Ship a support list and refuse to mutate Spotify when the installed
client is outside the known window, with explicit override escapes.
@afonsojramos
afonsojramos deleted the feat/spotify-version-support-gate branch July 20, 2026 08:53
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3551b97d-9f1b-4004-895e-728ee6680dd5

📥 Commits

Reviewing files that changed from the base of the PR and between 1ff95d2 and dff2428.

📒 Files selected for processing (12)
  • .github/workflows/build.yml
  • spicetify.go
  • src/cmd/apply.go
  • src/cmd/auto.go
  • src/cmd/backup.go
  • src/cmd/support.go
  • src/utils/config.go
  • src/utils/spotify_version.go
  • src/utils/spotify_version_test.go
  • src/utils/supported_versions.go
  • src/utils/supported_versions_test.go
  • supported-versions.json
 ________________________________________________________________________
< Brb...inventing the time machine to fix your code before you wrote it. >
 ------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/spotify-version-support-gate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@spicetify spicetify locked and limited conversation to collaborators Jul 20, 2026
@afonsojramos
afonsojramos restored the feat/spotify-version-support-gate branch July 20, 2026 09:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant