Skip to content

fix(self-driving): don't report benign user aborts as exceptions#795

Draft
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-code/skip-exception-benign-aborts
Draft

fix(self-driving): don't report benign user aborts as exceptions#795
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-code/skip-exception-benign-aborts

Conversation

@posthog

@posthog posthog Bot commented Jul 3, 2026

Copy link
Copy Markdown

Problem

This affects the wizard team, not users. When someone declines the PostHog GitHub App connection during self-driving setup (STEP 3), the skill emits [ABORT] github connection declined. The linear runner wraps that in a WizardError and routes it through wizardAbort, which called analytics.captureException unconditionally — so an expected, user-driven cancellation was filed as an exception in error tracking. The wizard already renders a friendly "GitHub connection required" outro and leaves nothing half-configured, so this was pure error-tracking noise (dozens of occurrences over the last 30 days, risking misdirected triage).

Changes

  • Add an optional expected flag to AbortCase and to wizardAbort's options. When an abort is expected, the outro still renders and the agent aborted analytics event still fires, but captureException is skipped and analytics shut down as cancelled rather than error.
  • The linear runner propagates a matched abort case's expected flag into wizardAbort.
  • Mark the benign self-driving abort cases as expected: github connection declined, requires-interactive-mode, and requirements-incomplete. The genuine self-driving is not available case (Signals unreachable in open beta) stays unexpected and is still reported.

Test plan

  • Added unit tests: wizardAbort skips captureException for expected aborts (and still captures unexpected ones); self-driving detect asserts which abort cases are flagged expected.
  • pnpm build && pnpm test (1160 tests pass) and pnpm lint (0 errors).

LLM context

Authored by PostHog Code (Claude) from an inbox report about error-tracking noise from benign GitHub-connection declines.


Created with PostHog Code from an inbox report.

Declining the GitHub App connection during self-driving setup emitted
`[ABORT] github connection declined`, which the linear runner wraps in a
WizardError and routes through `wizardAbort`. Because `wizardAbort` called
`analytics.captureException` unconditionally, an expected user-driven
cancellation was reported to error tracking even though the wizard already
renders a friendly "GitHub connection required" outro and leaves nothing
half-configured.

Add an `expected` flag to `AbortCase` and `wizardAbort`. Expected aborts
still render their outro and fire the `agent aborted` analytics event, but
skip `captureException` (and shut analytics down as `cancelled`, not
`error`). Mark the benign self-driving cases — github connection declined,
requires-interactive-mode, requirements-incomplete — as expected. The
genuine "self-driving is not available" (Signals unreachable) case stays
unexpected and is still reported.

Generated-By: PostHog Code
Task-Id: ca4902cd-8c3f-44a2-a228-cb21617ed3c8
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci error-tracking-upload-source-maps
  • /wizard-ci mcp-analytics
  • /wizard-ci misc
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci error-tracking-upload-source-maps/android
  • /wizard-ci error-tracking-upload-source-maps/cicd-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-nested-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-single-stage-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-gitlab-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-monorepo-pnpm-node-react
  • /wizard-ci error-tracking-upload-source-maps/cicd-monorepo-raw-node-react
  • /wizard-ci error-tracking-upload-source-maps/cicd-ssh-vps-node-raw
  • /wizard-ci error-tracking-upload-source-maps/flutter
  • /wizard-ci error-tracking-upload-source-maps/ios
  • /wizard-ci error-tracking-upload-source-maps/next
  • /wizard-ci error-tracking-upload-source-maps/next-no-posthog
  • /wizard-ci error-tracking-upload-source-maps/node-raw
  • /wizard-ci error-tracking-upload-source-maps/node-rollup
  • /wizard-ci error-tracking-upload-source-maps/node-rollup-typescript-plugin
  • /wizard-ci error-tracking-upload-source-maps/node-webpack
  • /wizard-ci error-tracking-upload-source-maps/nuxt-3-6
  • /wizard-ci error-tracking-upload-source-maps/nuxt-4-3
  • /wizard-ci error-tracking-upload-source-maps/react-native
  • /wizard-ci error-tracking-upload-source-maps/react-vite
  • /wizard-ci error-tracking-upload-source-maps/rust
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci misc/quack-quack
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants