aaronsb_obsidian-mcp-plugin/tests
Aaron Bockelie 8e09a3871f fix(retrieval): stop the score labels lying, and name both blind spots
Three defects that each cause an agent to trust a signal further than it holds.
All were surfaced by agents working the same retrieval task and reported
independently, twice each.

Score labels asserted a judgement the number cannot support
interpretScore mapped TF-IDF onto fixed bands — "Good" at >=1.0, "Low" at >0 —
but TF-IDF has no absolute scale; it means different things per query and per
corpus. On a vault where most notes mention the query term the scores compress:
measured, the single best-answering note scored 1.42 ("Good") while five
load-bearing notes scored 0.36-0.45 and were all labelled "Low". An agent
pruning at "Low" would have dropped the entire answer except the anchor. It said
so itself: "the graph was trustworthy; the ranking was not."

The number was never the problem — the adjective was. Scores now render bare,
against this run's top hit ("0.36, 25% of top hit"), which makes the compression
visible instead of hiding it behind a word. Results also carry an explicit
caution not to prune on score.

The graph's blind spot was undocumented, and it is the mirror of search's
The tool descriptions warned that search misses notes written in different
vocabulary. They did not warn that traversal only reaches what someone actually
linked. Both failure modes are real and they are opposite: in the test corpus a
note documenting a fifth consumer of a dependency hub was causally coupled to it
and NOT linked from it, so no traversal from the anchor could reach it — the
shell/ripgrep arm found it by content scan, the graph arm missed it entirely.
Meanwhile that same shell arm silently under-retrieved by 8 files because the
corpus spells the subject two ways, and "a partial match set is indistinguishable
from a complete one".

So they are complements, not substitutes: scan broadly to catch the unlinked,
follow links to catch the differently-worded, trust neither alone. The graph
description now says this, and points at backlinks as the way to find what
depends on a note — which its own text does not know.

"Summary view" read as a truncation warning
Every response closed with "_Summary view. For all metadata fields, use raw:
true._". On tools whose job is faithful retrieval, that reads as a warning that
the content was abridged, and callers spent real attention deciding whether the
note body was a lossy rendering of the argument. Only metadata is abbreviated;
genuine truncation already announces itself (a Pagination section, an explicit
"N more" line). The footer now names what it actually elides.

Also: search-traverse is now described with its cost, not just its brevity — it
returns snippets per node and prunes on scoreThreshold, so it finds WHICH notes
matter but is not the whole argument. Two agents declined to use it because the
description sold the saving without the trade, and chose more calls over less
certainty.

427 tests passing.
2026-07-13 18:45:26 -05:00
..
__mocks__ fix: .mcpignore semantics, TLS 1.3 startup, rename extension (#250, #252, #253) 2026-07-13 17:46:50 -05:00
fixtures harden(bases): runtime-computed-member escape test + scope scanner claim 2026-05-16 23:03:43 -05:00
formatters fix(retrieval): stop the score labels lying, and name both blind spots 2026-07-13 18:45:26 -05:00
security fix: .mcpignore semantics, TLS 1.3 startup, rename extension (#250, #252, #253) 2026-07-13 17:46:50 -05:00
validation test: Add comprehensive unit tests for input validation 2025-12-03 12:55:01 -06:00
bases-expression-evaluator.test.ts feat(bases): replace new Function with expression-eval (ADR-201) 2026-05-16 22:57:43 -05:00
bases-yaml.test.ts test(bases): address #182 review — accurate date-safety rationale + explicit divergences 2026-05-16 14:20:23 -05:00
bridge-bootstrap.test.ts refactor(bridge): bridge-owned autostart opt-out; address #247 review 2026-06-24 10:06:39 -05:00
bridge-self-heal.test.ts refactor(bridge): bridge-owned autostart opt-out; address #247 review 2026-06-24 10:06:39 -05:00
combine-inline-router.test.ts fix(vault): inline combine sourceFiles must match combined order 2026-05-18 12:20:48 -05:00
combine-inline.test.ts feat(vault): return combined content inline when destination is omitted 2026-05-18 08:10:12 -05:00
dataview-integration.test.ts fix(dataview): recover rows for implicit LIST GROUP BY; label whitespace group keys 2026-07-03 21:47:21 -05:00
dispatch-param-guards.test.ts fix(dispatch): address PR #212 review findings 2026-05-25 08:31:37 -05:00
file-lock-edit-serialization.test.ts fix(edit): serialize concurrent edits to the same file (closes #139) 2026-05-18 22:43:16 -05:00
fragments-path-scope.test.ts fix(retrieval): make paths usable and steer scan-then-follow 2026-07-13 18:29:29 -05:00
fuzzy-match.test.ts fix(mcp): stop debug route shadowing the GET /mcp SSE stream + two-row Levenshtein 2026-05-18 21:05:22 -05:00
graph-ignore-exclusion.test.ts fix(graph): honor MCP ignore exclusions in graph traversal 2026-06-08 14:50:14 +02:00
graph-node-title.test.ts fix(graph): honor MCP ignore exclusions in graph traversal 2026-06-08 14:50:14 +02:00
graph-search-traversal.test.ts fix(graph): honor MCP ignore exclusions in graph traversal 2026-06-08 14:50:14 +02:00
graph-search.test.ts fix(graph): honor MCP ignore exclusions in graph traversal 2026-06-08 14:50:14 +02:00
graph-statistics-vault-wide.test.ts fix(graph): honor MCP ignore exclusions in graph traversal 2026-06-08 14:50:14 +02:00
list-files-recursive.test.ts fix(vault.list): Align paginated recursive sort with flat listFiles 2026-05-15 13:40:35 -05:00
mcp-server.test.ts fix: Mock fs module in tests to prevent certificate directory creation (v0.9.0a) 2025-08-12 10:52:39 -05:00
mcp-session-reinit.test.ts fix(mcp): client-driven session re-init via spec 404 (ADR-106, closes #190) 2026-05-18 22:37:23 -05:00
network-classifier.test.ts fix(network): address PR #211 self-review findings (ADR-107) 2026-05-24 17:06:16 -05:00
network-exposure-integration.test.ts feat(network): wire classifier into server, settings, UI (ADR-107) 2026-05-24 16:56:24 -05:00
patch-operations.test.ts feat: Implement structured patch targeting for headings, blocks, and frontmatter 2025-07-06 22:47:02 -05:00
read-only-mode.test.ts refactor: Remove concurrent mode toggle, simplify connection setup (ADR-100) 2026-03-14 23:13:35 -05:00
recursive-copy.test.ts fix: Eliminate all eslint any-type violations for Obsidian plugin review 2026-02-03 21:51:55 -06:00
search-tag-operator.test.ts feat: add tests for searches with the tag operator 2025-08-16 15:46:55 +01:00
setup.ts fix(lint): use window timers + window.console; drop forbidden eslint-disables (closes #226) 2026-06-09 11:13:48 -05:00
sse-socket-timeout.test.ts refactor(mcp): address review of #244 — document SSE backstop, test teardown 2026-06-24 02:00:33 -05:00
test-contract.test.ts fix: .mcpignore semantics, TLS 1.3 startup, rename extension (#250, #252, #253) 2026-07-13 17:46:50 -05:00
vault-read-fidelity.test.ts fix(formatter): emit verbatim content in default vault.read (PR #205 blocking review) 2026-05-19 00:38:29 -05:00
vault-rename-extension.test.ts fix: .mcpignore semantics, TLS 1.3 startup, rename extension (#250, #252, #253) 2026-07-13 17:46:50 -05:00