feat(7833): each moment declares which kinds of record its search may consider, editable in Settings > Moments
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 34s
CI & Build / Python tests (push) Failing after 1m35s
CI & Build / integration (push) Successful in 1m58s
CI & Build / Build & push image (push) Skipped
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 34s
CI & Build / Python tests (push) Failing after 1m35s
CI & Build / integration (push) Successful in 1m58s
CI & Build / Build & push image (push) Skipped
The kind x moment table (services/record_kinds.py): - every record search fires at a door: the operator message, or a catalog moment (work.change for the write path); - each door considers a set of kinds (snippet, note, lesson, process, task:issue/work/spike/plan); a kind left out is never searched there; - the shipped defaults are today's behaviour; a user's change is stored per door, and putting a door back removes it. Both note arms read it, replacing their fixed kind lists, and a reserved slot whose kind is turned off is not reserved. The review re-run searches the same kinds. Settings > Moments shows and edits the table, with each cell's lines shown and opens from the record ledger. list_moments returns it as record_kinds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -91,14 +91,18 @@ async def test_the_tool_returns_the_catalog_with_this_installs_actions():
|
||||
from grimoire.mcp.tools import moments as tool
|
||||
|
||||
by_moment = {"actions": {"work.change": []}, "removed_defaults": []}
|
||||
table = {"doors": [{"door": "message", "kinds": ["snippet"]}]}
|
||||
with patch.object(tool, "current_user_id", lambda: 7), \
|
||||
patch.object(tool.actions_svc, "actions_by_moment",
|
||||
AsyncMock(return_value=by_moment)) as read:
|
||||
AsyncMock(return_value=by_moment)) as read, \
|
||||
patch.object(tool.record_kinds_svc, "table", AsyncMock(return_value=table)) as kinds:
|
||||
out = await tool.list_moments()
|
||||
read.assert_awaited_once_with(7)
|
||||
kinds.assert_awaited_once_with(7)
|
||||
assert out["moments"] == moments.catalog()["moments"]
|
||||
assert out["actions"] == by_moment["actions"]
|
||||
assert out["removed_defaults"] == []
|
||||
assert out["record_kinds"] == table
|
||||
|
||||
|
||||
def test_the_tools_are_registered_and_classified():
|
||||
|
||||
Reference in New Issue
Block a user