qmd/test
Kim Junmo fee576bf98 fix: migrate legacy lowercase paths on reindex
When qmd update runs against an index created before case-preservation,
documents may exist under lowercase paths (e.g. "skill.md" for a file
actually named "SKILL.md"). Add findOrMigrateLegacyDocument() that:

- Falls back to a lowercase lookup when the canonical path is not found
- Renames the document path in-place via UPDATE OR IGNORE
- Manually rebuilds the FTS entry (FTS5 INSERT OR REPLACE does not
  reliably update existing rows via triggers)
- Handles UNIQUE conflicts gracefully (returns null on conflict)

Embeddings are keyed by content hash, so the rename preserves all
existing vectors — no re-embedding required.

Both the CLI indexer and the library reindexer share the same helper,
eliminating the duplication that a previous review flagged.

Includes integration tests for: successful migration, already-lowercase
no-op, and UNIQUE conflict handling.
2026-04-09 08:25:00 +09:00
..
eval-docs Add 6 synthetic evaluation documents 2025-12-21 13:10:35 -04:00
ast-chunking.test.ts chore: migrate AST chunking tests to vitest 2026-04-05 17:19:59 -04:00
ast.test.ts feat: AST-aware chunking for code files via tree-sitter 2026-03-22 01:22:39 -04:00
bench-score.test.ts feat(cli): add qmd bench command for search quality benchmarks 2026-04-05 17:17:59 -04:00
cli.test.ts fix: preserve original case in handelize() 2026-04-09 07:59:22 +09:00
collections-config.test.ts fix(test): reset currentIndexName between test files 2026-02-18 15:53:58 -04:00
Containerfile test: restructure container smoke tests for interactive use 2026-02-22 11:09:36 -04:00
eval-bm25.test.ts test: move all tests to flat test/ directory 2026-02-15 21:37:47 -04:00
eval-deep-research.jsonl Merge origin/main into feat/ast-aware-chunking 2026-03-28 20:00:49 -04:00
eval-deep-research.ts Merge origin/main into feat/ast-aware-chunking 2026-03-28 20:00:49 -04:00
eval-harness.ts refactor: move CLI and MCP to subdirectories, MCP consumes SDK 2026-03-10 11:39:55 -04:00
eval.test.ts test: move all tests to flat test/ directory 2026-02-15 21:37:47 -04:00
formatter.test.ts Add line to JSON search output 2026-04-05 10:08:57 +00:00
intent.test.ts refactor: move CLI and MCP to subdirectories, MCP consumes SDK 2026-03-10 11:39:55 -04:00
launcher-detection.test.sh fix: prioritize package-lock.json in launcher to prevent Bun false positive 2026-03-12 01:46:38 -07:00
llm.test.ts feat(llm): resolve models as config > env > default 2026-04-05 18:00:08 -04:00
mcp.test.ts fix(ci): guard LLM calls in CI and increase test timeouts 2026-03-10 13:28:37 -04:00
multi-collection-filter.test.ts refactor: replace bash wrapper with standard #!/usr/bin/env node shebang 2026-02-22 11:09:36 -04:00
rrf-trace.test.ts feat(query): add --explain score traces for hybrid search 2026-03-07 14:35:10 -04:00
sdk.test.ts fix: bound memory usage during embed 2026-03-13 17:39:17 +08:00
smoke-install.sh test: restructure container smoke tests for interactive use 2026-02-22 11:09:36 -04:00
store-paths.test.ts test: move all tests to flat test/ directory 2026-02-15 21:37:47 -04:00
store.helpers.unit.test.ts fix: preserve original case in handelize() 2026-04-09 07:59:22 +09:00
store.test.ts fix: migrate legacy lowercase paths on reindex 2026-04-09 08:25:00 +09:00
structured-search.test.ts fix: handle hyphenated tokens in FTS5 lex queries 2026-03-24 20:13:52 -04:00