Skip to content

fix(telemetry): fingerprint coded errors by code, name the blocked-only drain - #1013

Merged
gewenyu99 merged 1 commit into
mainfrom
posthog-code/abort-telemetry-fingerprint
Oct 6, 2026
Merged

gewenyu99 merged 1 commit into
mainfrom
posthog-code/abort-telemetry-fingerprint

Conversation

@posthog

@posthog posthog Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Coded wizard errors split into one error-tracking issue per install route and release, because the stack's npx, bunx or pnpm path and the chunk hash end up in the fingerprint. "orchestrator drain ended with failed tasks" alone splits into 10 issues across 88 runs in 7 days, and it is also raised when nothing failed and tasks were only blocked.

Origin

Changes

  • analytics.captureException sets $exception_fingerprint to wizard_<code> for a WizardError with a code, or for an exception captured with an error_code. A caller's own fingerprint still wins, such as the OAuth wizard_oauth_<code>. This covers every abort and coded capture in one place.
  • A drain where no required step failed but steps were blocked and never ran now raises PHW_AGENT_ORCHESTRATOR_TASKS_BLOCKED ("orchestrator drain ended with blocked tasks"). A failed required step keeps PHW_AGENT_ORCHESTRATOR_TASKS_FAILED. Both keep tasks_failed, tasks_blocked, failed_types, missing_oauth_scopes and queue_state.
  • The error catalog and docs/error-catalog.md list the new code.

This supersedes the original branch, which targeted the pre-layer paths.

Test plan

  • analytics.test.ts: a coded WizardError and an error_code capture get wizard_<code>, and a caller's fingerprint is kept.
  • optional-tasks.test.ts: drainFailureCode names a failed drain and a blocked-only drain.
  • The new tests fail on main (4 of them). Full vitest passes (3,525 tests), plus typecheck and lint.

Sources

🤖 Generated with Claude Code

@github-actions

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 mcp-analytics
  • /wizard-ci revenue
  • /wizard-ci self-driving

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 mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit

Results will be posted here when complete.

@posthog
posthog Bot force-pushed the posthog-code/abort-telemetry-fingerprint branch from 90ae188 to 1dc653b Compare September 23, 2026 15:23
@gewenyu99
gewenyu99 force-pushed the posthog-code/abort-telemetry-fingerprint branch from 1dc653b to 93b394d Compare October 6, 2026 13:23
@gewenyu99 gewenyu99 changed the title fix(telemetry): name the orchestrator's blocked-drain guard, fingerprint aborts fix(telemetry): fingerprint coded errors by code, name the blocked-only drain Oct 6, 2026
@gewenyu99
gewenyu99 marked this pull request as ready for review October 6, 2026 13:44
@gewenyu99
gewenyu99 requested a review from a team as a code owner October 6, 2026 13:44
@posthog posthog Bot added the self-driving label Oct 6, 2026
…ly drain

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gewenyu99
gewenyu99 force-pushed the posthog-code/abort-telemetry-fingerprint branch from 93b394d to 50c3fa3 Compare October 6, 2026 13:46
@gewenyu99
gewenyu99 merged commit 622aa92 into main Oct 6, 2026
17 checks passed
@gewenyu99
gewenyu99 deleted the posthog-code/abort-telemetry-fingerprint branch October 6, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant