refactor: rename package fabledassistant -> scribe (code-only)
CI & Build / Python lint (push) Successful in 3s
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / Python tests (push) Successful in 54s
CI & Build / Build & push image (push) Successful in 1m14s

Renames src/fabledassistant -> src/scribe and all imports, plus the
default DB name and DB user/password (fabled -> scribe) in config +
compose. 952 refs / 154 files. Reverses the old 'internal name stays
fabledassistant' convention.

Code-only: live databases are still physically named 'fabledassistant'.
Deployed environments must set POSTGRES_DB / POSTGRES_USER (or rename the
DB) since the defaults now resolve to 'scribe'. Repo (FabledScribe), git
host (fabledsword), MCP (fabled-git) and the image name (fabledscribe)
are intentionally unchanged.

ruff check src/ clean locally; CI (typecheck + pytest) is the gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-03 15:48:35 -04:00
parent 1d4c206563
commit b255a0f90e
167 changed files with 1183 additions and 2368 deletions
+6 -6
View File
@@ -5,8 +5,8 @@ from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from fabledassistant.mcp._context import _user_id_ctx
from fabledassistant.mcp.tools.search import search
from scribe.mcp._context import _user_id_ctx
from scribe.mcp.tools.search import search
@pytest.fixture(autouse=True)
@@ -40,7 +40,7 @@ async def test_fable_search_returns_repackaged_results():
fake = _fake_note(id=1, title="kafka rebalance", body="HPA details",
tags=["ops"], is_task=False)
with patch(
"fabledassistant.mcp.tools.search.semantic_search_notes",
"scribe.mcp.tools.search.semantic_search_notes",
AsyncMock(return_value=[(0.93, fake)]),
):
out = await search(q="kafka")
@@ -62,7 +62,7 @@ async def test_fable_search_body_is_truncated_to_240_chars():
long_body = "x" * 500
fake = _fake_note(id=1, title="t", body=long_body)
with patch(
"fabledassistant.mcp.tools.search.semantic_search_notes",
"scribe.mcp.tools.search.semantic_search_notes",
AsyncMock(return_value=[(0.5, fake)]),
):
out = await search(q="x")
@@ -74,7 +74,7 @@ async def test_fable_search_content_type_filters_at_service_layer():
"""content_type maps to the is_task kwarg passed to the service."""
_user_id_ctx.set(7)
mock_search = AsyncMock(return_value=[])
with patch("fabledassistant.mcp.tools.search.semantic_search_notes", mock_search):
with patch("scribe.mcp.tools.search.semantic_search_notes", mock_search):
await search(q="x", content_type="task")
assert mock_search.call_args.kwargs["is_task"] is True
@@ -91,7 +91,7 @@ async def test_fable_search_content_type_filters_at_service_layer():
async def test_fable_search_limit_is_clamped():
_user_id_ctx.set(7)
mock_search = AsyncMock(return_value=[])
with patch("fabledassistant.mcp.tools.search.semantic_search_notes", mock_search):
with patch("scribe.mcp.tools.search.semantic_search_notes", mock_search):
await search(q="x", limit=999)
assert mock_search.call_args.kwargs["limit"] == 50