Skip to content

release: stale index detection, vector index warnings, configurable BM25 scan#52

Merged
jb-thery merged 3 commits into
mainfrom
develop
Jul 4, 2026
Merged

release: stale index detection, vector index warnings, configurable BM25 scan#52
jb-thery merged 3 commits into
mainfrom
develop

Conversation

@jb-thery

@jb-thery jb-thery commented Jul 4, 2026

Copy link
Copy Markdown
Member

Release

Promote develop to main to publish a new npm release via the protected Release npm workflow (semantic-release, Conventional Commits).

What's included

  • feat(core): detect stale index and surface vector index warnings (feat(core): detect stale index and surface vector index warnings #51)
    • Vector index training failures are no longer swallowed silently (writeRows returns vectorIndexWarning, surfaced in ingest CLI).
    • New index-manifest.json written at each ingest; getIndexFreshnessWarning detects stale/incompatible indexes cheaply. ask() returns staleWarning, doctor reports indexFreshness with a rebuild next step, and search/ask/doctor CLI surfaces warnings on stderr.
    • hybridTextScanLimit is now configurable (default 5000, RAGMIR_HYBRID_TEXT_SCAN_LIMIT); getLexicalScanWarning flags BM25 recall loss on large corpora.
    • Repository metadata and docs updates (npm package metadata, sponsor badge, issue templates, PR template).

Post-merge

Merging this PR will trigger the Release npm workflow, which runs pnpm validate then semantic-release. The new version is derived from the Conventional Commits history (expect a minor bump from the feat).

Checklist

jb-thery added 3 commits July 4, 2026 03:18
…lease

chore: backmerge main after release
* feat(core): detect stale index and surface vector index warnings

Audit of all RAG library usage confirmed every dependency
( @huggingface/transformers, @lancedb/lancedb, @modelcontextprotocol/sdk,
zod, unpdf, mammoth, fast-glob ) is used according to its current API.
No library needed replacement or upgrade.

Three quality and DX gaps fixed:

- store.ts no longer swallows createIndex errors silently. writeRows now
  returns vectorIndexWarning, propagated into IngestResult and printed by
  the ingest CLI, so a fallback to flat scan is visible to the operator.
- A new index-manifest.json (schemaVersion, embedding provider/model,
  chunk size/overlap, ragmir version) is written next to the LanceDB table
  at each ingest. getIndexFreshnessWarning detects a stale or incompatible
  index cheaply. ask() returns staleWarning, doctor reports indexFreshness
  with a rebuild next step, and the search/ask/doctor CLI surfaces the
  warning on stderr without breaking JSON output.
- The hybrid lexical scan limit is now configurable (hybridTextScanLimit,
  default 5000, RAGMIR_HYBRID_TEXT_SCAN_LIMIT env). getLexicalScanWarning
  flags when the corpus exceeds it so BM25 recall loss is no longer silent.

Also includes repository metadata and docs updates: npm package metadata in
the root package.json, sponsor badge and issue reporting guidance in the
README/CONTRIBUTING, a feature-request issue template, and conventional-
commit/branch checkboxes in the PR template.

* fix(doctor): drop manual backtick escaping flagged by CodeQL

The freshness warning comes from controlled getIndexFreshnessWarning
output, not user input, so the manual backtick escaping was unnecessary
and incomplete (did not escape backslashes). CodeQL flagged it as an
incomplete string-escaping pattern; removing it resolves the alert.
@jb-thery jb-thery merged commit 76334cb into main Jul 4, 2026
10 checks passed
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant