@vrtmrz/livesync-commonlib 0.1.32 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/common/idDerivation.d.ts +3 -1
- package/dist/common/idDerivation.js +27 -0
- package/dist/hashing.d.ts +3 -0
- package/dist/hashing.js +4 -0
- package/dist/managers/ChunkFetcher.d.ts +16 -0
- package/dist/managers/ChunkFetcher.js +231 -82
- package/dist/managers/HashManager/HashManager.d.ts +3 -0
- package/dist/managers/HashManager/HashManager.js +25 -5
- package/dist/managers/LiveSyncManagers.js +6 -0
- package/dist/managers/chunkFetcher.helper.d.ts +21 -0
- package/dist/managers/chunkFetcher.helper.js +43 -0
- package/dist/mock_and_interop/stores.d.ts +4 -0
- package/dist/mock_and_interop/stores.js +2 -0
- package/dist/replication/trystero/ProxiedDB.d.ts +1 -1
- package/dist/worker/bgWorker.js +1 -1
- package/docs/proven-in-use.md +8 -2
- package/package.json +9 -1
package/docs/proven-in-use.md
CHANGED
|
@@ -16,7 +16,11 @@ The unreleased 0.1.30 packed candidate adds encryption of Hidden File Sync and C
|
|
|
16
16
|
|
|
17
17
|
Additional real-CouchDB integration tests exercise Fast Fetch admission before local reset, generation 12 acceptance, and generation 13 retrieval with plaintext and encrypted internal Metadata together. A real-Obsidian migration scenario enables the preference through the settings UI without Rebuild, verifies that unchanged Metadata retains its original revision while rewritten entries are encrypted with stable IDs, and checks a second device's mismatch rejection and restoration after alignment. After turning the preference OFF, Fast Fetch still retrieves both representations and their Chunks with matching content; the remote feature declaration remains. These checks use the local packed candidate with LiveSync 1.0.32.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Optional independent ID derivation uses a saved secret for encrypted Chunk IDs and obfuscated document IDs. The unreleased Chunk update replaces the algorithm from `0.1.32`, published with the `next` tag, while retaining `idDerivationVersion: 1`, recovery codes, and settings. It hashes exact Chunk text with xxHash64 before HMAC-SHA-256 with a separate Chunk key. Preparation is shared per manager and current key; tests cover concurrent use, key changes, E2EE suspension, teardown, and retry after failure. Document IDs and agreement proofs retain their existing HMAC messages. Chunk collision resistance is bounded by the 64-bit prehash.
|
|
20
|
+
|
|
21
|
+
The updated Commonlib passes its complete Unit suite, type check, and isolated packed-package consumer checks. Real CouchDB and Object Storage Integration tests cover matching keys, direct-access rejection before control-document changes, Journal agreement, and differing Chunk keys when paths remain visible. LiveSync 1.0.32's Unit suite and build checks pass with the local packed candidate. Real Obsidian two-Vault checks cover matching-key synchronisation, incompatible document key rejection, and differing Chunk keys with visible paths. Its Review Harness exercises the actual calculation and copied report. Measurements use desktop Obsidian; native mobile timing and a complete Rebuild remain unmeasured for this construction.
|
|
22
|
+
|
|
23
|
+
The focused `/hashing` entry exposes the same `HashManager` used by database writes. Package checks exercise its types, a fixed ID vector through the installed Node module, and browser bundling. The Review Harness consumes that entry without importing the package's internal files. Earlier real-Obsidian onboarding, encrypted Journal upload, and CLI P2P Setup URI checks used the predecessor full-content-HMAC construction; they establish those integration paths but do not measure the updated algorithm. The local candidate is prepared as `0.1.33` for the `next` tag; registry publication remains separate from this evidence.
|
|
20
24
|
|
|
21
25
|
Regression tests also preserve each device's ID version and key through ordinary Tweak alignment, reject incompatible document ID modes separately from adoptable tweaks, and complete legacy P2P configuration imports without inheriting the receiving device's key. Direct-access admission checks cover both a different saved key and a legacy caller against keyed document IDs.
|
|
22
26
|
|
|
@@ -34,7 +38,9 @@ The equal-time scan test uses real in-memory PouchDB to verify that a missing re
|
|
|
34
38
|
|
|
35
39
|
Commonlib's chunk-reachability tests use real PouchDB revision trees. They verify that an ordinary superseded revision releases its unique chunks, a chunk shared by current files remains reachable, live conflict branches and their nearest available shared ancestor remain protected, and losing-branch ancestry becomes eligible after resolution. They also replicate a collected chunk deletion to another PouchDB database and verify that writing the same content can recreate and replicate the content-addressed chunk. Self-hosted LiveSync owns the CouchDB-specific Garbage Collection V3 workflow, including device checks, confirmation, deletion, push-only replication, and remote compaction.
|
|
36
40
|
|
|
37
|
-
Commonlib's injected CouchDB tests verify that a mixed remote chunk batch preserves available documents when another requested ID is absent. Its chunk-delivery tests separately verify
|
|
41
|
+
Commonlib's injected CouchDB tests verify that a mixed remote chunk batch preserves available documents when another requested ID is absent. Its chunk-delivery tests separately verify local persistence, an autonomous two-second retry after the first successful omission, and per-identifier backoff capped at ten seconds while finite replication is active. Backoff retains bounded remote activity but releases physical concurrency. Eligible retries can share batches without resetting their individual stages. Finite completion expedites a local recheck and, if needed, a final remote probe; a pre-completion in-flight lookup cannot replace that probe. Overlapping-request tests verify that earlier requests cannot release or report unavailability for replacement claims and that concurrent fetches preserve the configured interval across retry waits. Self-hosted LiveSync supplies the real CouchDB connection and start-up composition, so device-specific replication timing remains downstream integration evidence rather than Commonlib unit coverage.
|
|
42
|
+
|
|
43
|
+
The compatibility pending-Chunk counter follows those accepted identifiers, including queueing and retry delays. A separate atomic snapshot classifies them as initial or retrying without changing the total used for lifecycle deferral. Focused tests verify duplicate-request deduplication, partial completion, runner rejection, inactivity expiry, teardown, replacement claims, and independent fetcher contributions. The visible status indicators remain a downstream host responsibility.
|
|
38
44
|
|
|
39
45
|
Commonlib's injected remote-service tests verify that an owning operation can abort a pending CouchDB request, that closing the flat connection interrupts a response body which is already being consumed, that repeated closure closes PouchDB once, and that a bounded request does not fall back into the non-abortable native adapter. Its one-shot replicator tests verify deadline expiry, distinct timeout reporting, cleanup before release of the shared attempt, later invocation, successful ownership transfer, and the unchanged native-request boundary. Self-hosted LiveSync still supplies the actual Obsidian fetch adapters and real CouchDB environment; confirmation on the reporter's platform remains downstream evidence rather than a Commonlib guarantee.
|
|
40
46
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vrtmrz/livesync-commonlib",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34",
|
|
4
4
|
"description": "Shared data, storage, and replication primitives for Self-hosted LiveSync clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -47,6 +47,11 @@
|
|
|
47
47
|
"import": "./dist/context.js",
|
|
48
48
|
"default": "./dist/context.js"
|
|
49
49
|
},
|
|
50
|
+
"./hashing": {
|
|
51
|
+
"types": "./dist/hashing.d.ts",
|
|
52
|
+
"import": "./dist/hashing.js",
|
|
53
|
+
"default": "./dist/hashing.js"
|
|
54
|
+
},
|
|
50
55
|
"./node": {
|
|
51
56
|
"types": "./dist/platform/node/index.d.ts",
|
|
52
57
|
"import": "./dist/platform/node/index.js",
|
|
@@ -638,6 +643,9 @@
|
|
|
638
643
|
"context": [
|
|
639
644
|
"dist/context.d.ts"
|
|
640
645
|
],
|
|
646
|
+
"hashing": [
|
|
647
|
+
"dist/hashing.d.ts"
|
|
648
|
+
],
|
|
641
649
|
"node": [
|
|
642
650
|
"dist/platform/node/index.d.ts"
|
|
643
651
|
],
|