refactor: use store names as primary API identifier instead of UUIDs - #3
Merged
Conversation
Owner
Author
|
@copilot resolve the merge conflicts in this pull request |
Copilot stopped work on behalf of
devigned due to an error
June 3, 2026 19:36
Store names become the primary developer-facing identifier in all API paths, replacing UUIDs. This improves developer experience by allowing human-readable URLs like /v1/stores/my-project/memories instead of /v1/stores/e4b280cc-654e-4fbd-8417-148fbe436d4d/memories. Design decisions: - Store names are immutable after creation (like Kubernetes resources) - Names are unique per tenant - Internal UUIDs remain for database FK integrity - OmsProvider trait gains get_store_by_name() with default implementation - UpdateStoreRequest no longer accepts name changes Signed-off-by: David Justice <david@justice.dev>
Add get_store_by_name() override with direct indexed query for efficient name resolution. Add migration for unique index on (tenant_id, name) to enforce name uniqueness per tenant. Update update_store to no longer modify the name field (immutable). New tests: - get_store_by_name_returns_store - get_store_by_name_not_found - get_store_by_name_tenant_isolation - same_name_different_tenants_allowed - duplicate_name_same_tenant_rejected Signed-off-by: David Justice <david@justice.dev>
StoreRef is now a simple name wrapper instead of UUID-or-default enum.
resolve_store() looks up stores by name via get_store_by_name(), with
auto-provisioning preserved for the _default alias.
All route paths use {store_name} parameter. Integration tests updated
to construct URLs with store names rather than UUIDs.
Signed-off-by: David Justice <david@justice.dev>
MCP tool parameters renamed from store_id to store_name. Tools now resolve store names via get_store_by_name() instead of parsing UUIDs. Integration tests updated accordingly. Signed-off-by: David Justice <david@justice.dev>
devigned
force-pushed
the
refactor/name-based-store-routing
branch
from
June 3, 2026 19:42
76be898 to
cb36901
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.
Summary
Store names become the primary developer-facing identifier in all API paths, replacing UUIDs. This improves DX by allowing human-readable URLs:
Design Decisions
Changes
Spec (
spec/oms-spec.md){store_name}instead of{store_id}Core (
kd6-core)get_store_by_name()toOmsProvidertrait with default implementationnamefromUpdateStoreRequest(immutable)SQLite (
kd6-sqlite)(tenant_id, name)get_store_by_name()override with direct indexed queryServer (
kd6-server)StoreRefsimplified from enum to name wrapperresolve_store()uses name-based lookup{store_name}parameterMCP (
kd6-mcp)store_id→store_nameTest Results
149 tests pass (20 core + 7 embed-local + 13 embed-openai + 17 MCP + 47 server + 45 SQLite)