Skip to content

follow-up: minor review findings from train PR #20911 for knowledge graph facts streaming (#20719) #20931

Open

Description

@mrveiss

Valid, non-blocking review findings from PR #20911 (train carrying #20719), grouped here. Parent: #19727.

  • autobot-backend/api/knowledge_search_aggregator.py:660 — _get_facts_for_graph lists max_facts facts and only then filters by permission, so a graph can come back empty when the first N facts are private to others; keep scanning until enough accessible facts or the listing is exhausted.
  • autobot-backend/knowledge/fact_stream.py:19 — AUTOBOT_FACT_SCAN_BATCH_SIZE of zero/negative makes Redis reject the scan (get_all_facts then returns []); fall back to the default for non-positive values.
  • autobot-backend/knowledge/fact_stream.py:58 — Redis SCAN can return a key more than once; skip keys already seen in the scan so a page has no duplicates and omits no eligible fact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbugSomething isn't workingphase:M1.8Knowledge base: upload, web sources and chat retrieval work end to end

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions