feat(rees): replace Sentry with PostHog for error tracking + source maps#8615
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 68ff723 | Commit Preview URL Branch Preview URL |
Jul 25 2026, 09:17 AM |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (98.84%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #8615 +/- ##
==========================================
+ Coverage 89.59% 90.50% +0.90%
==========================================
Files 97 96 -1
Lines 22725 22477 -248
Branches 3874 3881 +7
==========================================
- Hits 20360 20342 -18
+ Misses 2187 1957 -230
Partials 178 178
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Bundle ReportChanges will decrease total bundle size by 6 bytes (-0.0%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: loopover-uiAssets Changed:
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-25 08:51:42 UTC
Review summary Nits — 7 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy · Diff highlights exactly what changed. Scroll preview
A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Per the epic's revised strategy (#8286 correction, 2026-07-25): PostHog replaces Sentry directly, not a parallel-run sink -- deletes src/sentry.ts, scripts/validate-sentry-release.mjs, @sentry/node, @sentry/cli, and the sentry-*.test.ts suite entirely. Adds src/posthog.ts, mirroring the deleted sentry.ts's shape 1:1 (redaction, tag allowlist, capture entry points, including captureAnalyzerDegradationPostHog's #5010 group-by-WHY behavior) using posthog-node's captureException API. Adds scripts/validate-posthog-release.mjs, a narrower release-verification counterpart to the deleted Sentry validator -- PostHog's release model has no commits/deploys/finalize lifecycle, only symbol-set presence via the error_tracking/symbol_sets API. Drops all Railway-specific config (RAILWAY_GIT_COMMIT_SHA, RAILWAY_DEPLOYMENT_ID, RAILWAY_ENVIRONMENT_NAME) -- this repo no longer deploys anything on Railway. README's Railway deploy section becomes a generic "Deploy standalone" section; docker-compose.yml's rees profile comment and the self-hosting-rees docs page now reference POSTHOG_API_KEY instead of SENTRY_DSN for the same cross-wire-avoidance reasoning that applied to the Sentry var. @posthog/cli is pinned to an exact version (0.9.1, no caret) rather than a range -- its postinstall script downloads a platform binary over HTTPS with no checksum verification, the same category of risk @sentry/cli already carried here via its own installer. Closes #8290
Adds the missing review-enrichment/src/server.ts codecov.yml ignore entry (a pre-existing gap another file's comment incorrectly claimed was already handled), plus real-subprocess and real-library tests covering initReesPostHog's success path and upload-sourcemaps.ts's release-validation retry/exhaustion and source-map-corruption branches. Remaining gaps are v8-ignored with justification where discovery-index's twin can only reach them via child_process/fs mocking that this package's node:test suite deliberately avoids.
54749ad to
68ff723
Compare
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…8619) Replaces the self-host release pipeline's @sentry/cli sourcemap inject/ upload/finalize steps with posthog-cli's simpler inject/upload (no separate release-create/set-commits/finalize lifecycle -- PostHog release metadata is a byproduct of the upload itself). Fixes a currently-broken step in the process: "Validate Sentry release" called review-enrichment/scripts/validate-sentry-release.mjs, which #8615 already deleted -- any official release cut since then would have failed there. Renames SENTRY_RELEASE -> POSTHOG_RELEASE throughout scripts/deploy-selfhost-prebuilt.sh (the operator-facing local sourcemap upload path) and scripts/selfhost-post-update-check.sh, matching what src/selfhost/posthog.ts's resolvePostHogRelease already reads. Replaces the stale "Sentry error tracking" block in .env.example (self-host has had zero SENTRY_* code paths since #8617) with the real PostHog vars, plus the CLI-specific POSTHOG_CLI_API_KEY/POSTHOG_CLI_PROJECT_ID/POSTHOG_CLI_HOST used only by this upload step. Requires POSTHOG_CLI_API_KEY (secret) and POSTHOG_CLI_PROJECT_ID (var) to be configured in the release and release-beta GitHub environments before the next official/beta image build -- neither exists yet.



Summary
Per the epic's revised strategy (correction comment on #8286, 2026-07-25): PostHog replaces Sentry directly, not a parallel-run sink.
src/sentry.ts,scripts/validate-sentry-release.mjs,@sentry/node,@sentry/cli, and the threesentry-*.test.tsfiles.src/posthog.ts(mirrors the deletedsentry.ts's shape 1:1 -- redaction, tag allowlist, capture entry points, includingcaptureAnalyzerDegradationPostHog's Fix Sentry fingerprinting for 3 fragmented issue groups (analyzer_timeout, AI-review-notes, publish-failed) #5010 group-by-WHY behavior),scripts/validate-posthog-release.mjs(narrower than the deleted Sentry validator, since PostHog's release model has no commits/deploys/finalize lifecycle -- just symbol-set presence + nofailure_reasonviaerror_tracking/symbol_sets), and threeposthog-*.test.tsfiles with equivalent coverage.POSTHOG_RELEASE/POSTHOG_ENVIRONMENT/POSTHOG_COMMIT_SHAwith no platform-specific fallback (previouslyRAILWAY_GIT_COMMIT_SHA/RAILWAY_DEPLOYMENT_ID/RAILWAY_ENVIRONMENT_NAME). README's Railway deploy section is now generic "Deploy standalone";docker-compose.yml's rees profile comment and the self-hosting-rees docs page referencePOSTHOG_API_KEYinstead ofSENTRY_DSNfor the same cross-wire-avoidance reasoning.@posthog/clipinned to an exact version (0.9.1, no caret) -- its postinstall script downloads a platform binary over HTTPS with no checksum verification (same risk category@sentry/clialready carried here via its own installer, now audited and pinned).Closes #8290
Test plan
npm run build --prefix review-enrichmentcleannpm run test:node --prefix review-enrichment-- 1357/1357 passingnpm run rees:test(the actual repo-root CI gate command) -- 1357/1357 passingnpm run typecheck(repo root) cleannpm audit --prefix review-enrichment-- only the pre-existing, unrelatedbrace-expansion/c8 finding (tracked separately), nothing new from removing@sentry/*