Defer NATS event publishing until after transaction commits to prevent RAG race condition

FixKBService
Shipped
March 30, 2026 at 10:16 PM UTC
Author
Kamo
Commit
424279b

Events were firing inside @Transactional methods, causing RAGService to read stale data from CockroachDB before the commit. Also auto-defaults aiVisibleToMembers when AI is enabled with no visibility flags set, and guards event publishing to skip DRAFT articles.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing