Skip to content

bug(kb): tag and category metadata writes leave stale labels in cached retrieval results #20993

Open

Description

@mrveiss

Found while implementing #20958.

Problem

Tag and category metadata writes do not invalidate retrieval caches:

  • autobot-backend/knowledge/tags.py:63
  • autobot-backend/knowledge/categories.py:943

A cached retrieval result can therefore show a stale tag or category label after the write. Servability does not change, so severity is low.

Acceptance criteria

  • Both writes are registered as invalidating entry points for invalidate_retrieval_caches (via @invalidates_retrieval_caches or an explicit call), or a decision is recorded that labels are not cached and are read live. If the decision is "not cached", it must be stated in the issue or the PR with the owner's sign-off.
  • A test covers the tag write and the category write and asserts that a cached retrieval result is not served with the old label.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: kb-retrievalWave 5 · cluster J — Knowledge-base retrieval qualitybackendbugSomething isn't workingknowledgeKnowledge base systemknowledge-basephase:M1.8Knowledge base: upload, web sources and chat retrieval work end to endpriority: low

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions