Skip to content

feat(lattice): add Enphase inventory fragment - #4358

Open
mgazza wants to merge 1 commit into
feat/lattice-complete-inventory-fragmentsfrom
feat/lattice-enphase-inventory-fragment
Open

feat(lattice): add Enphase inventory fragment#4358
mgazza wants to merge 1 commit into
feat/lattice-complete-inventory-fragmentsfrom
feat/lattice-enphase-inventory-fragment

Conversation

@mgazza

@mgazza mgazza commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a pure, default-off Enphase complete-inventory Lattice fragment publisher on the generic
inventory seam from #4352.

The publisher accepts explicit complete site/device discovery snapshots for the closed inventory
kinds gateway, inverter, battery, and meter. It emits provider-local REFERENCE topology;
only an explicitly API-verified hardware serial can become a strong cross-provider identity.

This PR is stacked on #4352. It is unregistered and imports no live Enphase API, authentication,
endpoint, scheduler or control code.

Safety properties

  • authority is 0; capabilities, roles, config projections, control claims and secrets are absent
  • newer complete inventory replaces the provider-local view; omitted observations disappear
  • explicit empty inventory is distinct from irreversible provider removal
  • site/device ownership, membership, cardinality, health and generation rules are inherited from
    the common durable adapter boundary
  • outer Enphase observations are reconstructed exactly before conversion; values that merely
    normalize to the canonical form fail before persistence or invalidation
  • conversion uses unbound class methods, so instance-shadowed callbacks cannot inject topology or
    strong identity
  • rejected or faulting input yields value-free errors with zero durable writes and invalidations
  • streams consume at most maximum + 1; oversized and infinite inputs terminate

Validation

  • focused Enphase boundary and hostile mutation tests on Python 3.9 and 3.14
  • full non-control Lattice matrix on Python 3.9 and 3.14
  • independent read-only adversarial review
  • Black, Ruff, CSpell, pre-commit and staged diff checks
  • GitNexus exact-worktree staged scope review

Not included

  • no live Enphase discovery or polling
  • no credentials, endpoints or auth state
  • no auto-config materialization
  • no schedule/control write
  • no runtime registration or feature activation

Tracking: Predictive-Cloud-Ltd/predbat-saas-infra#561
Programme: Predictive-Cloud-Ltd/predbat-saas-infra#466

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