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
+12 -12
View File
@@ -9,19 +9,19 @@ import inspect
def test_rulebooks_blueprint_registered():
from scribe.routes.rulebooks import rulebooks_bp
from grimoire.routes.rulebooks import rulebooks_bp
assert rulebooks_bp.name == "rulebooks"
assert rulebooks_bp.url_prefix == "/api"
def test_rulebooks_blueprint_registered_in_app():
from scribe.app import create_app
from grimoire.app import create_app
app = create_app()
assert "rulebooks" in app.blueprints
def test_rulebook_handlers_callable():
from scribe.routes import rulebooks as rb_routes
from grimoire.routes import rulebooks as rb_routes
for name in (
"list_rulebooks", "create_rulebook", "get_rulebook",
"update_rulebook", "delete_rulebook",
@@ -30,7 +30,7 @@ def test_rulebook_handlers_callable():
def test_topic_handlers_callable():
from scribe.routes import rulebooks as rb_routes
from grimoire.routes import rulebooks as rb_routes
for name in (
"list_topics", "create_topic", "update_topic", "delete_topic",
):
@@ -39,7 +39,7 @@ def test_topic_handlers_callable():
def test_service_signatures_require_user_id():
"""Routes must call services with user_id — verify the contract."""
from scribe.services import rulebooks as svc
from grimoire.services import rulebooks as svc
for fn_name in (
"create_rulebook", "list_rulebooks", "get_rulebook",
"update_rulebook", "delete_rulebook", "find_rulebook_by_title",
@@ -56,7 +56,7 @@ def test_service_signatures_require_user_id():
def test_rule_model_carries_project_id_and_topic_id_nullable():
"""Migration 0059 made topic_id nullable and added project_id."""
from scribe.models.rulebook import Rule
from grimoire.models.rulebook import Rule
assert "project_id" in Rule.__table__.columns
assert Rule.__table__.columns["topic_id"].nullable is True
assert Rule.__table__.columns["project_id"].nullable is True
@@ -64,7 +64,7 @@ def test_rule_model_carries_project_id_and_topic_id_nullable():
def test_create_project_rule_route_exists():
"""POST /api/projects/<id>/rules — the frontend fast-path endpoint."""
from scribe.routes import rulebooks as rb_routes
from grimoire.routes import rulebooks as rb_routes
assert callable(getattr(rb_routes, "create_project_rule"))
@@ -73,9 +73,9 @@ def test_subscriptions_and_suppressions_are_gone():
to a rulebook or mutes a rule for one — not a route, a service function or
a table. A partial removal would leave a door that 500s on a missing table.
"""
from scribe.models import rulebook as rb_models
from scribe.routes import rulebooks as rb_routes
from scribe.services import rulebooks as svc
from grimoire.models import rulebook as rb_models
from grimoire.routes import rulebooks as rb_routes
from grimoire.services import rulebooks as svc
for name in ("subscribe_project", "unsubscribe_project",
"suppress_project_rule", "unsuppress_project_rule",
"suppress_project_topic", "unsuppress_project_topic"):
@@ -90,7 +90,7 @@ def test_subscriptions_and_suppressions_are_gone():
def test_rule_handlers_callable():
from scribe.routes import rulebooks as rb_routes
from grimoire.routes import rulebooks as rb_routes
for name in (
"list_rules", "create_rule", "get_rule", "update_rule", "delete_rule",
"get_project_rules", "move_rule",
@@ -114,7 +114,7 @@ def test_the_rule_list_zero_fills_usage_on_every_row():
"""
import inspect
from scribe.routes import rulebooks as rb_routes
from grimoire.routes import rulebooks as rb_routes
src = inspect.getsource(rb_routes.list_rules)
assert "usage_for_rules" in src, "the rule list does not read usage at all"