Skip to content

feat(lattice): wire durable auto config runtime - #4450

Open
mgazza wants to merge 1 commit into
feat/lattice-gateway-ge-autoconfigfrom
feat/lattice-autoconfig-runtime
Open

feat(lattice): wire durable auto config runtime#4450
mgazza wants to merge 1 commit into
feat/lattice-gateway-ge-autoconfigfrom
feat/lattice-autoconfig-runtime

Conversation

@mgazza

@mgazza mgazza commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the default-off live runtime that turns the Gateway and GivEnergy Cloud fragments from #4449 into one atomically applied PredBat generated configuration.

  • binds only active Gateway and automatic GE Cloud providers
  • persists provider fragments and compiled publications with a checksummed two-slot journal
  • publishes topology plus mapper projections in one CAS generation
  • applies immutable full-replacement overlays only at PredBat config boundaries
  • preserves API and explicit apps.yaml overrides; inverter_hybrid is topology-owned when generated, with apps.yaml as the escape hatch
  • requires a fresh provider read after restart/offline before cached state can become active
  • fails closed for EMS and EV discovery in this XIAO-focused slice
  • keeps all legacy writers unchanged unless lattice_autoconfig_enable is exactly true

Merge train

Depends on #4449, which depends on #4444. Review and merge in that order.

Verification

  • 180 Lattice tests passed; 2 environment-only skips under system Python
  • 32 dependency-complete runtime, Gateway, GE wiring, and real durable storage tests passed
  • full custom Gateway suite passed, including 9 Lattice wiring tests
  • GE mapper and live writer-selection tests passed
  • Black, Ruff, cspell, compileall, and git diff checks passed
  • GitNexus staged audit: CRITICAL expected blast radius across 24 files, concentrated in get_arg, startup/config refresh, and provider run loops; reviewed with focused regressions and two adversarial passes

Rollout

The feature remains disabled by default. Enable only in a staged XIAO/Gateway deployment with lattice_autoconfig_enable: true, then verify restart, provider loss/failover, AC/AIO hybrid detection, and rollback by disabling the flag.

Tracking: https://github.com/Predictive-Cloud-Ltd/predbat-saas-infra/issues/561
Umbrella: https://github.com/Predictive-Cloud-Ltd/predbat-saas-infra/issues/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