diff --git a/src/GameCult.Caching/CultCache.cs b/src/GameCult.Caching/CultCache.cs index da791b82..ebea77d4 100644 --- a/src/GameCult.Caching/CultCache.cs +++ b/src/GameCult.Caching/CultCache.cs @@ -4034,8 +4034,11 @@ namespace GameCult.Caching for (var cause = exception; cause != null; cause = cause.InnerException) causes.Add(cause.Message); throw new InvalidDataException($"Record '{record.Key}' (schema '{record.SchemaId}') cannot be decoded: {string.Join(" <- ", causes.Distinct())}", exception); } - // Explained only when every mark is at depth 0 and the schema comparison reported ignored slots under this id. - unread = decoded.UnreadSlots?.Explaining(decoded.UnreadSlots.AllAtDepthZero && report.IgnoredExtraSlots.Length > 0); + // Explained only when every mark is at depth 0 and the schema comparison under this id reported every slot the mark carries + // past the reader: consent reaches no slot above the highest reported (none when nothing was reported). + unread = decoded.UnreadSlots is { } marked + ? marked.Explaining(marked.AllAtDepthZero && marked.SlotCount <= report.IgnoredExtraSlots.DefaultIfEmpty(-1).Max() + 1) + : null; return new CultStoredDocument( new CultRecordKey(record.Key), record.StoredAt, diff --git a/src/GameCult.Caching/CultUnreadSlots.cs b/src/GameCult.Caching/CultUnreadSlots.cs index cbf46f3c..9e8412f7 100644 --- a/src/GameCult.Caching/CultUnreadSlots.cs +++ b/src/GameCult.Caching/CultUnreadSlots.cs @@ -31,9 +31,10 @@ namespace GameCult.Caching public int Occurrences { get; } /// - /// True only when every mark is at depth 0 and the schema comparison reported ignored slots under the id the record was stored - /// under: the loss a compatible-id declaration consents to (cultlib-gaps:ruling:slot-mark-consent). Any other mark leaves the - /// record read-only whatever is declared. + /// True only when every mark is at depth 0 and the schema comparison under the id the record was stored under reported every + /// slot the mark carries past the reader ( is at most the highest reported slot plus one): the loss a + /// compatible-id declaration consents to (cultlib-gaps:ruling:slot-mark-consent). Any other mark leaves the record read-only + /// whatever is declared. /// public bool Explained { get; }