Skip to content

feat(tools): check_setup MCP tool — preflight facade over doctor.py (50→51 tools) - #133

Merged
cdeust merged 1 commit into
mainfrom
feat/check-setup-tool
Jul 14, 2026
Merged

feat(tools): check_setup MCP tool — preflight facade over doctor.py (50→51 tools)#133
cdeust merged 1 commit into
mainfrom
feat/check-setup-tool

Conversation

@cdeust

@cdeust cdeust commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Fixes #115. Nouvel outil MCP check_setup — façade fine (composition root) sur les checks de doctor.py, sur le modèle de check_vision_setup/check_voice_setup. Expose le préflight P1 (que l'audit avait trouvé invisible) depuis la session Claude elle-même.

  • Aucune logique dupliquée : importe doctor.CHECKS et les invoque tels quels (Liskov — mêmes objets Check que le CLI). doctor.py inchangé.
  • Sortie structurée : {ready, fixes_needed (non-optionnels seulement), checks[{name, ok, fix}]} en ordre de dépendance (Python→driver→DATABASE_URL→connexion→extensions→FS).
  • Compte d'outils : baseline 50→51 vérifié par test (_tool_names sur une FastMCP fraîche), test_main.py + docs/mcp-tools.md + CLAUDE.md mis à jour.
  • 11 tests (all-green, DB-down mix required/optional, exclusion des optionnels du compte fixes, ordre préservé, smoke sur les vrais CHECKS, schema no-args).

🤖 Generated with Claude Code

https://claude.ai/code/session_01R5Z1wfiBpADgENq6pB6E2i

Composition-root handler (mcp_server/handlers/check_setup.py) calls
doctor.CHECKS in its own dependency order (Python -> PG driver ->
DATABASE_URL -> connection -> extensions -> FS -> I10 -> optional
codebase-pipeline probe) with zero duplicated check logic, mirroring
the check_vision_setup/check_voice_setup pattern from the sibling
plugins. Registered in tool_registry_manage.py via safe_handler.

Standalone tool count moves 50 -> 51: bump
test_standalone_baseline_is_50_tools -> ..._51_tools (name, value,
docstring), docs/mcp-tools.md, and the CLAUDE.md count line.

Fixes #115

Co-Authored-By: Claude <noreply@anthropic.com>
@cdeust
cdeust merged commit 01fe71d into main Jul 14, 2026
14 checks passed
@cdeust
cdeust deleted the feat/check-setup-tool branch July 14, 2026 23:09
pull Bot pushed a commit to asleekgeek/Cortex that referenced this pull request Jul 15, 2026
Cuts 13 commits ahead of v4.14.1: core→infrastructure layer-violation
cleanup via reverse-DI ports-and-adapters (cdeust#135), check_setup MCP tool +
/preflight command (cdeust#115, cdeust#119, cdeust#133), XDG-aware embedding cache_folder
(cdeust#132), project settings catalogue + headless CI regimes (cdeust#131), devcontainer
with prewarmed models (cdeust#129), optional OTLP telemetry (cdeust#128), stale docs/
module-count fixes (cdeust#130, cdeust#121), CLAUDE.md refactor (cdeust#125), Windows
postInstall dispatch fix (cdeust#117). No retrieval-path code touched.

Pre-tag guard on the exact release tree (git_sha 018c76d, isolated
ephemeral pgvector container via benchmarks/reproduce.sh --no-ablation):
LongMemEval MRR 0.9166/R@10 0.9820 (matches v4.14.1, no regression); LoCoMo
3-run mean MRR 0.8009/R@10 0.9146 (vs v4.14.1's 3-run mean 0.7984/0.9142,
an improvement within noise); BEAM MRR 0.5437/R@10 0.7139 (within v4.14.1's
established intra-day variance band). All 4 gated floors PASS (tolerance
0.005) — unlike v4.14.1 where LoCoMo MRR failed the absolute floor on its
3-run mean, 4.14.2's mean clears it by -0.0041. Evidence:
benchmarks/results/repro/20260715-v4.14.2-pretag/.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exposer un outil MCP check_setup (façade doctor.py), sur le modèle check_vision_setup/check_voice_setup

1 participant