Skip to content

Commit 2f0100d

Browse files
kingpanther13claude
andcommitted
test(flows): actually pin the per-encounter no-op
The test demonstrated the fallback and guarded the dead shapes in two halves that never met: the demonstrating half drives _handle_form_step, which never calls validate_step_values -- only the walkers do. So nothing put the fallback shape through the validator, and tightening `any` to `all` killed the capability with the whole file still green. Measured: 73 passed under that mutation. One line puts the same shape through the validator. Now 73 passed unmutated, 1 failed under the mutation, failing on the fallback assertion rather than incidentally on a dead shape another test already covers. Found by Patch76 review on #2256. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012d29UJTiH4Uy2Pm37SBPtr
1 parent a507260 commit 2f0100d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/src/unit/test_flow_options_preserve.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,11 @@ def test_an_empty_object_in_a_list_is_a_per_encounter_no_op(self) -> None:
11631163

11641164
# Encounter one falls back to what it would have been; two is addressed.
11651165
assert seen == ["BW", "NY"]
1166+
# Put the SAME shape through the validator. Without this the two halves
1167+
# test different code — _handle_form_step never calls the validator,
1168+
# only the walkers do — so tightening `any` to `all` would kill the
1169+
# capability with the suite still green (Patch76 review, #2256).
1170+
validate_step_values({"step_values": {"init": [{}, {"province": "NY"}]}})
11661171
# ...while an entry that applies nothing anywhere is still rejected.
11671172
for dead in ([{}], [], {}, [{}, {}]):
11681173
with pytest.raises(ToolError):

0 commit comments

Comments
 (0)