Filters that match no properties refuse the run 🟥

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-07 12:05:03 +00:00
parent cfedb8e9cf
commit e9b39df322

View file

@ -114,6 +114,23 @@ def test_trigger_run_rejects_a_task_that_already_has_subtasks(api: Api) -> None:
assert len(api.subtasks_for(task)) == 1
def test_trigger_run_rejects_filters_that_match_no_properties(api: Api) -> None:
"""Zero resolved properties is a caller error (ADR-0055): a task with no
sub_tasks could never roll up to complete, and the app's preview shows the
same zero from the same rule before POSTing."""
# arrange — a portfolio with no properties at all
task = api.seed_task()
scenario = api.seed_scenario()
# act
response = _trigger(api, task, [scenario])
# assert
assert response.status_code == 400
assert api.sent_bodies == []
assert api.subtasks_for(task) == []
def test_trigger_run_fans_out_one_subtask_and_message_per_scenario_batch(
api: Api,
) -> None: