Skip to content

Add meridian-control: node control-plane service - #35

Merged
Lothnic merged 2 commits into
mainfrom
meridian-control
Aug 1, 2026
Merged

Add meridian-control: node control-plane service#35
Lothnic merged 2 commits into
mainfrom
meridian-control

Conversation

@Lothnic

@Lothnic Lothnic commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

What

Adds meridian-control, the central control plane for meridian-node GPU agents, as a new isolated service in this repo (per decision 13 in the meridian-node DESIGN.md). It is additive and does not import or modify the gateway — the gateway will consume its serving projection read-only in a later, separately-reviewed change.

Why

meridian-node (the host-local GPU agent) is built and tested against a fake/reference control plane, but had no real server to talk to. This is that server: the durable, cert-issuing counterpart that closes the loop.

What's included

  • Node control protocol (contracts/v1): approval-gated enrollment with a built-in Ed25519 CA issuing real X.509 node certs, epoch-fenced sessions, leases, desired-state generations, and observations.
  • Durable via SQLAlchemy — SQLite by default, Postgres via MERIDIAN_CONTROL_DB_URL; control replicas are stateless.
  • Restore-safe fencing (DESIGN 17.5): a control-plane incarnation + epoch floor so a restore-from-backup can never re-admit a previously fenced agent.
  • FastAPI app + operator admin endpoints; meridian-control CLI (run, mint-token); a serving projection endpoint for the gateway.
  • Isolated [control] extra so the gateway install is unchanged.

Tests (19, ruff + mypy clean)

  • Durable service logic: enrollment, fencing, sequence monotonicity, restore-safe fencing, revocation, serving projection.
  • HTTP surface via TestClient; CA certificate issuance and chain-of-trust.
  • Cross-repo: tests/control/test_cross_repo.py runs the real meridian-node agent against this service over a real HTTP socket (the compatibility target from the node's DESIGN §20/§24). Skipped unless meridian-node is installed.

Not included (follow-ups)

  • Alembic migrations (schema via create_all for now).
  • Gateway registry wiring to consume the projection.
  • Cert rotation/revocation automation + CRL distribution.

🤖 Generated with Claude Code

Lothnic and others added 2 commits July 30, 2026 23:41
Implements the central control plane for meridian-node GPU agents, as a
separate service in this repo (DESIGN decision 13 in the meridian-node repo).
It does not import or modify the gateway; the gateway consumes its serving
projection read-only.

- Node control protocol (contracts/v1): approval-gated enrollment with a
  built-in Ed25519 CA (real X.509 node certs), epoch-fenced sessions, leases,
  desired-state generations, and observations.
- Durable via SQLAlchemy: SQLite by default, Postgres via a connection URL;
  control replicas are stateless.
- Restore-safe fencing (DESIGN 17.5): a control-plane incarnation + epoch floor
  so a restore-from-backup cannot re-admit a previously fenced agent.
- FastAPI app + operator admin endpoints; meridian-control CLI (run,
  mint-token); serving projection for the gateway.
- Isolated [control] extra so the gateway install is unchanged.

Tests (19): durable service logic (enrollment, fencing, sequence, restore,
revocation, projection), HTTP surface, CA cert issuance, and a cross-repo test
driving the real meridian-node agent against this service over a real socket.
ruff and mypy clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 31, 2026 21:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Lothnic
Lothnic merged commit 4f82ca8 into main Aug 1, 2026
7 checks passed
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.

2 participants