Skip to content

[1.6.0] - 2026-04-19

Choose a tag to compare

@flamehaven01 flamehaven01 released this 19 Apr 17:09
· 30 commits to main since this release

Added

  • BM25 + RRF Hybrid Search (engine/hybrid_search.py): Production-grade BM25
    (k1=1.5, b=0.75) with Korean+English tokenizer
    (re.findall(r"[a-z0-9\uac00-\ud7a3]+", text.lower())).
    Reciprocal Rank Fusion merges BM25 and ChronosGrid semantic lists using
    string URI as doc ID — no integer alignment required. k=60, top_k configurable.
    Lazy per-store index with _bm25_dirty set: index rebuilt on first hybrid
    search after any upload, not on every upload.

  • KnowledgeAtom chunk-level indexing (engine/knowledge_atom.py): Two-level
    indexing — file-level doc + chunk atoms with fragment URIs
    (local://store/enc_path#c0001). chunk_and_inject() splits content into
    800-char overlapping windows (120-char overlap, 80-char minimum), embeds each
    chunk via embedding_generator.generate(), injects into ChronosGrid, and
    registers in _atom_store_docs for URI-based resolution. Enables precision
    chunk-level retrieval alongside file-level documents.

  • Stable URI scheme: Local documents now use
    local://<store>/<urllib.parse.quote(abs_path, safe='')> instead of
    local://<store>/<basename>. Eliminates collisions when files with identical
    names exist in different directories. URIs are reversible via unquote().
    Both main docs and chunk atoms share the same URI namespace.

Refactored

  • core.py segmentation (1258 → 221 lines): FlamehavenFileSearch split into
    three focused mixin classes via IngestMixin, LocalSearchMixin,
    CloudSearchMixin. core.py is now a thin orchestrator: __init__,
    create_store, list_stores, delete_store, get_metrics,
    _resolve_vector_backend.

    Mixin File Responsibility
    IngestMixin _ingest.py (228 L) upload_file, upload_files, _local_upload, _generate_file_vector
    LocalSearchMixin _search_local.py (273 L) _local_search, BM25 rebuild, hybrid rerank, RAG prompt
    CloudSearchMixin _search_cloud.py (265 L) search, search_stream, search_multimodal + 6 shared helpers
  • Duplicate helper elimination (_search_cloud.py): Six blocks that were
    copy-pasted between search() and search_multimodal() are now shared helpers:
    _resolve_search_params, _ensure_store, _query_vector_backend,
    _driftlock_validate, _extract_grounding_sources, _gemini_search_call.

Fixed

  • search_stream double intent-refine bug: intent_refiner.refine_intent(query)
    was called twice (lines 984 and 988 in old core.py) — once before the
    provider-RAG branch and once inside it. The second call discarded the first
    optimized_query. Fixed: single call, result reused throughout the method.

Tests

  • 443 tests pass, 13 skipped — no regression from refactor.
  • test_flamehaven_remote_client_flow patch target updated: also patches
    flamehaven_filesearch._search_cloud._google_genai_types after types moved
    from core.py to _search_cloud.py.