Repository navigation
Add incremental path identity lookup for file access - #222
Merged
Merged
Conversation
Expose a host-owned file-name lookup capability and shared index so collision checks can reuse identity buckets across content-only edits. Retain fallback hosts and fresh reconstruction preflight guarantees.
This was referenced Nov 12, 2026
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 adds an incremental file-name index and a host lookup contract so collision checks can reuse path identities across content-only edits.
Related to vrtmrz/obsidian-livesync#1346.
Changes
FilePathIndexand the shared name-query types through/storage. Preserve original path spelling and every collision candidate under the existing Legacy/NFC and case policies; update materialised identity buckets through membership deltas.IFileSystemAdapter.fileNameLookupcapability and forward it through file access. Hosts without it retain the listing fallback, including request sharing and invalidation when the storage-event count or comparison policy changes.targetFilterrequest identity candidates instead of rebuilding its own whole-Vault map. Keep collision rejection and the existing narrowly scoped bypass behaviour.Compatibility and adoption
The adapter capability is optional. Direct implementations of
StorageAccessmust implement the newfindPathIdentityCandidates()method when adopting this pre-1.0 interface. ExistinggetFileNames()callers remain valid;{ fresh: true }invokes the host's supported listing authority.The CLI and Obsidian integrations are in the companion Self-hosted LiveSync PR #1351. The index itself owns no watcher, filesystem I/O, persistent storage, or file metadata. Non-indexed hosts retain their current fallback costs.
Validation
npm run check:types.npm test -- --maxWorkers=1: 3,793 tests passed.npm run test:package, including the packed exports and consumer checks.The downstream checks use a locally packed candidate; this PR does not publish a package or designate the current registry version as containing these APIs. Package publication and exact downstream dependency adoption remain separate steps.