Repository navigation
Conversation
Use immutable reflection results and shared rejection-preserving dispatchers. Adapt scanner outcomes at the scanner boundary, and separate chunk request stages and database entry preparation from their orchestration. Preserve request ownership, retry admission, comparison locking, and revision selection.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fix restores an unavailable owned local database connection and propagates incomplete file-reflection failures to the host which can retain and recover the work.
Related to vrtmrz/obsidian-livesync#1360 and vrtmrz/obsidian-livesync#1224. The companion consumer is LiveSync #1364.
Behaviour
canReadCurrentDatabaseInfo(). Serialise open, close, reset, and same-database recovery with the existingwithLock; verify the current owner and physical selection before and after draining work.closedevent and await itsclose()promise. The key-value store owns its separate logical-database, reset, and shutdown lifecycle, so replacing the Pouch connection preserves pending records and retry allowances.local-database,remote, or no established recovery resource), with the original cause. Finite Chunk producers settle and perform the final local recheck before a read fails. Unknown failures remain reviewable without gaining automatic retry eligibility.The host owns pause/drain, pending-target persistence, finite retry admission, and resumption policy. Recovery uses operation boundaries and the current Pouch probe; it does not replace public Pouch methods or infer connection loss from an error name, message, or nested cause.
Validation
idbregression closes a retained native connection under fake IndexedDB and verifies same-database reopening with preserved content and revision.Tested package:
@vrtmrz/livesync-commonlib@0.5.0, built from this PR's696e31bac449e5531242855bffa45080090df16esource; tarball SHA-2564b2e0122514c925ba54bf2a85c3277e31b4d74fc30cc5f58029c3de31879e542. All 746 packed files were compared byte-for-byte with the installed consumer package, preserving locked transitive dependencies. The registry package with the same version does not contain these changes.Boundaries and adoption
Controlled failures establish the tested recovery path. They do not establish the cause or frequency of natural iOS/WebKit connection termination, and automatic recovery on a physical iPhone remains unverified. A successful
info()confirms only that operation; adapters can cache metadata or reopen internally. Linux WebKit diagnostics could not start because required shared libraries were unavailable.This PR does not publish a package. LiveSync #1364 remains draft until an exact published package containing these changes is selected in its manifest and lockfile and verified as a consumer.