From d921f1587ef91fd440857c1e71a51ab0e1ea2560 Mon Sep 17 00:00:00 2001 From: Lihua <1017343802@qq.com> Date: Wed, 28 Oct 2026 05:35:32 -0700 Subject: [PATCH] test(todo): follow the claim-operation-id commands widened by #7510 #7510 lets todo update and todo complete carry --claim-operation-id so they can settle a managed execution lease, but the shared-option test still expected both to reject it. Every main test run since then fails two shards on those parametrizations. Keep the rejection for add, list and supersede against the current message, and assert that claim, update and complete accept the option. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Lihua <1017343802@qq.com> --- tests/test_cli_argument_diagnostics.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_cli_argument_diagnostics.py b/tests/test_cli_argument_diagnostics.py index 738b643e6f..0fcf2dd03b 100644 --- a/tests/test_cli_argument_diagnostics.py +++ b/tests/test_cli_argument_diagnostics.py @@ -559,16 +559,24 @@ def test_todo_claim_validation_preserves_exact_diagnostics( assert str(exc_info.value) == expected -@pytest.mark.parametrize("command", ["add", "list", "update", "complete", "supersede"]) +@pytest.mark.parametrize("command", ["add", "list", "supersede"]) @pytest.mark.parametrize("operation_id", ["retry-one", ""]) def test_claim_operation_id_is_not_silently_ignored_by_other_commands(command, operation_id): args = build_parser().parse_args([ "todo", command, "--goal-id", "example-goal", "--claim-operation-id", operation_id, ]) - with pytest.raises(ValueError, match="supported only by todo claim"): + with pytest.raises(ValueError, match="supported only by todo claim/update/complete"): validate_shared_todo_options(args) +@pytest.mark.parametrize("command", ["claim", "update", "complete"]) +def test_claim_operation_id_is_shared_by_lease_bound_commands(command): + args = build_parser().parse_args([ + "todo", command, "--goal-id", "example-goal", "--claim-operation-id", "retry-one", + ]) + validate_shared_todo_options(args) + + @pytest.mark.parametrize( ("extra_args", "expected"), [