fix(runner): don't report matched abort cases as exceptions#837
Draft
posthog[bot] wants to merge 1 commit into
Draft
fix(runner): don't report matched abort cases as exceptions#837posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
A matched AbortCase (e.g. the user declining the GitHub App connection during self-driving setup) is an expected, program-defined outcome, not a crash. The linear runner was still building a WizardError for it and handing it to wizardAbort, which unconditionally calls captureException — turning an expected user decline into an error-tracking issue. Only pass a WizardError to wizardAbort for unmatched (genuinely unexpected) aborts. Matched cases still fire the `agent aborted` analytics event, so the signal is preserved without polluting error tracking. Generated-By: PostHog Code Task-Id: 5eb42403-f6e4-4ac3-811b-17e57ed799ba
🧙 Wizard CIRun 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:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Self-driving setup requires connecting the PostHog GitHub App. When a user can't or won't connect, the skill emits
[ABORT] github connection declined, whichSELF_DRIVING_ABORT_CASEScorrectly turns into a friendly "GitHub connection required" outro.But the ABORT handler in the linear runner also built a
WizardErrorfor the matched case and handed it towizardAbort, which callscaptureExceptionon any error. So an expected user decline became an error-tracking issue — and because the stack frames point at version-specific minifiedbin.jsline numbers, each release likely re-fingerprints it as a brand-new issue.Changes
Only pass a
WizardErrortowizardAbortfor unmatched (genuinely unexpected) aborts. A matchedAbortCaseis an expected, program-defined outcome, so we skip exception capture for it. Thewizard: agent abortedanalytics event still fires for every abort (matched or not), so the signal is preserved without the error-tracking noise.Test plan
pnpm build && pnpm test— 1268 tests pass.pnpm fix— clean.wizard-abortcontract this relies on ("noerror→ nocaptureException") is already covered by existing tests.Created with PostHog Code from an inbox report.