Add validator to prevent integration domain overrides of core - #5442
Open
ludeeus wants to merge 2 commits into
Open
Add validator to prevent integration domain overrides of core#5442ludeeus wants to merge 2 commits into
ludeeus wants to merge 2 commits into
Conversation
Adds an integration-only action check that fails when the integration domain from manifest.json matches a Home Assistant core integration domain. The core domain list is read from the integrations.json file published by the Home Assistant site. HACS policy already states that integrations overriding a core integration are not accepted as defaults, but until now that was only enforced by a reviewer reading the hacs/default pull request. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qc22QRVJF4ssjo7wPzBn2A
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new validation step in the HACS action validation pipeline to detect when an integration’s manifest domain conflicts with an existing Home Assistant core integration domain, using the next.home-assistant.io/integrations.json domain list to catch upcoming core additions.
Changes:
- Added
core_domain_overridevalidator that fetches core integration domains and fails validation on domain collisions. - Added dedicated validator tests and updated action/validation snapshots (API usage + logs) to account for the new check.
- Added proxy fixture for
next.home-assistant.io/integrations.jsonand updated action test setup to mock the new endpoint.
Reviewed changes
Copilot reviewed 15 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| custom_components/hacs/validate/core_domain_override.py | New validator that fetches core domains and blocks domain overrides. |
| tests/validate/test_core_domain_override_check.py | Test coverage for pass/fail/skip and error conditions for the new validator. |
| tests/action/test_hacs_action_integration.py | Updates action test to mock the new endpoint and adjust expected check counts. |
| tests/fixtures/proxy/next.home-assistant.io/integrations.json | Adds proxy fixture for the new external endpoint used by the validator. |
| tests/snapshots/api-usage/tests/validate/test_core_domain_override_check*.json | Captures expected external calls for the new validator tests. |
| tests/snapshots/api-usage/tests/validate/test_async_run_repository_checkstest-async-run-repository-checks.json | Updates expected external calls due to the new validator being executed. |
| tests/snapshots/api-usage/tests/action/test_hacs_action_integration*.json | Updates action snapshots to include the new endpoint call. |
| tests/snapshots/action/test_hacs_action_integration/*.log | Updates logs to include the new validator and updated check counts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
ludeeus
marked this pull request as ready for review
July 31, 2026 13:20
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.
Summary
This PR adds a new validator that checks whether a HACS integration is attempting to override a domain that already exists in Home Assistant core. This prevents accidental or intentional conflicts with core integrations.
Key Changes
New validator:
core_domain_override.py- Validates that integration domains don't conflict with core Home Assistant domainshttps://next.home-assistant.io/integrations.jsonintegration_manifestcheck instead)Comprehensive test coverage:
test_core_domain_override_check.pywith 5 test casesIntegration into validation pipeline: Updated action tests to include the new validator
Implementation Details
HacsCategory.INTEGRATIONrepositoriesValidationException