C#: compatible schema ids publish a schema on open, Mesh takes only the older layout, the refusal names its file

A record whose schema id the catalog lists only as a compatible id now opens (the cache resolved a persisted schema by entry id
alone). CultMesh's fallback to the older catalog-entry reader fires only for a store in that layout, decided by the entry's slot 5,
not for any decode failure, so a current-layout store with a malformed slot is refused as CultCache refuses it.
CultStoreUnreadableException.Path names the refused file. New vectors: compatible-id-only-v3 (accepted by all four) and three
current-layout catalogs with one malformed slot. The contract states the writer's invariant.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-30 06:54:17 +02:00
commit 969d78de39
16 changed files with 118 additions and 16 deletions

View file

@ -122,6 +122,10 @@ A reader never recovers a schema from a record's payload: a record whose schema
catalog does not publish (by id or as a compatible id) makes the store unreadable, whatever
the payload's first field says. The catalog is the store's own description of itself.
A writer keeps the same invariant: every record it writes carries a schema id that some catalog
entry it writes publishes, as that entry's id or as one of its compatible ids. A cache stamps a
record with its registered schema's id, whatever id the record arrived under.
This is not decorative paperwork. It is what allows another CultCache
implementation to inspect an old store, resolve the schema for each record, and
decide whether it can: