Add CultMesh authority lease checks

This commit is contained in:
Meta Vens 2026-05-20 01:49:18 +01:00
commit e5e993e7aa
7 changed files with 211 additions and 0 deletions

View file

@ -14,6 +14,7 @@ Namespace: `GameCult.Mesh`
- `CultMesh.CreatePeerCatalog()`
- `CultMesh.CreateVerseDiscoveryClient(...)`
- `CultMesh.CreatePeerExchangeClient(...)`
- `CultMesh.CreateAuthorityLeaseCatalog()`
- `CultMesh.CreateClient(...)`
- `CultMesh.ConnectClient(...)`
@ -66,6 +67,14 @@ upsert them into a local catalog.
Peer cards are discovery hints; authority still requires a valid lease or
signature for the target Verse.
### Authority Leases
`CultMeshAuthorityLease` grants one peer specific roles for a Verse, optionally
scoped to shard ids and bounded by time. `CultMeshAuthorityLeaseCatalog` checks
whether a peer card is authorized for a requested role and shard. This keeps
peer exchange separate from authority instead of letting contact gossip mutate
the world.
### Shard Authority
Each shard has one primary writer for now. Non-primary writes are rejected or

View file

@ -64,3 +64,8 @@ primary shard, replica, read replica, and simulation observer roles, but those
cards do not grant authority by themselves. Public operator Verses should treat
authority lease ids and signatures as mandatory before accepting committed
state from a peer.
Authority leases are the narrow bridge between discovery and trust. A lease
binds a peer id to a Verse, role, shard scope, issuer, validity window, and
signature. Peer exchange can spread cards quickly; lease validation decides
whether a card is allowed to touch committed state.