Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion backend/api/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class PromptCreate(BaseModel):


class PromptResponse(BaseModel):
id: int
prompt_uid: str
title: str
description: Optional[str] = None
Expand Down
11 changes: 10 additions & 1 deletion backend/tests/test_prompts_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,22 @@ def test_prompt_crud(auth_client):
data = resp.json()
assert data["title"] == "Test Prompt"
assert data["prompt_uid"].startswith("prompt_")
# Identity is the opaque prompt_uid; the sequential DB surrogate must never
# be exposed on the API surface (see CLAUDE.md "never expose sequential
# database ids").
assert "id" not in data
assert mock_session.items[0].organization_id == "org-acme"
assert mock_session.items[0].workspace_id == "workspace-org-acme"

# List
resp = auth_client.get("/api/prompts")
assert resp.status_code == 200
assert len(resp.json()) == 1
listed = resp.json()
assert len(listed) == 1
assert all(
"id" not in item and item["prompt_uid"].startswith("prompt_")
for item in listed
)


def test_prompt_list_scopes_shared_prompts_to_current_workspace(auth_client):
Expand Down
Loading