test_the_code_axis_says_a_build_through_it_is_refused

Tests › tests/test_freshness.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE OTHER HALF OF THE SAME SENTENCE, and the half whose absence was measured (gh#348). The message used to read "The DATA is not affected", full stop — TRUE FOR READS, FALSE FOR WRITES. A build-30 process rebuilt a build-32 index AT 30, the `external` stage vanished from the stage list, and `status` then reported `stale: false, build_version: 30` — perfectly healthy, having just destroyed a layer.

Given

  1. code = dict(MATCHING_CODE, source_fingerprint="bbbbbbbbbbbb", matches_source=False)
→

When

  1. message = _message(fr.notices(_status(), code), fr.AXIS_CODE)
→

Then

  1. ✓ message.lower() contains "refused"
  2. ✓ message contains "DROP WHOLE LAYERS"

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) · 6 of 142 steps

… 87 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_worker88. 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:332 · its file's page

What it checks (2)

  1. assert "refused" in message.lower(), "a stale process must not be invited to build" observes _message via message
  2. assert "DROP WHOLE LAYERS" in message, "name the consequence, not just the prohibition" observes _message via message

Where the product reaches it

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

Call flow

test_the_code_axis_says_a_build_through_it_is_refused→_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_the_code_axis_says_a_build_through_it_is_refused · 2 checksnoticesREQ-DDB-MCP-004 · measured
Also reaches 1 requirement

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