Repository navigation
feat(analytics): report structured error causes instead of error text - #101
Merged
Merged
Conversation
Coverage Report •
|
7 tasks done
rboni-dk
approved these changes
Nov 18, 2026
rboni-dk
left a comment
Contributor
There was a problem hiding this comment.
UvToolUpgradeStep runs uv --no-cache tool upgrade …, and since get_command_name stops at the first option, that failure reports failed_cmd: "uv". uv tool upgrade --no-cache … would give us uv tool upgrade.
Events no longer carry the exception message chain, which held home directory paths, user names, and command lines. Failures and aborts are described by codes instead: abort_reason (every AbortAction has one), failed_step, failed_optional_steps, error_types, failed_cmd (program and subcommand only), and cmd_exit_code. Multi-step actions also report step_durations and skipped_steps. - No events are sent while pytest runs, or for commands the installer does not register. - The Windows .exe reports the MD5 of the script it bundles, matching the .py from the same commit, and every event carries is_exe. - Pip mode passes the installer's instance ID to TestGen so its events can be matched to the install, and an opt-out now reaches TestGen through the environment and config.env. - Pip install and start report success once the app is ready, not when it stops. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ubuntu-latest moved to Ubuntu 26.04, which setup-python has no Python 3.9 build for, so lint and tests failed before running. 3.9 is still the installer's minimum, so pin the runner instead of raising the version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aarthy-dk
force-pushed
the
feat/analytics-outcome-fields
branch
from
November 19, 2026 05:11
ad7e3ea to
fd47c2c
Compare
Contributor
Author
|
Thanks. Fixed in f822ef1: |
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.
Summary
errorproperty carried the exception message chain, including home-directory paths, user names, and command lines. Events now describe failures with codes and names:abort_reason: everyAbortActionhas a reason fromAbortReason, found anywhere in the exception chain.failed_step: the step that failed, or that the user interrupted with Ctrl+C.failed_optional_steps: optional steps that failed, such as demo data generation, without failing the action.error_types: the exception class at each link of the chain. This also fixes every link being labeled with the outer exception's class.failed_cmdandcmd_exit_code: the failed command's program and leading subcommands only, with no path or arguments (for exampletestgen standalone-setup), and its exit code.step_durationsandskipped_stepsfor multi-step actions.CLAUDE.mdasks coding agents to run the installer withDK_INSTALLER_ANALYTICS=no, because the Mixpanel token is public..exe. The build stamps the MD5 of the committed script into the bundle, so the.exereports the same version as the.pyfrom the same commit. Events also carryis_exe.testgencommand gets the installer's instance ID (TG_INSTANCE_ID), so TestGen's own events can be matched to the install.TG_ANALYTICS=nogoes in the environment, andconfig.envis rewritten after setup and on upgrade.TG_ANALYTICS=yesis never set in the environment, because it would override an earlier opt-out.elapsedmeasures install time instead of how long the app ran.Test plan
ruff check/ruff format --checkcleanpytest: 300 passed, on Python 3.13 and 3.9raise AbortActioncarrying a reason, and a pip opt-out reaching TestGentg startandtg upgradewith no install, with sending replaced by a print:abortedwithabort_reason: no_installand no error text🤖 Generated with Claude Code