Skip to content

fix: preserve vault settings and warn before registry edits - #141

Merged
Yakitrak merged 2 commits into
mainfrom
codex/preserve-vault-registry
Oct 13, 2026
Merged

Yakitrak merged 2 commits into
mainfrom
codex/preserve-vault-registry

Conversation

@Yakitrak

@Yakitrak Yakitrak commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

A running Obsidian process can overwrite external vault registrations when its window reopens. Warn before add-vault and remove-vault write the registry, and document in command help and the README that Obsidian must be fully quit, including Cmd+Q on macOS. Send warnings to stderr so existing stdout remains unchanged. These commands remain available for headless use; this does not detect or synchronize with a running Obsidian process.

Also preserve unknown top-level settings and per-vault metadata when adding or removing registrations. Previously, rewriting the path-only config structure discarded those fields. Preserve raw JSON values, including large numbers.

Validation:

  • go.mod now requires Go 1.26.1, which fixes GO-2026-4602 reported by the shared Security check on Go 1.26.0.
  • go test -race ./... passes, including add/remove round trips with nested metadata and large integers, and missing/null vault maps.
  • CI-pinned golangci-lint v2.10.1 reports no issues.
  • go mod verify passes.
  • The reported Obsidian GUI reopen sequence was not independently reproduced; this addresses the requested warning/documentation and config preservation.

Fixes #138.

@Yakitrak
Yakitrak merged commit b4fa591 into main Oct 13, 2026
3 checks passed
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.

Vault registration is overwritten when reopening Obsidian while the app is still running

1 participant