Skip to content

docs(cli): Document conversation query filters - #1460

Merged
vgrozdanic merged 1 commit into
mainfrom
docs/TET-2955-conversation-query-examples
Oct 9, 2026
Merged

vgrozdanic merged 1 commit into
mainfrom
docs/TET-2955-conversation-query-examples

Conversation

@vgrozdanic

Copy link
Copy Markdown
Member

Agent conversation query docs now show supported filters for errors, agent names, aggregate tool-call counts, and tool names. They also clarify that any matching span selects its conversation while totals cover all spans within selected project and time range.

Fixes TET-2955

Document supported agent, tool, error, and aggregate filters and clarify that totals use the selected project and time scope.

Fixes TET-2955

Co-authored-by: GPT-5.6 Sol <[email protected]>
@linear-code

linear-code Bot commented Oct 9, 2026

Copy link
Copy Markdown

TET-2955

@vgrozdanic
vgrozdanic marked this pull request as ready for review October 9, 2026 14:28
@github-actions github-actions Bot added the risk: low PR risk score: low label Oct 9, 2026
@vgrozdanic
vgrozdanic merged commit 1d53ad8 into main Oct 9, 2026
24 checks passed
@vgrozdanic
vgrozdanic deleted the docs/TET-2955-conversation-query-examples branch October 9, 2026 16:06
joshuawayzwright pushed a commit to joshuawayzwright/sentry-mcp that referenced this pull request Nov 16, 2026
…tsentry#1460)

## Root Cause

`promptAndStartTrial` in `src/lib/seer-trial.ts` had two catch blocks
that silently discarded error objects:

1. **Trial availability check** (line 80): `catch { return false; }` —
silently swallowed errors from `getProductTrials()` API call
2. **Trial start** (line 118): `catch { log.warn(...) }` — showed
user-facing warning but discarded the actual error object

Per AGENTS.md, every catch block must surface the error for diagnostic
visibility. When the API call fails due to network issues, auth
problems, or unexpected responses, there was no diagnostic output even
with `--verbose`.

## Reproduction

1. Run `sentry issue explain` with a Seer-eligible error and network
issues
2. The trial prompt check fails silently with no error details
3. Even with `--verbose`, no diagnostic information about the failure is
logged

## Fix

- Add `log.debug()` calls to both catch blocks so the underlying error
(network failure, auth issue, unexpected response) is visible with
`--verbose`
- Preserve the graceful degradation behavior (still catch + return false
or show user-facing warning)
- Update the test mock to include the `debug` method

<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>&nbsp;<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>&nbsp;</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
…tsentry#1460)

## Root Cause

`promptAndStartTrial` in `src/lib/seer-trial.ts` had two catch blocks
that silently discarded error objects:

1. **Trial availability check** (line 80): `catch { return false; }` —
silently swallowed errors from `getProductTrials()` API call
2. **Trial start** (line 118): `catch { log.warn(...) }` — showed
user-facing warning but discarded the actual error object

Per AGENTS.md, every catch block must surface the error for diagnostic
visibility. When the API call fails due to network issues, auth
problems, or unexpected responses, there was no diagnostic output even
with `--verbose`.

## Reproduction

1. Run `sentry issue explain` with a Seer-eligible error and network
issues
2. The trial prompt check fails silently with no error details
3. Even with `--verbose`, no diagnostic information about the failure is
logged

## Fix

- Add `log.debug()` calls to both catch blocks so the underlying error
(network failure, auth issue, unexpected response) is visible with
`--verbose`
- Preserve the graceful degradation behavior (still catch + return false
or show user-facing warning)
- Update the test mock to include the `debug` method

<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>&nbsp;<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>&nbsp;</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
…tsentry#1460)

## Root Cause

`promptAndStartTrial` in `src/lib/seer-trial.ts` had two catch blocks
that silently discarded error objects:

1. **Trial availability check** (line 80): `catch { return false; }` —
silently swallowed errors from `getProductTrials()` API call
2. **Trial start** (line 118): `catch { log.warn(...) }` — showed
user-facing warning but discarded the actual error object

Per AGENTS.md, every catch block must surface the error for diagnostic
visibility. When the API call fails due to network issues, auth
problems, or unexpected responses, there was no diagnostic output even
with `--verbose`.

## Reproduction

1. Run `sentry issue explain` with a Seer-eligible error and network
issues
2. The trial prompt check fails silently with no error details
3. Even with `--verbose`, no diagnostic information about the failure is
logged

## Fix

- Add `log.debug()` calls to both catch blocks so the underlying error
(network failure, auth issue, unexpected response) is visible with
`--verbose`
- Preserve the graceful degradation behavior (still catch + return false
or show user-facing warning)
- Update the test mock to include the `debug` method

<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>&nbsp;<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>&nbsp;</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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant