Repository navigation
feat(agent-conversation): Filter list by project - #1459
Merged
Merged
Conversation
Support standard organization and project target syntax while preserving project scope across pagination. Fixes TET-2948 Co-Authored-By: GPT-5.6 Sol <[email protected]>
vgrozdanic
marked this pull request as ready for review
October 9, 2026 14:13
7 tasks done
joshuawayzwright
pushed a commit
to joshuawayzwright/sentry-mcp
that referenced
this pull request
Nov 16, 2026
…n-telemetry (getsentry#1459) ## Root Cause Both `queueCompletionTelemetry` and `drainCompletionTelemetry` in `src/lib/db/completion-telemetry.ts` had catch blocks that silently swallowed errors without any logging. Per AGENTS.md, every catch block must either re-throw, log with `log.debug()` or `log.warn()`, or return a fallback value **with** a `log.debug()` call explaining the suppression. ## Reproduction 1. Corrupt or lock the CLI database 2. Run any shell completion (`sentry __complete ...`) 3. The telemetry queue write fails silently — no diagnostic output even with `--verbose` 4. Similarly, `drainCompletionTelemetry` on the next normal CLI run swallows the error ## Fix - Import `logger` and create a tagged logger (`completion-telemetry`) - Add `log.debug()` calls to both catch blocks so failures are visible with `--verbose` - Preserve the best-effort behavior (still catch + return fallback), just surface the error for diagnostics <div><a href="https://cursor.com/agents/bc-6e0fdaa7-73f7-4608-be3a-1498a6cc73bd?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/automations/95624600-485e-4461-829e-6b76f086c473"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/view-automation-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/view-automation-light.png"><img alt="View Automation" width="141" height="28" src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a> </div> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Miguel Betegón <[email protected]>
joshuawayzwright
pushed a commit
to joshuawayzwright/sentry-mcp
that referenced
this pull request
Nov 16, 2026
…n-telemetry (getsentry#1459) ## Root Cause Both `queueCompletionTelemetry` and `drainCompletionTelemetry` in `src/lib/db/completion-telemetry.ts` had catch blocks that silently swallowed errors without any logging. Per AGENTS.md, every catch block must either re-throw, log with `log.debug()` or `log.warn()`, or return a fallback value **with** a `log.debug()` call explaining the suppression. ## Reproduction 1. Corrupt or lock the CLI database 2. Run any shell completion (`sentry __complete ...`) 3. The telemetry queue write fails silently — no diagnostic output even with `--verbose` 4. Similarly, `drainCompletionTelemetry` on the next normal CLI run swallows the error ## Fix - Import `logger` and create a tagged logger (`completion-telemetry`) - Add `log.debug()` calls to both catch blocks so failures are visible with `--verbose` - Preserve the best-effort behavior (still catch + return fallback), just surface the error for diagnostics <div><a href="https://cursor.com/agents/bc-6e0fdaa7-73f7-4608-be3a-1498a6cc73bd?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/automations/95624600-485e-4461-829e-6b76f086c473"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/view-automation-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/view-automation-light.png"><img alt="View Automation" width="141" height="28" src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a> </div> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Miguel Betegón <[email protected]>
joshuawayzwright
pushed a commit
to joshuawayzwright/sentry-mcp
that referenced
this pull request
Nov 16, 2026
…n-telemetry (getsentry#1459) ## Root Cause Both `queueCompletionTelemetry` and `drainCompletionTelemetry` in `src/lib/db/completion-telemetry.ts` had catch blocks that silently swallowed errors without any logging. Per AGENTS.md, every catch block must either re-throw, log with `log.debug()` or `log.warn()`, or return a fallback value **with** a `log.debug()` call explaining the suppression. ## Reproduction 1. Corrupt or lock the CLI database 2. Run any shell completion (`sentry __complete ...`) 3. The telemetry queue write fails silently — no diagnostic output even with `--verbose` 4. Similarly, `drainCompletionTelemetry` on the next normal CLI run swallows the error ## Fix - Import `logger` and create a tagged logger (`completion-telemetry`) - Add `log.debug()` calls to both catch blocks so failures are visible with `--verbose` - Preserve the best-effort behavior (still catch + return fallback), just surface the error for diagnostics <div><a href="https://cursor.com/agents/bc-6e0fdaa7-73f7-4608-be3a-1498a6cc73bd?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/automations/95624600-485e-4461-829e-6b76f086c473"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/view-automation-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/view-automation-light.png"><img alt="View Automation" width="141" height="28" src="https://cursor.com/assets/images/view-automation-dark.png"></picture></a> </div> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Miguel Betegón <[email protected]>
joshuawayzwright
pushed a commit
to joshuawayzwright/sentry-mcp
that referenced
this pull request
Nov 16, 2026
…sentry#1471) ## What Makes error-handling enforcement systemic, per getsentry#1470. The repo already had `check:errors` (`packages/cli/script/check-error-patterns.ts`) wired into CI, but its silent-catch scan was **advisory only** — it warned and never failed. That is exactly how drifts like getsentry#1459 and getsentry#1460 slipped through. ## How Convert the silent-catch scan into an enforcing **ratchet**, following the existing `check-env-coverage.ts` allowlist precedent: - Grandfather the current backlog (169 silent catches across 84 files) into a committed baseline, `script/silent-catch-baseline.json`, keyed by file → count. - A **new** silent catch (a file exceeding its baseline count, or a file not in the baseline at all) now **fails CI**. - Removing silent catches **without** lowering the baseline also fails, so the baseline stays honest and can only ratchet down. - `pnpm run check:errors -- --update` regenerates the baseline after an intentional change. - Refactored the script to export its detectors and baseline logic so they're unit-testable; the standalone CLI behavior is unchanged. - Updated `packages/cli/AGENTS.md` to document the ratchet (replacing the old "advisory / SENTRY_STRICT_SILENT_CATCH" note). ## Tests - New `test/script/check-error-patterns.test.ts`: unit tests for `findSilentCatches`, `findContextErrorNewlines`, `findAdHocTryPatterns`, `countByFile`, and `compareToBaseline` (regression + stale-baseline directions), plus a subprocess test asserting the current tree passes against the committed baseline. - `pnpm run check:errors` passes; `vitest run test/script/check-error-patterns.test.ts` → 17 passing; biome + tsc clean on the changed files. Closes getsentry#1470 <!-- Plan: check:errors already existed and ran in CI (.github/workflows/ci.yml) but silent-catch was advisory (169-item backlog), so new drift was invisible to CI. Fix = ratchet baseline (same pattern as check-env-coverage.ts INTERNAL_ENV_VARS allowlist). Refactored check-error-patterns.ts to export pure detectors (findSilentCatches/findContextErrorNewlines/findAdHocTryPatterns) + scanFiles/countByFile/compareToBaseline; main() gated behind direct-invocation check so tests can import. Baseline committed at script/silent-catch-baseline.json (169 catches / 84 files). --update flag regenerates it. New silent catch OR stale (shrunk) baseline both fail CI. CI check count: ci.yml runs check:errors in the same job as check:deps/check:patches/check:stale-refs. --> 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
…sentry#1471) ## What Makes error-handling enforcement systemic, per getsentry#1470. The repo already had `check:errors` (`packages/cli/script/check-error-patterns.ts`) wired into CI, but its silent-catch scan was **advisory only** — it warned and never failed. That is exactly how drifts like getsentry#1459 and getsentry#1460 slipped through. ## How Convert the silent-catch scan into an enforcing **ratchet**, following the existing `check-env-coverage.ts` allowlist precedent: - Grandfather the current backlog (169 silent catches across 84 files) into a committed baseline, `script/silent-catch-baseline.json`, keyed by file → count. - A **new** silent catch (a file exceeding its baseline count, or a file not in the baseline at all) now **fails CI**. - Removing silent catches **without** lowering the baseline also fails, so the baseline stays honest and can only ratchet down. - `pnpm run check:errors -- --update` regenerates the baseline after an intentional change. - Refactored the script to export its detectors and baseline logic so they're unit-testable; the standalone CLI behavior is unchanged. - Updated `packages/cli/AGENTS.md` to document the ratchet (replacing the old "advisory / SENTRY_STRICT_SILENT_CATCH" note). ## Tests - New `test/script/check-error-patterns.test.ts`: unit tests for `findSilentCatches`, `findContextErrorNewlines`, `findAdHocTryPatterns`, `countByFile`, and `compareToBaseline` (regression + stale-baseline directions), plus a subprocess test asserting the current tree passes against the committed baseline. - `pnpm run check:errors` passes; `vitest run test/script/check-error-patterns.test.ts` → 17 passing; biome + tsc clean on the changed files. Closes getsentry#1470 <!-- Plan: check:errors already existed and ran in CI (.github/workflows/ci.yml) but silent-catch was advisory (169-item backlog), so new drift was invisible to CI. Fix = ratchet baseline (same pattern as check-env-coverage.ts INTERNAL_ENV_VARS allowlist). Refactored check-error-patterns.ts to export pure detectors (findSilentCatches/findContextErrorNewlines/findAdHocTryPatterns) + scanFiles/countByFile/compareToBaseline; main() gated behind direct-invocation check so tests can import. Baseline committed at script/silent-catch-baseline.json (169 catches / 84 files). --update flag regenerates it. New silent catch OR stale (shrunk) baseline both fail CI. CI check count: ci.yml runs check:errors in the same job as check:deps/check:patches/check:stale-refs. --> 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
…sentry#1471) ## What Makes error-handling enforcement systemic, per getsentry#1470. The repo already had `check:errors` (`packages/cli/script/check-error-patterns.ts`) wired into CI, but its silent-catch scan was **advisory only** — it warned and never failed. That is exactly how drifts like getsentry#1459 and getsentry#1460 slipped through. ## How Convert the silent-catch scan into an enforcing **ratchet**, following the existing `check-env-coverage.ts` allowlist precedent: - Grandfather the current backlog (169 silent catches across 84 files) into a committed baseline, `script/silent-catch-baseline.json`, keyed by file → count. - A **new** silent catch (a file exceeding its baseline count, or a file not in the baseline at all) now **fails CI**. - Removing silent catches **without** lowering the baseline also fails, so the baseline stays honest and can only ratchet down. - `pnpm run check:errors -- --update` regenerates the baseline after an intentional change. - Refactored the script to export its detectors and baseline logic so they're unit-testable; the standalone CLI behavior is unchanged. - Updated `packages/cli/AGENTS.md` to document the ratchet (replacing the old "advisory / SENTRY_STRICT_SILENT_CATCH" note). ## Tests - New `test/script/check-error-patterns.test.ts`: unit tests for `findSilentCatches`, `findContextErrorNewlines`, `findAdHocTryPatterns`, `countByFile`, and `compareToBaseline` (regression + stale-baseline directions), plus a subprocess test asserting the current tree passes against the committed baseline. - `pnpm run check:errors` passes; `vitest run test/script/check-error-patterns.test.ts` → 17 passing; biome + tsc clean on the changed files. Closes getsentry#1470 <!-- Plan: check:errors already existed and ran in CI (.github/workflows/ci.yml) but silent-catch was advisory (169-item backlog), so new drift was invisible to CI. Fix = ratchet baseline (same pattern as check-env-coverage.ts INTERNAL_ENV_VARS allowlist). Refactored check-error-patterns.ts to export pure detectors (findSilentCatches/findContextErrorNewlines/findAdHocTryPatterns) + scanFiles/countByFile/compareToBaseline; main() gated behind direct-invocation check so tests can import. Baseline committed at script/silent-catch-baseline.json (169 catches / 84 files). --update flag regenerates it. New silent catch OR stale (shrunk) baseline both fail CI. CI check count: ci.yml runs check:errors in the same job as check:deps/check:patches/check:stale-refs. --> Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
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.
Conversation listing now supports project-scoped targets through standard CLI positional syntax. Users can list all projects in an organization with
<org>/, select one with<org>/<project>, or find a project by bare slug. Pagination keeps selected scope, while no-target organization autodetection remains unchanged.Port of getsentry/cli#1663 after CLI moved into Toolkit.
Fixes TET-2948