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
@@ -23,7 +23,7 @@ hook's own history is made of.
import pytest
from scribe.services.shape_ledger import (
from grimoire.services.shape_ledger import (
_RESEMBLE_MIN, _RESEMBLE_REASON, _REVIEW_ROWS_SHOWN, canon_coherence,
stamp_score, stamps_to_review,
)
@@ -200,7 +200,7 @@ def test_the_service_carries_no_machinery_for_bulk_withdrawal() -> None:
If someone adds an auto-retire path to the ledger, this fails and the
conversation about whether a machine may un-judge in bulk happens again
— deliberately, rather than in a diff nobody read."""
import scribe.services.shape_ledger as ledger
import grimoire.services.shape_ledger as ledger
body = open(ledger.__file__).read()
for banned in ("def retire_weak", "def auto_unclassify", "def bulk_withdraw"):
@@ -233,8 +233,8 @@ def test_a_class_and_the_to_dict_beside_it_are_one_shape() -> None:
calls it incoherent for containing precisely what it says it contains."""
rows = []
for i in range(6):
rows += [_model(f"M{i}", f"src/scribe/models/m{i}.py"),
_to_dict(f"src/scribe/models/m{i}.py")]
rows += [_model(f"M{i}", f"src/grimoire/models/m{i}.py"),
_to_dict(f"src/grimoire/models/m{i}.py")]
out = stamps_to_review(rows)
assert out["incoherent_count"] == 0
@@ -262,11 +262,11 @@ def test_family_grouping_alone_passes_a_polluted_canon() -> None:
in this file green."""
rows = []
for i in range(37):
rows.append(_model(f"M{i}", f"src/scribe/models/m{i}.py"))
rows.append(_model(f"M{i}", f"src/grimoire/models/m{i}.py"))
for i in range(25):
rows.append(_to_dict(f"src/scribe/models/m{i % 37}.py"))
strangers = (["src/scribe/routes/rulebooks.py"] * 2
+ ["src/scribe/services/embeddings.py"] * 7
rows.append(_to_dict(f"src/grimoire/models/m{i % 37}.py"))
strangers = (["src/grimoire/routes/rulebooks.py"] * 2
+ ["src/grimoire/services/embeddings.py"] * 7
+ ["frontend/src/stores/rulebooks.ts"] * 3
+ ["tests/test_services_rulebooks.py"] * 19)
for i, path in enumerate(strangers):
@@ -282,7 +282,7 @@ def test_family_grouping_alone_passes_a_polluted_canon() -> None:
# The listing is capped, the count is not — a reader must be able to
# tell twelve strangers from thirty-one.
assert len(entry["strangers"]) == _REVIEW_ROWS_SHOWN
assert all(not s["path"].startswith("src/scribe/models")
assert all(not s["path"].startswith("src/grimoire/models")
for s in entry["strangers"])
@@ -356,7 +356,7 @@ def test_the_coherence_verdict_reads_rows_and_writes_nothing() -> None:
# about what "weak" means — one predicate, so they cannot drift apart.
def test_one_predicate_says_what_weak_is() -> None:
from scribe.services.shape_ledger import is_weak_stamp
from grimoire.services.shape_ledger import is_weak_stamp
assert is_weak_stamp(_stamped(0.72))
assert not is_weak_stamp(_stamped(_RESEMBLE_MIN))
@@ -367,7 +367,7 @@ def test_one_predicate_says_what_weak_is() -> None:
def test_weak_stamps_do_not_elect_a_dominant_canon() -> None:
from scribe.services.shape_ledger import dominant_canon
from grimoire.services.shape_ledger import dominant_canon
weak = [_stamped(0.72, path=f"web/src/lib/{i}.ts", symbol=f"f{i}") for i in range(5)]
assert dominant_canon(weak) is None
@@ -382,7 +382,7 @@ def test_weak_stamps_do_not_elect_a_dominant_canon() -> None:
def test_weak_stamps_do_not_say_what_form_a_canon_is() -> None:
from scribe.services.shape_ledger import FORM_UNKNOWN, canon_form
from grimoire.services.shape_ledger import FORM_UNKNOWN, canon_form
weak = [_stamped(0.7, symbol=f"T{i}", signature=f"class T{i}:") for i in range(5)]
assert canon_form(weak, 1) == FORM_UNKNOWN