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:
@@ -9,7 +9,7 @@ from tests.helpers import make_mock_session
|
||||
|
||||
|
||||
def test_the_ledger_lines_parse_and_garbage_is_dropped():
|
||||
from scribe.services.shape_check import parse_written
|
||||
from grimoire.services.shape_check import parse_written
|
||||
|
||||
raw = ("a.py\tsym\thelper\n"
|
||||
"a.py\tsym\thelper\n" # duplicate
|
||||
@@ -22,7 +22,7 @@ def test_the_ledger_lines_parse_and_garbage_is_dropped():
|
||||
|
||||
|
||||
def test_a_first_stop_blocks_or_passes_and_the_next_never_blocks():
|
||||
from scribe.services.shape_check import outcome_for
|
||||
from grimoire.services.shape_check import outcome_for
|
||||
|
||||
one = [{"path": "a", "kind": "sym", "symbol": "b"}]
|
||||
assert outcome_for("check", one) == "blocked"
|
||||
@@ -32,7 +32,7 @@ def test_a_first_stop_blocks_or_passes_and_the_next_never_blocks():
|
||||
|
||||
|
||||
def test_the_reason_names_each_shape_its_evidence_and_the_one_call():
|
||||
from scribe.services.shape_check import block_reason
|
||||
from grimoire.services.shape_check import block_reason
|
||||
|
||||
unjudged = [
|
||||
{"path": "web/A.svelte", "kind": "file", "symbol": "A", "status": "new", "evidence": {}},
|
||||
@@ -50,7 +50,7 @@ def test_the_reason_names_each_shape_its_evidence_and_the_one_call():
|
||||
|
||||
|
||||
def test_a_long_turn_is_listed_with_a_tail_not_dropped():
|
||||
from scribe.services.shape_check import _LISTED, block_reason
|
||||
from grimoire.services.shape_check import _LISTED, block_reason
|
||||
|
||||
many = [{"path": "p.py", "kind": "sym", "symbol": f"f{i}", "status": "new", "evidence": {}}
|
||||
for i in range(_LISTED + 3)]
|
||||
@@ -60,10 +60,10 @@ def test_a_long_turn_is_listed_with_a_tail_not_dropped():
|
||||
|
||||
|
||||
async def test_the_outcome_is_recorded_as_a_plugin_event():
|
||||
from scribe.services.shape_check import record_shape_check
|
||||
from grimoire.services.shape_check import record_shape_check
|
||||
|
||||
session = make_mock_session()
|
||||
with patch("scribe.services.shape_check.async_session", return_value=session):
|
||||
with patch("grimoire.services.shape_check.async_session", return_value=session):
|
||||
await record_shape_check(7, "blocked", written=5, unjudged=2, project_id=2)
|
||||
row = session.add.call_args.args[0]
|
||||
assert (row.category, row.action, row.user_id) == ("plugin", "shape_check", 7)
|
||||
@@ -72,17 +72,17 @@ async def test_the_outcome_is_recorded_as_a_plugin_event():
|
||||
|
||||
|
||||
async def test_an_unknown_outcome_is_refused_before_anything_is_written():
|
||||
from scribe.services.shape_check import record_shape_check
|
||||
from grimoire.services.shape_check import record_shape_check
|
||||
|
||||
session = make_mock_session()
|
||||
with patch("scribe.services.shape_check.async_session", return_value=session), \
|
||||
with patch("grimoire.services.shape_check.async_session", return_value=session), \
|
||||
pytest.raises(ValueError):
|
||||
await record_shape_check(7, "skipped", written=1, unjudged=1)
|
||||
session.add.assert_not_called()
|
||||
|
||||
|
||||
def test_the_window_counts_turns_asks_and_asks_walked_past():
|
||||
from scribe.services.shape_check import summarise
|
||||
from grimoire.services.shape_check import summarise
|
||||
|
||||
assert summarise([]) == {"checked": 0, "asked": 0, "left": 0}
|
||||
got = summarise(["passed", "blocked", "judged_after_block", "blocked", "left_after_block"])
|
||||
|
||||
Reference in New Issue
Block a user