Coverage for src / lexigram / contracts / data / vector / tenancy.py: 0%
6 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-08-15 18:57 +0800
« prev ^ index » next coverage.py v7.13.5, created at 2026-08-15 18:57 +0800
1"""Tenant-aware collection resolution protocols for vector stores."""
3from __future__ import annotations
5from typing import Protocol, runtime_checkable
8@runtime_checkable
9class TenantCollectionResolver(Protocol):
10 """Resolve a logical collection name to a tenant-specific name.
12 Implementations transform a logical name (e.g. ``"canon"``) into a
13 tenant-scoped physical name (e.g. ``"canon_t_t1"``) using the
14 current tenant context.
15 """
17 def resolve(self, logical_name: str, tenant_id: str) -> str:
18 """Resolve a logical collection name for the given tenant.
20 Args:
21 logical_name: The logical collection name used by application code.
22 tenant_id: The current tenant identifier.
24 Returns:
25 A tenant-scoped collection name.
26 """
27 ...
30__all__ = ["TenantCollectionResolver"]