Skip to content

store: match vault names case-insensitively - #78

Closed
team-humaki wants to merge 1 commit into
mtiluk:mainfrom
team-humaki:store/case-insensitive-vault-names
Closed

team-humaki wants to merge 1 commit into
mtiluk:mainfrom
team-humaki:store/case-insensitive-vault-names

Conversation

@team-humaki

Copy link
Copy Markdown

What

Vault lookups, deletes, and same-user uniqueness checks now use SQLite COLLATE NOCASE. notes and NOTES resolve to the same vault. The stored spelling is unchanged, so existing rows keep their original casing.

Why

Fixes #75. VaultByName still compared names byte-for-byte, which is what the HTTP TODO called out. Blob and manifest routes already go through VaultByName, so they pick up the same matching. Creates reject a case-only duplicate instead of inserting a second row that the unique index would allow.

Testing

  • Store: lookup notes / NOTES against stored Notes; delete via NOTES; CreateVault("NOTES") after notes returns ErrVaultExists.
  • HTTP: GET /vaults/NOTES returns the vault stored as notes.
  • go test ./... and go test -race ./internal/server/store/ ./internal/server/http/ green.

Lookups, deletes, and same-user creates treat notes and NOTES as the
same vault. Stored spelling is unchanged. Fixes mtiluk#75.
Repository owner locked as spam and limited conversation to collaborators Sep 19, 2026
@mtiluk mtiluk closed this Sep 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement case-insensitive vault name matching

2 participants