Reply shape survives a compaction (#7716); test review pass (#8249); detector fix (#8292) #239

Merged
bvandeusen merged 27 commits from dev into main 2026-12-02 13:09:44 -05:00
Showing only changes of commit 4321b05387 - Show all commits
+2 -2
View File
@@ -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)}"