Problem
PR #117 adds unit tests for serialisation functions in episodic/canonical/profile_templates/_brief_serializers.py and related modules, but no snapshot tests exist to validate the complete structured JSON output of those serialisers. Without snapshot coverage, incidental formatting drift or unintended key-set changes in serialised brief payloads can go undetected.
Required resolution
- Introduce a snapshot testing library (e.g.
syrupy) as a development dependency.
- Add snapshot tests for the serialised outputs of:
_serialize_profile_for_brief
_serialize_episode_template_for_brief
_serialize_reference_document_for_brief
- Explicitly redact or freeze non-deterministic fields (UUIDs, timestamps) in each snapshot to prevent spurious failures.
- Add compile-time tests (e.g.
TypedDict or assert_type checks) confirming the return types of serialisers are assignable to JsonMapping.
References
/cc @leynos
Problem
PR #117 adds unit tests for serialisation functions in
episodic/canonical/profile_templates/_brief_serializers.pyand related modules, but no snapshot tests exist to validate the complete structured JSON output of those serialisers. Without snapshot coverage, incidental formatting drift or unintended key-set changes in serialised brief payloads can go undetected.Required resolution
syrupy) as a development dependency._serialize_profile_for_brief_serialize_episode_template_for_brief_serialize_reference_document_for_briefTypedDictorassert_typechecks) confirming the return types of serialisers are assignable toJsonMapping.References
/cc @leynos