fix(data): never let the compile_options probe block opening an index

Any failure of the informational PRAGMA compile_options probe is logged
and gives an empty list; before, anything but a SqliteException was cached
by the lazy value and rethrown by every later open.

Tests now cover the decode-tier fields end to end: the Library's
preview-only chip and its plural tooltip, server cards and frames carrying
previewOnlyCount and the preview size over the API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-12 11:17:55 +00:00
1 parent 5599e4de89
commit bbc7f244fa
4 files changed
+100 -21

No files matched your search

@@ -28,6 +28,15 @@ public sealed class SqliteBindingTests(TestContext context) : DatabaseTest(conte
if (!OperatingSystem.IsWindows()) Assert.Contains(options, o => o.StartsWith("THREADSAFE=", StringComparison.Ordinal));
}
[Test]
public void AProbeThatFailsInAnyWayGivesNoOptionsInsteadOfBlockingTheIndex()
{
// A build that returns no statement for the pragma, a column it cannot read, a SQLite error: none escapes.
Assert.Empty(SqliteDatabase.ProbeCompileOptions(() => throw new ArgumentException("No statement in 'PRAGMA compile_options'.")));
Assert.Empty(SqliteDatabase.ProbeCompileOptions(() => throw new InvalidOperationException("Column type 5 is not text.")));
Assert.SequenceEqual(["THREADSAFE=1"], SqliteDatabase.ProbeCompileOptions(() => ["THREADSAFE=1"]));
}
[Test]
public async Task ConnectionsUseTheBriefPragmas()
{