fix(config): infinite loop on spotify_launch_flags and non-deterministic extension ordering#3847
fix(config): infinite loop on spotify_launch_flags and non-deterministic extension ordering#3847nghiphaam wants to merge 2 commits into
Conversation
…tic extension ordering
📝 WalkthroughWalkthrough
ChangesConfig Determinism Fixes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/cmd/config.go (1)
23-24: 💤 Low valueCorrectly fixes the infinite loop.
The removal of
continueensures the loop advances pastargs = args[2:].Consider adding a warning message to inform users that this field is not editable via the config command (similar to how
toggleTypewarns on invalid values), but this is optional.case "spotify_launch_flags": - // not editable via config command + unchangeWarning(field, "not editable via config command")🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/cmd/config.go` around lines 23 - 24, In the switch branch for case "spotify_launch_flags" (the same branch now falling through to args = args[2:]), add a user-facing warning message indicating this field is not editable via the config command (mirroring the behavior of the invalid toggleType warning) before advancing the args slice so users know why no change is applied; update the code path that currently just skips editing to call the same logging/printing mechanism used for toggleType warnings.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/cmd/config.go`:
- Around line 23-24: In the switch branch for case "spotify_launch_flags" (the
same branch now falling through to args = args[2:]), add a user-facing warning
message indicating this field is not editable via the config command (mirroring
the behavior of the invalid toggleType warning) before advancing the args slice
so users know why no change is applied; update the code path that currently just
skips editing to call the same logging/printing mechanism used for toggleType
warnings.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1458ea3d-aec6-4570-95a8-5c6ad728e942
📒 Files selected for processing (1)
src/cmd/config.go
spotify_launch_flagsinEditConfigusedcontinuewhich skippedargs = args[2:], causing an infinite loop when that field is passed. Also sorts the extension list after map iteration to ensure stable ordering.Summary by CodeRabbit