REQ-DDB-WIKI-032: The MCP server hosts a hub of every indexed repository’s wiki, on request

← Requirements

What it requires

  1. With CLEW_WIKI=1 the MCP server runs an HTTP thread beside its transport — none otherwise — bound to 127.0.0.1 on an OS-chosen port, refusing every request without the per-session token (a ?t= query sets an HttpOnly, SameSite=Strict cookie), and writing nothing to stdout.
  2. / lists every registered target with its wiki's state (built, building, queued, not built, failed, or unreachable when the checkout is gone — listed, never dropped); /r/<slug>/ serves that target's wiki, built on demand in a subprocess, one build at a time, behind a page that reloads until it is ready; a path resolving outside the built site is refused before any build.
  3. The hub's URL is recorded in wiki.json under the state root, created 0600, and removed with the hub when the transport ends.
tier
PASS
declared
implemented
priority
P1

Where it lives

  • Answer: query engine + MCP server6

See it on the map

How it is met

implemented bytestsresultbuild_in_subprocessrequest_buildstartstart_if_enabledstoptest_a_comment_posted_on_a_served_page_is_stored_for_the_agentpassedtest_a_dossier_reply_carries_a_wiki_url_only_while_the_hub_runspassedtest_a_refreshed_target_with_a_built_wiki_is_rebuilt_and_announcedpassedtest_a_repository_that_chose_the_channel_has_its_comments_pushedpassedtest_a_wiki_is_built_on_demand_and_then_servedpassedtest_by_default_a_comment_is_counted_for_the_hook_and_not_pushedpassedtest_mcp_refresh_of_a_vendored_sub_index_excludes_its_own_childrenpassedtest_nothing_outside_the_site_is_servedpassedtest_pages_served_by_the_hub_carry_the_live_scriptpassedtest_serve_attaches_the_hub_to_the_tools_and_the_refresh_looppassedtest_serve_runs_the_background_loop_beside_the_transportpassedtest_serve_runs_the_hub_only_when_asked_and_records_its_urlpassedtest_served_pages_carry_the_comment_controlpassedtest_the_api_answers_with_the_query_enginepassedtest_the_comment_endpoint_refuses_what_it_mustpassedtest_the_hub_binds_loopback_and_refuses_a_request_without_its_tokenpassedtest_the_hub_lists_every_target_and_says_which_are_unreachablepassedtest_the_hub_runs_a_test_only_when_running_is_switched_onpassedtest_the_hub_writes_nothing_to_stdoutpassedtest_the_refresh_loop_tells_the_hub_what_it_refreshedpassed

Show on the map

Implemented by

Tests (20)

Linked directly

20 tests: 20 passed

20 passed
testresultlinked byimplementers exercisedcalls away
test_mcp_refresh_of_a_vendored_sub_index_excludes_its_own_childrenpassedmeasured5 of 6—
test_serve_attaches_the_hub_to_the_tools_and_the_refresh_looppassedmeasured3 of 6: start, start_if_enabled, stop—
test_serve_runs_the_hub_only_when_asked_and_records_its_urlpassedmeasured3 of 6: start, start_if_enabled, stop—
test_a_repository_that_chose_the_channel_has_its_comments_pushedpassedmeasured2 of 6: start, stop—
test_by_default_a_comment_is_counted_for_the_hook_and_not_pushedpassedmeasured2 of 6: start, stop—
test_the_api_answers_with_the_query_enginepassedmeasured2 of 6: start, stop—
test_the_hub_runs_a_test_only_when_running_is_switched_onpassedmeasured2 of 6: start, stop—
test_a_refreshed_target_with_a_built_wiki_is_rebuilt_and_announcedpassedmeasured1 of 6: request_build—
test_a_wiki_is_built_on_demand_and_then_servedpassedmeasured1 of 6: request_build—
test_nothing_outside_the_site_is_servedpassedmeasured1 of 6: request_build—
test_the_hub_writes_nothing_to_stdoutpassedmeasured1 of 6: request_build—
test_a_comment_posted_on_a_served_page_is_stored_for_the_agentpassedcatalogunknown—
test_a_dossier_reply_carries_a_wiki_url_only_while_the_hub_runspassedcatalogunknown—
test_pages_served_by_the_hub_carry_the_live_scriptpassedcatalogunknown—
test_served_pages_carry_the_comment_controlpassedcatalogunknown—
test_the_comment_endpoint_refuses_what_it_mustpassedcatalogunknown—
test_the_hub_binds_loopback_and_refuses_a_request_without_its_tokenpassedcatalogunknown—
test_the_hub_lists_every_target_and_says_which_are_unreachablepassedcatalogunknown—
test_the_refresh_loop_tells_the_hub_what_it_refreshedpassedcatalogunknown—
test_serve_runs_the_background_loop_beside_the_transportpassedmeasured2 of 6: start_if_enabled, stop2