Problem
Several review-pipeline failure points are caught + swallowed and were invisible to the central Sentry forwarder (which captures level:error/fatal structured logs):
- RAG retrieval (
retrieveContext, rag.ts:409) logs rag_retrieve_error via console.log with no level field → a down qdrant/embedder silently degrades reviews to diff-only, invisible in Sentry.
- REES enrichment (
buildReviewEnrichment catch) swallows fetch/timeout/parse errors → the brief silently drops, invisible.
- Inline review comments (
postInlineReviewComments catch) logged the post failure at warn → skipped by the forwarder.
These compound the diagnosis pain seen with the recent #1610 outage: a degrading reviewer with no Sentry signal.
Fix
Emit these at level:error so the forwarder captures them (no forwarder change needed):
- rag.ts:
review_context_fetch_failed (contextType: rag) at the existing retrieve catch.
- enrichment-wire.ts:
review_context_fetch_failed (contextType: enrichment) in the catch.
- inline-comments.ts:
inline_comments_post_failed warn → error.
Each is fail-safe (the review still proceeds); only the visibility changes. Regression tests pin that each surfaces at error.
Note: grounding-wire and rag-wire's outer catches are intentionally left alone — their inner code is fail-safe so those catches are unreachable; the real failure point for RAG is inside retrieveContext.
Problem
Several review-pipeline failure points are caught + swallowed and were invisible to the central Sentry forwarder (which captures
level:error/fatalstructured logs):retrieveContext, rag.ts:409) logsrag_retrieve_errorviaconsole.logwith nolevelfield → a down qdrant/embedder silently degrades reviews to diff-only, invisible in Sentry.buildReviewEnrichmentcatch) swallows fetch/timeout/parse errors → the brief silently drops, invisible.postInlineReviewCommentscatch) logged the post failure atwarn→ skipped by the forwarder.These compound the diagnosis pain seen with the recent #1610 outage: a degrading reviewer with no Sentry signal.
Fix
Emit these at
level:errorso the forwarder captures them (no forwarder change needed):review_context_fetch_failed(contextType: rag) at the existing retrieve catch.review_context_fetch_failed(contextType: enrichment) in the catch.inline_comments_post_failedwarn → error.Each is fail-safe (the review still proceeds); only the visibility changes. Regression tests pin that each surfaces at error.
Note: grounding-wire and rag-wire's outer catches are intentionally left alone — their inner code is fail-safe so those catches are unreachable; the real failure point for RAG is inside
retrieveContext.