fix(knowledge): withdraw a queued generation when its Search KB turns dormant - #8445
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
processingQueuedAtand refunds the attempt its dispatch charged, asclearDocumentsQueueddoes, and keeps the token as the ownership markerpendingwith a live stamp and a spent attempt. Later dispatches treated the document as already queued until the 4-hour grace window passed, and each such skip used up one of the 5 processing attemptsensureSearchKnowledgeBase, keeps any in-flight generationspendingrows, so a newer dispatch is never withdrawn or refunded. It is skipped when no generation was suppliedType of Change
Testing
dormant-search-processing.integration.ts(real Postgres viabun run test:integration):lib/knowledge/documentsunit suite passes (320 tests)bun run lint,bun run check:audits(52 audits),docs-manifest:check, andtype-checkpassChecklist
test-auditauthoring gate)