Align multi-device tests with retained content evidence

This commit is contained in:
vorotamoroz committed 2026-10-17 13:39:22 +00:00
1 parent ddb4d52931
commit 081d3f3339
3 files changed
+44 -5

No files matched your search

+3 -2
View File
@@ -98,7 +98,7 @@ npm run test:docker-couchdb:start
NODE_OPTIONS=--max-old-space-size=3072 npm run test:integration -- src/serviceModules/FileHandler.multidevice.integration.spec.ts --maxWorkers=1
```
The expected result is five passing tests. Each case creates a uniquely named remote database and removes it during teardown. Stop the fixture after the run, including when the test command fails:
The expected result is six passing tests. Each case creates a uniquely named remote database and removes it during teardown. Stop the fixture after the run, including when the test command fails:
```bash
npm run test:docker-couchdb:stop
@@ -116,7 +116,8 @@ Each simulated device owns a separate real PouchDB database, `LiveSyncLocalDB` m
| Four editing devices | Repeat the same sequence with four independently edited branches. | All four contents are initially preserved, and the same unchanged-save and convergence guarantees hold. |
| A genuine edit on a losing device | After three-way resolution reaches its DB, a device adds content to its still-unreflected losing file, then saves and replicates it. | The new revision extends that device's recorded branch. The selected result and the new edit remain readable on every replica. |
| Missing provenance | After four-way resolution, remove a losing device's provenance record and set its file to the original historical ancestor's content. Save, remove provenance again, and repeat the save. | The file becomes one fresh independent root, distinct from the historical root. Both contents remain readable after replication, and repeated saves create no duplicates. CLI `resolve` can select the independent root and propagate its resolution. |
| Compacted base | After four-way resolution, compact a losing device's local DB and confirm that its recorded revision body is unavailable. Save the remaining file, then repeat after removing provenance. | The file is preserved as one independent conflict rather than discarded. Both contents remain readable on every replica, repeated saves create no duplicates, and CLI `resolve` can select the independent root and propagate its resolution. |
| Compacted base with saved content evidence | After four-way resolution, retain the saved content hash and byte length, compact a losing device's local DB, and confirm that its recorded revision body is unavailable. Process its unchanged file twice. | The selected revision is reflected without a database write or a new conflict. Provenance advances to that revision, and every replica retains only the selected non-deleted branch. |
| Compacted base without content evidence | After four-way resolution, retain a legacy provenance record with only its revision and modification time, compact a losing device's local DB, and confirm that its recorded revision body is unavailable. Save the remaining file, then repeat after removing provenance. | The file is preserved as one independent conflict rather than discarded. Both contents remain readable on every replica, repeated saves create no duplicates, and CLI `resolve` can select the independent root and propagate its resolution. |
### Coverage boundaries