Unity CHANGELOG: remote writes to a CultNetDatabaseServer need a granting authority

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-28 02:07:59 +01:00
commit a4eae90561

View file

@ -20,6 +20,7 @@ Releases as 3.0.0 (major).
- `GameCult.Mesh`: `AsSchemaAlias<TAlias>()` is removed from the interfaces `ICultMeshDocumentHandle` and `ICultMeshCollectionHandle` and from the classes `CultMeshDocumentHandle` and `CultMeshCollectionHandle`. Read the handle by the schema you mean.
- The element types of owned lists gain a public string `Id` member with `[CultElementId]`, so their lists merge by identity: in `GameCult.Mesh`, `CultMeshBodyDescriptor`, `CultMeshCdnChunkRef`, `CultMeshDiscoveryCandidateDocument`, `CultMeshEntityPrefabComponent`, `CultMeshEntityPrefabAssetRef` and `CultMeshEntityPrefabNode`; in `GameCult.Networking`, `CultWitnessContractPin`, `CultWitnessArtifactEntry` and `CultWitnessTimingEntry`; in `GameCult.Geometry`, `CultGeometryDomainNode`, `CultGeometryFeatureClaim` and `CultGeometryContributionRow`. Code that matched those elements positionally by shape must set or read `Id`.
- `CultNetDocumentRegistry.Register` refuses a binding that claims a document type or a schema id another binding already holds, with `CultSchemaConflictException`; binding a type to the schema id it already holds still replaces that binding.
- `GameCult.Networking`: a `CultNetDatabaseServer` refuses every put and delete a peer sends unless `CultNetDatabaseServerOptions.RemoteWriteAuthority` grants it. The authority is an `ICultNetRemoteWriteAuthority` you supply; it is asked once per write with the resolved schema id (never the alias the peer sent), before the write is applied, published or forwarded. With no authority, or a null decision, or an authority that throws, the peer receives the typed error `write_not_authorized` and the store is unchanged. Writes the host makes through its own `CultNetDatabase` are not gated. The library ships no authority that grants everything: a server that took peer writes before must now say who may write.
- `InternalsVisibleTo GameCult.Mesh` is removed from `GameCult.Caching`: CultMesh's single-file document helpers use the public `ReadStoreSnapshot`, `WriteDocument`, `WriteRecord` and `CultCodec.DecodeDocument` below.
### Added