Issue 4 — P4 (Small stuff)
Title: [CHORE] Small cleanups: magic numbers, glob pattern, cancellation tokens
Labels: chore, good first issue, help wanted
Body:
Problem
A handful of small issues that each take <30 min but add up:
*HybridSearchService — magic number topK 2** for semantic + keyword result counts. WhenApplyFilterstrips a lot, you end up with fewer thantopKresults. Should be a configurable constant onHybridOptions.
SearchFilter.FilePathPattern is not a glob. It strips * and ? and does a substring match. The name promises glob. Either:
Use a real glob library (DotNet.Glob NuGet, ~50KB), or
Honestly document it as a substring match in the README.
No CancellationToken propagation in SearchAsync / embeddingService.GenerateEmbeddingAsync(). In interactive mode the user cannot cleanly abort when Ollama hangs.
McpServer.HandleLineAsync is ~170 lines and mixes JSON-RPC parsing with method dispatch. Extract a IDispatchable strategy or at least split into per-method handlers.
appsettings.json is loaded from the working directory. Fragile for tests running in parallel or from a different cwd. Should be embedded or resolved relative to the assembly.
No benchmarks for the search hot path. BenchmarkDotNet would tell us whether the cosine-similarity loop in SqliteVssDatabase stays sub-100ms at 10k chunks.
Proposed Solution
Pick one or more of the above and tackle in a small PR. Each is self-contained, doesn't require touching unrelated code, and is well-suited for a first contribution.
Estimated scope per item: 15–60 min, 1–3 tests each.
Issue 4 — P4 (Small stuff)
Title: [CHORE] Small cleanups: magic numbers, glob pattern, cancellation tokens
Labels: chore, good first issue, help wanted
Body:
Problem
A handful of small issues that each take <30 min but add up:
*HybridSearchService — magic number
topK 2** for semantic + keyword result counts. WhenApplyFilterstrips a lot, you end up with fewer thantopKresults. Should be a configurable constant onHybridOptions.SearchFilter.FilePathPattern is not a glob. It strips * and ? and does a substring match. The name promises glob. Either:
Use a real glob library (DotNet.Glob NuGet, ~50KB), or
Honestly document it as a substring match in the README.
No CancellationToken propagation in SearchAsync / embeddingService.GenerateEmbeddingAsync(). In interactive mode the user cannot cleanly abort when Ollama hangs.
McpServer.HandleLineAsync is ~170 lines and mixes JSON-RPC parsing with method dispatch. Extract a IDispatchable strategy or at least split into per-method handlers.
appsettings.json is loaded from the working directory. Fragile for tests running in parallel or from a different cwd. Should be embedded or resolved relative to the assembly.
No benchmarks for the search hot path. BenchmarkDotNet would tell us whether the cosine-similarity loop in SqliteVssDatabase stays sub-100ms at 10k chunks.
Proposed Solution
Pick one or more of the above and tackle in a small PR. Each is self-contained, doesn't require touching unrelated code, and is well-suited for a first contribution.
Estimated scope per item: 15–60 min, 1–3 tests each.