Skip to content

feat(lattice): add complete inventory and Deye fragments - #4352

Open
mgazza wants to merge 2 commits into
feat/lattice-reference-feed-fragmentsfrom
feat/lattice-complete-inventory-fragments
Open

feat(lattice): add complete inventory and Deye fragments#4352
mgazza wants to merge 2 commits into
feat/lattice-reference-feed-fragmentsfrom
feat/lattice-complete-inventory-fragments

Conversation

@mgazza

@mgazza mgazza commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a generic, default-off complete-inventory Lattice fragment publisher
  • add a Deye station/inverter normalizer on that generic seam
  • publish only provider-local REFERENCE topology and explicitly API-verified serial identity
  • route accepted inventory, liveness, and removal changes through the existing durable fragment
    invalidation contract

This is stacked on #4350 and has no production registration or live Deye integration.

Safety properties

  • authority is 0; capabilities, roles, config projections, control, auth, endpoints, and TOU
    state are absent
  • a newer complete snapshot replaces the provider-local view, so omitted observations disappear
  • an explicit empty inventory remains distinct from the irreversible whole-provider tombstone
  • replay, same-generation mutation, duplicate ownership, unknown membership, and ambiguous verified
    serials fail before persistence
  • only api_verified_serial can emit a strong serial identity
  • Unicode controls, format characters, and surrogates are rejected before encoding or persistence
  • provider iterable faults are replaced with value-free errors; source values do not survive in
    messages, args, causes, or contexts
  • generic and Deye inputs consume at most maximum + 1; oversized and infinite streams terminate
    before any durable write
  • every provider snapshot, durable state, alias, identity, role, projection, value, transform,
    generic observation, and Deye observation is reconstructed through exact class conversion and
    must already equal the canonical result; normalization-equivalent post-construction mutation
    fails before persistence or invalidation

The publishers are disabled by default, structurally undiscoverable until explicitly enabled and
seeded, and import no live Deye/auth/control code.

Validation

  • independent adversarial review completed after the initial blocker-fix cycles and a fresh final
    read-only canonical-mutation review
  • Python 3.9: 253 non-control Lattice tests pass
  • Python 3.14: 253 non-control Lattice tests pass
  • independent hostile matrix: 152/152 cross-provider tests pass on both runtimes
  • publish/restart/registry/compiler normalization probes perform zero durable writes or
    invalidations and preserve last-known-good
  • Black, Ruff, cspell, pre-commit hooks, and diff checks pass
  • GitNexus final staged analysis: LOW, 8 files, 117 changed symbols, 0 affected flows

The sole full-discovery import error is pre-existing environment protobuf skew in
test_lattice_control (missing protobuf on Python 3.9; gencode 7.34.1/runtime 7.34.0 on Python
3.14).

Not included

  • no live Deye discovery/poller wiring
  • no projection or automatic-configuration materialization
  • no configuration or control write
  • no 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