Skip to content

feat(onboarding): Render private CLI setup instructions - #129764

Merged
evanpurkhiser merged 1 commit into
git/feat-onboarding-mint-private-prompts-for-agent-setupfrom
git/feat-onboarding-render-private-cli-setup-instructions
Nov 5, 2026
Merged

evanpurkhiser merged 1 commit into
git/feat-onboarding-mint-private-prompts-for-agent-setupfrom
git/feat-onboarding-render-private-cli-setup-instructions

Conversation

@evanpurkhiser

@evanpurkhiser evanpurkhiser commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

The handoff claim flow needs a self-contained Markdown guide for installing or authenticating the CLI against the intended Sentry account and organization. Render the guide from a Jinja template and finish by asking the user what they would like to do next. A template TODO tracks selecting future skill handoffs from the handoff context.

Render from authorized organization context and already-minted codes. Pass the intended instance and public client ID to bootstrap commands, shell-quote command values, and escape context labels and code fences.

VDY-341. The public claim endpoint integrates this renderer in the next slice.

@evanpurkhiser
evanpurkhiser changed the base branch from master to git/feat-onboarding-mint-private-prompts-for-agent-setup November 3, 2026 20:23
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 3, 2026
@linear-code

linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown

VDY-341

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

No findings on the latest commit.

@evanpurkhiser
evanpurkhiser force-pushed the git/feat-onboarding-render-private-cli-setup-instructions branch from ffbc31e to dcce8fc Compare November 3, 2026 20:28
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-onboarding-render-private-cli-setup-instructions branch from dcce8fc to 9a6ab31 Compare November 3, 2026 20:34
Comment thread src/sentry/agent_handoff/runbook.py Resolved
Comment thread src/sentry/agent_handoff/runbook.py Resolved
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-onboarding-render-private-cli-setup-instructions branch 2 times, most recently from 9a24f52 to 3b740b9 Compare November 4, 2026 20:12
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-onboarding-render-private-cli-setup-instructions branch from 3b740b9 to 454144b Compare November 4, 2026 20:56
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-onboarding-render-private-cli-setup-instructions branch 2 times, most recently from 4014d41 to 66465f4 Compare November 4, 2026 21:03
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-onboarding-render-private-cli-setup-instructions branch from 66465f4 to cd601fe Compare November 4, 2026 21:08
@evanpurkhiser
evanpurkhiser marked this pull request as ready for review November 4, 2026 21:11
@evanpurkhiser
evanpurkhiser requested review from a team as code owners November 4, 2026 21:11

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cd601fe. Configure here.

"""Keep untrusted context on one line, outside Markdown instructions or HTML."""
single_line = " ".join(value.split())
printable = "".join(character for character in single_line if character.isprintable())
return _MARKDOWN_SPECIAL.sub(r"\\\1", html.escape(printable, quote=False))

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.

Label escaping corrupts greater-than entities

Medium Severity

_escape_label runs html.escape before markdown escaping, so the > inside > is then backslash-escaped to &gt\>. Labels that contain > no longer render as that character, and the organization-name assertion that expects intact > entities does not match the output.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit cd601fe. Configure here.

@evanpurkhiser
evanpurkhiser removed this pull request from stack #129765 November 4, 2026 21:45
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-onboarding-render-private-cli-setup-instructions branch from cd601fe to 186b4a5 Compare November 4, 2026 21:54
@@ -0,0 +1,54 @@
{# TODO: Select skill handoffs from the handoff code's context. #}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just checking this todo is meant to be here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah going to follow up

@evanpurkhiser
evanpurkhiser merged commit 3d40583 into master Nov 5, 2026
98 of 99 checks passed
@evanpurkhiser
evanpurkhiser deleted the git/feat-onboarding-render-private-cli-setup-instructions branch November 5, 2026 02:08
evanpurkhiser added a commit that referenced this pull request Nov 12, 2026
…ease (#130060)

The private CLI setup runbook (#129764) tells the agent to run `curl
-fsSL https://cli.sentry.dev/install | … bash`. That runs whatever
cli.sentry.dev serves at that moment, at whatever version it picks.

Since getsentry/toolkit#1962, each CLI release attaches its `install`
script as a GitHub release asset, and the release registry lists its URL
(`file_urls.install`). The runbook now runs the installer from the
latest release in the cached `/apps` registry entry and pins
`SENTRY_VERSION` to that same release. CLI releases are immutable on
GitHub, so that script can't change after publish, and the installer
already verifies the CLI binary against the registry's checksums before
installing it.

- `sentry.agent_handoff.installer` picks the installer and builds the
command; the runbook only renders it.
- The URL ends up in a shell command, so only a
`github.com/getsentry/toolkit/releases/download/cli@<semver>/install`
URL is accepted, and the pinned version comes from that URL.
- When the registry has no `install` asset (self-hosted, or before the
first CLI release that ships one), the runbook uses the plain `curl
https://cli.sentry.dev/install | bash` command.

<!-- junior-request-attribution:start -->
via **evan.purkhiser**, @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC010884QHLG%3A1793826611.312959 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/slack%3AC010884QHLG%3A1793826611.312959)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC010884QHLG%3A1793826611.312959/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Evan Purkhiser <[email protected]>
Co-authored-by: BYK <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants