refactor: introduce client-side VaultFs boundary#37
Draft
enieuwy wants to merge 1 commit into
Draft
Conversation
3236105 to
d925e74
Compare
d925e74 to
aea8823
Compare
fc810fe to
3837c05
Compare
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.
Goal
Introduce the client-side
VaultFsstorage boundary required before rebasing the headless CLI work. This PR migratesDiskMirroroff directapp.vault.*file operations and onto a small filesystem interface, with an Obsidian adapter for the plugin and an in-memory adapter for tests.Opening as a draft intentionally: please confirm this scoped PR-A boundary before detailed review.
Scope
Included:
VaultFscontract, errors, stats/list/read/rename/write/delete operations.NFC, slash normalization, no leading/trailing slash).ObsidianVaultFspreserving Obsidian semantics (Vault.delete,FileManager.renameFile).FakeVaultFsand targetedDiskMirrortests for create/update/delete/rename, suppression fingerprints, frontmatter-blocked writes, target-exists rename, and missing-source rename.DiskMirrornow usesVaultFsfor disk reads/writes/deletes/renames.Explicitly not included in this PR:
app.vault.*callsites insrc/main.tsfor reconcile scans, vault event handlers, direct reads, and disk-index stat calls.NodeVaultFs/NodeDiskMirrorrefactor. That is the PR-B rebase follow-up after this boundary lands.DiskMirrorCore.Follow-up after this merges
Rebase PR #16 (
feat/headless-cli-fresh) on top ofmain, drop its duplicate normalizer, addNodeVaultFs, and move the CLI filesystem hardening behind that adapter while preserving the PR #16 hardening checklist.Verification
node --import jiti/register --test tests/sync/diskMirror-vaultFs.test.tsnpm run buildnpm run test:regressionsgit diff --checkgit log --oneline upstream/main..HEADshows one refactor commitNot run locally:
npm run test:e2e:obsidianfailed before launching tests becausewdiois not installed in this workspace (sh: wdio: command not found, exit 127). The two-peer manual Obsidian smoke was not run in this headless workspace for the same missing local harness reason.