Shape rows of a repo that left a project stop counting (#8376); marker/binding fixes (#8321); hook contract tests (#8249) #240

Merged
bvandeusen merged 7 commits from dev into main 2026-12-02 23:21:05 -05:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit af5edd5c3f - Show all commits
+2 -2
View File
@@ -360,8 +360,8 @@ def test_the_route_reads_every_name_the_hook_sends(tmp_path):
last = [e for e in seen if e["_path"] == "/api/plugin/moment"][-1]
sent = {k for k in last if not k.startswith("_")}
assert {"exclude_rule_ids", "held_rule_ids", "shapes_seen"} <= sent, sent
read = route_query_args(routes.moment, routes._project_scope)
assert sent - {"session_id"} <= read, f"the route ignores {sorted(sent - read)}"
read = route_query_args(routes.moment, routes._project_scope, routes._bind_delivery_session)
assert sent <= read, f"the route ignores {sorted(sent - read)}"
assert {"tool_name", "tool_input"} <= set(json.loads(last["_body"]))
+3 -2
View File
@@ -972,8 +972,9 @@ def test_route_reads_every_arg_the_hook_sends(tmp_path):
# Every ledger the hook keeps went out, so this run exercised the whole query.
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_query_args(routes.write_path_prior_art, routes._project_scope)
assert sent - {"session_id"} <= read, f"the route ignores {sorted(sent - read)}"
read = route_query_args(routes.write_path_prior_art, routes._project_scope,
routes._bind_delivery_session)
assert sent <= read, f"the route ignores {sorted(sent - read)}"
# project_id is the other scope key the hook can send (from a project marker).
assert "project_id" in read