Skip to content

Improve CLI error telemetry - #928

Merged
zahlekhan merged 8 commits into
thesysdev:mainfrom
zahlekhan:codex/improve-cli-error-telemetry
Aug 6, 2026
Merged

Improve CLI error telemetry#928
zahlekhan merged 8 commits into
thesysdev:mainfrom
zahlekhan:codex/improve-cli-error-telemetry

Conversation

@zahlekhan

@zahlekhan zahlekhan commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add bounded failure_stage, error_class, and error_code properties to existing CLI failure events
  • attach an ephemeral cli_run_id and command to every event from one invocation
  • classify dependency failures across peer conflicts, registry access, network failures, and install scripts
  • identify lockfile/workspace configuration and package engine/version compatibility failures
  • attach bounded process metadata (duration_ms, exit_code, and failure_signal) to skill-install, dependency-install, and dev-server processes
  • distinguish Cloud-auth method, OIDC, user-info, organization, key-mint, and HTTP failures
  • emit cancellation events separately for prompts and interrupted child processes
  • keep commands/generate.ts unchanged; the shared top-level handler emits bounded fields without raw messages

Why

The CLI already had useful command and stage-specific events, but top-level create failures discarded CreateError.stage, dependency and auth failures lacked actionable categories, process failures lacked consistent exit metadata, cancellations could look like failures, and generate failures sent truncated raw messages that could contain paths.

This patch extends the existing event model. A compact process runner streams output unchanged while retaining a bounded 16 KiB diagnostic tail locally for allowlisted classification; that diagnostic text is never emitted.

Validation

  • pnpm --filter @openuidev/cli build:cli
  • pnpm --filter @openuidev/cli lint:check
  • pnpm --filter @openuidev/cli format:check
  • git diff --check

Notes

  • Existing event names and funnel ordering are preserved.
  • Error messages, paths, stack traces, command output, and generated output are not sent.
  • The implementation intentionally omits the generalized lifecycle/run-ID framework from the earlier version of this PR.
  • The CLI was not published and live PostHog delivery was not tested.

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

@zahlekhan is attempting to deploy a commit to the thesys-devs Team on Vercel.

A member of the Team first needs to authorize it.

@zahlekhan
zahlekhan marked this pull request as ready for review August 6, 2026 10:07
@zahlekhan
zahlekhan merged commit 4e6e0ea into thesysdev:main Aug 6, 2026
30 of 32 checks passed
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.

2 participants