CultNet: schema catalog serves member rows on request (C# server, contract) (#195)

This commit is contained in:
Eureka 2026-11-28 06:54:17 +00:00
commit ccac93abf1
23 changed files with 935 additions and 15 deletions

View file

@ -154,6 +154,13 @@ A malformed put or delete is `message_invalid`, not a per-operation code: the pe
- The C# writer sets every key of a `database_change_raw` message, nil where unset: a removed change carries `document`
nil, an added or updated one `recordKey` and `schemaId` nil. The schema accepts those nils; an added or updated change
still needs a document, and a removed one a `recordKey` and `schemaId`.
- A database or subscription server answers `schema_catalog_request` for each document type its cache registers: kind
`document_payload`, `contentHash` equal to the `schemaContentHash` that type's records carry, `schemaJson` left to
contract schemas and never filled with cache schema JSON. A request that sets `includeMembers` (optional, default false)
gets each descriptor's `members`, the rows every store catalog writes for the type (`slot`, `name`, `type`,
`isReference`, `isMany`, `targetSchemaName`, `isName`, `indexAlias`), in slot order; a peer that did not ask never sees the key.
A subscriber caches rows by `schemaId` plus `schemaContentHash`, and a record whose hash it has no rows for is decoded only after a
catalog request. Both fields are additive within `cultnet.schema_catalog_*.v0`; the C# subscription server serves them first.
- Client-owned input documents may be predicted locally only inside explicit
`CultNetClientAuthorityScope` declarations.
- Predicted input state is not authoritative shared state. The shard log still

View file

@ -12,6 +12,7 @@
"schemaVersion": { "const": "cultnet.schema_catalog_request.v0" },
"messageId": { "type": "string", "minLength": 1 },
"includeSchemaJson": { "type": "boolean" },
"includeMembers": { "type": "boolean" },
"schemaIds": {
"type": "array",
"items": { "type": "string", "minLength": 1 }

View file

@ -34,6 +34,31 @@
}
},
"contentHash": { "type": "string", "minLength": 1 },
"schemaJson": { "type": "string", "minLength": 1 }
"schemaJson": { "type": "string", "minLength": 1 },
"members": {
"type": "array",
"items": {
"type": "object",
"required": [
"slot",
"name",
"type",
"isReference",
"isMany",
"isName"
],
"additionalProperties": false,
"properties": {
"slot": { "type": "integer", "minimum": 0 },
"name": { "type": "string", "minLength": 1 },
"type": { "type": "string", "minLength": 1 },
"isReference": { "type": "boolean" },
"isMany": { "type": "boolean" },
"targetSchemaName": { "type": ["string", "null"] },
"isName": { "type": "boolean" },
"indexAlias": { "type": ["string", "null"] }
}
}
}
}
}