Repository navigation
fix(cli): Repair zsh completion during setup - #1524
Merged
Merged
Conversation
Register Sentry completion after initializing zsh completion when needed. Migrate the legacy managed fpath command when setup runs again, with real-shell regression coverage. Co-Authored-By: GPT-6 Codex <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
BYK
approved these changes
Oct 16, 2026
Limit regression shells to zsh's installed function directories so unrelated insecure runner directories cannot prompt without a terminal. Include an insecure directory fixture and correct stale Bun comments. Co-Authored-By: GPT-6 Codex <[email protected]>
MathurAditya724
marked this pull request as ready for review
October 16, 2026 20:30
7 tasks done
joshuawayzwright
pushed a commit
to joshuawayzwright/sentry-mcp
that referenced
this pull request
Nov 16, 2026
…getsentry#1524) Follow-up to getsentry#1520. Investigates whether a canonical, machine-readable source exists for "which datasets accept a sort on grouped aggregates" and records the finding. **Result: no such source exists today.** The OpenAPI spec (`@sentry/api` `listOrganizationEvents`) models `sort` as a flat query param whose only documented constraint is "must be in the `field` list" — it does not encode per-dataset sort capability, and there is no dataset-capability introspection endpoint. The spec's `dataset` enum (`errors | logs | profile_functions | spans | tracemetrics | uptime_results`) does not even include `discover`. Given that, the hand-curated `SORTABLE_DATASETS` set stays, but: - The `discover` entry is removed — it was unreachable, since `discover` is not a valid `--dataset` value (see `DATASET_ALIASES`). - The doc comment now records the research findings as an explicit contract, with a note to revisit if Sentry ships a per-dataset capability contract. ## Testing `vitest run test/commands/explore.test.ts` (40 passed) and `test/lib/api/explore.test.ts` (18 passed); biome clean on the changed file. Refs getsentry#1523 <!-- ## Plan 1. Investigate candidate canonical sources for sortable-dataset capability: - @sentry/api OpenAPI spec (getsentry/sentry-api-schema @ 0.256.0): fetched openapi-derefed.json. - listOrganizationEvents `sort` is a flat query param, doc constraint only "must be in field list". - dataset enum: errors, logs, profile_functions, spans, tracemetrics, uptime_results (no discover). - no capabilities/dataset-meta endpoint anywhere in spec. - Conclusion: no machine-readable source; best achievable deliverable is a documented contract. 2. explore.ts: remove dead `discover` from SORTABLE_DATASETS (unreachable via DATASET_ALIASES); rewrite the doc comment to record the findings and the contract. 3. Verify no test referenced `discover`; run explore unit tests + lint. --> Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
joshuawayzwright
pushed a commit
to joshuawayzwright/sentry-mcp
that referenced
this pull request
Nov 16, 2026
…getsentry#1524) Follow-up to getsentry#1520. Investigates whether a canonical, machine-readable source exists for "which datasets accept a sort on grouped aggregates" and records the finding. **Result: no such source exists today.** The OpenAPI spec (`@sentry/api` `listOrganizationEvents`) models `sort` as a flat query param whose only documented constraint is "must be in the `field` list" — it does not encode per-dataset sort capability, and there is no dataset-capability introspection endpoint. The spec's `dataset` enum (`errors | logs | profile_functions | spans | tracemetrics | uptime_results`) does not even include `discover`. Given that, the hand-curated `SORTABLE_DATASETS` set stays, but: - The `discover` entry is removed — it was unreachable, since `discover` is not a valid `--dataset` value (see `DATASET_ALIASES`). - The doc comment now records the research findings as an explicit contract, with a note to revisit if Sentry ships a per-dataset capability contract. ## Testing `vitest run test/commands/explore.test.ts` (40 passed) and `test/lib/api/explore.test.ts` (18 passed); biome clean on the changed file. Refs getsentry#1523 <!-- ## Plan 1. Investigate candidate canonical sources for sortable-dataset capability: - @sentry/api OpenAPI spec (getsentry/sentry-api-schema @ 0.256.0): fetched openapi-derefed.json. - listOrganizationEvents `sort` is a flat query param, doc constraint only "must be in field list". - dataset enum: errors, logs, profile_functions, spans, tracemetrics, uptime_results (no discover). - no capabilities/dataset-meta endpoint anywhere in spec. - Conclusion: no machine-readable source; best achievable deliverable is a documented contract. 2. explore.ts: remove dead `discover` from SORTABLE_DATASETS (unreachable via DATASET_ALIASES); rewrite the doc comment to record the findings and the contract. 3. Verify no test referenced `discover`; run explore unit tests + lint. --> Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
joshuawayzwright
pushed a commit
to joshuawayzwright/sentry-mcp
that referenced
this pull request
Nov 16, 2026
…getsentry#1524) Follow-up to getsentry#1520. Investigates whether a canonical, machine-readable source exists for "which datasets accept a sort on grouped aggregates" and records the finding. **Result: no such source exists today.** The OpenAPI spec (`@sentry/api` `listOrganizationEvents`) models `sort` as a flat query param whose only documented constraint is "must be in the `field` list" — it does not encode per-dataset sort capability, and there is no dataset-capability introspection endpoint. The spec's `dataset` enum (`errors | logs | profile_functions | spans | tracemetrics | uptime_results`) does not even include `discover`. Given that, the hand-curated `SORTABLE_DATASETS` set stays, but: - The `discover` entry is removed — it was unreachable, since `discover` is not a valid `--dataset` value (see `DATASET_ALIASES`). - The doc comment now records the research findings as an explicit contract, with a note to revisit if Sentry ships a per-dataset capability contract. ## Testing `vitest run test/commands/explore.test.ts` (40 passed) and `test/lib/api/explore.test.ts` (18 passed); biome clean on the changed file. Refs getsentry#1523 <!-- ## Plan 1. Investigate candidate canonical sources for sortable-dataset capability: - @sentry/api OpenAPI spec (getsentry/sentry-api-schema @ 0.256.0): fetched openapi-derefed.json. - listOrganizationEvents `sort` is a flat query param, doc constraint only "must be in field list". - dataset enum: errors, logs, profile_functions, spans, tracemetrics, uptime_results (no discover). - no capabilities/dataset-meta endpoint anywhere in spec. - Conclusion: no machine-readable source; best achievable deliverable is a documented contract. 2. explore.ts: remove dead `discover` from SORTABLE_DATASETS (unreachable via DATASET_ALIASES); rewrite the doc comment to record the findings and the contract. 3. Verify no test referenced `discover`; run explore unit tests + lint. --> Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
This branch was previously deployed
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.
sentry cli setupnow enables zsh tab completion whether completion has already been initialized by another tool or has never been initialized. Previously, setup could append Sentry's completion directory aftercompinithad scannedfpath, leaving the installed completion unregistered.Re-running setup replaces the legacy Sentry-managed
fpathcommand in place, repairing existing installs while keeping subsequent runs idempotent. Custom configuration is preserved, noninteractive shells skip completion initialization, and uninstall removes the complete managed command.Regression coverage runs setup against fresh, previously initialized, and existing-install configurations, then checks registration and autoloading in real zsh processes. Tests isolate zsh's installed functions from unrelated insecure runner directories, including an explicit insecure-directory fixture, without disabling completion security checks. The CLI CI job installs zsh. Stale Bun comments in the affected setup and shell files now describe the Node implementations.
End-to-end validation of both the production npm bundle and a locally built standalone macOS arm64 binary reproduced broken Tab completion before setup, then verified command and subcommand expansion after setup in fresh terminals. Fresh installs, repeated setup, and native
setup --installbinary placement also passed. Repeated setup left configuration unchanged. These tests built the PR code locally; they did not download or publish a release.Local typecheck, lint, and 147 related tests pass. With UTC and an isolated home, the full workspace run passes all other suites; the CLI reports 10,861 passed tests and 19 skipped tests, with one existing musl-installer fixture still failing because it assumes Linux while running on macOS. That baseline file is unchanged in this PR.