revert: restore accumulator and consumer to stable 2.5.1 behavior#133
Merged
cayossarian merged 2 commits intomainfrom Apr 10, 2026
Merged
revert: restore accumulator and consumer to stable 2.5.1 behavior#133cayossarian merged 2 commits intomainfrom
cayossarian merged 2 commits intomainfrom
Conversation
The 2.5.2 lifecycle changes (property clearing, unconditional lifecycle transition on $state=init, generation counter) and the 2.5.3 partial fix both caused false energy dip spikes on panel reboots and network events. Revert accumulator.py and homie.py to their 2.5.1 state. The existing dirty-node tracking handles reboot transitions correctly without special-case lifecycle management. Bumps version to 2.5.4.
There was a problem hiding this comment.
Pull request overview
Reverts the MQTT/Homie accumulator + consumer lifecycle behavior back to the stable 2.5.1 semantics to prevent false energy “dip spike” artifacts during panel reboots and transient network events, and bumps the package version to 2.5.4.
Changes:
- Reverted
HomiePropertyAccumulatorlifecycle handling (removes generation counter and avoids unconditional READY disruption on transient$statevalues likeinit). - Simplified
HomieDeviceConsumersnapshot caching by removing generation-based cache invalidation and relying on dirty-node tracking. - Updated release metadata (version bump + changelog) and removed tests that targeted the reverted behavior.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/span_panel_api/mqtt/accumulator.py |
Removes generation tracking and restores prior lifecycle transition behavior. |
src/span_panel_api/mqtt/homie.py |
Drops generation-based cache invalidation logic in snapshot building. |
tests/test_accumulator.py |
Removes reboot/description-related lifecycle tests tied to the reverted behavior. |
tests/test_mqtt_homie.py |
Removes a snapshot-cache invalidation test that depended on the reverted generation/lifecycle logic. |
CHANGELOG.md |
Adds 2.5.4 entry describing the revert; updates version history summary. |
pyproject.toml |
Bumps project version to 2.5.4. |
uv.lock |
Updates locked project version; also drops some wheel entries for certain architectures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ervation Lock in the core 2.5.4 revert invariants: transient $state values (init, sleeping, alert) must not disrupt READY lifecycle or snapshot caching, and property/timestamp/target values must survive reboot cycles with cache invalidation driven by dirty-node tracking.
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.
The 2.5.2 lifecycle changes (property clearing, unconditional lifecycle transition on $state=init, generation counter) and the 2.5.3 partial fix both caused false energy dip spikes on panel reboots and network events.
Revert accumulator.py and homie.py to their 2.5.1 state. The existing dirty-node tracking handles reboot transitions correctly without special-case lifecycle management.
Bumps version to 2.5.4.