fix(observability): surface RAG/enrichment/inline review failures to Sentry (#1618)#1619
Merged
Merged
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1619 +/- ##
=======================================
Coverage ? 95.51%
=======================================
Files ? 204
Lines ? 22051
Branches ? 7966
=======================================
Hits ? 21062
Misses ? 413
Partials ? 576
🚀 New features to boost your workflow:
|
…Sentry (#1618) Three review-context failure points were caught + swallowed and never reached the central Sentry forwarder (which captures level:error/fatal structured logs), so a degrading reviewer (qdrant/REES down, inline-post 422) had no signal: - retrieveContext (rag.ts) logged rag_retrieve_error via console.log with no level field — now level:error review_context_fetch_failed (contextType rag), keeping the ev tag for log continuity. - buildReviewEnrichment swallowed fetch/timeout/parse errors — now level:error review_context_fetch_failed (contextType enrichment). - postInlineReviewComments logged the post failure at warn — now error. Each remains fail-safe (the review still proceeds); only visibility changes. Regression tests pin that each surfaces at level:error. The grounding-wire and rag-wire OUTER catches are left as-is — their inner code is fail-safe so those catches are unreachable; the real RAG failure point is inside retrieveContext.
JSONbored
force-pushed
the
feat/review-step-sentry-telemetry
branch
from
June 27, 2026 19:35
c57e8e5 to
2638adc
Compare
8 tasks
JSONbored
added a commit
that referenced
this pull request
Jun 27, 2026
…1625) fetchRepoTree and listStoredChunkPaths logged their catch failures via console.log with no level, so the central Sentry forwarder (level:error/fatal only) never saw them — a broken RAG index population (GitHub tree fetch down, D1 read error) silently degraded retrieval quality with no signal. Promote both to level:error (event rag_index_tree_error / rag_list_paths_error, keeping the ev tag for log continuity), mirroring the rag.ts pattern from #1619. Both stay fail-safe; only visibility changes. Covered by the existing tree-throws and stored-paths-read-error tests, now asserting the level:error log.
This was referenced Jun 27, 2026
JSONbored
added a commit
that referenced
this pull request
Jun 28, 2026
…the event slug (#1636) forwardStructuredLogToSentry titled each issue with only obj.event and buried the real failure in a 'log' context blob — so operators had to open each issue to learn what broke. Now: - title leads with the failure: "<event>: <message ?? error>" (e.g. orb_broker_unavailable: The operation was aborted due to timeout) - index filterable tags for the dimensions operators search/group by (repo, installationId, pull, pr, project, kind, deliveryId), present values only - fingerprint by event so recurrences collapse into one issue instead of fragmenting on the variable detail now in the title Pairs with the source-side instrumentation (#1605/#1619/#1625/#1627/#1628): those make failures reach Sentry; this makes each issue legible at a glance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three review-pipeline failure points were caught + swallowed and never reached Sentry (the central forwarder captures
level:error/fatalstructured logs). When the reviewer's context backends degrade, the review silently gets worse with no signal — exactly the diagnosis pain behind the recent self-host outage. This surfaces them aterror(no forwarder change needed; each remains fail-safe — only visibility changes):retrieveContext,rag.ts) — loggedrag_retrieve_errorviaconsole.logwith nolevelfield → a down qdrant/embedder degraded reviews to diff-only, invisibly. Nowlevel:errorreview_context_fetch_failed(contextType:rag), keeping theevtag for log continuity.buildReviewEnrichmentcatch) — swallowed fetch/timeout/parse errors. Nowlevel:errorreview_context_fetch_failed(contextType:enrichment).postInlineReviewCommentscatch) — logged the post failure atwarn(forwarder skips it). Nowerror.Each fix is exercised by a regression test asserting it surfaces at
level:error. Grounding-wire and rag-wire's outer catches are intentionally left as-is — their inner code is fail-safe so those catches are unreachable; the real RAG failure point is insideretrieveContext, which is where the fix lands.Closes #1618.
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.md; nosite/,CNAME, or Pages.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patch≥97% — each changed catch is exercised by a test asserting thelevel:errorreview_context_fetch_failed/inline_comments_post_failedlog (rag via a throwing vector query, enrichment via a rejecting fetch, inline via a 500 review POST).npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
Safety
.slicebounds apply).Notes
error.