Lattice 1/4: projection framework (dormant, flag-gated)#4081
Draft
mgazza wants to merge 3 commits into
Draft
Conversation
Fragment/Node/Capability/AccessPath dataclasses, merge_fragments (by identity, ranked access paths), resolve_read/resolve_control + control_candidates (best available path, clamp, fallback), and the inverter_fragment producer builder. Zero PredBat/HA deps — fully unit-tested standalone. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ute/apply) PROJECTION_TABLE maps a curated (capability, scope) onto predbat.* entities; LatticeProjection discovers producers data-drivenly, merges their fragments, and resolves reads/writes — would_handle() gates the live path and apply() executes with provider fallback. Flag-gated, no live wiring yet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…itch LatticeComponent (registered in COMPONENT_LIST, phase 2) refreshes the merged graph and logs the site topology when lattice_projection_enable is on; a no-op when off (default). Adds the lattice_projection_enable config switch. Strictly additive — nothing changes until enabled. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
First of a 4-PR merge train adding the Lattice device-control projection layer. Pure framework — additive, OFF by default (
lattice_projection_enable), touches no live control path.Commits (story):
lattice.py)LatticeProjection(lattice_projection.py)LatticeComponent+ registration + enable switchEach integration can publish a topology fragment; the projection merges them by identity and resolves a curated
(capability, scope)onto existingpredbat.*entities with provider fallback. Nothing is wired to control yet.Tests: 40 standalone unit tests —
python -m pytest apps/predbat/test_lattice.py.Train: PR1 (this) → 2 producers → 3 hot-path → 4 brand adapters.
🤖 Generated with Claude Code