test_the_stamped_prefix_round_trips¶
Tests › tests/test_diagnostics.py
What this test is for
Why it exists
THREE MODULES SPELL THIS SECTION NAME and only one imports the constant: the flatten (`diagnostics.META_PREFIX`), the writer (`signature`, a literal) and the reader (`mcp_server.state`, a literal). A shared constant would not have caught a divergence in the two literals; writing through one and reading through the other does.
Given
db = tmp_path / "clew.db"payload = dg.BuildDiagnostics( accessor_families=(AccessorFamily(prefix="Store_Set_", keys=5),), accessor_names_examined=3784, unclaimed_aliases=("broadcasts",), )
When
write_build_signature(db, diagnostics=payload.as_meta())read = meta_section(db, dg.META_PREFIX)
Then
- ✓ read["accessor_families_count"] equals "1"
- ✓ read["accessor_names_examined"] equals "3784"
- ✓ read["unclaimed_event_aliases"] equals "broadcasts"
tests/test_diagnostics.py:370 · its file's page
What it checks (3)
assert read["accessor_families_count"] == "1"observesmeta_sectionviareadassert read["accessor_names_examined"] == "3784"observesmeta_sectionviareadassert read["unclaimed_event_aliases"] == "broadcasts"observesmeta_sectionviaread
Where the product reaches it
index→_index_action→build_or_refresh→db_status→_meta_section→meta_section(flow)
Call flow
What 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 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-MCP-001 measured
- REQ-DDB-PIPE-005 measured
- REQ-DDB-QUERY-011 measured