Skip to content

rag-cli 2.0.0 crashes during project indexing #4

Description

@Sinabehzadifard

rag-cli 2.0.0 crashes during project indexing
Error: vector_store.add() receives embeddings instead of documents (type mismatch)
Wasted significant tokens debugging before realizing it's a plugin bug!
Claude Code version (claude --version)
OS (Windows)
File types you were indexing (R, PDF, LaTeX, MD, DOCX)

Summary of changes:

Bug Fixes

  1. fcntl import breaks on Windows (tavily_connector.py)
  • fcntl is Unix-only. Replaced with conditional import (sys.platform != "win32").
  • Removed fcntl.flock() file-locking calls (replaced with plain file writes — threading already
    handled by singleton lock).
  1. langchain.text_splitter import fails on langchain ≥0.2 (document_processor.py)
  • RecursiveCharacterTextSplitter moved to langchain_text_splitters package.
  • Fixed with try/except fallback: tries new package path first, falls back to legacy.
  1. vector_store.add() called with wrong signature (rag_project_indexer.py)
  • Signature is add(embeddings, texts, metadata) — code was passing add(embeddings, metadata), so
    texts slot received metadata dicts → "Expected document to be a str" error.
  • Fixed: pass texts as second positional argument.

New Feature

  1. Local file indexing (rag_project_indexer.py)
  • Indexer previously only detected Python/JS/TS/Rust/Go/Java via manifest files. Projects using R,
    LaTeX, Markdown, notebooks, PDFs, DOCX got 0 technologies → early exit, nothing indexed.
  • Added LocalFileIndexer class that walks the project directory and indexes: .md, .tex, .R, .py,
    .bib, .txt, .yaml, .json, .csv, .html, .pdf, .docx, .ipynb.
  • Tech detection failure no longer blocks indexing — local files always indexed regardless.
  • Skips: .git, pycache, archive dirs, binary/build artifacts, files >5 MB.

Config

  1. config/default.yaml missing
  • Indexer printed warning on every run; config module fell back to defaults silently.
  • Created config/default.yaml in project root with explicit settings (chunk size, embeddings model,
    ChromaDB backend, online docs disabled).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions