Skip to content

fix(runner): skip exception capture for matched aborts#821

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

fix(runner): skip exception capture for matched aborts#821
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-code/skip-exception-capture-matched-aborts

Conversation

@posthog

@posthog posthog Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Problem

The team gets spurious error-tracking issues whenever a user declines the GitHub connection during self-driving setup, even though nothing broke. When the self-driving skill emits [ABORT] github connection declined, the wizard handles it gracefully with a friendly outro — but runLinearProgram built a WizardError for every abort, including these matched, expected cases, and handed it to wizardAbort(), which unconditionally calls analytics.captureException(). So a normal user decision got logged as a WizardError exception and spawned an error-tracking issue. This hits the team (noise / false alerts), not end users; it recurs on every GitHub decline as self-driving open beta grows.

Changes

Skip the exception capture for matched abort cases — these are expected, user-driven outcomes already surfaced via outroData. In linear.ts, only pass an error to wizardAbort() when the abort did not match a known abort case. Genuine, unmatched aborts still capture, and the existing wizardCapture('agent aborted', …) product-analytics event fires either way, so no real signal is lost.

Test plan

Added linear-abort.test.ts covering both branches: a matched abort case passes no error to wizardAbort (no exception captured), while an unmatched abort still passes a WizardError. Full suite green (1212 tests), lint clean.

LLM context

Authored by PostHog Code (Claude) from an inbox report. Change is scoped to the abort branch of the linear runner.


Created with PostHog Code from an inbox report.

A matched abort case in runLinearProgram (e.g. the self-driving skill emitting
`[ABORT] github connection declined`) is an expected, user-driven outcome that
is already surfaced through a friendly error outro. Previously every abort —
matched or not — built a WizardError and handed it to wizardAbort(), which
unconditionally calls analytics.captureException(), spawning a spurious
error-tracking issue for a normal user decision.

Only pass an `error` to wizardAbort() for genuine, unmatched aborts. The
`agent aborted` product-analytics event still fires either way, so no real
signal is lost.

Generated-By: PostHog Code
Task-Id: 99261312-1bbc-4d65-86ba-e179b8e7b042
@github-actions

github-actions Bot commented Jul 7, 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