test_index_stamps_the_action_that_produced_the_reply

Tests › tests/test_subject_surface.py

passed Passed in the packaged run.

What this test is for

Why it exists

Every `index` reply carries the `action` that produced it.

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.

Build, refresh and check the index · 19 of 153 steps

callercallercallercallerclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyopt (line 3017)optopt (line 3019)optopt (line 3021)optloop (line 2353)loopindex1. index → _index_action1_index_action▶ test enters2. _index_action → registry_wide_target_error2registry_wide_target_error3. _index_action → status3status4–6. _index_action → build_or_refresh4build_or_refresh +2 more7. ensure_target → _target_from_roots7_target_from_roots▶ test enters8–9. _target_from_roots → _roots8_roots +1 more10. _roots_askable → roots_request_supported10roots_request_supported11. roots_request_supported → server_request_surface11server_request_surface

… 2 steps between

callercallercallercallerclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/mcp_server/routing.pyclew/mcp_server/routing.pyclew/mcp_server/routing.pyclew/mcp_server/routing.pyloop (line 2353)loopindex14. list → link14link15. _target_from_roots → root_uri_to_path15root_uri_to_path16. ensure_target → adopt16adopt▶ test enters17. adopt → repo_indexes17repo_indexes18. repo_indexes → target_for18target_for

… 3 steps between

callercallercallercallerclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyopt (line 2070)optloop (line 662)loopcatch (line 562)catchindex22. adopt → target_for22target_for23. adopt → _sync_tier123_sync_tier124. _sync_tier1 → register_query_tools24register_query_tools▶ test enters25–29. register_query_tools → _add_tool25_add_tool +4 more30. _answering_with_refresh → refused30refused31. _answering_with_refresh → _take_context31_take_context32. _take_context → list32list33. register_query_tools → list33list34. adopt → db_status34db_status35. db_status → _options_meta35_options_meta

… 109 steps between

callercallercallercallerclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyloop (line 2805)looploop (line 2807)loopindex145–146. read_comments → ensure_target145ensure_target +1 more147–148. _index_action → list_targets147list_targets +1 more149. list_targets → db_status149db_status150–152. list_targets → _top_level_names150_top_level_names +2 more153. list_targets → _capped_listing153_capped_listing
1 more

tests/test_subject_surface.py:496 · its file's page

What it checks (3)

  1. assert listed["action"] == "targets"
  2. assert listed["results"] == [], "an empty registry lists nothing, in the wrapped shape"
  3. assert reported["action"] == "status", "the mapping-shaped result must survive the stamp"

Where the product reaches it

Call flow

test_index_stamps_the_action_that_produced_the_reply→build_server

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_index_stamps_the_action_that_produced_the_reply · 3 checksbuild_serverREQ-DDB-MCP-001 · measuredbuild_server_refusal_as_tool_errorREQ-DDB-MCP-004 · measuredbuild_server_register_promptsREQ-DDB-WIKI-034 · measured
Also reaches 6 requirements

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