The shared helper's fail-closed behavior (yielding the "" sentinel rather than skipping a well-typed-but-unparseable image_url part) was only tested indirectly through detect_capabilities. Add direct unit tests covering the four input shapes of the shared-helper-unparseable-input-contract plan: common/valid, alternate valid, well-typed-but-unparseable (-> sentinel), and wrong-typed/absent (-> skip). Presence of the image_url key is the type tag: a present-but-malformed payload still yields the sentinel.
6.4 KiB
6.4 KiB