From 4321b05387639c218f99a78894869a3f7af3f6c7 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 1 Dec 2026 17:27:39 -0500 Subject: [PATCH] test(8249): the route/hook argument run fills the sync channel too, so a renamed sync key is caught there Deliberate break 3 renamed exclude_sync_ids in the hook; the channel test caught it, the argument contract test did not, because its run had no sync ids to send. Co-Authored-By: Claude Opus 5.5 --- tests/test_write_path_trigger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_write_path_trigger.py b/tests/test_write_path_trigger.py index 4dc907c0..a321e153 100644 --- a/tests/test_write_path_trigger.py +++ b/tests/test_write_path_trigger.py @@ -968,7 +968,7 @@ def test_route_reads_every_arg_the_hook_sends(tmp_path): state = tmp_path / "grimoire-priorart" state.mkdir() (state / "s-args.opened.ids").write_text("7\n") - reply = (b'{"context":"> hint","note_ids":[11],"sync_note_ids":[],"rule_ids":[33],' + reply = (b'{"context":"> hint","note_ids":[11,22],"sync_note_ids":[22],"rule_ids":[33],' b'"derive_keys":["dup:1"],"ruling_system_ids":[4]}') with http_sink(reply) as (port, seen): env["GRIMOIRE_URL"] = f"http://127.0.0.1:{port}" @@ -981,7 +981,7 @@ def test_route_reads_every_arg_the_hook_sends(tmp_path): assert out.returncode == 0, out.stderr sent = set(seen[1]) # Every ledger the hook keeps went out, so this run exercised the whole query. - assert {"path", "code", "repo", "shapes", "exclude_ids", "exclude_rule_ids", + assert {"path", "code", "repo", "shapes", "exclude_ids", "exclude_sync_ids", "exclude_rule_ids", "exclude_derive", "held_rule_ids", "seen_ruling_systems"} <= sent, sent read = _route_args(routes.write_path_prior_art, routes._project_scope) assert sent - {"session_id"} <= read, f"the route ignores {sorted(sent - read)}"