@Devnil434 Where: vlm_captions=["Person reaching toward keypad", "Person pressing keypad buttons"]
What's wrong:
- Tests that refactor to import these fixtures and then assert result.vlm_captions[0] == "Person reaching toward keypad" are making an index-order assumption. If ReasoningResult internally stores captions in a set (to deduplicate), or if a future schema migration changes vlm_captions to list[VLMCaption] with its own serialiser, the round-trip model_validate(result.model_dump()) may return captions in a different order. The fixture locks in a fragile positional contract with no sorted() or order-agnostic assertion.
Fix:
-
In refactored tests, assert membership not position
- assert "Person reaching toward keypad" in result.vlm_captions
-
NOT: assert result.vlm_captions[0] == "Person reaching toward keypad"
@Devnil434 Where: vlm_captions=["Person reaching toward keypad", "Person pressing keypad buttons"]
What's wrong:
Fix:
In refactored tests, assert membership not position
NOT: assert result.vlm_captions[0] == "Person reaching toward keypad"