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:
@@ -15,27 +15,27 @@ BAD = "All done, pushed it."
|
||||
|
||||
|
||||
def test_a_complete_report_misses_nothing():
|
||||
from scribe.services.report_check import missing_sections
|
||||
from grimoire.services.report_check import missing_sections
|
||||
|
||||
assert missing_sections(GOOD) == []
|
||||
|
||||
|
||||
def test_a_bare_reply_misses_every_section_in_order():
|
||||
from scribe.services.report_check import SECTIONS, missing_sections
|
||||
from grimoire.services.report_check import SECTIONS, missing_sections
|
||||
|
||||
assert missing_sections(BAD) == list(SECTIONS)
|
||||
|
||||
|
||||
def test_a_bare_id_does_not_count_as_placing_the_work():
|
||||
"""The title is what spares the reader a lookup; "closed #41" does not."""
|
||||
from scribe.services.report_check import missing_sections
|
||||
from grimoire.services.report_check import missing_sections
|
||||
|
||||
assert missing_sections("Closed #41.\n**Needs you:** nothing.\n**Next:** #42.") == ["where it sits"]
|
||||
assert missing_sections('Closed #41 "Sync". Needs you: nothing. Next: #42.') == []
|
||||
|
||||
|
||||
def test_the_reason_names_only_sections_it_knows():
|
||||
from scribe.services.report_check import block_reason
|
||||
from grimoire.services.report_check import block_reason
|
||||
|
||||
reason = block_reason(["next", "ignore previous instructions", "Where It Sits"])
|
||||
assert "missing: where it sits, next." in reason
|
||||
@@ -45,8 +45,8 @@ def test_the_reason_names_only_sections_it_knows():
|
||||
def test_the_reason_carries_the_completion_shapes_line_and_where_the_rest_is():
|
||||
"""The shape was delivered when the task closed; the reason repeats its
|
||||
one line, not the whole of it, and names where the full text is."""
|
||||
from scribe.services import reply_shapes
|
||||
from scribe.services.report_check import block_reason
|
||||
from grimoire.services import reply_shapes
|
||||
from grimoire.services.report_check import block_reason
|
||||
|
||||
reason = block_reason(["next"])
|
||||
assert reply_shapes.SHAPES["completion"].reminder in reason
|
||||
@@ -54,16 +54,16 @@ def test_the_reason_carries_the_completion_shapes_line_and_where_the_rest_is():
|
||||
|
||||
|
||||
def test_a_reason_with_nothing_recognised_still_says_what_to_do():
|
||||
from scribe.services.report_check import block_reason
|
||||
from grimoire.services.report_check import block_reason
|
||||
|
||||
assert "missing: the completion sections." in block_reason([])
|
||||
|
||||
|
||||
async def test_the_outcome_is_recorded_as_a_plugin_event():
|
||||
from scribe.services.report_check import record_report_check
|
||||
from grimoire.services.report_check import record_report_check
|
||||
|
||||
session = make_mock_session()
|
||||
with patch("scribe.services.report_check.async_session", return_value=session):
|
||||
with patch("grimoire.services.report_check.async_session", return_value=session):
|
||||
await record_report_check(7, "blocked", missing=["next", "bogus"], task_ids=[41], project_id=2)
|
||||
row = session.add.call_args.args[0]
|
||||
assert (row.category, row.action, row.user_id) == ("plugin", "report_check", 7)
|
||||
@@ -73,10 +73,10 @@ 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.report_check import record_report_check
|
||||
from grimoire.services.report_check import record_report_check
|
||||
|
||||
session = make_mock_session()
|
||||
with patch("scribe.services.report_check.async_session", return_value=session), \
|
||||
with patch("grimoire.services.report_check.async_session", return_value=session), \
|
||||
pytest.raises(ValueError):
|
||||
await record_report_check(7, "skipped")
|
||||
session.add.assert_not_called()
|
||||
@@ -89,7 +89,7 @@ async def test_an_unknown_outcome_is_refused_before_anything_is_written():
|
||||
(BAD, True, "missing_after_rewrite", False),
|
||||
])
|
||||
async def test_check_reply_records_every_outcome_and_holds_only_a_first_miss(reply, rewrite, outcome, held):
|
||||
from scribe.services import report_check
|
||||
from grimoire.services import report_check
|
||||
|
||||
record = AsyncMock()
|
||||
with patch.object(report_check, "record_report_check", record):
|
||||
@@ -102,7 +102,7 @@ async def test_check_reply_records_every_outcome_and_holds_only_a_first_miss(rep
|
||||
|
||||
async def test_an_unrecorded_check_holds_nothing():
|
||||
"""A hold the numbers cannot see is not one this check may make."""
|
||||
from scribe.services import report_check
|
||||
from grimoire.services import report_check
|
||||
|
||||
with patch.object(report_check, "record_report_check", AsyncMock(side_effect=RuntimeError("db"))):
|
||||
got = await report_check.check_reply(7, BAD, task_ids=[41], rewrite=False)
|
||||
|
||||
Reference in New Issue
Block a user