Table of Contents

Orleans.Lattice.Api.Schema

This page documents Orleans.Lattice.Api.Schema 10.5.0, in the documentation for Orleans.Lattice 10.5.0 (release line 10.5), built 2026-12-05. It is also published as markdown, with every table and list, at README.md, and llms.txt lists every page.

A transport-agnostic schema-management control facade for Orleans.Lattice.Schema.

What is it?

Orleans.Lattice.Api.Schema is the control plane of a cluster's schema system. The Orleans.Lattice.Schema package adds enforcement, policy storage, dead-letter handling, remediation, compliance scanning, and the optional versioning engine reached through .NET service interfaces; this package adds the administrative surface an operator dashboard, a CLI, or an internal admin service needs to manage policies, inspect rejected writes, drive remediation, and audit compliance - over a single surface with no wire dependency.

It is built the same way as the read-only Orleans.Lattice.Api.State, read-write Orleans.Lattice.Api.Data, and backup Orleans.Lattice.Api.Backup facades:

  • Transport-agnostic facades. ILatticeSchemaControl, ILatticeSchemaComplianceOperations, and ILatticeSchemaOperations are public contracts in the shared Orleans.Lattice.Api.Abstractions package. They expose policy, dead-letter, versioning, remediation, compliance-audit, capability-probe, and accept-then-poll operation verbs over plain request / response records. They have no wire dependency, so the same surfaces serve an in-process consumer and a remote one.
  • A code-first gRPC binding (the sibling Orleans.Lattice.Api.Schema.Grpc package) that projects these facades onto a remotely callable service and typed client. This package ships no transport of its own; it is the contract every binding adapts over.

Core properties

  • Opt-in and absent by default. Nothing registers unless the host calls AddLatticeSchemaApi() on the silo, and once added the facade does no background work until a method is called.
  • Fail-closed by construction. Every operation authorizes the tree's scope through the schema engine's internal authorization component before touching the admin plane. Reads require Read authority; mutations require SchemaAdmin authority.
  • Bounded-memory dead-letter streaming. Dead-letter inspection can stream diverted schema-rejected writes without materializing the whole set in memory.
  • Versioning stays separate. Schema versioning is enabled by AddLatticeSchemaVersioning(...). A version operation on a silo without versioning registered throws a clear InvalidOperationException at call time rather than failing dependency resolution.
  • Read-only capability probe. A caller can ask, with no side effects, which schema operations it may perform over a given tree. The probe runs fail-closed Read and SchemaAdmin checks and reports the result as capability flags, so a UI can grey out actions the caller cannot perform without ever mutating state. The probe is advisory only: it never replaces the per-operation authorization each real call still performs.

Ordering

AddLatticeSchemaApi() must be called after AddLatticeSchemaEnforcement(...): the schema engine is the source of truth for the policy, dead-letter, remediation, compliance, and authorization seams this facade drives. Calling it first fails fast at registration with an actionable message.

AddLatticeSchemaVersioning(...) is separate and optional. Register it when versioning operations should be available.

Quick Start

Register the facade on a silo that already has the core library and schema enforcement, then resolve ILatticeSchemaControl (or ILatticeSchemaOperations / ILatticeSchemaComplianceOperations) from the silo's services, or add the gRPC binding to serve it remotely:

siloBuilder
    .AddLatticeSchemaEnforcement()   // after AddLattice(...)
    .AddLatticeSchemaVersioning()    // optional: version operations and runtime catalogs
    .AddLatticeSchemaApi();

Surface

The facade operations (each projected by the gRPC binding as one RPC when the sibling binding is registered). The blocking LATTICE0002 facade verbs were removed in this major version; use the operation starts below and the migration tables in Schema operations and Schema operations.

Operation Purpose
Set policy Set a tree's write-validation policy.
Clear policy Remove a tree's policy and report whether one was present.
Get policy Read a tree's policy, or absent.
List dead letters Stream the diverted schema-rejected writes with bounded memory.
Count dead letters Count the diverted schema-rejected writes.
Set version config Set a tree's versioning config.
Get version config Read a tree's version config, or absent.
Advance target version Advance the declared target version without migrating existing values.
Clear version config Remove the tree's version config and report whether one was present.
Get registry Read the tree's durable runtime schema catalog: version descriptors, migration hops, and the host's supported transform ids.
Register schema Append version descriptors and migration hops to the tree's runtime catalog (declarative transforms or installed transform ids, never code).
Get remediation status Read the status or last report of remediation for a tree.
Start a compliance scan Start the same audit in the background and poll its progress and report (ILatticeSchemaComplianceOperations; see Schema operations).
Start remediation, start migration, start advance and migrate Start the run in the background and return at once; poll the operation for its phase and values processed (ILatticeSchemaOperations; see Schema operations).
Operation status, list, cancel Read, page or cancel the caller's remediation and migration operations through ILatticeSchemaOperations, and the caller's compliance scans through ILatticeSchemaComplianceOperations.
Probe capabilities Report, with no side effects, which schema operations the caller may perform over a tree.

Reference

  • API reference - the public options and model types, and the facade operations by name.
  • Schema operations - the accept-then-poll compliance scan, remediation and migration, and migrating from the removed blocking verbs.
  • Configuration - the public options properties, their types, and defaults.
  • Architecture - how the facade authorizes, streams dead letters, gates versioning, and audits compliance.

See also