test_an_unreadable_source_tree_does_not_manufacture_a_code_warning

Tests › tests/test_freshness.py

passed Passed in the packaged run.

What this test is for

Why it exists

`source_fingerprint` returns "" for a tree it cannot read, and that must read as absent evidence rather than as disagreement. A warning that fires when the check could not run is the "guard that fires on some of the real cases" defect: it converts "unchecked" into "checked and wrong".

Given

  1. —
→

When

  1. fr.source_fingerprint(tmp_path / "does-not-exist")
  2. unknown = dict(MATCHING_CODE, source_fingerprint="", matches_source=True)
  3. fr.notices(_status(), unknown)
→

Then

  1. ✓ fr.source_fingerprint(tmp_path / "does-not-exist") equals ""
  2. ✓ _message(fr.notices(_status(), unknown), fr.AXIS_CODE) equals ""

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 7 of 142 steps

… 84 earlier steps

thread startthread startthread startthread startclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pytry (line 3260)try_first_build_worker85. db_status → code_identity85code_identity86. code_identity → source_fingerprint86source_fingerprint87. source_fingerprint → package_source_root87package_source_root▶ test enters88. code_identity → package_version88package_version89. db_status → notices89notices90. notices → code_identity90code_identity▶ test enters91. notices → _data_notice91_data_notice92–94. _data_notice → _cost_clause92_cost_clause +2 more95–98. notices → _schema_notice95_schema_notice +3 more99. _run_build_walked → declared_scope_rejection99declared_scope_rejection100. declared_scope_rejection → _declared_index_scope100_declared_index_scope

… 42 later steps

2 more

tests/test_freshness.py:382 · its file's page

What it checks (2)

  1. assert fr.source_fingerprint(tmp_path / "does-not-exist") == "" observes source_fingerprint
  2. assert _message(fr.notices(_status(), unknown), fr.AXIS_CODE) == "" observes _message

Where the product reaches it

  • index → _index_action → build_or_refresh → db_status → notices (flow)
  • index → _index_action → build_or_refresh → code_identity → source_fingerprint (flow)

Call flow

test_an_unreadable_source_tree_does_not_manufacture_a_code_warning→source_fingerprint→_message→notices→_status

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.

test_an_unreadable_source_tree_does_not_manufacture_a_code_warning · 2 checkssource_fingerprintREQ-DDB-MCP-004 · measured
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.