test(8249): the prior-art and moment contract tests count the session binder as a reader of session_id
CI & Build / Plugin hooks (push) Successful in 16s
CI & Build / Python lint (push) Successful in 2s
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / integration (push) Successful in 2m17s
CI & Build / Python tests (push) Successful in 2m31s
CI & Build / Build & push image (push) Successful in 18s

They subtracted session_id from what the hook sent, and their failure message
still listed it. The binder that runs before every plugin route reads it, so
it is passed to route_query_args beside the handler and the scope helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 16:49:53 -05:00
co-authored by Claude Opus 5.5
parent 1a9057e875
commit af5edd5c3f
2 changed files with 5 additions and 4 deletions
+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