Skip to content

fix(rees): capture degraded analyzer failures in Sentry - #1740

Merged
JSONbored merged 1 commit into
mainfrom
codex/rees-degraded-analyzer-sentry
Jun 29, 2026
Merged

fix(rees): capture degraded analyzer failures in Sentry#1740
JSONbored merged 1 commit into
mainfrom
codex/rees-degraded-analyzer-sentry

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires >=97% coverage of the lines AND branches you changed (aim for 98%+ on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries
  • npm run test:ci
  • npm run rees:test

If any required check was skipped, explain why:

  • None.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. N/A: this PR does not change those surfaces.
  • API/OpenAPI/MCP behavior is updated and tested where needed. N/A: this PR does not change the API contract.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. N/A: this PR does not change UI.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository. N/A: no visible UI changed.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

N/A: README text changed only; no rendered UI surface changed.

Notes

  • Analyzer failures still return partial briefs and mark only the failed analyzer as degraded.
  • Sentry events use rees_analyzer_degraded with scrubbed context, normalized tags, and an analyzer-based fingerprint.

@dosubot dosubot Bot added the size:L label Jun 29, 2026
@JSONbored
JSONbored merged commit ce1d354 into main Jun 29, 2026
15 checks passed
@JSONbored
JSONbored deleted the codex/rees-degraded-analyzer-sentry branch June 29, 2026 11:05
@loopover-orb

loopover-orb Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

4 files · 1 AI reviewer · no blockers · readiness 75/100 · CI green · unknown

✅ Suggested Action - Approve/Merge — safe to merge

Review updated: 2026-06-29 11:05:09 UTC

Review summary
The change wires analyzer catch paths into a dedicated Sentry capture path while preserving the partial brief behavior, and the production path still marks failed analyzers as degraded. The event payload and tags are explicitly scrubbed and the README documents the operator-facing shape. I do not see a reachable correctness break in the changed code, but there are a couple of maintainability/test-shape issues worth tightening.

Nits — 6 non-blocking
  • nit: review-enrichment/src/brief.ts:74 makes `buildBrief` accept a test-only analyzer registry in the public function signature; that widens the production API surface for a harness convenience, so I would prefer a private helper or an options object that makes the injection intentionally test-scoped.
  • nit: review-enrichment/src/brief.ts:79 derives `all` from the injected registry, which means a test registry can no longer exercise the `analyzer_unregistered` path for a requested analyzer unless it includes an explicit `undefined` value; either remove that dead guard or add a focused test that proves why the partial registry shape matters.
  • nit: review-enrichment/test/sentry-degradation.test.ts:60 passes extra secret-bearing fields with `as never`, but `captureAnalyzerDegradation` intentionally drops unknown fields before scrubbing, so that assertion does not prove request-body or diff sanitization on this path.
  • In review-enrichment/src/brief.ts:74, keep the public `buildBrief(req)` shape and move the injected registry behind an internal `buildBriefWithAnalyzers` test hook if you want this seam only for unit coverage.
  • In review-enrichment/src/brief.ts:90, either delete the `if (!analyzer) throw new Error("analyzer_unregistered")` branch or add a test registry containing `{ dependency: undefined }` so the branch is real coverage instead of incidental defensive code.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #1732
Related work ⚠️ 2 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Review load ❌ 8/20 Readiness component derived from cached public PR metadata and labels; size label size:L.
Validation evidence ✅ 25/25 PR body includes validation/test evidence.
Open PR queue ❌ 3/10 19 open PR(s), 8 likely reviewable, 11 unlinked.
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 80 PR(s), 284 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Review top overlaps.
  • Add scope summary.
  • Expect slower review.
  • No action.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Review load = cached public PR metadata such as size labels, changed paths, and preflight status.
  • Open PR queue = repo-wide review pressure; it is not a PR quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

observability(rees): capture degraded analyzer runs in Sentry

1 participant