test(8249): the route/hook argument run fills the sync channel too, so a renamed sync key is caught there
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Build & push image (push) Canceled after 0s
CI & Build / Python tests (push) Canceled after 2m14s
CI & Build / integration (push) Canceled after 2m6s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Build & push image (push) Canceled after 0s
CI & Build / Python tests (push) Canceled after 2m14s
CI & Build / integration (push) Canceled after 2m6s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -968,7 +968,7 @@ def test_route_reads_every_arg_the_hook_sends(tmp_path):
|
|||||||
state = tmp_path / "grimoire-priorart"
|
state = tmp_path / "grimoire-priorart"
|
||||||
state.mkdir()
|
state.mkdir()
|
||||||
(state / "s-args.opened.ids").write_text("7\n")
|
(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]}')
|
b'"derive_keys":["dup:1"],"ruling_system_ids":[4]}')
|
||||||
with http_sink(reply) as (port, seen):
|
with http_sink(reply) as (port, seen):
|
||||||
env["GRIMOIRE_URL"] = f"http://127.0.0.1:{port}"
|
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
|
assert out.returncode == 0, out.stderr
|
||||||
sent = set(seen[1])
|
sent = set(seen[1])
|
||||||
# Every ledger the hook keeps went out, so this run exercised the whole query.
|
# 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
|
"exclude_derive", "held_rule_ids", "seen_ruling_systems"} <= sent, sent
|
||||||
read = _route_args(routes.write_path_prior_art, routes._project_scope)
|
read = _route_args(routes.write_path_prior_art, routes._project_scope)
|
||||||
assert sent - {"session_id"} <= read, f"the route ignores {sorted(sent - read)}"
|
assert sent - {"session_id"} <= read, f"the route ignores {sorted(sent - read)}"
|
||||||
|
|||||||
Reference in New Issue
Block a user