Skip to content

fix(rag): let runtime adopt the recovered document store - #5959

Draft
RaresKeY wants to merge 1 commit into
odysseus-dev:devfrom
RaresKeY:fix/rag-live-manager-recovery
Draft

fix(rag): let runtime adopt the recovered document store#5959
RaresKeY wants to merge 1 commit into
odysseus-dev:devfrom
RaresKeY:fix/rag-live-manager-recovery

Conversation

@RaresKeY

@RaresKeY RaresKeY commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

Allow the runtime to adopt a recovered document store through a shared PersonalDocsManager so chat, personal-document routes, indexing/removal, and agent document tools use the same live RAG instance after delayed backend recovery. This prevents startup-time fallback state from remaining permanently disconnected after the document store becomes available.

Publication must retain a live delayed-Chroma and end-to-end gate: the automated recovery tests pass, but recovery from an unavailable-at-startup Chroma instance still needs to be demonstrated through chat and agent document operations in the running application.

Target branch

  • This PR targets dev, not main. All PRs land in dev; main is curated by the maintainer at each release. If your PR is on main by accident, click "Edit" on this PR and change the base.

Linked Issue

Fixes #5948

Part of #4377

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)
  • Breaking change (changes or removes existing behaviour)
  • Refactor / cleanup (behaviour unchanged)
  • Documentation only
  • CI / tooling / configuration

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app (docker compose up or uvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.

The live delayed-Chroma startup/recovery and end-to-end chat/agent scenarios remain required before claiming application-level validation.

How to Test

  1. Run python -m pytest -q tests/test_rag_live_manager_recovery.py tests/test_rag_keyword_fallback_owner.py tests/test_rag_manager_owner_compat.py tests/test_rag_remove_directory_scope.py tests/test_rag_search_signature.py tests/test_personal_docs_state_store.py; the validated head reports 12 passing tests and one warning.
  2. Start the application while Chroma is unavailable, then make Chroma available and trigger recovery without restarting Odysseus.
  3. Confirm an existing chat session can search newly indexed personal documents after recovery.
  4. Confirm agent document add, search, and remove operations use the recovered store and remain owner-scoped.
  5. Treat steps 2–4 as a required publication gate; they have not yet been completed against a live delayed-Chroma environment.

Visual / UI changes — REQUIRED if you touched anything that renders

Anything that changes what the UI looks like — buttons, icons, padding, colors, fonts, spacing, layout, CSS, HTML, SVG, or any static/js/ module that draws to the DOM — needs all of the following. PRs that change rendering without these WILL be closed.

N/A — no rendered UI files are changed; the remaining end-to-end gate concerns runtime behavior.

  • Screenshot or short clip of the change in the running app, attached below. Mobile screenshot too if the change affects mobile.
  • Style match: the change uses Odysseus's existing visual language. Specifically:
    • Reuse existing CSS variables (--red, --fg, --bg, --card, --border, etc.) — do not introduce new color values, font sizes, or spacing units.
    • Reuse existing button/input/card/border classes. Don't invent parallel styling.
    • No Unicode emoji in UI or code. Use inline SVG (matching the monochrome icon style already in static/index.html) or plain text.
    • Monospaced font (Fira Code) for primary UI text. Don't override.
    • Dark theme is the default; any light-mode work must be wired through the existing theme system, not hard-coded.
  • No new component patterns. If a similar widget already exists in the app, extend it instead of writing a parallel one.
  • I am not an LLM agent submitting a bulk PR. If you are, please open an issue describing the problem first — bulk auto-generated PRs that don't match the project's visual style are closed on sight, even when the underlying fix is correct.

Screenshots / clips

N/A — no rendered UI files changed.

@github-actions github-actions Bot added the ready for review Description complete — ready for maintainer review label Aug 8, 2026
@RaresKeY
RaresKeY force-pushed the fix/rag-live-manager-recovery branch from 68aa0cc to 12da466 Compare August 9, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recovered RAG manager is not adopted by long-lived consumers

1 participant