Repository navigation
fix(docs-mcp): count empty fallback failures once - #1622
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
betegon
force-pushed
the
fix/docs-mcp-agent-failure-metrics
branch
from
October 23, 2026 12:22
4c74e05 to
282e387
Compare
betegon
marked this pull request as ready for review
October 23, 2026 12:23
betegon
enabled auto-merge (squash)
October 23, 2026 12:23
joshuawayzwright
pushed a commit
to joshuawayzwright/sentry-mcp
that referenced
this pull request
Nov 16, 2026
…#1622) ## Summary A bare target was resolved differently depending on the command and cache state. `sentry issue list acme` and `sentry explore acme` could fail when `acme` was an organization, while a warm cache could make the organization win even when a project had the same slug. Target resolution now has one shared order: 1. exact project match(es) 2. exact organization match 3. fuzzy project recovery 4. not found The slash forms stay explicit: `<org>/` selects the organization and `<org>/<project>` selects that project. Without a slash, a project always wins when a project and organization share the same slug. Commands that support organization scope fall back to the organization only after the project search misses; project-bound commands keep requiring a project and return an actionable error for an organization match. The command layer now chooses an explicit capability helper (`resolveProjectBound*`, `resolveOrgOptional*`, or `resolveOrgOnly*`) instead of implementing project/org lookup itself. This also covers the alert-list `--web` shortcuts and trace/log target paths that previously bypassed the shared list dispatcher. `sentry init` intentionally disables fuzzy recovery and keeps its special true-miss behavior of creating a new project. Issue-ID recovery remains a documented non-target-resolution exception. ## Test plan - [x] `TZ=UTC pnpm run test:unit` — 464 files, 9,963 passed, 14 skipped - [x] `pnpm run lint` - [x] `pnpm exec tsc --noEmit` - [x] Same project and organization slug: project wins - [x] No project and exact organization slug: org-capable commands use the organization - [x] Project-bound commands still reject an organization-only target - [x] Explicit `<org>/` and `<org>/<project>` forms bypass bare-target fallback - [x] Alert `--web`, dashboard, trace/log, replay, feedback, explore, and init paths use their capability policy --------- Co-authored-by: Cursor <[email protected]>
joshuawayzwright
pushed a commit
to joshuawayzwright/sentry-mcp
that referenced
this pull request
Nov 16, 2026
## Summary Follow-up to getsentry#1622. CLI commands should resolve project/org targets through the capability helpers in `resolve-target.ts`; calling `findProjectsBySlug()` or the old miss classifier directly lets command-specific precedence drift. This adds a Biome Grit rule for `src/commands/**` that rejects direct low-level target lookup, including namespace-style calls. `commands/issue/utils.ts` is explicitly excluded because its project lookup is part of issue-ID resolution, not CLI target parsing. The command-layer boundary is also documented in `AGENTS.md` so the diagnostic points contributors to the intended architecture. ## Test plan - [x] `pnpm run lint` - [x] `pnpm exec tsc --noEmit` - [x] Temporary command fixture calling `findProjectsBySlug()` produces the new plugin diagnostic - [x] Existing intentional lookup in `commands/issue/utils.ts` remains accepted Made with [Cursor](https://cursor.com) Co-authored-by: Cursor <[email protected]>
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.
When fallback synthesis also returns empty text, the tailor agent counts one failed invocation twice. Remove the redundant increment and let the existing catch record the failure once, preserving the thrown error and the separate fallback-attempt metric.
Fixes #1620.