go-ai/mcp
Snider 6f6844a8a5 test: Phase 5 — testing gaps (process/RAG/ML mocks, metrics bench)
Process tools CI tests:
- Full lifecycle tests using real process.Service with echo/sleep/cat/pwd/env
- Handler validation: empty command, empty ID, nonexistent ID, empty input
- Start → list → output → kill → list lifecycle test
- Working directory and environment variable passthrough tests
- stdin/stdout round-trip via cat process

RAG tools mock tests:
- Handler validation: empty question, empty path, nonexistent path
- Default collection and topK application verification
- Graceful error when Qdrant/Ollama unavailable (no panic)
- Expanded struct round-trip tests for all RAG types

ML tools mock tests:
- Mock ml.Backend for Generate/Chat without real inference
- Mock inference.Backend for registry testing
- Handler validation: empty prompt, empty response, missing backend
- Heuristic scoring without live services
- Semantic scoring fails gracefully without judge
- Content suite redirects to ml_probe
- Capability probes run against mock backend (23 probes)
- ml_backends lists mock inference registry entries

Metrics benchmarks:
- BenchmarkMetricsRecord: ~22μs/op single-threaded
- BenchmarkMetricsRecord_Parallel: ~13μs/op with 32 goroutines
- BenchmarkMetricsQuery_10K: ~15ms/op reading 10K JSONL events
- BenchmarkMetricsQuery_50K: ~75ms/op reading 50K JSONL events
- BenchmarkMetricsSummary_10K: ~235μs/op aggregating 10K events
- TestMetricsRecordAndRead_10K_Good: write+read+summarise 10K events

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 06:48:31 +00:00
..
ide chore: update module paths and add gitignore 2026-02-17 19:19:38 +00:00
integration_test.go feat: extract AI/ML packages from core/go 2026-02-16 15:25:55 +00:00
mcp.go chore: update module paths and add gitignore 2026-02-17 19:19:38 +00:00
mcp_test.go fix: post-split cleanup — remove test script, fix tests, update docs 2026-02-20 01:18:27 +00:00
subsystem.go feat: extract AI/ML packages from core/go 2026-02-16 15:25:55 +00:00
subsystem_test.go feat: extract AI/ML packages from core/go 2026-02-16 15:25:55 +00:00
tools_metrics.go chore: update module paths and add gitignore 2026-02-17 19:19:38 +00:00
tools_metrics_test.go feat: extract AI/ML packages from core/go 2026-02-16 15:25:55 +00:00
tools_ml.go feat(ml): Phase 2 — migrate ml_backends to go-inference registry 2026-02-20 06:01:30 +00:00
tools_ml_test.go test: Phase 5 — testing gaps (process/RAG/ML mocks, metrics bench) 2026-02-20 06:48:31 +00:00
tools_process.go chore: update module paths and add gitignore 2026-02-17 19:19:38 +00:00
tools_process_ci_test.go test: Phase 5 — testing gaps (process/RAG/ML mocks, metrics bench) 2026-02-20 06:48:31 +00:00
tools_process_test.go feat: extract AI/ML packages from core/go 2026-02-16 15:25:55 +00:00
tools_rag.go refactor: extract rag/ to standalone core/go-rag module 2026-02-19 18:30:37 +00:00
tools_rag_ci_test.go test: Phase 5 — testing gaps (process/RAG/ML mocks, metrics bench) 2026-02-20 06:48:31 +00:00
tools_rag_test.go feat: extract AI/ML packages from core/go 2026-02-16 15:25:55 +00:00
tools_webview.go chore: update module paths and add gitignore 2026-02-17 19:19:38 +00:00
tools_webview_test.go test: Phase 3 — MCP transport e2e tests 2026-02-20 06:38:34 +00:00
tools_ws.go chore: update module paths and add gitignore 2026-02-17 19:19:38 +00:00
tools_ws_test.go chore: update module paths and add gitignore 2026-02-17 19:19:38 +00:00
transport_e2e_test.go test: Phase 3 — MCP transport e2e tests 2026-02-20 06:38:34 +00:00
transport_stdio.go chore: update module paths and add gitignore 2026-02-17 19:19:38 +00:00
transport_tcp.go fix: post-split cleanup — remove test script, fix tests, update docs 2026-02-20 01:18:27 +00:00
transport_tcp_test.go feat: extract AI/ML packages from core/go 2026-02-16 15:25:55 +00:00
transport_unix.go chore: update module paths and add gitignore 2026-02-17 19:19:38 +00:00