clew
  • Requirements
  • Flows
  • Tests
  • Change impact
  • Map
  • Architecture
  • Docs
  • SBOM

test_a_plain_file_named_dot_git_is_not_consent¶

Tests › tests/test_background_indexing.py

passed Passed in the packaged run.

What this test is for

Why it exists

A directory whose `.git` is a plain file is refused, not built.

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 · 39 of 153 steps

… 15 earlier steps

callercallercallercallercallercallerclew/mcp_server/server.pyclew/mcp_server/server.pyclew/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/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/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.pyclew/mcp_server/routing.pyclew/mcp_server/routing.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyother filesother filesother filesother filesother filesother filesopt (line 352)optopt (line 169)optloop (line 169)loopopt (line 171)optopt (line 172)optopt (line 2070)optloop (line 662)loopcatch (line 562)catchopt (line 1826)optopt (line 1874)optopt (line 1887)optopt (line 1904)optindex16. ensure_target → adopt16adopt17. adopt → repo_indexes17repo_indexes18. repo_indexes → target_for18target_for19. target_for → _safe_index_name19_safe_index_name20. target_for → state_home20state_home21. repo_indexes → target_for21target_for22. 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▶ test enters36. _options_meta → _meta_section36_meta_section37. _meta_section → meta_section37meta_section38. db_status → stated_options38stated_options39. db_status → read_build_signature39read_build_signature40–43. db_status → _source_drift40_source_drift +3 more44. _scope_meta → _meta_section44_meta_section45. db_status → _coverage_meta45_coverage_meta46. _coverage_meta → _meta_section46_meta_section47. db_status → _refresh_meta47_refresh_meta48. _refresh_meta → _meta_section48_meta_section49. db_status → list49list50. db_status → _diagnostics_meta50_diagnostics_meta51. _diagnostics_meta → _meta_section51_meta_section52. db_status → _data_model_meta52_data_model_meta53. _data_model_meta → _meta_section53_meta_section54. db_status → code_identity54code_identity55–57. code_identity → source_fingerprint55source_fingerprint +2 more58. db_status → notices58notices59–60. notices → code_identity59code_identity +1 more61–63. _data_notice → _cost_clause61_cost_clause +2 more64–67. notices → _schema_notice64_schema_notice +3 more68. _build_subject → resolve_target68resolve_target69. resolve_target → _indexes_for69_indexes_for▶ test enters70. _indexes_for → repo_indexes70repo_indexes71. _indexes_for → repo_indexes71repo_indexes72. resolve_target → list72list73. resolve_target → target_for73target_for74. resolve_target → unknown_target_error74unknown_target_error

… 12 steps between

callercallercallercallerclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/wiki/themes/clew/static/web.jsclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyother filesother filesother filesother filestry (line 1003)tryindex87. whole_repo_scope → _gitignored_paths87_gitignored_paths88. _gitignored_paths → git_argv88git_argv89. git_argv → _no_ext_diff89_no_ext_diff▶ test enters90. git_argv → list90list91. _gitignored_paths → git_env91git_env92. whole_repo_scope → list92list

… 61 later steps

7 more
  • thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 26 of 142 steps
  • `main` (scripts/stage_probe.py) · 23 of 37 steps
  • clew-mcp — `main` (clew/mcp_server/server.py) · 9 of 17 steps
  • clew — `main` (clew/cli.py) · 3 of 400 steps
  • Build this wiki from the index · 2 of 400 steps
  • `main` (clew/guard/main.py) · 2 of 357 steps
  • `main` (scripts/incremental_probe.py) · 1 of 3 steps

tests/test_background_indexing.py:305 · its file's page

What it checks (1)

  1. assert build.built == [], f"a file named .git was taken as consent to index: {build.built}"

Where the product reaches it

  • main → build_server (flow)

Call flow

test_a_plain_file_named_dot_git_is_not_consent→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_a_plain_file_named_dot_git_is_not_consent · 1 checksbuild_serverREQ-DDB-MCP-001 · measuredbuild_server_refusal_as_tool_errorREQ-DDB-MCP-004 · measuredbuild_server_register_promptsREQ-DDB-WIKI-034 · measured
Also reaches 8 requirements

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

  • REQ-DDB-CONFIG-001 measured
  • REQ-DDB-CONFIG-006 measured
  • REQ-DDB-CONFIG-007 measured
  • REQ-DDB-MCP-001 measured
  • REQ-DDB-MCP-003 measured
  • REQ-DDB-MCP-004 measured
  • REQ-DDB-WIKI-034 measured
  • REQ-DDB-WIKI-054 measured
clew Generated by clew wiki from the repository's index