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
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:
@@ -11,10 +11,10 @@ from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from scribe.mcp.tools.milestones import list_milestones
|
||||
from scribe.mcp.tools.projects import enter_project, get_project
|
||||
from scribe.services.milestones import brief_milestone_summary
|
||||
from scribe.services.milestones import unplanned_milestones as brief_unplanned
|
||||
from grimoire.mcp.tools.milestones import list_milestones
|
||||
from grimoire.mcp.tools.projects import enter_project, get_project
|
||||
from grimoire.services.milestones import brief_milestone_summary
|
||||
from grimoire.services.milestones import unplanned_milestones as brief_unplanned
|
||||
from tests.helpers import fake_project
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ def _no_platforms():
|
||||
case — a project with none yet. The populated shape is asserted in its
|
||||
own test.
|
||||
"""
|
||||
with patch("scribe.mcp.tools.projects.platforms_svc.project_platforms",
|
||||
with patch("grimoire.mcp.tools.projects.platforms_svc.project_platforms",
|
||||
AsyncMock(return_value=[])):
|
||||
yield
|
||||
|
||||
@@ -101,25 +101,25 @@ def _enter_stubs(project, milestones: list[dict], tasks: list, *, rules=None, sy
|
||||
design=None):
|
||||
applicable = rules or {"rules": [], "project_rules": [], "truncated": False}
|
||||
return [
|
||||
patch("scribe.mcp.tools.projects.projects_svc.get_project",
|
||||
patch("grimoire.mcp.tools.projects.projects_svc.get_project",
|
||||
AsyncMock(return_value=project)),
|
||||
patch("scribe.mcp.tools.projects.rulebooks_svc.get_applicable_rules",
|
||||
patch("grimoire.mcp.tools.projects.rulebooks_svc.get_applicable_rules",
|
||||
AsyncMock(return_value=applicable)),
|
||||
patch("scribe.mcp.tools.projects.milestones_svc.get_project_milestone_summary",
|
||||
patch("grimoire.mcp.tools.projects.milestones_svc.get_project_milestone_summary",
|
||||
AsyncMock(return_value=milestones)),
|
||||
patch("scribe.mcp.tools.projects.notes_svc.list_notes",
|
||||
patch("grimoire.mcp.tools.projects.notes_svc.list_notes",
|
||||
AsyncMock(return_value=(tasks, len(tasks)))),
|
||||
patch("scribe.mcp.tools.projects.systems_svc.list_systems",
|
||||
patch("grimoire.mcp.tools.projects.systems_svc.list_systems",
|
||||
AsyncMock(return_value=systems or [])),
|
||||
patch("scribe.mcp.tools.projects.systems_tools.bootstrap_systems_ask",
|
||||
patch("grimoire.mcp.tools.projects.systems_tools.bootstrap_systems_ask",
|
||||
AsyncMock(return_value=None)),
|
||||
patch("scribe.mcp.tools.projects.design_systems_svc.design_context",
|
||||
patch("grimoire.mcp.tools.projects.design_systems_svc.design_context",
|
||||
AsyncMock(return_value=design)),
|
||||
patch("scribe.mcp.tools.projects.coverage_svc.cached_coverage",
|
||||
patch("grimoire.mcp.tools.projects.coverage_svc.cached_coverage",
|
||||
AsyncMock(return_value=None)),
|
||||
patch("scribe.mcp.tools.projects.family_adoption_svc.family_readout",
|
||||
patch("grimoire.mcp.tools.projects.family_adoption_svc.family_readout",
|
||||
AsyncMock(return_value=None)),
|
||||
patch("scribe.mcp.tools.projects.spawn"),
|
||||
patch("grimoire.mcp.tools.projects.spawn"),
|
||||
]
|
||||
|
||||
|
||||
@@ -195,11 +195,11 @@ async def test_omitted_key_is_absent_when_nothing_was_left_out():
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_project_lists_every_milestone_without_plans():
|
||||
with patch("scribe.mcp.tools.projects.projects_svc.get_project",
|
||||
with patch("grimoire.mcp.tools.projects.projects_svc.get_project",
|
||||
AsyncMock(return_value=fake_project(id=5))), \
|
||||
patch("scribe.mcp.tools.projects.milestones_svc.get_project_milestone_summary",
|
||||
patch("grimoire.mcp.tools.projects.milestones_svc.get_project_milestone_summary",
|
||||
AsyncMock(return_value=_history(10))), \
|
||||
patch("scribe.mcp.tools.projects.rulebooks_svc.get_applicable_rules",
|
||||
patch("grimoire.mcp.tools.projects.rulebooks_svc.get_applicable_rules",
|
||||
AsyncMock(return_value={"rules": [], "truncated": False})):
|
||||
out = await get_project(project_id=5)
|
||||
assert len(out["milestone_summary"]) == 10
|
||||
@@ -209,7 +209,7 @@ async def test_get_project_lists_every_milestone_without_plans():
|
||||
@pytest.mark.asyncio
|
||||
async def test_list_milestones_lists_every_milestone_without_plans():
|
||||
"""The call milestone_summary_omitted points to."""
|
||||
with patch("scribe.mcp.tools.milestones.milestones_svc.get_project_milestone_summary",
|
||||
with patch("grimoire.mcp.tools.milestones.milestones_svc.get_project_milestone_summary",
|
||||
AsyncMock(return_value=_history(30))):
|
||||
out = await list_milestones(project_id=5)
|
||||
assert len(out["milestones"]) == 30
|
||||
@@ -220,7 +220,7 @@ def test_a_planning_read_lists_rules_without_restating_them():
|
||||
"""A project's listing is every global rule tagged to its areas, so the
|
||||
full rule_brief of each would make a planning read enormous. Planning
|
||||
reads name the rules; get_rule reads one."""
|
||||
from scribe.services.rulebooks import rules_payload
|
||||
from grimoire.services.rulebooks import rules_payload
|
||||
|
||||
applicable = {
|
||||
"rules": [{"id": i, "title": f"r{i}", "statement": PLAN, "when_to_apply": PLAN,
|
||||
@@ -230,7 +230,7 @@ def test_a_planning_read_lists_rules_without_restating_them():
|
||||
for i in range(30)],
|
||||
"truncated": True,
|
||||
}
|
||||
with patch("scribe.services.rulebooks.record_rule_surfaced") as surfaced:
|
||||
with patch("grimoire.services.rulebooks.record_rule_surfaced") as surfaced:
|
||||
out = rules_payload(applicable, user_id=7, source="start_planning")
|
||||
|
||||
assert out["applicable_rules"][0] == {"id": 0, "title": "r0", "topic_title": "git"}
|
||||
|
||||
Reference in New Issue
Block a user