Skip to content

fix(gecloud): parse the integer rating of 3-phase hybrid models (GIV-3HY-11) - #5293

Merged
springfall2008 merged 2 commits into
mainfrom
fix/gecloud-3hy-integer-rating-5136
Sep 30, 2026
Merged

springfall2008 merged 2 commits into
mainfrom
fix/gecloud-3hy-integer-rating-5136

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

This is an automated draft PR generated from issue #5136 — a maintainer should review it before merging.

Fixes #5136

Summary

get_max_inverter_rate_from_model() only recognised decimal ratings, so GIV-3HY-11 (11 kW 3-phase hybrid) fell through to max_charge_rate. That value is a battery figure, and GE Cloud reports it variously as 9984, 7987 or 11000 W on 11 kW units. It then went into inverter_limit and understated the clipping and export ceiling in the plan.

Following the approach recommended in the 2026-09-28 comment on the issue:

  • The decimal pass is unchanged.
  • A new second pass accepts an integer rating only when it is a whole hyphen-bounded segment directly after 3HY-: (?:^|-)3HY-(\d{1,2})(?=-|$), case-insensitive. A "last integer" rule would have misread GIV-AIO-GW2 as 2 kW. This pass cannot match GW2 or G3-style suffixes.
  • Models with no rating (All-In-One, Gateway, Plant EMS, GIV-AIO-GW2) keep today's max_charge_rate fallback.
  • New: if a model containing HY still falls back, it logs one warning per model. A future naming scheme will then show up in the log, where today the limit is silently wrong.

Testing

  • ./run_pre_commit (from coverage/): all hooks passed, and the quick suite reported "All tests passed".
  • New rows in _test_get_max_inverter_rate_from_model (ge_cloud suite):
    • GIV-3HY-11 → 11000, GIV-3HY-8 → 8000, giv-3hy-5 → 5000
    • GIV-AIO-GW2, GIV-3HY-G3 and GIV-3HY-110 keep the fallback
    • ALPS HY-6.0-GL → 6000 (the decimal pass still wins)
    • A check that an unparseable hybrid warns exactly once and a non-hybrid (Gateway) stays silent
  • The new test fails without the fix and passes with it:
    • With gecloud.py stashed, tools/triage_test.sh ge_cloud gave 123 passed, 1 failed. The 3HY rows returned 9984/7987/4000 and no warning was logged.
    • With the fix restored: 124 passed, 0 failed.

Notes

  • max_discharge_rate was deliberately not adopted as the fallback. It is still a battery figure rather than an AC rating, and switching to it would change behaviour for every digit-less model. Both the triage comment and the follow-up flagged this as a decision for the maintainer.
  • The GIV-3HY-8 and GIV-3HY-5 strings are assumed formats, because only GIV-3HY-11 has been observed. The anchored regex accepts any 1–2 digit segment after 3HY-.
  • Blast radius: GitNexus impact rated this LOW. By search, the only production caller is publish_info() (gecloud.py). detect_changes reports low risk and no affected processes.
  • The new model_rate_warned set is initialised in GECloudDirect.initialize() and mirrored in the MockGECloudDirect test double, the same way as the existing validation_parse_warned.

🤖 Generated with Claude Code

…3HY-11) instead of falling back to max_charge_rate

Fixes #5136

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@springfall2008 springfall2008 self-assigned this Sep 28, 2026
@springfall2008 springfall2008 added BOT_REVIEW Trigger an autotriage BOT_CLEANUP Trigger: bot should address PR review feedback and CI failures, then commit and push labels Sep 28, 2026
@springfall2008
springfall2008 marked this pull request as ready for review September 28, 2026 19:05
Comment thread apps/predbat/gecloud.py Outdated
Comment thread apps/predbat/gecloud.py Outdated
Comment thread apps/predbat/gecloud.py Outdated
Comment thread apps/predbat/gecloud.py Outdated
Comment thread apps/predbat/gecloud.py
Comment thread apps/predbat/gecloud.py Outdated
Comment thread apps/predbat/tests/test_ge_cloud.py
Comment thread apps/predbat/gecloud.py
@springfall2008 springfall2008 removed the BOT_REVIEW Trigger an autotriage label Sep 28, 2026
…punctuation, 3HY before decimal, readable fallback warning, publish_info tests

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@springfall2008 springfall2008 removed the BOT_CLEANUP Trigger: bot should address PR review feedback and CI failures, then commit and push label Sep 28, 2026
@springfall2008
springfall2008 merged commit 3c415f5 into main Sep 30, 2026
2 checks passed
@springfall2008
springfall2008 deleted the fix/gecloud-3hy-integer-rating-5136 branch September 30, 2026 07:03
springfall2008 added a commit that referenced this pull request Oct 2, 2026
…0-01

docs(debug-journal): fold in the 2026-10-01 queue slice (9 candidates); mark GH#5313 fixed by PR #5315, GH#5136 by PR #5293, GH#5222 by PR #5283, the iog-slot-io-adjusted row by PR #5304, GH#5068 reworked by PRs #5309/#5314; add the dynamic-load car cancel row and the GH#2649/#5302/#5324 findings
gcoan pushed a commit to gcoan/batpred that referenced this pull request Oct 3, 2026
…); mark GH#5313 fixed by PR springfall2008#5315, GH#5136 by PR springfall2008#5293, GH#5222 by PR springfall2008#5283, the iog-slot-io-adjusted row by PR springfall2008#5304, GH#5068 reworked by PRs springfall2008#5309/springfall2008#5314; add the dynamic-load car cancel row and the GH#2649/springfall2008#5302/springfall2008#5324 findings

Co-Authored-By: Claude Code <noreply@anthropic.com>
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.

gecloud: max_inverter_rate falls back to max_charge_rate on GIV-3HY-11 as the model rating is not parsed

1 participant