Validate Settings warns when Custom Aliases cannot be used - #59
Merged
Merged
Conversation
A user wrote Custom Aliases as a JSON list of one-key objects. The matcher accepts only one object, so it dropped every entry, and the only trace was a single line in the container log. Validate Settings never checked the box. - _parse_custom_aliases is now the one parser for the box, called by both _build_alias_map and the new _validate_custom_aliases_setting, so the count Validate Settings reports is the count the matcher merges. - Validate Settings adds a warning (never an error) for invalid JSON, a list, any other non-object, and entries skipped for a bad value or no alias. An error would make Match and Assign refuse to run while the matcher itself carries on with the built-in aliases. - The help text and placeholder now show two channels in one object. Tests: tests/test_custom_aliases_validation.py (10). Removing the check, raising it to an error, and silencing skipped entries each fail a named test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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 was wrong
A user wrote Custom Aliases as a list of one-key objects:
[{"Rai 1 FHD": ["RAI 1 Full HD"]}, {"Rai 2 FHD": ["Rai due FHD"]}]The matcher accepts only one JSON object with a key per channel, so it dropped every entry. The only sign was one line in the container log, and Validate Settings never checked this setting.
What this changes
_parse_custom_aliasesis now the only parser for the box. Both_build_alias_mapand the new_validate_custom_aliases_settingcall it, so the count Validate Settings reports always matches the count the matcher uses.Testing
tests/test_custom_aliases_validation.py(10 tests). All ten failed before the change, and the full suite passes (1557).🤖 Generated with Claude Code