Skip to content

Phase 1: Session Metadata Foundation#227

Open
griffinmilsap wants to merge 7 commits intodevfrom
feature/session-metadata
Open

Phase 1: Session Metadata Foundation#227
griffinmilsap wants to merge 7 commits intodevfrom
feature/session-metadata

Conversation

@griffinmilsap
Copy link
Copy Markdown
Collaborator

@griffinmilsap griffinmilsap commented Mar 2, 2026

Summary

This PR introduces the session-scoped metadata layer that the later control-plane
work builds on top of.

  • Add session-backed GraphContext / GraphServer commands for connect,
    disconnect, register, clear, and snapshot operations.
  • Introduce structured graph metadata models in graphmeta.py for component
    metadata, graph snapshots, and settings snapshot values.
  • Teach the DAG and graph server to track edge ownership by session and clean up
    owned state when a session exits.
  • Integrate metadata registration into runtime startup so ez.run(...) can
    expose component structure and initial settings to inspection tools.
  • Add tests for session lifecycle, metadata collision handling, and topic
    behavior.

Scope

This PR is intentionally limited to session and metadata lifecycle. It does not
yet add the process-control plane, routed process requests, or profiling
streaming APIs. Those are stacked in the follow-on PR from
feature/process-control into feature/session-metadata.

Review Order

  1. src/ezmsg/core/graphmeta.py
  2. src/ezmsg/core/netprotocol.py
  3. src/ezmsg/core/dag.py
  4. src/ezmsg/core/graphcontext.py
  5. src/ezmsg/core/graphserver.py
  6. src/ezmsg/core/backend.py
  7. tests/test_graph_session.py
  8. tests/test_topics.py

Reviewer Checklist

  • Session-owned edges are added and removed deterministically.
  • Metadata registration is scoped to the session that created it.
  • Component-address collisions are rejected cleanly.
  • Graph snapshots are structured and IDE-friendly rather than dict-shaped
    protocol soup.
  • Runtime startup and teardown keep session state coherent.

Suggested Validation

.venv/bin/pytest tests/test_graph_session.py tests/test_topics.py -q

@griffinmilsap griffinmilsap changed the title Phase 1: Session-Scoped Graph Metadata, Typed Snapshots, and Edge Ownership Refactor Phase 1: Session Metadata Foundation Apr 2, 2026
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