Skip to content

feat(lattice): add invalidatable auto-config compiler - #4321

Open
mgazza wants to merge 1 commit into
feat/lattice-charge-power-dispatcherfrom
feat/lattice-fragment-autoconfig
Open

feat(lattice): add invalidatable auto-config compiler#4321
mgazza wants to merge 1 commit into
feat/lattice-charge-power-dispatcherfrom
feat/lattice-fragment-autoconfig

Conversation

@mgazza

@mgazza mgazza commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a pure, default-off compiler for immutable Lattice provider snapshots
  • let any registered integration invalidate a monotonic generation and trigger a coalesced full re-read
  • correlate provider-local nodes only through explicit stable identity assertions
  • produce deterministic topology, aliases, provenance, provider generations, fields, warnings, and a semantic digest
  • preserve last-known-good state across provider/compile/materialization failures

This PR is chained on #4318. It does not register a provider, write PredBat arguments, connect the planner, or enable any runtime path.

Invalidation and materialization safety

  • one compiler flight at a time
  • every attempt freshly reads every provider
  • burst invalidations coalesce
  • invalidation during a compile guarantees one bounded follow-up
  • a superseded candidate is never materialized
  • every accepted provider/generation/reason remains auditable
  • replayed/regressing generations and same-generation content changes fail closed
  • transient loss of a previously active provider cannot materialize destructive removal
  • fatal compile/materialization failures retain caller-driven retry without requiring a fake new provider generation
  • materializer feedback tokens cannot recurse into another compile

Identity and merge safety

  • equal raw node IDs from different providers remain distinct
  • explicit stable identities can correlate different provider-local node IDs
  • provider identity reuse, conflicting strong identities, topology identity conflicts, duplicate providers, and qualified alias collisions fail closed
  • semantic digest ignores generation-only bookkeeping while preserving current provenance
  • current singular primary/control roles reject ambiguity; indexed/grouped roles and the projection layer remain a separate prerequisite before provider materialization

Validation

  • auto-config compiler: 25/25 passed
  • existing Lattice topology merge: 11/11 passed
  • Black: passed
  • pre-commit Ruff, Black, cspell, whitespace/EOF hooks: passed
  • GitNexus staged change detection: LOW, two new files, zero affected execution flows

Tracking

  • Predictive-Cloud-Ltd/predbat-saas-infra#561
  • 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