Repository navigation
Sync main into prerelease/3.8 - #209
Merged
Merged
Conversation
…r and check every property Each capture is replayed through SchemaOneAdapter and every declared property is perturbed to see which snapshot leaves it moves. The harness fails on a valued property that reaches nothing without code that says why, on a value with no valued wire property behind it, and on a mapped value that breaks the transform documented for its field. The rules cite the library code behind every transform, derivation and intentional drop, and cover every row of _PROPERTY_FIELD_MAP and the lugs tables. Two cells: the MAIN 32 capture on spanos3/r202639/03 and the MAIN 32 capture on spanos3/r202633/02, vendored byte-identical from the eBus panel simulator's v0.9.0 tag with their SHA-256 pinned. The r202633 capture's upstream-lugs link status is recorded as a deferral with its reason. The check that no device is shown by its own id while it forms the grid is a strict xfail until the fix later in this branch. The harness is type-checked by the mypy hook like the other test support.
is_sheddable is now a shed priority (OFF_GRID or SOC_THRESHOLD) and a controllable relay. SPAN's r202633 changelog asks consumers to treat UNKNOWN as "not yet known" rather than as sheddable, which the previous priority != NEVER rule did not.
On r202639 every non-root device publishes its id as its $description.name, so while a battery formed the grid, grid_forming_device_name showed the battery's device id. device_display_name now keeps $description.name only where it differs from the id, falls back to vendor and model, or the model alone, and is otherwise None; it is the only producer of the snapshot's device names. The fidelity cells' check that no device is named by its own id now passes on both captures.
… captures The two captures are distributed under the eBus panel simulator's MIT license, and the sdist carries tests/, so that repository's LICENSE at the same v0.9.0 tag is copied beside them byte for byte as distribution-enclosure-simulator.LICENSE, cited in both READMEs and pinned by SHA-256 with the captures. The hooks that rewrite whitespace and line endings now skip the captures and the license. The READMEs no longer say the Wi-Fi SSID is masked: both captures declare status/wifi-ssid and publish no value for it.
…luded Only the captured value was held to its transform, so a property the capture holds at zero, which reads the same under identity and negation, could carry a wrong sign unseen; the battery reads 0 W on both MAIN 32 captures, so its firmware-dependent frame was never checked. Every value the perturbation publishes is now held to the same transform. Derivations simple enough to state (two poles or more, not relay-controllable, a CONNECTED cloud link, an OK link, the listed spaces) are checked against their rule rather than accepted whatever they hold, and the MID's serial is a literal. The sign self-test now flips a circuit drawing power with 0.0 - x, so the sign itself fails rather than a -0.0, and new self-tests flip the battery's frame while it reads 0 W and invert is_240v.
The identity-and-topology drop rule covers whole classes of property, so a valued property it newly covers passed without review. The report now lists the rows dropped on purpose while carrying a value, and each MAIN 32 cell pins that set with the reason each drop is right, as the deferrals already are. A latent property is one the library's tables address that moved nothing when given a value, which the fate's description now says, rather than that it would be read.
…names Treat an UNKNOWN shed priority as not sheddable and never show a device id as a name
…gelog The client-rebuild docstring and the 2.6.4 changelog entry cited the path of a design note that is not published, so a reader could not follow it. Both already describe the recovery in full, so the citation goes and nothing replaces it.
…ference Remove an internal design-note reference from a docstring and the changelog
… 1.3.0b1 Betas of 3.7.0 and the two adapters' 1.3.0. Both adapters now floor on span-panel-api 3.7.0b1, whose snapshot fields accept the unknown values they report, and the schema-0 and schema-1 extras floor on the 1.3.0b1 adapters. Beta floors name betas, as RELEASE.md describes; the finals restore stable ones. The changelog entries stay under Unreleased, since a beta's bump changes no heading.
Release span-panel-api 3.7.0b1, schema-0 1.3.0b1 and schema-1 1.3.0b1
Brings the adapter fidelity harness and its MAIN 32 cells, the UNKNOWN shed-priority and display-name fixes, the 3.7.0b1 release and the docstring path removal onto the pre-release line. Resolved: - .pre-commit-config.yaml: the whitespace and line-ending hooks skip both sets of byte-pinned copies, the reference captures under tests/fixtures/captures/ and the MAIN 32 captures with their LICENSE. - packages/schema-1/pyproject.toml: the core floor is main's 3.7.0b1, and the note that it rises to 3.8.0b1 when that release is cut stays. The versions are main's 3.7.0b1 / 1.3.0b1 until the 3.8.0b1 release. Adapted so the harness holds on this line, in the MAIN 32 rules: the model reads None for UNKNOWN and sets the first and last positions; the occupied spaces set them where the table lacks the model; busbar current, frequency, the upstream protection rating, nominal voltage, protection functions, the feeds role and both shared-with lists each get their transform; a circuit's feed status sets a fed battery's link; and battery presence, measures_outside_panel and publishes_solar_roles are derivations from the declarations. The mapped-field coverage test also reads the upstream lugs' connection table.
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.
Merges
mainintoprerelease/3.8by merge commit: the adapter fidelity harness and its MAIN 32 cells (#196), the docstring path removal (#198) and the 3.7.0b1 release (#199).Conflicts resolved:
.pre-commit-config.yaml: the whitespace and line-ending hooks skip both sets of byte-pinned copies, the reference captures undertests/fixtures/captures/and the MAIN 32 captures with their LICENSE.packages/schema-1/pyproject.toml: the core floor ismain's>=3.7.0b1, keeping the note that it rises to 3.8.0b1 when that release is cut. Versions aremain's 3.7.0b1 / 1.3.0b1 until then.Adapted so the harness holds on this line (MAIN 32 rules, each citing the library code):
info/modelreadsNoneforUNKNOWNand setsfirst_position/last_positionfromPANEL_POSITIONS_BY_MODEL;info/spacessets them where the table lacks the model;meter/busbar-current,meter/frequency,info/nominal-voltage(identity); the upstream lugs'connection/overcurrent-protection(int);breaker/protection-functions,connection/feeds-role,meter/andswitch/shared-with-device-ids(derived, with the rule stated where it is simple); a circuit'sfeeds-device-statussets a fed battery'sconnected.battery.present,circuit.measures_outside_panel,panel.publishes_solar_roles.Checks:
pytest tests -q: 1799 passed, 7 skipped, 9 xfailed (tests/adapter_fidelity: 30 passed).pre-commit run --all-files: all hooks pass,uv lock --checkincluded.