From 1c6c8742578221710dda3ee3e9223383bc67d825 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 1 Dec 2026 17:41:39 -0500 Subject: [PATCH] test(8249): DELIBERATE BREAK, client turns retrieved, tool arm keeps its own rule ledger, route reads shape_seen Reverted by the next commit. CI must go red on test_the_hook_spends_no_request_on_a_client_written_turn[client-written], test_the_two_pre_tool_arms_share_one_session_rule_ledger and test_the_route_reads_the_shape_ledger_the_hook_sends_and_returns_its_keys. Co-Authored-By: Claude Opus 5.5 --- plugin/hooks/grimoire_autoinject.sh | 2 +- plugin/hooks/grimoire_tool_rules.sh | 2 +- src/grimoire/routes/plugin.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/hooks/grimoire_autoinject.sh b/plugin/hooks/grimoire_autoinject.sh index a4d98744..37bed7d9 100755 --- a/plugin/hooks/grimoire_autoinject.sh +++ b/plugin/hooks/grimoire_autoinject.sh @@ -60,7 +60,7 @@ transcript=$(grimoire_json_pick "$event_flat" '.transcript_path') # recorded against a notification inflates this surface's denominator and # seeds `near_misses` with demand nobody expressed. grimoire_skip_prompt carries # the reasoning. -grimoire_skip_prompt "$prompt" && exit 0 +: # DELIBERATE BREAK (#8249): client-written turns are retrieved against # Unconfigured install → silent (auto-inject is pure enrichment). grimoire_config || exit 0 diff --git a/plugin/hooks/grimoire_tool_rules.sh b/plugin/hooks/grimoire_tool_rules.sh index d0fd1460..cc1a35cf 100644 --- a/plugin/hooks/grimoire_tool_rules.sh +++ b/plugin/hooks/grimoire_tool_rules.sh @@ -94,7 +94,7 @@ rulingsfile="" rulings_q="" if [ -n "$session_id" ]; then safe_sid=$(printf '%s' "$session_id" | tr -c 'A-Za-z0-9._-' '_') - rulefile="$state_dir/${safe_sid}.rules.ids" + rulefile="$state_dir/${safe_sid}.toolrules.ids" # Ageing, not a flat read: an id named two hours ago is not one the # session is still holding. grimoire_rules_live carries the reasoning. rule_seen=$(grimoire_rules_live "$rulefile") diff --git a/src/grimoire/routes/plugin.py b/src/grimoire/routes/plugin.py index 06913dcc..226a3ef9 100644 --- a/src/grimoire/routes/plugin.py +++ b/src/grimoire/routes/plugin.py @@ -218,7 +218,7 @@ async def autoinject_retrieve(): # The reply mounts go through the same rule ledger; a rule the prompt arm # just named is not quoted a second time by the turn's delivery. turn = await moment_delivery_svc.deliver_for_turn( - g.user.id, seen=reply_shapes_svc.parse_seen(request.args.get("shapes_seen")), + g.user.id, seen=reply_shapes_svc.parse_seen(request.args.get("shape_seen")), project_id=project_id, exclude=frozenset(exclude_rule_ids) | frozenset(rules["rule_ids"]), held=frozenset(held_rule_ids),