Skip to content

fix(selfhost): replace Sentry with PostHog for error tracking#8617

Merged
JSONbored merged 1 commit into
mainfrom
claude/selfhost-remove-sentry
Jul 25, 2026
Merged

fix(selfhost): replace Sentry with PostHog for error tracking#8617
JSONbored merged 1 commit into
mainfrom
claude/selfhost-remove-sentry

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Completes the self-host leg of #8287 under epic #8286's 2026-07-25 strategy correction: PostHog now fully replaces Sentry for self-host error tracking (no parallel-run). PostHog's implementation already mirrored Sentry's capture/monitor/structured-log-forwarding behavior field-for-field, so this is mostly subtraction:

  • Deleted src/selfhost/sentry.ts and every real call site (server.ts, sqlite-queue.ts, pg-queue.ts, monitored-work.ts, queue/processors.ts, queue/ai-review-orchestration.ts, services/agent-action-executor.ts).
  • Moved the one shared constant (SENTRY_OPERATIONAL_TAG_KEYS) into redaction-scrub.ts, renamed OPERATIONAL_TAG_KEYS.
  • Dropped @sentry/node + @sentry/opentelemetry from the root package.json (the hosted Worker's own separate @sentry/cloudflare/@sentry/hono integration is untouched — different surface, src/api/routes.ts, follow-up PR).
  • Wired self-host's OTel exporter to default its OTLP trace endpoint at PostHog's own distributed-tracing product (beta, plain OTLP/HTTP) when POSTHOG_API_KEY is set and no explicit OTEL_EXPORTER_OTLP_* override is given — replaces the bespoke Sentry span-processor/sampler bridge with a strictly simpler generic-OTLP path, so removing the bridge is not a capability loss.
  • Updated self-hosting-operations.mdx and every affected drift-guard test.
  • Regenerated selfhost-env-reference.ts and the branding-drift baseline.

Deliberately out of scope (independent of this code path, tracked as follow-ups):

  • Hosted ORB Worker's own Sentry middleware (src/api/routes.ts).
  • Grafana Sentry-issues dashboard (scripts/setup-sentry-datasource.sh) and the release pipeline's @sentry/cli source-map upload (.github/workflows/release-selfhost.yml).

Test plan

  • npm run typecheck — clean
  • Full npm run test:ci gate — 1153 test files / 21513 tests passed (plus the four workspace sub-suites it chains), 0 failures
  • npm audit --audit-level=moderate — same 5 pre-existing high-severity findings as main (eslint/minimatch/brace-expansion chain), unrelated to this change
  • npm run selfhost:env-reference:check / npm run branding-drift:check — both pass against the regenerated files

Removes src/selfhost/sentry.ts and every real call site now that PostHog
error tracking is a full replacement, not a parallel-run sink (2026-07-25
epic #8286 correction). PostHog already mirrored Sentry's capture/monitor/
structured-log-forwarding behavior field-for-field, so this is mostly
subtraction: strip the Sentry imports, move the one shared constant
(operational tag keys) into redaction-scrub.ts, and drop @sentry/node +
@sentry/opentelemetry from the root package.json (the hosted Worker's own
separate @sentry/cloudflare + @sentry/hono integration is untouched).

Also wires self-host's OpenTelemetry exporter to default its OTLP trace
endpoint at PostHog's own distributed-tracing product (beta, plain OTLP/
HTTP) when POSTHOG_API_KEY is set and no explicit OTEL_EXPORTER_OTLP_*
override is given -- this replaces the bespoke Sentry span-processor/
sampler bridge with a strictly simpler generic-OTLP path, so removing the
bridge is not a capability loss.

Updates the self-hosting-operations docs and every affected drift-guard
test accordingly. Deliberately out of scope, left for follow-up PRs: the
hosted ORB Worker's own Sentry middleware (src/api/routes.ts), and the
Grafana Sentry-issues dashboard + release pipeline's @sentry/cli source-map
upload (neither is coupled to this error-tracking code path).
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
loopover-ui 2c27e13 Commit Preview URL

Branch Preview URL
Jul 25 2026, 10:30 AM

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 1.3kB (-0.02%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
loopover-ui 7.42MB -1.3kB (-0.02%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: loopover-ui

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/add-scalar-classes-BmKnKIwW.js (New) 2.17MB 2.17MB 100.0% 🚀
assets/tanstack-vendor-CM7RmRfD.js (New) 738.33kB 738.33kB 100.0% 🚀
assets/docs.fumadocs-spike-api-reference-BZ9cJckD.js (New) 442.92kB 442.92kB 100.0% 🚀
assets/AgentScalarChatInterface.vue-bgmdf2Uv.js (New) 201.71kB 201.71kB 100.0% 🚀
assets/modal-D0oxSZ8M.js (New) 184.38kB 184.38kB 100.0% 🚀
assets/client-3DJNAhNO.js (New) 146.06kB 146.06kB 100.0% 🚀
assets/self-hosting-operations-Df8o1mTJ.js (New) 133.65kB 133.65kB 100.0% 🚀
assets/self-hosting-configuration-D50rlCUw.js (New) 99.97kB 99.97kB 100.0% 🚀
assets/maintainer-panel-Dg8NMT0l.js (New) 78.99kB 78.99kB 100.0% 🚀
assets/ui-vendor-XKUy3kLc.js (New) 57.04kB 57.04kB 100.0% 🚀
assets/routes-CGv1mGb5.js (New) 34.98kB 34.98kB 100.0% 🚀
assets/owner-panel-DAn97To3.js (New) 27.46kB 27.46kB 100.0% 🚀
assets/app-VdPzTIx7.js (New) 25.95kB 25.95kB 100.0% 🚀
assets/app.runs-CnVF-RBE.js (New) 23.56kB 23.56kB 100.0% 🚀
assets/miner-panel-1WaU4jHR.js (New) 20.28kB 20.28kB 100.0% 🚀
assets/api._op-Dcth53be.js (New) 17.57kB 17.57kB 100.0% 🚀
assets/self-hosting-docs-audit-BS91nVZh.js (New) 16.6kB 16.6kB 100.0% 🚀
assets/app.index-GAvpy28A.js (New) 15.62kB 15.62kB 100.0% 🚀
assets/docs._slug-B0U0pLej.js (New) 15.37kB 15.37kB 100.0% 🚀
assets/playground-panel-DPUNrcYw.js (New) 14.49kB 14.49kB 100.0% 🚀
assets/fairness-D6LwYaL1.js (New) 10.6kB 10.6kB 100.0% 🚀
assets/app.audit-BiedQkRM.js (New) 10.11kB 10.11kB 100.0% 🚀
assets/app.config-generator-C1qRdP6a.js (New) 10.09kB 10.09kB 100.0% 🚀
assets/maintainers-FCjXNgJd.js (New) 8.09kB 8.09kB 100.0% 🚀
assets/miners-PaeoIoSN.js (New) 7.91kB 7.91kB 100.0% 🚀
assets/agents-BOLuSB4B.js (New) 7.8kB 7.8kB 100.0% 🚀
assets/commands-panel-Co8civUB.js (New) 6.65kB 6.65kB 100.0% 🚀
assets/roadmap-DBn0c6Xf.js (New) 6.52kB 6.52kB 100.0% 🚀
assets/maintainer-workflow-He7pRgIm.js (New) 6.52kB 6.52kB 100.0% 🚀
assets/digest-panel-DUKJBr-8.js (New) 6.18kB 6.18kB 100.0% 🚀
assets/repos._owner._repo.quality-Dxrp1oPJ.js (New) 6.14kB 6.14kB 100.0% 🚀
assets/docs-nav-D-lKaFZS.js (New) 5.95kB 5.95kB 100.0% 🚀
assets/docs.index-CD0nWdG_.js (New) 5.95kB 5.95kB 100.0% 🚀
assets/api.index-C1ON1CCE.js (New) 4.7kB 4.7kB 100.0% 🚀
assets/docs-CgATv6j2.js (New) 2.7kB 2.7kB 100.0% 🚀
assets/api-DHhkwHIc.js (New) 2.69kB 2.69kB 100.0% 🚀
assets/docs-page-BAZC7XCF.js (New) 2.1kB 2.1kB 100.0% 🚀
assets/table-94m47LB7.js (New) 1.75kB 1.75kB 100.0% 🚀
assets/app.workbench-WIsQpYnW.js (New) 1.58kB 1.58kB 100.0% 🚀
assets/tooltip-D7Vrlq7h.js (New) 1.47kB 1.47kB 100.0% 🚀
assets/session-CSi20udI.js (New) 1.45kB 1.45kB 100.0% 🚀
assets/tabs-BD5O556M.js (New) 1.39kB 1.39kB 100.0% 🚀
assets/app.repos-CHzSufJG.js (New) 1.07kB 1.07kB 100.0% 🚀
assets/input-CPS_L3Q_.js (New) 796 bytes 796 bytes 100.0% 🚀
assets/file-cog-BC_oDgzM.js (New) 758 bytes 758 bytes 100.0% 🚀
assets/app.maintainer-CwJei1SQ.js (New) 502 bytes 502 bytes 100.0% 🚀
assets/sparkles-D_k44Rzh.js (New) 494 bytes 494 bytes 100.0% 🚀
assets/app.owner-CiunK-rH.js (New) 474 bytes 474 bytes 100.0% 🚀
assets/app.commands-BW8OKQql.js (New) 455 bytes 455 bytes 100.0% 🚀
assets/app.playground-Bd_c6MWq.js (New) 442 bytes 442 bytes 100.0% 🚀
assets/index-BCRm4rtQ.js (New) 438 bytes 438 bytes 100.0% 🚀
assets/app.digest-BuqpJvOQ.js (New) 430 bytes 430 bytes 100.0% 🚀
assets/eye-off-CXTLYNgM.js (New) 430 bytes 430 bytes 100.0% 🚀
assets/app.miner-Umh1kjXV.js (New) 422 bytes 422 bytes 100.0% 🚀
assets/key-round-Bx93E4e9.js (New) 355 bytes 355 bytes 100.0% 🚀
assets/bot-BAHvE02H.js (New) 328 bytes 328 bytes 100.0% 🚀
assets/trash-2-DLsHmSCE.js (New) 328 bytes 328 bytes 100.0% 🚀
assets/save-Dpblm4Og.js (New) 327 bytes 327 bytes 100.0% 🚀
assets/git-pull-request-arrow-CkDLhhN1.js (New) 321 bytes 321 bytes 100.0% 🚀
assets/wrench-CgugkyD1.js (New) 303 bytes 303 bytes 100.0% 🚀
assets/list-checks-Dv277n6D.js (New) 279 bytes 279 bytes 100.0% 🚀
assets/workflow-4ru4iKGs.js (New) 265 bytes 265 bytes 100.0% 🚀
assets/compass-DIY8az5b.js (New) 251 bytes 251 bytes 100.0% 🚀
assets/history-DhjXF2c6.js (New) 237 bytes 237 bytes 100.0% 🚀
assets/activity-CUSGQv_b.js (New) 234 bytes 234 bytes 100.0% 🚀
assets/message-square-B8CROZe6.js (New) 233 bytes 233 bytes 100.0% 🚀
assets/lock-CqYa--GJ.js (New) 206 bytes 206 bytes 100.0% 🚀
assets/rotate-cw-DHpPqf9S.js (New) 201 bytes 201 bytes 100.0% 🚀
assets/play-nK-krd2F.js (New) 190 bytes 190 bytes 100.0% 🚀
assets/circle-check-CGYRmOBW.js (New) 178 bytes 178 bytes 100.0% 🚀
assets/search-BVVdM2Z8.js (New) 174 bytes 174 bytes 100.0% 🚀
assets/circle-BGO5Lx-D.js (New) 130 bytes 130 bytes 100.0% 🚀
assets/add-scalar-classes-DsGndBGH.js (Deleted) -2.17MB 0 bytes -100.0% 🗑️
assets/tanstack-vendor-R4cnZ2kK.js (Deleted) -738.33kB 0 bytes -100.0% 🗑️
assets/docs.fumadocs-spike-api-reference-DGXBwIaV.js (Deleted) -442.92kB 0 bytes -100.0% 🗑️
assets/AgentScalarChatInterface.vue-DIVZil9q.js (Deleted) -201.71kB 0 bytes -100.0% 🗑️
assets/modal-DRAAs6Et.js (Deleted) -184.38kB 0 bytes -100.0% 🗑️
assets/client-fkilhkBG.js (Deleted) -146.06kB 0 bytes -100.0% 🗑️
assets/self-hosting-operations-A97yi6_M.js (Deleted) -134.78kB 0 bytes -100.0% 🗑️
assets/self-hosting-configuration-ufMfmgMA.js (Deleted) -100.13kB 0 bytes -100.0% 🗑️
assets/maintainer-panel-DdcA3PSp.js (Deleted) -78.99kB 0 bytes -100.0% 🗑️
assets/ui-vendor-Dc6I4SGs.js (Deleted) -57.04kB 0 bytes -100.0% 🗑️
assets/routes-BQDQIUdB.js (Deleted) -34.98kB 0 bytes -100.0% 🗑️
assets/owner-panel-BD0600N9.js (Deleted) -27.46kB 0 bytes -100.0% 🗑️
assets/app-yWw0NwqF.js (Deleted) -25.95kB 0 bytes -100.0% 🗑️
assets/app.runs-CEdhAQGC.js (Deleted) -23.56kB 0 bytes -100.0% 🗑️
assets/miner-panel-mMNmWpw9.js (Deleted) -20.28kB 0 bytes -100.0% 🗑️
assets/api._op-nvDxzKR7.js (Deleted) -17.57kB 0 bytes -100.0% 🗑️
assets/self-hosting-docs-audit-P-GOKF_A.js (Deleted) -16.61kB 0 bytes -100.0% 🗑️
assets/app.index-DDeiEnod.js (Deleted) -15.62kB 0 bytes -100.0% 🗑️
assets/docs._slug-CIb5A8HL.js (Deleted) -15.37kB 0 bytes -100.0% 🗑️
assets/playground-panel-BR0gCokI.js (Deleted) -14.49kB 0 bytes -100.0% 🗑️
assets/fairness-BkuZRg8t.js (Deleted) -10.6kB 0 bytes -100.0% 🗑️
assets/app.audit-tcyvfk-W.js (Deleted) -10.11kB 0 bytes -100.0% 🗑️
assets/app.config-generator-DB9f9YPl.js (Deleted) -10.09kB 0 bytes -100.0% 🗑️
assets/maintainers-B6BQfQ7j.js (Deleted) -8.09kB 0 bytes -100.0% 🗑️
assets/miners-Bco10BNV.js (Deleted) -7.91kB 0 bytes -100.0% 🗑️
assets/agents-BwXOXgs4.js (Deleted) -7.8kB 0 bytes -100.0% 🗑️
assets/commands-panel-DRaEHjxn.js (Deleted) -6.65kB 0 bytes -100.0% 🗑️
assets/roadmap-Du9ld_OW.js (Deleted) -6.52kB 0 bytes -100.0% 🗑️
assets/maintainer-workflow-Cw9chtfd.js (Deleted) -6.52kB 0 bytes -100.0% 🗑️
assets/digest-panel-CyT2FvVX.js (Deleted) -6.18kB 0 bytes -100.0% 🗑️
assets/repos._owner._repo.quality-Ds96fROi.js (Deleted) -6.14kB 0 bytes -100.0% 🗑️
assets/docs-nav-aCRsXGEt.js (Deleted) -5.95kB 0 bytes -100.0% 🗑️
assets/docs.index-BMATtgy_.js (Deleted) -5.95kB 0 bytes -100.0% 🗑️
assets/api.index-C7BkW_B6.js (Deleted) -4.7kB 0 bytes -100.0% 🗑️
assets/docs-D29cm41j.js (Deleted) -2.7kB 0 bytes -100.0% 🗑️
assets/api-CIcok6Uy.js (Deleted) -2.69kB 0 bytes -100.0% 🗑️
assets/docs-page-DaECE4si.js (Deleted) -2.1kB 0 bytes -100.0% 🗑️
assets/table-Bjj-QmPs.js (Deleted) -1.75kB 0 bytes -100.0% 🗑️
assets/app.workbench-tCjuw2hv.js (Deleted) -1.58kB 0 bytes -100.0% 🗑️
assets/tooltip-Cj4jBLqi.js (Deleted) -1.47kB 0 bytes -100.0% 🗑️
assets/session-B08VN7YW.js (Deleted) -1.45kB 0 bytes -100.0% 🗑️
assets/tabs-g_oXG5Qa.js (Deleted) -1.39kB 0 bytes -100.0% 🗑️
assets/app.repos-WO1vr0ts.js (Deleted) -1.07kB 0 bytes -100.0% 🗑️
assets/input-Cv3SNFim.js (Deleted) -796 bytes 0 bytes -100.0% 🗑️
assets/file-cog-CsKB54Ho.js (Deleted) -758 bytes 0 bytes -100.0% 🗑️
assets/app.maintainer-BZhUUqnk.js (Deleted) -502 bytes 0 bytes -100.0% 🗑️
assets/sparkles-CtH2N-MR.js (Deleted) -494 bytes 0 bytes -100.0% 🗑️
assets/app.owner-ClBYU7Ol.js (Deleted) -474 bytes 0 bytes -100.0% 🗑️
assets/app.commands-CX59wB-C.js (Deleted) -455 bytes 0 bytes -100.0% 🗑️
assets/app.playground-BAUqRQmw.js (Deleted) -442 bytes 0 bytes -100.0% 🗑️
assets/index-Cm312S6a.js (Deleted) -438 bytes 0 bytes -100.0% 🗑️
assets/app.digest-BQLXPB_m.js (Deleted) -430 bytes 0 bytes -100.0% 🗑️
assets/eye-off-lDthDnhM.js (Deleted) -430 bytes 0 bytes -100.0% 🗑️
assets/app.miner-Dl9ls0lz.js (Deleted) -422 bytes 0 bytes -100.0% 🗑️
assets/key-round-CvUSOjMH.js (Deleted) -355 bytes 0 bytes -100.0% 🗑️
assets/bot-DeUOWmiF.js (Deleted) -328 bytes 0 bytes -100.0% 🗑️
assets/trash-2-Bfa-uPuY.js (Deleted) -328 bytes 0 bytes -100.0% 🗑️
assets/save-D3KFqH7s.js (Deleted) -327 bytes 0 bytes -100.0% 🗑️
assets/git-pull-request-arrow-BThAAA4B.js (Deleted) -321 bytes 0 bytes -100.0% 🗑️
assets/wrench-BrnlGJpt.js (Deleted) -303 bytes 0 bytes -100.0% 🗑️
assets/list-checks-CM2raYXy.js (Deleted) -279 bytes 0 bytes -100.0% 🗑️
assets/workflow-DSjD6wUV.js (Deleted) -265 bytes 0 bytes -100.0% 🗑️
assets/compass-DdJMxm0X.js (Deleted) -251 bytes 0 bytes -100.0% 🗑️
assets/history-m7zN04Ts.js (Deleted) -237 bytes 0 bytes -100.0% 🗑️
assets/activity--FD3Pqwt.js (Deleted) -234 bytes 0 bytes -100.0% 🗑️
assets/message-square-C-KPQZ6y.js (Deleted) -233 bytes 0 bytes -100.0% 🗑️
assets/lock-25E-HOdE.js (Deleted) -206 bytes 0 bytes -100.0% 🗑️
assets/rotate-cw-lZOnlXIQ.js (Deleted) -201 bytes 0 bytes -100.0% 🗑️
assets/play-BwtOJAmc.js (Deleted) -190 bytes 0 bytes -100.0% 🗑️
assets/circle-check-CUtzXr04.js (Deleted) -178 bytes 0 bytes -100.0% 🗑️
assets/search-Bv1THVgY.js (Deleted) -174 bytes 0 bytes -100.0% 🗑️
assets/circle-DtQBxgfq.js (Deleted) -130 bytes 0 bytes -100.0% 🗑️

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.75%. Comparing base (e56e9a7) to head (2c27e13).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8617      +/-   ##
==========================================
- Coverage   92.82%   92.75%   -0.08%     
==========================================
  Files         798      797       -1     
  Lines       79621    79355     -266     
  Branches    24129    24032      -97     
==========================================
- Hits        73909    73604     -305     
- Misses       4573     4604      +31     
- Partials     1139     1147       +8     
Flag Coverage Δ
backend 93.64% <100.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/queue/ai-review-orchestration.ts 100.00% <ø> (ø)
src/queue/processors.ts 95.66% <ø> (-0.01%) ⬇️
src/review/active-review-reconciliation.ts 100.00% <ø> (ø)
src/selfhost/host-pressure.ts 100.00% <ø> (ø)
src/selfhost/monitored-work.ts 100.00% <100.00%> (ø)
src/selfhost/orb-collector.ts 100.00% <ø> (ø)
src/selfhost/otel.ts 100.00% <100.00%> (ø)
src/selfhost/posthog.ts 99.24% <100.00%> (ø)
src/selfhost/redaction-scrub.ts 51.19% <100.00%> (-48.81%) ⬇️
src/selfhost/sqlite-queue.ts 99.60% <100.00%> (-0.01%) ⬇️
... and 2 more

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 25, 2026
@loopover-orb

loopover-orb Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-25 10:47:31 UTC

40 files · 1 AI reviewer · 2 blockers · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This PR mechanically replaces Sentry with PostHog across the self-host error-tracking surface: sentry.ts and every real call site are deleted, the OTel bridge/sampler-reconciliation machinery is simplified since PostHog's tracing product is plain OTLP/HTTP, the shared operational-tag allowlist moves to redaction-scrub.ts, and generated artifacts (env reference, branding-drift baseline) are regenerated to match. The change is well-scoped subtraction that matches its stated intent, CI is green with a large test suite, and the OTLP endpoint/header resolution logic in otel.ts is internally consistent (explicit OTEL_EXPORTER_OTLP_* always wins over the PostHog fallback for both endpoint and headers). The most notable loose end is that src/env.d.ts's POSTHOG_API_KEY doc comment still describes the old 'parallel-run alongside SENTRY_DSN' posture even though this PR just deleted SENTRY_DSN's self-host implementation entirely.

Nits — 5 non-blocking
  • src/env.d.ts's POSTHOG_API_KEY doc comment (near the file's end) still says self-host error tracking is 'the parallel-run PostHog sink alongside SENTRY_DSN, both active simultaneously when both are configured' — that's now false since sentry.ts is deleted in this same PR; update it to describe the full-replacement posture.
  • The crash-handling claim that initPostHog's enableExceptionAutocapture fully replaces the explicit uncaughtException/unhandledRejection process.on wiring removed from server.ts (including the process.exit(1) after flush) isn't visible in this diff (posthog.ts's initPostHog body wasn't shown) — worth confirming there's a test asserting the process still exits on a fatal uncaught exception now that the manual handler is gone.
  • DEFAULT_POSTHOG_OTEL_HOST in src/selfhost/otel.ts duplicates the same 'https:​//us.i.posthog.com' default already documented for POSTHOG_HOST in src/env.d.ts — consider a single shared constant to avoid the two drifting.
  • src/env.d.ts's WORKER_POSTHOG_API_KEY comment still references the Worker-side 'parallel-run... until the gated decommission (Sentry decommission: gated cutover checklist across all six surfaces #8298)' posture — out of this PR's stated scope, but worth a follow-up note since it's adjacent to what this PR just changed.
  • Update the POSTHOG_API_KEY doc comment in src/env.d.ts to drop the 'parallel-run alongside SENTRY_DSN' framing.

Concerns raised — review before merging

  • No linked issue detected: No closing reference or linked issue number was found in the PR metadata/body. — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue: This repo's maintainer focus manifest requires every PR to reference a tracked issue. — Link the relevant issue (for example Closes #123) before opening the PR.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected: No closing reference or linked issue number was found in the PR metadata/body. — If this PR is intended to solve an issue, link it explicitly in the PR body.

2. Maintainer requires a linked issue: This repo's maintainer focus manifest requires every PR to reference a tracked issue. — Link the relevant issue (for example `Closes #123`) before opening the PR.

Decision drivers

  • ❌ Code review — 2 blockers (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 13 registered-repo PR(s), 13 merged, 241 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 13 PR(s), 241 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, Ruby, Go, MDX, Shell, Solidity, JavaScript
  • Official Gittensor activity: 13 PR(s), 241 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Then work through the remaining 2 steps in the Signals table above.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/ before / (scroll)
before / (scroll)
after / (scroll)
after / (scroll)

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.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 25, 2026
@JSONbored
JSONbored merged commit 0e93a85 into main Jul 25, 2026
11 checks passed
@JSONbored
JSONbored deleted the claude/selfhost-remove-sentry branch July 25, 2026 11:40
JSONbored added a commit that referenced this pull request Jul 25, 2026
…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.
JSONbored added a commit that referenced this pull request Jul 25, 2026
ui-preview.yml / ui-preview-deploy.yml (via the shared deploy-ui-preview
composite) create a "preview/pr-<N>" GitHub Environment via createDeployment
the first time a PR gets a preview build -- transient_environment: true is
only a display hint, it never triggers deletion, and nothing else in the
repo ever calls the delete-environment API. Confirmed live: 1254 of 1260
environments were preview/pr-* entries for already-closed PRs (spanning PR
#4140-#8617), none carrying protection rules -- cleaned up directly via the
API as a one-time sweep before adding this workflow.

Mirrors cache-cleanup.yml's existing fix for the identical class of
problem (GHA caches instead of environments): batched on a daily schedule,
not a pull_request:[closed] trigger, so PR-close bursts never queue a
runner per event and compete with real CI. No storage-budget urgency here
unlike the 10GB cache cap, so daily is enough.

Needs a new ENVIRONMENT_ADMIN_TOKEN secret -- deleting an environment
requires repo scope (classic PAT) or Administration:write (fine-grained
PAT); GITHUB_TOKEN can never be granted this via a permissions: block,
confirmed against GitHub's own docs.
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant