Skip to content

chore: sync fork with upstream bolagnaise/PowerSync (v2.12.895) - #42

Closed
Artic0din wants to merge 126 commits into
mainfrom
cursor/sync-upstream-d852
Closed

chore: sync fork with upstream bolagnaise/PowerSync (v2.12.895)#42
Artic0din wants to merge 126 commits into
mainfrom
cursor/sync-upstream-d852

Conversation

@Artic0din

Copy link
Copy Markdown
Collaborator

Summary

Fast-forward sync of this fork with upstream bolagnaise/PowerSync main.

  • Before: 55a8492a (v2.12.857)
  • After: 219b9ed9 (v2.12.895)
  • Delta: 125 commits behind upstream; 0 unique fork commits

Direct push to main and gh repo sync were blocked by branch protection / token scope, so this PR carries the sync.

Notes

No additional local changes — pure upstream fast-forward.

Test plan

  • CI status checks pass
  • Confirm merge brings fork main to 219b9ed9 / v2.12.895
Open in Web Open in Cursor 

bolagnaise and others added 30 commits July 16, 2026 05:39
@cursor

cursor Bot commented Jul 20, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a3e728a9-7600-4387-bc0d-2a27ef469a05)

@Artic0din
Artic0din marked this pull request as ready for review July 21, 2026 11:55
Copilot AI review requested due to automatic review settings July 21, 2026 11:55
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fast-forward sync of this fork with upstream bolagnaise/PowerSync to v2.12.895, bringing in upstream fixes, new features, and expanded regression coverage across Tesla/Powerwall local control, monitoring-mode transitions, quota settlement, and EV automation behavior.

Changes:

  • Add a dedicated “monitoring mode enable” handoff to safely release control before persisting monitoring mode.
  • Prefer fresh Powerwall-local readbacks for certain UI entities (e.g., grid charging / export rule) and expand Powerwall local transport capabilities.
  • Expand quota/optimizer/EV regression tests and bump integration version to 2.12.895.

Reviewed changes

Copilot reviewed 99 out of 100 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_tesla_grid_mode_switches.py Adds coverage for preferring fresh local Powerwall readback and monitoring switch write-free behavior.
tests/test_sungrow_sh_controller.py Adds regression tests around timeout abort/disconnect and export recovery state.
tests/test_run_optimization_atomicity.py Adds regression coverage for reserve-bridge reference usage across dual solves.
tests/test_quota_optimizer_constraints.py Adds HiGHS quota-cap row allocation and quota-boundary LP period split coverage.
tests/test_quota_ledger.py Adds extensive coverage for baseline/availability recovery and confidence transitions.
tests/test_powerwall_signaling.py Adds coverage for permanently-unsupported Hermes JWT exchange behavior.
tests/test_powerwall_local_dcq_snapshot.py Extends DCQ snapshot tests to validate grid charging/export rule fields.
tests/test_powerwall_bms_health.py Adds AST-based coverage ensuring authoritative site count is used for pack count resolution.
tests/test_optimizer_cost_tracking_refresh.py Adds regression test ensuring periodic refresh tracks cost before boundary action.
tests/test_loadpoint_status.py Adds coverage for treating binary_sensor “on” as “connected” for generic chargers.
tests/test_home_load_telemetry.py Adds coverage for PowerSync proxy headers and auth URL parameterization.
tests/test_hold_soc_persistence.py Updates persistence restore expectations for hold-soc cleanup semantics.
tests/test_flow_power_pricing_regressions.py Adds KWatch 5-min vs 30-min merge coverage and avoids overlap.
tests/test_ev_policy_command_view.py Adds regression tests for manual quick session restart/unload behavior.
tests/test_ev_ownership_runtime.py Expands runtime restore coverage to return resumable/expired manual sessions.
tests/test_ev_ownership_leaks.py Adds coverage for OCPP stop canonicalization and manual-stop-hold interactions.
tests/test_ev_ocpp_actions.py Adds regression tests for hysteresis refresh, start/stop behaviors, and generic charger actions.
tests/test_disable_ev_preserve_reserve.py Adds monitoring handoff tests and updates source expectations for monitoring flow.
tests/test_dashboard_dependency_detection.py Adds node-executed regression coverage for authoritative pack counts in the frontend card.
tests/test_custom_optimizer_telemetry.py Adds symtable-based regression coverage for global constant visibility and normalization import path.
tests/test_custom_mobile_telemetry.py Adds new regression suite for custom external-controller mobile telemetry normalization and wiring.
tests/test_currency_sensor_metadata.py Updates Covau metadata expectations and adjusts sigenergy charger state signature usage.
tests/test_covau.py Adds coverage for provider contract period IDs, baseline recovery, and title resolution.
tests/test_config_flow_weather_options.py Adds monitoring handoff behavior checks and ensures disable-idle settings reconcile correctly.
tests/test_battery_optimizer_export_guard.py Adds HiGHS SOC-cap/export deadline regression and loosens brittle “first slot is charge” assertion.
tests/test_amber_price_cache.py Adds coverage for PowerSync bearer validation behavior on 401 invalid_token.
README.md Updates sponsors section (avatar alt text / entries).
docs/wiki/GoodWe.md Documents Hold SoC EMS-mode usage and safety constraints for GoodWe EMS entity path.
custom_components/power_sync/translations/en.json Adds monitoring_cleanup_failed translation key.
custom_components/power_sync/strings.json Adds monitoring_cleanup_failed strings key (base for translations).
custom_components/power_sync/switch.py Adds monitoring handoff integration and prefers fresh Powerwall-local readback for grid charging switch.
custom_components/power_sync/sensor.py Adds custom battery coordinator routing, diagnostics attributes, and Covau period selection logic.
custom_components/power_sync/select.py Prefers fresh Powerwall-local readback for operation mode/export rule selects.
custom_components/power_sync/quota.py Improves baseline establishment rules, availability recovery, and confidence downgrade semantics.
custom_components/power_sync/powerwall_local/transport.py Adds enum helpers, adjusts islanding/scheduling semantics, and introduces backup/authorization read APIs.
custom_components/power_sync/powerwall_local/tedapi_combined.proto Extends proto definitions to support authorization client listing messages.
custom_components/power_sync/powerwall_local/signaling.py Detects permanent “signed_command required” Hermes JWT exchange failures and stops retries/fallback.
custom_components/power_sync/powerwall_local/coordinator.py Exposes new snapshot fields (grid charging enabled / export rule) via API.
custom_components/power_sync/powerwall_local/bms_health.py Adds resolve_physical_battery_count() helper to prefer authoritative site count when valid.
custom_components/power_sync/monitoring.py New helper module to coordinate safe monitoring-mode enable handoff + temporary write-block.
custom_components/power_sync/manifest.json Bumps integration version to 2.12.895.
custom_components/power_sync/inverters/sungrow_sh.py Aborts poll + disconnects on core battery read failure (prevents partial/invalid data use).
custom_components/power_sync/frontend/power-sync-strategy.js Improves battery health card to use authoritative pack count and explain partial relay detail.
custom_components/power_sync/covau.py Adds explicit “period” IDs for base vs bonus windows in provider contract output.
custom_components/power_sync/const.py Adds PowerSync OAuth URL builder with HA identity parameters and stable instance ID support.
custom_components/power_sync/config_flow.py Adds client-instance-id generation/persistence and monitoring-mode handoff during options changes.
custom_components/power_sync/automations/loadpoint_status.py Treats generic “on” status as connected.
custom_components/power_sync/automations/ev_ownership.py Returns resumable/expired manual quick sessions on runtime restore.
.gitignore Ignores local agent/workflow artifacts and Cloudflare wrangler state.
.github/discord-release-last-posted.txt Updates last-posted Discord release marker to v2.12.895.
.agents/skills/powersync-discord-triage/SKILL.md Removed upstream skill artifact from the repo.
.agents/skills/optimizer-bug-hunt/SKILL.md Removed upstream skill artifact from the repo.
.agents/skills/optimizer-bug-hunt/references/verification-playbook.md Removed upstream skill reference artifact from the repo.
.agents/skills/optimizer-bug-hunt/references/invariants.md Removed upstream skill reference artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/trigger-eval.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/feedback.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-2-spread-export-overwrites-charge-slot/without_skill/run-1/timing.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-2-spread-export-overwrites-charge-slot/without_skill/run-1/outputs/diagnosis.md Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-2-spread-export-overwrites-charge-slot/without_skill/run-1/grading.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-2-spread-export-overwrites-charge-slot/with_skill/run-1/timing.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-2-spread-export-overwrites-charge-slot/with_skill/run-1/outputs/diagnosis.md Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-2-spread-export-overwrites-charge-slot/with_skill/run-1/grading.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-2-spread-export-overwrites-charge-slot/eval_metadata.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-1-tesla-reserve-stuck-after-disable/without_skill/run-1/timing.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-1-tesla-reserve-stuck-after-disable/without_skill/run-1/outputs/diagnosis.md Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-1-tesla-reserve-stuck-after-disable/without_skill/run-1/grading.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-1-tesla-reserve-stuck-after-disable/with_skill/run-1/timing.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-1-tesla-reserve-stuck-after-disable/with_skill/run-1/outputs/diagnosis.md Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-1-tesla-reserve-stuck-after-disable/with_skill/run-1/grading.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-1-tesla-reserve-stuck-after-disable/eval_metadata.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-0-hold-soc-stuck-after-restart/without_skill/run-1/timing.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-0-hold-soc-stuck-after-restart/without_skill/run-1/outputs/diagnosis.md Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-0-hold-soc-stuck-after-restart/without_skill/run-1/grading.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-0-hold-soc-stuck-after-restart/with_skill/run-1/timing.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-0-hold-soc-stuck-after-restart/with_skill/run-1/outputs/diagnosis.md Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-0-hold-soc-stuck-after-restart/with_skill/run-1/grading.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/eval-0-hold-soc-stuck-after-restart/eval_metadata.json Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/iteration-1/benchmark.md Removed upstream workspace artifact from the repo.
.agents/skills/optimizer-bug-hunt-workspace/evals/evals.json Removed upstream workspace artifact from the repo.
.agents/skills/focused-delegation/SKILL.md Removed upstream skill artifact from the repo.
.agents/skills/focused-delegation/agents/openai.yaml Removed upstream skill artifact from the repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"""Enable monitoring mode — all control commands will be logged but not executed."""
if self._current_value():
return
_LOGGER.info("Monitoring mode ENABLED — all battery/inverter commands will be blocked")
@Artic0din Artic0din closed this Jul 23, 2026
@Artic0din
Artic0din deleted the cursor/sync-upstream-d852 branch July 23, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants