gh#165: get -> set -> get is byte-identical, metadata included¶
Tests › tests/unit/api/json_serializers_test.cpp
What this test is for
Why it exists
The test says nothing about why.
tests/unit/api/json_serializers_test.cpp:354 · its file's page
What it checks (12)
CHECK(second == first)observesserialize_messagesviafirstREQUIRE(restored.size() == 2)observesparse_messages_jsonviarestoredCHECK(restored[1].metadata.at("tool_name") == "filesystem.read")observesparse_messages_jsonviarestoredCHECK(restored[1].metadata.at("is_context_anchor") == "true")observesparse_messages_jsonviarestoredREQUIRE(restored[1].content_parts.size() == 2)observesparse_messages_jsonviarestoredCHECK(restored[1].content_parts[0].type == entropic::ContentPartType::TEXT)observesparse_messages_jsonviarestoredCHECK(restored[1].content_parts[0].text == "describe this")observesparse_messages_jsonviarestoredCHECK(img.type == entropic::ContentPartType::IMAGE)not attributedCHECK(img.image_path == "/tmp/foo.png")not attributedCHECK(img.image_url == "https://example.invalid/foo.png")not attributedCHECK(img.width == 512)not attributedCHECK(img.height == 384)not attributed
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
gh#165: get -> set -> get is byte-identical, metadata included→make_msg→rich_message→WHEN→serialize_messages→parse_messages_json→REQUIREWhat it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 4 requirements
Its run touches their code; that is reach, not proof.
- REQ-API-012 inferred
- REQ-LOOP-010 inferred
- REQ-SAFE-001 inferred
- REQ-TYPE-006 inferred