link_issue passes through a misleading 404 when an integration token lists Sentry App installations
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- api, authentication
调研方向
从 packages/mcp-core/src/tools/support/issue-linking/app.ts 开始,重点查看第 311–315 行附近的 linkAppIssue,并追踪它如何处理 listSentryAppInstallations 返回的错误。该 issue 描述了将列表查询的 404 转换为 UserInputError,并说明需要 member-token 或 OAuth。完成的标准是 integration-token 情况下返回清晰的指引,而不是原始 404。
由索引模型根据 Issue 内容生成。
描述
Problem
An agent tried to link a Sentry issue to a Linear issue with link_issue three times, using numeric, short-ID and issue-URL forms. Each call failed with HTTP 404: "Could not find requested organization." Reading the same issue with get_issue_details worked, so the agent couldn't tell what was wrong and kept changing the issue reference (MCP-SERVER-GQW, kind=broken, impact=worked_around, server 0.42.0).
The org exists. The token isn't a member's token. Sentry only lists Sentry App installations for organization members, and link_issue needs that list to find the App's installation UUID.
Evidence
Failing call on 2026-11-16 at 16:02:44 UTC, trace 1ef233a8b788497097715d0d140d0143. There's no mcp.session.id or client.id.
- The MCP
http.serverspan hasapp.access.method=sentry_access(directSentry-Bearertoken) and nouser.id. GET /organizations/{org}/issues/{shortId}/returned 200. On the region side,GroupDetailsEndpointmade theapp.find_installation_by_proxy_userRPC, which Sentry only runs for Sentry App proxy users (src/sentry/auth/access.py:1185,_from_rpc_sentry_appat:1374-1382). So the token is an integration (Sentry App) token.GET https://sentry.io/api/0/organizations/{org}/sentry-app-installations/?per_page=100returned 404 (span858fccc96f0fe1d3). The control-silo span stops right afterorganization.get_access_context_by_slugand never reachescheck_object_permissions.- Sentry at
e495a739f:SentryAppInstallationsBaseEndpoint.convert_args(src/sentry/sentry_apps/api/bases/sentryapps.py:416-422) raisesCould not find requested organizationwhencontext.member is Nonefor a non-superuser with auser_id. A proxy user is never a member. - Toolkit at
ca04710:linkAppIssue(packages/mcp-core/src/tools/support/issue-linking/app.ts:311-315) awaitslistSentryAppInstallationsin aPromise.alland lets the raw 404 through. - This isn't one user. In the last 14 days, sampled spans show 30 404s on this listing call. All 12 traces I checked were
sentry_accesssessions without auser.id.
Existing work
- getsentry/sentry#128739 reports the same 404 for internal integration tokens. Draft getsentry/sentry#129878 lets internal integrations list their own org's installations and returns 403 for published-App tokens.
- Inference from code, not tested: even with getsentry/sentry#129878, the link
POST /sentry-app-installations/{uuid}/external-issue-actions/checksis_acting_user(request.user, installation.sentry_app.proxy_user_id)for App callers (sentryapps.py:466-468). An internal integration's token would still be refused for the Linear installation. So the MCP should keep a clear error either way. - Not covered by toolkit#2136 (App not installed) or toolkit#1954 (409 URL guard).
Fix
Draft PR to follow: turn the 404 on the installation listing into a UserInputError that says Sentry only lists installations for org members, so integration tokens get this 404, and that linking App issues needs a user token or OAuth sign-in.
Reports
- MCP-SERVER-GQW (2026-11-16)
Report count: 1
via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_6b056fcf1c2c5c748f43774a62ac1591.
--
- 主要语言
- TypeScript
- 星标
- 975
- 派生
- 189
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 571
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/toolkit 的其他 Issue
-
Rejected regionUrl errors don't say how to recover when an agent passes the organization's web URL未关闭mcp-feedback-pattern
难度 2/5 1-3 小时 新手友好度 84/100
getsentry/toolkit#2777 · 1 条评论 ·
维护者通常 1 天内回复
-
mcp-feedback-pattern
难度 2/5 1-3 小时 新手友好度 74/100
getsentry/toolkit#2458 · 4 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
getsentry/toolkit#2444 · 1 条评论 ·
维护者通常 1 天内回复
-
mcp-feedback-pattern
难度 2/5 1-3 小时 新手友好度 67/100
getsentry/toolkit#2362 · 1 条评论 ·
维护者通常 1 天内回复
-
mcp-feedback-pattern
难度 2/5 1-3 小时 新手友好度 75/100
getsentry/toolkit#2315 · 1 条评论 ·
维护者通常 1 天内回复
查看 getsentry/toolkit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
area:vscode bug has repro platform:macos platform:vscode regression
难度 2/5 1-3 小时 新手友好度 70/100
anthropics/claude-code#113502 ·
-
check:passed streams:add
难度 1/5 1 小时以内 新手友好度 77/100
维护者通常 1 天内回复
-
effort/l priority/p1 risk/high triage/core
难度 2/5 1-3 小时 新手友好度 76/100
iflytek/skillhub#1188 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement needs-triage
难度 2/5 1-3 小时 新手友好度 74/100
Fission-AI/OpenSpec#2337 ·
维护者通常 1 天内回复