feat(cli): classmap-aware support reporting and migration tooling#3896
Closed
afonsojramos wants to merge 15 commits into
Closed
feat(cli): classmap-aware support reporting and migration tooling#3896afonsojramos wants to merge 15 commits into
afonsojramos wants to merge 15 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Stacked on #3895. Builds the classmap-aware layer on top of the version gate, toward the v3 goal of per-version, saved-across-versions mapping:
src/utils/classmap.go): nested semantic-path -> hashed-class tree with validation, resolution, and leaf counting, matching the@delu/tailor/spicetify/classmapsshape. Lookup walks search roots in documented order (binary dir, then config dir); within a root,classmap.jsonwins overclassmap-*.jsonglobs.spicetify support:supported-versions.jsongains optional per-version map metadata (maps,default_map_status), and a newspicetify support [version]command reports allowlist status, classmap key, map status, and local classmap presence. An unavailable list renders asunknownrather thannot allowlisted, matching the gate's fail-open stance.scripts/), dev-only:classmap_capture.py: migrates a base classmap to a new target using CSS signature similarity + css-map semantic fit, with false-friend rejection (e.g.actionBarcan never satisfy a playbar path), evidence-based confidence labels, and explicitstalemarkers for leaves that keep their old hash.classmap_cdp_verify.mjs: verifies a classmap against a live Spotify client over CDP (hash + semantic modes, optional UI navigation). Requires Node >= 22, paths via--out-diror explicit flags.classmap_e2e.sh: orchestrates migrate -> static verify -> CDP verify. Enables remote debugging by appending--remote-debugging-portto existingspotify_launch_flags(no--remote-allow-origins=*), and restores the originalconfig-xpui.inion exit, including on Ctrl-C/SIGTERM. Applied (non-stock)xpui.spacopies are detected and never used as a migrate source.Test plan
go test ./...: classmap validation/resolution, multi-root precedence (root order beats glob names, within-root preference), schema v2 negatives (bad status, bad key, duplicate normalized keys), support report with maps, list-unavailable reporting.python3 -m unittest scripts.test_classmap_capture: 14 tests covering the hash heuristic, semantic false friends, identity/stale handling, and the CSS-evidence rules.spicetify supportfor supported, unsupported, and missing-list cases.