Repository navigation
Conversation
Merging this PR will degrade performance by 23.21%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3074 +/- ##
========================================
Coverage 99.77% 99.77%
========================================
Files 300 305 +5
Lines 26564 27006 +442
========================================
+ Hits 26503 26945 +442
Misses 61 61
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
This looks like its at the wrong altitude. We shouldn't be hard coding any of this |
Agreed. Entry already exists from sync. Core PR plus docs make nightly sync produce it. Overlay script hardcodes name, description, dependencies. Next full sync undoes it. Fix dependency in core metadata instead. |
|
|
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Warning
Important issues found.
- A one-component overlay script bypasses the sync pipeline, and the next nightly sync will undo it
- Component-specific string check hardcoded into the shared action converter
Merge upstream main and replace the scoped Adafruit BLE refresh with framework metadata in the common generator. Reject conflicting constraints and cover the behavior in the regular sync suite.
There was a problem hiding this comment.
🟡 Changes recommended
The packaged catalog was not regenerated and committed, so built wheels still expose unsupported-chip choices and the unwanted zephyr dependency in the dashboard.
1 open issue
What changed in this PR
This PR updates the build-time catalog generator to derive chip compatibility from ESPHome framework metadata, keeping unsupported components out of device selections.
Changes:
- Combine platform/framework pairs, root schema validators, and platform auto-loading metadata to derive compatibility.
- Remove implicit framework dependencies while preserving configurable dependencies, and abort generation when constraints conflict.
- Add regression tests for compatibility, dependency filtering, schema scope, and unavailable introspection.
| File | Description |
|---|---|
tests/test_sync_components_frameworks.py |
Adds regression coverage for framework-derived catalog constraints. |
script/sync_components.py |
Derives platform restrictions, filters implicit dependencies, and rejects conflicting constraints. |
Review effort: Balanced (adaptive)
| implicit_frameworks, supported_platforms = _apply_framework_constraints( | ||
| dependencies, | ||
| (introspection.get("root_frameworks") or {}).get(domain), | ||
| _platform_arm_alternatives(domain, stem if domain else top_key, dependencies) | ||
| or _derive_supported_platforms(stem if domain else top_key, dependencies, introspection), | ||
| component_id=component_id, | ||
| ) |
Code Review
PR Review — Derive catalog platform constraints from ESPHome framework metadataMerge-ready. This PR replaces the earlier hardcoded Adafruit overlay with a general, metadata-driven fix at the right layer. Strengths:
Non-blocking notes:
✅ Resolved since last review (1)Previously-flagged issues verified fixed
🟢 Suggestions
1. A rename of Core's closure variable would crash catalog generation with a bare KeyError
|
ESPHome Bot (esphbot)
left a comment
There was a problem hiding this comment.
Tip
No blocking issues found — ready to merge.
|
Addressed the defensive handling suggestions in 8690741, with the test-isolation follow-up in 9f9e460:
Kept this follow-up limited to the generator and existing test file: no helper extraction, generic wrapper traversal, or catalog regeneration. The same-input comparison preserves all 1,203 generated component entries; an independent run of the final snapshot passed 1,200 sync-component tests on Core 2026.11.0. |

What does this implement/fix?
The catalog exposed Zephyr-only components on unsupported chips and presented the auto-loaded Zephyr framework as a configurable dependency.
Derive platform compatibility from Core's platform/framework pairs, root schema validators, and platform
AUTO_LOADmetadata. Keep real component dependencies visible. Stop catalog generation with the affected component ID when known framework and platform constraints conflict. Also fail explicitly if a recognized framework validator has unreadable closure metadata; warn once if Core lacks the platform/framework enum, preserving the existing fallback.Remove the Adafruit BLE refresh overlay. For newer Core exports, the standard schema and docs pipeline supplies optional
ble_trigger(defaulttrue) and the bootloader action with its typed ID. Settingble_trigger: falseis available without the BLE server. Core requires the server when the setting istrue.The checked-in catalog was regenerated through the standard pipeline with the official enriched ESPHome 2026.11.0 schema and matching Core. The unpatched run reproduced the shipped catalog byte for byte. The generated delta is limited to the shared component index and 18 component bodies. The packaged release retains the real
zephyr_ble_serverdependency for Adafruit OTA. The optionalble_triggerfield and manual action appear only in the newer Core export.Related issue or feature (if applicable):
The merged companion PRs are linked below. This PR changes the common catalog generator and adds normal-CI regression tests.
Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocsmaintenancecidependenciesFrontend coordination
Uses existing catalog metadata and form controls. Core validates the conditional BLE-server requirement.
Checklist
ruff,codespell, yaml/json/python checks).tests/where applicable.components.index.json/definitions/components/*.jsonhave not been hand-edited (regenerate viascript/sync_components.pyif a sync is needed).docs/ARCHITECTURE.mdand/ordocs/API.md.The change is limited to build-time catalog generation and uses the existing runtime API and models.
Validation
Follow-up hardening: the missing-freevar and empty-cell regressions exercise the catalog loop, and the missing-enum test exercises the actual import and cached fallback. On the final follow-up snapshot, an independent run passed 1,200 sync-component tests with ESPHome 2026.11.0. An identical-input comparison before/after the follow-up produced the same 1,203 component entries; no generated catalog files changed. Earlier broader test results below belong to their respective preparation snapshots.
The release-pinned catalog and board generation repeated byte for byte. Both
check_catalogruns passed. A built wheel contained the expected index and component bodies, and the installed wheel passed nRF52 picker and lazy body checks in an isolated venv with ESPHome 2026.11.0.Both conflict regressions failed before the fix and passed afterward. The sync suite passed 1,527 baseline and 1,539 candidate tests. Final targeted Ruff lint and format checks passed. An independent review reconstructed the final patch on the reviewed base and passed 1,198 tests plus generator exit probes.
The real dev schema export, docs enrichment, full generation and
check_catalogpassed on the pinned and fresh Core snapshots. The fresh run built 1,238 components and 1,394 automation bodies. It verified the field, default, conditional help, nRF52 picker and typed bootloader action. The earlier same-input comparison identified 17 affected components.The real older Core export retained its BLE-server dependency and omitted the new option and action.
The isolated Chromium smoke was attempted. A cgroup process limit prevented browser rendering from being verified.
Companion pull requests
The conditional-help wording was verified with a separate, unpublished docs patch. It is outside this Builder PR.