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
+27 -27
View File
@@ -15,7 +15,7 @@ from unittest.mock import patch
import pytest
from scribe.services import backup
from grimoire.services import backup
def test_backup_version_is_current():
@@ -134,33 +134,33 @@ class _AnySlug(dict):
# rather than in the service because it exists only to be introspected: the
# product code already knows these pairings by calling them.
def _column_guard_targets():
from scribe.models.canonical_system import CanonicalSystem
from scribe.models.family import (
from grimoire.models.canonical_system import CanonicalSystem
from grimoire.models.family import (
FamilyAdoption, FamilyDecision, FamilyIdea, FamilyIdeaPlatform,
FamilyIdeaReference, Platform, ProjectPlatform,
)
from scribe.models.code_shape import CodeShape, CodeShapeEvent, CodeShapeUse
from scribe.models.lesson_rule_link import LessonNoRule, LessonRuleLink
from scribe.models.rule_moment_judgment import RuleMomentJudgment
from scribe.models.design_system import DesignSystem, DesignToken
from scribe.models.milestone import Milestone
from scribe.models.note import Note
from scribe.models.note_draft import NoteDraft
from scribe.models.note_supersession import NoteSupersession
from scribe.models.note_usage import NoteUsageEvent
from scribe.models.rule_usage import RuleUsageEvent
from scribe.models.system_usage import SystemUsageEvent
from scribe.models.retrieval_tuning import RetrievalTuningEvent
from scribe.models.moment_mapping import MomentMapping
from scribe.models.note_version import NoteVersion
from scribe.models.rule_version import RuleVersion
from scribe.models.project import Project
from scribe.models.repo_binding import RepoBinding
from scribe.models.rulebook import Rule, Rulebook, RulebookTopic, RuleRelation
from scribe.models.setting import Setting
from scribe.models.system import RecordSystem, System
from scribe.models.task_log import TaskLog
from scribe.models.user import User
from grimoire.models.code_shape import CodeShape, CodeShapeEvent, CodeShapeUse
from grimoire.models.lesson_rule_link import LessonNoRule, LessonRuleLink
from grimoire.models.rule_moment_judgment import RuleMomentJudgment
from grimoire.models.design_system import DesignSystem, DesignToken
from grimoire.models.milestone import Milestone
from grimoire.models.note import Note
from grimoire.models.note_draft import NoteDraft
from grimoire.models.note_supersession import NoteSupersession
from grimoire.models.note_usage import NoteUsageEvent
from grimoire.models.rule_usage import RuleUsageEvent
from grimoire.models.system_usage import SystemUsageEvent
from grimoire.models.retrieval_tuning import RetrievalTuningEvent
from grimoire.models.moment_mapping import MomentMapping
from grimoire.models.note_version import NoteVersion
from grimoire.models.rule_version import RuleVersion
from grimoire.models.project import Project
from grimoire.models.repo_binding import RepoBinding
from grimoire.models.rulebook import Rule, Rulebook, RulebookTopic, RuleRelation
from grimoire.models.setting import Setting
from grimoire.models.system import RecordSystem, System
from grimoire.models.task_log import TaskLog
from grimoire.models.user import User
return {
"users": (User, backup._user_rows),
@@ -512,7 +512,7 @@ def test_every_table_is_either_backed_up_or_explicitly_excluded():
now fails here until someone either backs it up or states in
`_NOT_INCLUDED` that it shouldn't be. Either is fine; silence is not.
"""
from scribe.models import Base
from grimoire.models import Base
schema = set(Base.metadata.tables)
accounted = set(backup._BACKED_UP) | set(backup._NOT_INCLUDED)
@@ -561,7 +561,7 @@ class _CM:
@pytest.mark.asyncio
async def test_export_full_backup_contains_every_declared_section():
with patch("scribe.services.backup.async_session", lambda: _CM()):
with patch("grimoire.services.backup.async_session", lambda: _CM()):
out = await backup.export_full_backup()
assert out["version"] == backup.BACKUP_VERSION