You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 7, 2026. It is now read-only.
Verify behavior with partial write scenarios (power loss simulation)
Test file locking conflicts and concurrent access issues
Validate backup/restore mechanisms
Ensure graceful degradation when storage is unavailable
Corruption Scenarios
Header corruption - Invalid file version or metadata
Partial vector data - Truncated vector serialization
Index corruption - Corrupted KD-Tree or HNSW data structures
File locking conflicts - Multiple processes accessing same file
Permission denied - Read-only file system scenarios
Test Structure
[Test][Category("Chaos")]publicasyncTaskDatabase_LoadFromCorruptedFile_HandlesGracefully(){// Arrange: Create valid database filevarvalidDb=newVectorDatabase();PopulateDatabase(validDb,vectorCount:1000);vartempPath=CreateTempDatabasePath();awaitvalidDb.SaveAsync(tempPath);// Act: Corrupt the fileCorruptDatabaseFile(tempPath,CorruptionType.HeaderDamage);// Assert: Loading should either recover or fail gracefullyvarcorruptedDb=newVectorDatabase();if(awaitTryLoadAsync(corruptedDb,tempPath)){// If loaded, verify data integrityAssert.That(corruptedDb.Count,Is.GreaterThan(0));VerifyBasicOperations(corruptedDb);}else{// If failed, ensure clean error handlingAssert.That(corruptedDb.Count,Is.EqualTo(0));}}
File System Simulation
Create IFileSystemSimulator for controlled I/O failures
Description
Test database behavior when persistent storage is corrupted, partially written, or becomes unavailable during operations.
Phase
Phase 1: Chaos Engineering and Failure Injection
Epic
Related to #202
Acceptance Criteria
Corruption Scenarios
Test Structure
File System Simulation
IFileSystemSimulatorfor controlled I/O failures