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:
@@ -35,9 +35,9 @@ async def test_resolve_process_by_numeric_id():
|
||||
session = _make_mock_session()
|
||||
# numeric id → first execute (id lookup) hits
|
||||
session.execute = AsyncMock(side_effect=[_result(first=note)])
|
||||
with patch("fabledassistant.services.notes.async_session") as cls:
|
||||
with patch("scribe.services.notes.async_session") as cls:
|
||||
cls.return_value = session
|
||||
from fabledassistant.services.notes import resolve_process
|
||||
from scribe.services.notes import resolve_process
|
||||
found, candidates = await resolve_process(1, "5")
|
||||
assert found is note
|
||||
assert candidates == []
|
||||
@@ -50,9 +50,9 @@ async def test_resolve_process_exact_title_beats_substring():
|
||||
session = _make_mock_session()
|
||||
# non-digit → exact-title query (first execute) hits; substring never runs
|
||||
session.execute = AsyncMock(side_effect=[_result(first=note)])
|
||||
with patch("fabledassistant.services.notes.async_session") as cls:
|
||||
with patch("scribe.services.notes.async_session") as cls:
|
||||
cls.return_value = session
|
||||
from fabledassistant.services.notes import resolve_process
|
||||
from scribe.services.notes import resolve_process
|
||||
found, candidates = await resolve_process(1, "Drift Audit")
|
||||
assert found is note
|
||||
assert candidates == []
|
||||
@@ -66,9 +66,9 @@ async def test_resolve_process_substring_returns_candidates():
|
||||
session = _make_mock_session()
|
||||
# exact miss, then substring returns two (most-recent first)
|
||||
session.execute = AsyncMock(side_effect=[_result(first=None), _result(all_=[n1, n2])])
|
||||
with patch("fabledassistant.services.notes.async_session") as cls:
|
||||
with patch("scribe.services.notes.async_session") as cls:
|
||||
cls.return_value = session
|
||||
from fabledassistant.services.notes import resolve_process
|
||||
from scribe.services.notes import resolve_process
|
||||
found, candidates = await resolve_process(1, "drift")
|
||||
assert found is n1
|
||||
assert candidates == [{"id": 9, "title": "Drift Audit Notes"}]
|
||||
@@ -79,9 +79,9 @@ async def test_resolve_process_substring_returns_candidates():
|
||||
async def test_resolve_process_no_match():
|
||||
session = _make_mock_session()
|
||||
session.execute = AsyncMock(side_effect=[_result(first=None), _result(all_=[])])
|
||||
with patch("fabledassistant.services.notes.async_session") as cls:
|
||||
with patch("scribe.services.notes.async_session") as cls:
|
||||
cls.return_value = session
|
||||
from fabledassistant.services.notes import resolve_process
|
||||
from scribe.services.notes import resolve_process
|
||||
found, candidates = await resolve_process(1, "nope")
|
||||
assert found is None
|
||||
assert candidates == []
|
||||
|
||||
Reference in New Issue
Block a user