feat: sharing tests, property tests, tag-share UI, inline errors, route fix
- Add 10 sharing endpoint tests (share/unshare memory, tag shares, shared-with-me,
my-shares, recall with shared, update permission checks)
- Add hypothesis property-based tests for model validation (roundtrip, bounds,
enum, sort_by, limit)
- Tighten model validation: sort_by Literal, limit ge=1/le=500, tags/keywords max_length
- Fix dashboard shared_with_me stat to include tag-based shares
- Add tag-sharing management UI (share/remove tags, user typeahead)
- Replace alert() with inline error messages
- Fix route ordering bug: share-tag routes before {memory_id} parameterized routes
This commit is contained in:
parent
688be268b9
commit
c130bcff33
9 changed files with 503 additions and 43 deletions
|
|
@ -9,8 +9,8 @@ MAX_MEMORY_CHARS = 800
|
|||
class MemoryStore(BaseModel):
|
||||
content: str = Field(..., max_length=MAX_MEMORY_CHARS)
|
||||
category: str = "facts"
|
||||
tags: str = ""
|
||||
expanded_keywords: str = ""
|
||||
tags: str = Field(default="", max_length=500)
|
||||
expanded_keywords: str = Field(default="", max_length=500)
|
||||
importance: float = Field(default=0.5, ge=0.0, le=1.0)
|
||||
force_sensitive: bool = False
|
||||
|
||||
|
|
@ -19,8 +19,8 @@ class MemoryRecall(BaseModel):
|
|||
context: str
|
||||
expanded_query: str = ""
|
||||
category: Optional[str] = None
|
||||
sort_by: str = "importance"
|
||||
limit: int = 10
|
||||
sort_by: Literal["importance", "relevance", "recency"] = "importance"
|
||||
limit: int = Field(default=10, ge=1, le=500)
|
||||
|
||||
|
||||
class MemoryResponse(BaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue