diff --git a/tests/ClaudeDo.Installer.Tests/InstallManifestStoreTests.cs b/tests/ClaudeDo.Installer.Tests/InstallManifestStoreTests.cs index 553773b..ff7565f 100644 --- a/tests/ClaudeDo.Installer.Tests/InstallManifestStoreTests.cs +++ b/tests/ClaudeDo.Installer.Tests/InstallManifestStoreTests.cs @@ -63,4 +63,14 @@ public sealed class InstallManifestStoreTests : IDisposable var result = InstallManifestStore.TryRead(_tempDir); Assert.Null(result); } + + [Fact] + public void TryRead_ReturnsNull_WhenJsonIsValidButShapeIsWrong() + { + // Valid JSON, but installedAt has a wrong type — causes JsonException, swallowed silently. + File.WriteAllText(Path.Combine(_tempDir, "install.json"), + """{"version":"1.0","installDir":"x","workerDir":"y","installedAt":12345}"""); + var result = InstallManifestStore.TryRead(_tempDir); + Assert.Null(result); + } }