Make psram mode/speed variant assertions skew-tolerant#1683
Merged
swoboda1337 merged 2 commits intoJun 24, 2026
Conversation
test_sync_components_psram pinned the exact variant list per psram mode/speed (`by_value["octal"] == ["esp32s3"]`). esphome adds psram variants over time (e.g. esp32s31 octal, esp32h4 quad), which flips these to inequality and breaks this repo's downstream test against esphome dev. Assert membership instead, so the inference is still covered without lockstepping to esphome's variant set.
Member
Author
|
@esphbot review |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates PSRAM schema sync tests to be resilient to upstream ESPHome adding new variants, avoiding downstream CI failures caused by pinning exact per-variant option lists.
Changes:
- Switch PSRAM mode/speed assertions from exact list equality to membership checks for key known variants.
- Preserve coverage that each mode/speed option is tagged with compatible variants without locking to a fixed upstream set.
Contributor
PR Review — Make psram mode/speed variant assertions skew-tolerantCorrect, minimal fix for a real downstream-lockstep problem. Merge-ready. What's solid:
Worth noting:
Checklist
Automated review by Kōan (Claude) |
esphbot
approved these changes
Jun 24, 2026
esphbot
left a comment
Contributor
There was a problem hiding this comment.
No blocking issues found.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1683 +/- ##
=======================================
Coverage 99.54% 99.54%
=======================================
Files 227 227
Lines 18129 18129
=======================================
Hits 18047 18047
Misses 82 82
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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 does this implement/fix?
test_sync_components_psram.pypinned the exact variant list per psram mode and speed — e.g.assert by_value["octal"] == ["esp32s3"]andassert by_value["20MHZ"] == ["esp32p4"]. Those lists are derived from the installed esphome'spsramCONFIG_SCHEMA, so the moment esphome adds a psram variant they flip from equality to inequality and the assertion fails.esphome/esphome#17192 adds octal PSRAM for ESP32-S31 and quad for ESP32-H4, which turns
by_value["octal"]into["esp32s3", "esp32s31"]— breaking this repo's downstream test run against esphomedev, with no way for either side to go green first (the same lockstep that #1681 fixed forhas_native_wifi).Fix: assert membership (
"esp32s3" in by_value["octal"]) instead of equality. The unioning logic stays covered (each mode/speed is still tagged with the variants that accept it) without pinning to esphome's exact, growing variant set. Verified the membership assertions hold against the currently-installed esphome.Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocsmaintenancecidependenciesFrontend coordination
Checklist
_psram_config_entries()directly; full pytest suite can't run in this env —conftestdep unavailable. CI runs it.)tests/where applicable.components.index.json/definitions/components/*.jsonhave not been hand-edited.docs/ARCHITECTURE.mdand/ordocs/API.md(N/A).