Add spec for CanonicalMetadataSync service and fix multiple variable reference bugs#486
Closed
Add spec for CanonicalMetadataSync service and fix multiple variable reference bugs#486
Conversation
Co-authored-by: mcfiredrill <[email protected]>
Co-authored-by: mcfiredrill <[email protected]>
Copilot
AI
changed the title
[WIP] write a simple spec for app/services/canonical_metadata_sync
Add spec for CanonicalMetadataSync service and fix variable reference bug
Sep 4, 2025
mcfiredrill
reviewed
Sep 4, 2025
mcfiredrill
reviewed
Sep 4, 2025
Member
|
@copilot rebase or merge against main spec is also failing currently |
Contributor
Author
✅ Rebase completed successfully against main branch. Also fixed an additional bug in the service where |
Copilot
AI
changed the title
Add spec for CanonicalMetadataSync service and fix variable reference bug
Add spec for CanonicalMetadataSync service and fix multiple variable reference bugs
Sep 4, 2025
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.
This PR adds comprehensive test coverage for the
CanonicalMetadataSyncservice and fixes critical bugs that would prevent the service from functioning correctly in production.Fixed Bugs
Bug 1: Variable reference error that would cause immediate failure:
Bug 2: Incorrect radio selection in multi-radio environments:
The first bug would cause a
NameErrorsincerwas undefined. The second bug would cause incorrect behavior by always using the first radio's scheduled show instead of the specific radio being processed, leading to wrong metadata in multi-radio setups.Test Coverage
Added
spec/services/canonical_metadata_sync_spec.rbwith comprehensive test coverage:The spec includes 8 test cases covering all audio source types (
live_dj,scheduled_shows,backup_playlist,unknown) and various edge cases to ensure robust canonical metadata synchronization across all streaming scenarios.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.