fix(moments): the tools import the delivery module, and the tool-list cache leaves the swept directory (milestone 458 step 4a, #4922)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / integration (push) Successful in 49s
CI & Build / TypeScript typecheck (push) Successful in 52s
CI & Build / Python tests (push) Successful in 1m48s
CI & Build / Build & push image (push) Successful in 32s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / integration (push) Successful in 49s
CI & Build / TypeScript typecheck (push) Successful in 52s
CI & Build / Python tests (push) Successful in 1m48s
CI & Build / Build & push image (push) Successful in 32s
Two guards caught 7865313:
- test_mcp_tool_processes reads every coroutine in a tool module's
namespace as a tool, and a name-imported attach_moment_rules looked
like one. All seven modules now call moment_delivery.attach_moment_rules,
and the parity guard accepts the attribute form.
- The session-ledger convention: a file in a swept directory must be a
.ids ledger. The tool-list cache describes the install, not the
context, so it moves to its own directory, scribe-moment, where a
compaction does not sweep it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ from scribe.services import trash as trash_svc
|
||||
from scribe.services.rule_usage import (
|
||||
record_rule_outcome, record_rule_pulled,
|
||||
)
|
||||
from scribe.services.moment_delivery import attach_moment_rules
|
||||
from scribe.services import moment_delivery
|
||||
|
||||
|
||||
# ── Rulebook CRUD ───────────────────────────────────────────────────────
|
||||
@@ -537,7 +537,7 @@ async def create_rule(
|
||||
)
|
||||
data = await rulebooks_svc.rule_detail(uid, rule, system_ids, moments)
|
||||
data.update(dedup_svc.overlap_response(overlaps, "rule"))
|
||||
return await attach_moment_rules(uid, "create_rule", {}, data)
|
||||
return await moment_delivery.attach_moment_rules(uid, "create_rule", {}, data)
|
||||
|
||||
|
||||
async def create_project_rule(
|
||||
@@ -646,7 +646,7 @@ async def create_project_rule(
|
||||
)
|
||||
data = await rulebooks_svc.rule_detail(uid, rule, system_ids, moments)
|
||||
data.update(dedup_svc.overlap_response(overlaps, "rule"))
|
||||
return await attach_moment_rules(uid, "create_project_rule", {"project_id": project_id}, data)
|
||||
return await moment_delivery.attach_moment_rules(uid, "create_project_rule", {"project_id": project_id}, data)
|
||||
|
||||
|
||||
async def update_rule(
|
||||
@@ -879,7 +879,7 @@ async def create_preference(
|
||||
)
|
||||
data = await rulebooks_svc.rule_detail(uid, rule, system_ids, moments)
|
||||
data.update(dedup_svc.overlap_response(overlaps, "preference"))
|
||||
return await attach_moment_rules(uid, "create_preference", {}, data)
|
||||
return await moment_delivery.attach_moment_rules(uid, "create_preference", {}, data)
|
||||
|
||||
|
||||
async def update_preference(
|
||||
|
||||
Reference in New Issue
Block a user