Skip to content

Allow host-selected internal storage events to bypass normal-file target regex - #233

Merged
vrtmrz merged 3 commits into
mainfrom
fix/issue-825-internal-admission
Nov 20, 2026
Merged

vrtmrz merged 3 commits into
mainfrom
fix/issue-825-internal-admission

Conversation

@vrtmrz

@vrtmrz vrtmrz commented Nov 19, 2026

Copy link
Copy Markdown
Owner

This change keeps ordinary-file allow-lists (syncOnlyRegEx) from blocking optional internal synchronisation (i: and ix:) and host-selected internal storage events.

Behaviour

  • EntryManager.isTargetFile exempts internal documents (i: and ix:) and explicit internalFileEvent checks from syncOnlyRegEx, while preserving ignoreRegEx on i: documents for backward compatibility and continuing to exempt ix: documents from both normal-file patterns.
  • StorageEventManagerBase accepts an optional isTargetInternalFile dependency for INTERNAL storage events, preserving protected-path exclusions (shouldBeIgnored) and existing host admission when not supplied.
  • IVaultService.isTargetFile forwards options.internalFileEvent to isAcceptedByLocalDBFactory so a host can run veto handlers on internal file events without requiring ordinary-file eligibility.

Verification

  • npm run check:types, npx vitest run (212 files, 4,198 tests), npm run build:package, npm run test:boundary, npm run check:boundary, and npm run test:package passed.
  • Self-hosted LiveSync was built and verified against the packed tarball (npm run check and 2,530 unit tests).

Refs vrtmrz/obsidian-livesync#825.

@vrtmrz
vrtmrz merged commit 3fb1f1b into main Nov 20, 2026
3 checks passed
@vrtmrz vrtmrz mentioned this pull request Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant