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:
@@ -12,8 +12,8 @@ from unittest.mock import AsyncMock, MagicMock, patch
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
from scribe.models import async_session
|
||||
from scribe.services import retrieval_review as review
|
||||
from grimoire.models import async_session
|
||||
from grimoire.services import retrieval_review as review
|
||||
from tests.helpers import ensure_user, fake_note
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ async def test_the_re_run_searches_the_way_the_arm_does():
|
||||
compared, so a change to the arm's spec fails here until the review
|
||||
follows it — and the arm has to have filters for the check to mean
|
||||
anything."""
|
||||
from scribe.services import retrieval_pipeline as rp
|
||||
from grimoire.services import retrieval_pipeline as rp
|
||||
|
||||
arm_kw: dict = {}
|
||||
|
||||
@@ -83,7 +83,7 @@ async def test_the_re_run_searches_the_way_the_arm_does():
|
||||
|
||||
row = SimpleNamespace(query="q", threshold=0.5, limit_n=3, project_id=None,
|
||||
created_at=CALL)
|
||||
with patch("scribe.services.embeddings.semantic_search_notes", side_effect=rerun_search):
|
||||
with patch("grimoire.services.embeddings.semantic_search_notes", side_effect=rerun_search):
|
||||
await review._rerun(1, row, 3)
|
||||
|
||||
arm = {k: arm_kw[k] for k in _FILTERS if k in arm_kw}
|
||||
@@ -113,7 +113,7 @@ async def test_the_re_run_ranks_from_one_and_marks_the_budget_cut():
|
||||
kw["report"]["best_chunk"] = {12: {"text": "second\nthe passage that matched"}}
|
||||
return hits
|
||||
|
||||
with patch("scribe.services.embeddings.semantic_search_notes", side_effect=search):
|
||||
with patch("grimoire.services.embeddings.semantic_search_notes", side_effect=search):
|
||||
lines = await review._rerun(1, row, 3)
|
||||
assert [(ln["rank"], ln["record_id"], ln["within_budget"]) for ln in lines] == [
|
||||
(1, 11, True), (2, 12, True), (3, 13, False),
|
||||
@@ -140,7 +140,7 @@ async def test_a_record_written_after_the_call_is_dropped_before_ranking():
|
||||
return hits
|
||||
|
||||
rep: dict = {}
|
||||
with patch("scribe.services.embeddings.semantic_search_notes", side_effect=search):
|
||||
with patch("grimoire.services.embeddings.semantic_search_notes", side_effect=search):
|
||||
lines = await review._rerun(1, row, 2, report=rep)
|
||||
assert rep["postdated"] == [21]
|
||||
assert [(ln["rank"], ln["record_id"], ln["within_budget"], ln["changed_since_call"])
|
||||
@@ -154,7 +154,7 @@ async def test_a_record_written_after_the_call_is_dropped_before_ranking():
|
||||
async def logged_calls():
|
||||
"""A reviewer's logged calls: two reviewable, one that offered nothing,
|
||||
one of another arm — and another user's reviewable call."""
|
||||
from scribe.models.retrieval_log import RetrievalLog
|
||||
from grimoire.models.retrieval_log import RetrievalLog
|
||||
|
||||
async with async_session() as s:
|
||||
me = await ensure_user(s, "review_owner")
|
||||
@@ -181,8 +181,8 @@ async def logged_calls():
|
||||
yield ids
|
||||
|
||||
from sqlalchemy import delete
|
||||
from scribe.models.note_usage import NoteUsageEvent
|
||||
from scribe.models.retrieval_judgment import RetrievalJudgment
|
||||
from grimoire.models.note_usage import NoteUsageEvent
|
||||
from grimoire.models.retrieval_judgment import RetrievalJudgment
|
||||
async with async_session() as s:
|
||||
logs = [ids[k] for k in ("a", "b", "empty", "other_arm", "theirs")]
|
||||
await s.execute(delete(RetrievalJudgment).where(
|
||||
@@ -248,8 +248,8 @@ async def test_a_record_the_re_run_does_not_hold_is_refused(logged_calls):
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.usefixtures("_dispose_engine")
|
||||
async def test_verdicts_land_replace_and_read_back_by_rank(logged_calls):
|
||||
from scribe.models.note_usage import NoteUsageEvent
|
||||
from scribe.services.retrieval_telemetry import retrieval_summary
|
||||
from grimoire.models.note_usage import NoteUsageEvent
|
||||
from grimoire.services.retrieval_telemetry import retrieval_summary
|
||||
|
||||
ids = logged_calls
|
||||
# The reviewer's agent opened 501 an hour inside the call; nothing opened 502.
|
||||
@@ -288,6 +288,6 @@ async def test_verdicts_land_replace_and_read_back_by_rank(logged_calls):
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.usefixtures("_dispose_engine")
|
||||
async def test_a_fresh_install_reads_an_empty_judged_block_not_a_failure():
|
||||
from scribe.services.retrieval_telemetry import retrieval_summary
|
||||
from grimoire.services.retrieval_telemetry import retrieval_summary
|
||||
|
||||
assert (await retrieval_summary(990041, days=30))["judged"] == {}
|
||||
|
||||
Reference in New Issue
Block a user