Skip to content

fix: multiple bug fixes across rerankings, indexing, config and app - #850

Open
praneshnikhar wants to merge 1 commit into
Cinnamon:mainfrom
praneshnikhar:fix/rerank-bool-index-bugs
Open

praneshnikhar wants to merge 1 commit into
Cinnamon:mainfrom
praneshnikhar:fix/rerank-bool-index-bugs

Conversation

@praneshnikhar

@praneshnikhar praneshnikhar commented Jul 26, 2026 •

Copy link
Copy Markdown

Fixes 6 bugs found during code review:

  1. Return-inside-for-loop in rerankings/ui.py — The return was
    inside the for loop, so only the first vendor parameter was ever
    processed (copy-paste error from embeddings/ui.py).

  2. Undefined variable in index/file/ui.py — errors was never
    defined; should be index_errors (from StopIteration.value).
    Crashed whenever the indexing generator finished.

  3. bool casting bug in flowsettings.py — python-decouple's
    cast=bool treated any non-empty string (including "False",
    "0", "no") as True for GraphRAG flags.

  4. Empty-string GRADIO_TEMP_DIR in app.py — os.getenv(..., None)
    only returned None when unset, not when set to "". Downstream
    received an empty path.

  5. Hardcoded relative asset path in app.py — "libs/ktem/ktem/assets"
    broke if CWD != project root. Now resolved via Path(__file__).

  6. inbrowser=True on headless servers — Made configurable via
    KH_OPEN_BROWSER env var, defaulting to off.

- Fix return-inside-for-loop bug in rerankings/ui.py that caused
  only the first vendor parameter to be processed (copy-paste error)
- Fix undefined variable error in index/file/ui.py (errors -> index_errors)
- Fix bool casting in flowsettings.py where python-decouple's cast=bool
  parsed 'False'/'0'/'no' as True for GraphRAG flags
- Fix GRADIO_TEMP_DIR empty-string edge case in app.py
- Fix hardcoded relative asset path in app.py using Path(__file__)
- Make inbrowser launch configurable via KH_OPEN_BROWSER env var

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant