Skip to content

qmd_index not personalized on install — every vault collides on the same QMD store #137

Description

@breferrari

Summary

qmd_index in vault-manifest.json is shipped as a hardcoded literal ("obsidian-mind") and is not a personalization variable, so the installer copies it through verbatim. Every obsidian-mind vault installed on the same machine ends up with the same qmd_index, which defeats the per-vault SQLite isolation the value is supposed to provide.

Evidence (from a real install)

  • Template ships a literal, not a placeholder. templates/vault-manifest.json contains "qmd_index": "obsidian-mind" as a fixed string (no {{...}}), so there is nothing for shardmind to substitute.
  • Not in the schema. shard-schema.yaml only defines four interactive values: user_name, org_name, vault_purpose, qmd_enabled. The only QMD-related prompt is the boolean "Enable QMD semantic search?" — never the index name.
  • Resulting shard-values.yaml:
    user_name: Brenno
    org_name: Trade Republic
    vault_purpose: engineering
    qmd_enabled: true
  • Default mirrors the shard name. shard.yamlname: obsidian-mind, so qmd_index just defaults to the package name.

Installed shard version: breferrari/obsidian-mind@6.2.1 (shardmind schema_version 2).

Impact

The vault's own CLAUDE.md states the purpose of qmd_index is: "so the SQLite store stays isolated from other vaults on the machine." Because the value is a fixed default rather than a per-install value:

  • Two+ obsidian-mind vaults on one machine share a single obsidian-mind QMD index.
  • Search results bleed across vaults; re-indexing one clobbers the other.
  • The MCP server, the CLI fallback, and the SessionStart hook all read this one field, so the collision affects every QMD surface at once.

Single-vault installs work fine today, so this is a latent bug rather than an immediate breakage.

Proposed fix

Make qmd_index a derived/prompted value during install instead of a static literal. Options, in rough order of preference:

  1. Derive from the install folder name (e.g. basename of the target dir), optionally suffixed with a short org/user token, and slugified. Zero extra prompts, naturally unique per location.
  2. Prompt the user for an index name in the schema, defaulting to the derived folder-based slug so most users just hit enter.
  3. At minimum, default to obsidian-mind-<user_or_org_slug> so it's not a bare shared name.

Either way, turn the vault-manifest.json qmd_index field into a templated placeholder fed by that value.

Workaround for existing installs

Edit vault-manifest.json qmd_index to a unique string, then rebuild: node --experimental-strip-types scripts/qmd-bootstrap.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions