Skip to content

Lattice 1/4: projection framework (dormant, flag-gated)#4081

Draft
mgazza wants to merge 3 commits into
mainfrom
lattice-pr1-framework
Draft

Lattice 1/4: projection framework (dormant, flag-gated)#4081
mgazza wants to merge 3 commits into
mainfrom
lattice-pr1-framework

Conversation

@mgazza

@mgazza mgazza commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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):

  1. pure topology model + merge + resolve engine (lattice.py)
  2. curated projection table + LatticeProjection (lattice_projection.py)
  3. flag-gated LatticeComponent + registration + enable switch

Each integration can publish a topology fragment; the projection merges them by identity and resolves a curated (capability, scope) onto existing predbat.* 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

mgazza and others added 3 commits June 18, 2026 09:49
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>
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