rename(547): the server is grimoire — package, image, DB defaults, backups
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 56s
CI & Build / integration (push) Successful in 1m4s
CI & Build / Python tests (push) Successful in 1m55s
CI & Build / Build & push image (push) Successful in 44s

Step 2 of the Scribe -> Grimoire rename.

- src/scribe -> src/grimoire, and every import, patch target, module path,
  hypercorn entry point and `python -m grimoire.restore` with it; pyproject,
  uv.lock and the frontend package are named grimoire.
- Image git.fabledsword.com/bvandeusen/fabledgrimoire; CI's Postgres service
  runs as grimoire / grimoire_test.
- Compose files default the DB user, database and (prod) volume to grimoire,
  each overridable from .env, so an install created as Scribe keeps its data
  by setting POSTGRES_USER, POSTGRES_DB and PGDATA_VOLUME.
- Backups are written as grimoire-<ts>.tar with format grimoire-backup-tar.
  Archives named scribe-* with the scribe-backup-tar manifest still restore
  and are still counted at the destination (folder and S3), with tests.
- Exports, the MCP auth realm, the ASGI scope key and the persistent logger
  carry the new name.

Kept on purpose: the secret-sealing key label stays "scribe.secrets.v1",
because every stored secret was derived under it.

Plugin identity (plugin name, hooks, env vars, .scribe marker, skills) is
step 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 10:50:45 -04:00
co-authored by Claude Opus 5.5
parent e99f1169f7
commit 0f5ef0be63
447 changed files with 3611 additions and 3558 deletions
+11 -11
View File
@@ -26,12 +26,12 @@ async def drive_update_note(note, **kwargs):
result = MagicMock()
result.scalars.return_value.first.return_value = note
session.execute = _AsyncMock(return_value=result)
with patch("scribe.services.notes.async_session") as cls, \
patch("scribe.services.notes.embed_note", MagicMock()), \
patch("scribe.services.notes._maybe_reactivate_project", _AsyncMock()), \
patch("scribe.services.note_versions.create_version", _AsyncMock()):
with patch("grimoire.services.notes.async_session") as cls, \
patch("grimoire.services.notes.embed_note", MagicMock()), \
patch("grimoire.services.notes._maybe_reactivate_project", _AsyncMock()), \
patch("grimoire.services.note_versions.create_version", _AsyncMock()):
cls.return_value = session
from scribe.services.notes import update_note
from grimoire.services.notes import update_note
return await update_note(user_id=7, note_id=note.id, **kwargs)
@@ -111,7 +111,7 @@ async def ensure_user(session, username: str, role: str = "user"):
"""
from sqlalchemy import select
from scribe.models.user import User
from grimoire.models.user import User
existing = (
await session.execute(select(User).where(User.username == username))
@@ -309,7 +309,7 @@ def plain_rule_detail():
"""
async def _detail(_uid, rule, _system_ids=None, _moments=None):
return rule.to_dict()
return patch("scribe.mcp.tools.rulebooks.rulebooks_svc.rule_detail", _detail)
return patch("grimoire.mcp.tools.rulebooks.rulebooks_svc.rule_detail", _detail)
class FakeMCP:
@@ -420,8 +420,8 @@ def writepath_cfg(**over):
real_one_does` is what makes the next addition fail loudly here rather than
silently no-op an arm, which is the whole claim this docstring makes.
"""
from scribe.services.plugin_context import _CHECKPOINT_DEFAULT
from scribe.services.retrieval_surfaces import SURFACES
from grimoire.services.plugin_context import _CHECKPOINT_DEFAULT
from grimoire.services.retrieval_surfaces import SURFACES
cfg = {
"enabled": True,
@@ -475,8 +475,8 @@ async def rule_row(rule_id: int):
database and must not pay for one — the same reason `plugin_config` defers
its service imports.
"""
from scribe.models import async_session
from scribe.models.rulebook import Rule
from grimoire.models import async_session
from grimoire.models.rulebook import Rule
async with async_session() as s:
return await s.get(Rule, rule_id)