Skip to content

fix(cli): CliUserError for missing notifyAppReady / public key / appId - #3181

Open
riderx wants to merge 1 commit into
mainfrom
cursor/cli-user-error-config-failures-b5f7
Open

fix(cli): CliUserError for missing notifyAppReady / public key / appId#3181
riderx wants to merge 1 commit into
mainfrom
cursor/cli-user-error-config-failures-b5f7

Conversation

@riderx

@riderx riderx commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary (AI generated)

Motivation (AI generated)

PostHog error tracking classified legitimate user setup mistakes as unhandled crashes (~79 / ~28 / ~16 users), creating triage noise for notifyAppReady, missing public key, and missing appId.

Business Impact (AI generated)

  • Reduces false-positive error tracking volume so real CLI regressions surface faster.
  • No change to user-facing exit codes, printed guidance, or trackCommandFailed analytics.

Test Plan (AI generated)

  • cd cli && bun run test:cli-user-error-config
  • cd cli && bun run test:posthog-exception
  • CI green — Run tests #32846624510 (pull_request)
  • Rebased onto latest main; no merge conflicts
  • 0 unresolved review threads; reviewDecision APPROVED; mergeStateStatus CLEAN

Generated with AI

Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Review in cubic

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

  • Run on-demand review

On-demand reviews are free for the next 26 days. After that, they cost $0.25 per reviewed file.

Or wait 31 minutes for your next included review.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 55 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5d20277a-b884-4bd0-9f7c-945b6e058780

📥 Commits

Reviewing files that changed from the base of the PR and between dcd9561 and daf07db.

📒 Files selected for processing (20)
  • cli/package.json
  • cli/src/app/debug.ts
  • cli/src/app/delete.ts
  • cli/src/app/set.ts
  • cli/src/build/needed.ts
  • cli/src/build/prescan/context.ts
  • cli/src/bundle/cleanup.ts
  • cli/src/bundle/compatibility.ts
  • cli/src/bundle/delete.ts
  • cli/src/bundle/encrypt.ts
  • cli/src/bundle/list.ts
  • cli/src/bundle/unlink.ts
  • cli/src/bundle/zip.ts
  • cli/src/channel/add.ts
  • cli/src/channel/delete.ts
  • cli/src/channel/list.ts
  • cli/src/channel/set.ts
  • cli/src/preview/qr.ts
  • cli/test/test-cli-user-error-config.mjs
  • cli/test/test-posthog-exception.mjs
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@TorichanCapgo

Copy link
Copy Markdown
Contributor

Closing: Martin’s direction is not to silence these as CliUserError / skip PostHog capture. Keep tracking real user failures and fix success paths (auto-detect, prompt to create/fix, inject missing pieces) so users complete the flow. Will reopen as success-path PRs where we have a clear product fix.

@TorichanCapgo

Copy link
Copy Markdown
Contributor

Do not merge — Martin rejected CliUserError-only silencing. Keep PostHog tracking for these user failures; prefer success-path fixes (auto-detect / prompt / inject) so users complete the flow. Replacement work in flight for notifyAppReady/public key/appId; same direction for the rest of this batch (#3175#3182 CliUserError PRs).

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Do not merge this PR.

Martin rejected the CliUserError / shouldCapturePosthogException silencing approach for these expected-config failures. We should keep tracking them in PostHog and instead fix the success path so users can complete the flow:

  • auto-detect appId
  • generate + write public key when missing
  • inject / fix notifyAppReady

A separate cloud agent (bc-99b4ff8e…) is handling the rewrite. This PR should be closed or abandoned — not merged.

@riderx
riderx marked this pull request as ready for review August 24, 2026 13:24
@cursor
cursor Bot force-pushed the cursor/cli-user-error-config-failures-b5f7 branch from 697cda9 to f01e8d0 Compare August 24, 2026 13:25
@codspeed-hq

codspeed-hq Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing cursor/cli-user-error-config-failures-b5f7 (daf07db) with main (dcd9561)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread cli/test/test-cli-user-error-config.mjs Outdated
@cursor
cursor Bot force-pushed the cursor/cli-user-error-config-failures-b5f7 branch from 7bdab3d to 3cdffdb Compare August 24, 2026 13:33
@cursor
cursor Bot force-pushed the cursor/cli-user-error-config-failures-b5f7 branch from 0a46305 to 30e5569 Compare August 24, 2026 13:52
@cursor
cursor Bot force-pushed the cursor/cli-user-error-config-failures-b5f7 branch from 108e8a6 to f17b4dc Compare August 24, 2026 14:06
@cursor
cursor Bot force-pushed the cursor/cli-user-error-config-failures-b5f7 branch from 2f327be to ed8f099 Compare August 24, 2026 14:34
@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 01:17 Active
@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 01:30 Active
@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 01:41 Active
@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 01:57 Active
@cursor
cursor Bot force-pushed the cursor/cli-user-error-config-failures-b5f7 branch from d8de084 to fd9720d Compare August 25, 2026 10:40
@cursor

cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

@coderabbitai review

@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 10:40 Active
@cursor

cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

@coderabbitai review

@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 11:01 Active
@cursor

cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

@coderabbitai full review

@cursor
cursor Bot force-pushed the cursor/cli-user-error-config-failures-b5f7 branch from 9cdc8bc to fd9720d Compare August 25, 2026 11:22
@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 11:22 Active
@cursor

cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

@coderabbitai review

@TorichanCapgo TorichanCapgo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased onto main (12.257.1). Conflicts resolved. CI green on run 32841965137. All review threads addressed.

@cursor
cursor Bot force-pushed the cursor/cli-user-error-config-failures-b5f7 branch from fd9720d to 77a5c5b Compare August 25, 2026 11:39
@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 11:39 Active
@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 11:50 Active
@cursor
cursor Bot force-pushed the cursor/cli-user-error-config-failures-b5f7 branch from 29f31b4 to 77a5c5b Compare August 25, 2026 12:02
@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 12:02 Active
Rebased onto main (12.257.1): keep channel-add duplicate recovery (#3195),
merge config/org + bundle CliUserError tests, and add test:cli-user-error-config
to the CLI test suite.

Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
@cursor
cursor Bot force-pushed the cursor/cli-user-error-config-failures-b5f7 branch from 77a5c5b to daf07db Compare August 25, 2026 12:15
@cursor
cursor Bot deployed to deepsec-pr August 25, 2026 12:15 Active
@sonarqubecloud

Copy link
Copy Markdown

@cursor

cursor Bot commented Aug 25, 2026

Copy link
Copy Markdown

@coderabbitai review

cursor Bot pushed a commit that referenced this pull request Aug 25, 2026
Replaces CliUserError-only PostHog silencing (rejected in #3181) with
interactive success-path recovery for bundle zip: semver fallback, missing
inputs, notifyAppReady injection, project rebuild, and updater install.

Recovery is TTY-only; declined or non-interactive failures still throw plain
Error so PostHog keeps tracking real user setup issues.

Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
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.

3 participants