refactor: rename package fabledassistant -> scribe (code-only)
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:
@@ -20,10 +20,10 @@ async def test_pin_version_sets_manual_kind_and_label():
|
||||
mock_version.pin_label = None
|
||||
|
||||
with patch(
|
||||
"fabledassistant.services.version_pinning.async_session",
|
||||
"scribe.services.version_pinning.async_session",
|
||||
return_value=_mock_session_for_version(mock_version),
|
||||
):
|
||||
from fabledassistant.services.version_pinning import pin_version
|
||||
from scribe.services.version_pinning import pin_version
|
||||
result = await pin_version(
|
||||
user_id=1, note_id=42, version_id=7, label="the runbook circa Q2",
|
||||
)
|
||||
@@ -40,10 +40,10 @@ async def test_pin_version_accepts_null_label():
|
||||
mock_version.pin_label = None
|
||||
|
||||
with patch(
|
||||
"fabledassistant.services.version_pinning.async_session",
|
||||
"scribe.services.version_pinning.async_session",
|
||||
return_value=_mock_session_for_version(mock_version),
|
||||
):
|
||||
from fabledassistant.services.version_pinning import pin_version
|
||||
from scribe.services.version_pinning import pin_version
|
||||
await pin_version(user_id=1, note_id=42, version_id=7, label=None)
|
||||
|
||||
assert mock_version.pin_kind == "manual"
|
||||
@@ -57,10 +57,10 @@ async def test_pin_version_promotes_auto_to_manual_with_label_update():
|
||||
mock_version.pin_label = "stable 2026-04-01 → 2026-04-05"
|
||||
|
||||
with patch(
|
||||
"fabledassistant.services.version_pinning.async_session",
|
||||
"scribe.services.version_pinning.async_session",
|
||||
return_value=_mock_session_for_version(mock_version),
|
||||
):
|
||||
from fabledassistant.services.version_pinning import pin_version
|
||||
from scribe.services.version_pinning import pin_version
|
||||
await pin_version(
|
||||
user_id=1, note_id=42, version_id=7, label="post-network-refresh",
|
||||
)
|
||||
@@ -78,10 +78,10 @@ async def test_pin_version_rejects_overlong_label():
|
||||
# even be entered. We still patch it to avoid accidental DB lookups
|
||||
# if the implementation order changes.
|
||||
with patch(
|
||||
"fabledassistant.services.version_pinning.async_session",
|
||||
"scribe.services.version_pinning.async_session",
|
||||
return_value=_mock_session_for_version(mock_version),
|
||||
):
|
||||
from fabledassistant.services.version_pinning import pin_version
|
||||
from scribe.services.version_pinning import pin_version
|
||||
try:
|
||||
await pin_version(
|
||||
user_id=1, note_id=42, version_id=7, label="x" * 501,
|
||||
@@ -102,10 +102,10 @@ async def test_pin_version_returns_none_when_not_found():
|
||||
mock_session.__aexit__ = AsyncMock(return_value=False)
|
||||
|
||||
with patch(
|
||||
"fabledassistant.services.version_pinning.async_session",
|
||||
"scribe.services.version_pinning.async_session",
|
||||
return_value=mock_session,
|
||||
):
|
||||
from fabledassistant.services.version_pinning import pin_version
|
||||
from scribe.services.version_pinning import pin_version
|
||||
out = await pin_version(user_id=1, note_id=42, version_id=99, label=None)
|
||||
|
||||
assert out is None
|
||||
@@ -117,10 +117,10 @@ async def test_unpin_version_clears_kind_and_label():
|
||||
mock_version.pin_label = "previous label"
|
||||
|
||||
with patch(
|
||||
"fabledassistant.services.version_pinning.async_session",
|
||||
"scribe.services.version_pinning.async_session",
|
||||
return_value=_mock_session_for_version(mock_version),
|
||||
):
|
||||
from fabledassistant.services.version_pinning import unpin_version
|
||||
from scribe.services.version_pinning import unpin_version
|
||||
result = await unpin_version(user_id=1, note_id=42, version_id=7)
|
||||
|
||||
assert result is mock_version
|
||||
|
||||
Reference in New Issue
Block a user