Skip to content

r202639: breaker position range - #201

Merged
cayossarian merged 3 commits into
prerelease/3.8from
feat/panel-positions
Oct 9, 2026
Merged

cayossarian merged 3 commits into
prerelease/3.8from
feat/panel-positions

Conversation

@cayossarian

Copy link
Copy Markdown
Member

r202639: the snapshot reports the panel's breaker position range, and a model reported as UNKNOWN reads as no model.

  • New fields SpanPanelSnapshot.first_position / last_position (int | None): the reported model's range from PANEL_POSITIONS_BY_MODEL; the occupied range where the model is not known; None on the flat schema. Only a range: no position is filled in. A panel whose circuits occupy spaces outside its model's range keeps the table's range and is reported once at WARNING.
  • The reference tree's three single-space circuits move from spaces 1-3 into the model's range (manifest and recapture from the pinned emitter, in their own commit); four tests follow the new spaces.
  • info/model UNKNOWN reads as model = None, sizes the panel 0 without a per-snapshot warning, and is not model drift.
  • New field SpanPanelSnapshot.publishes_solar_roles: True where any circuit declares connection/feeds-role.
  • Six acceptance tests now pass and leave the expected-failure registry.

Checks:

  • pytest tests -q: 1550 passed, 7 skipped, 14 xfailed (40 new; 6 registry rows removed).
  • pre-commit run --all-files: all hooks pass (ruff, black, mypy, pylint, bandit, vulture, coverage 96.53%).

The manifest placed three single-space circuits on spaces 1 to 3, which
are outside the breaker positions a panel of the reference's model has.
They move to 9, 10 and 11, marked as a third deliberate divergence from
the emitter's example, and parent_child_tree.json is recaptured from the
pinned ebus-panel-sim 0.8.0. Only those three info/spaces values and the
wall-clock $description versions change.

The tests that pinned the old space, or added a circuit at a position
outside the model's range, follow.

Part of the spanos3/r202639/03 batch 2 work.
… for an unknown model

SpanPanelSnapshot.first_position and last_position say which breaker
positions the panel has. They come from the reported model through
PANEL_POSITIONS_BY_MODEL, and from the occupied spaces where the model is
not known. They are only a range: nothing is filled in over it. Where a
panel's circuits occupy spaces outside its model's range, the range stays
the table's and the adapter warns once for that panel, naming the model,
the range and the occupied extremes.

A model reported as UNKNOWN names no model. It reads as None, sizes the
panel 0 without a warning on every snapshot, and is not model drift.

SpanPanelSnapshot.publishes_solar_roles is True where any circuit
declares connection/feeds-role. The acceptance tests these satisfy leave
the expected-failure registry.

Part of the spanos3/r202639/03 batch 2 work.
Resolved: SchemaOneAdapter.__init__ keeps the per-device grace state that
replaced the feed-wait fields, and adds the once-per-panel positions flag.
@cayossarian
cayossarian merged commit 1a924eb into prerelease/3.8 Oct 9, 2026
5 checks passed
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.

1 participant