Repository navigation
Maintain watched file names for CLI collision checks - #1351
Merged
Merged
Conversation
Share the CLI watcher with a reconciled name inventory, observe local mutations, and retain newer notifications across overlapping reads. Adopt the shared index for Obsidian and preserve fresh bulk operations.
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 reduces CLI daemon collision-check work by maintaining file names from filesystem observations and updating path-identity membership without rescanning every file after content-only edits.
Addresses #1346; the reporter's CPU and syscall results remain to be confirmed with this implementation. #1347 covers a related, separate lookup path.
Changes
Dependency and draft status
Depends on Commonlib PR #222, which introduces
FilePathIndexand the shared name-query contract.Local validation used an unpublished packed Commonlib candidate.
package.jsonandpackage-lock.jsonstill select the published0.4.3, which does not contain the new APIs. A clean registry install therefore does not yet reproduce the validated environment. Keep this PR in draft until the Commonlib change is published, the exact dependency and lockfile are updated, and clean-install consumer checks pass. The applicable LiveSync PR test workflows skip drafts.Validation
npm run check: type checking, lint, Svelte checks, production build, and compatibility checks passed.npm run test:unit --workspace self-hosted-livesync-cli -- --maxWorkers=1: 393 passed.npm run build --workspace self-hosted-livesync-cli: passed.Real Obsidian/database E2E checks and the reporter's large-Vault daemon measurements remain outstanding. CLI queries still read the relevant directory entries; a large flat directory is not a constant-time lookup, and the watched inventory is not an atomic filesystem snapshot.