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:
parent
d5bc28e207
commit
969d78de39
16 changed files with 118 additions and 16 deletions
|
|
@ -6,13 +6,17 @@ namespace GameCult.Caching
|
|||
/// A store file this runtime cannot read: not exactly one complete store (truncated, bytes after it, a value that is not a
|
||||
/// store, a missing or extra top-level slot), a format or record it does not know, or a body it cannot decode. Open, flush,
|
||||
/// commit and CultMesh's single-file reads all refuse a file with this one exception, and a refused file is left as it was.
|
||||
/// The underlying cause, where there is one, is the inner exception.
|
||||
/// The underlying cause, where there is one, is the inner exception, and <see cref="Path"/> names the file.
|
||||
/// </summary>
|
||||
public sealed class CultStoreUnreadableException : NotSupportedException
|
||||
{
|
||||
public CultStoreUnreadableException(string message, Exception? innerException = null)
|
||||
public CultStoreUnreadableException(string message, string? path = null, Exception? innerException = null)
|
||||
: base(message, innerException)
|
||||
{
|
||||
Path = path;
|
||||
}
|
||||
|
||||
/// <summary>The store file that was refused, or null when the bytes were read without a file.</summary>
|
||||
public string? Path { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue