analyze_issue_with_seer can't replace a completed Seer run

未关闭
#2,273 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
tooling

调研方向

Read packages/mcp-core/src/tools/catalog/analyze-issue-with-seer.ts around L149 (the startAutofix gate), L209-225 (the path that returns an existing terminal run), and the input schema at L83-92 with its Results are cached description at L80. Check the related getsentry/toolkit#1270 runId guard before changing the branch, since the new parameter has to coexist with it and with the fact that starting a run spends Seer credits. Done means a caller can explicitly request a fresh analysis, instruction is honoured or rejected rather than silently dropped, and the tool's existing tests are updated to cover both the reuse and refresh paths.

由索引模型根据 Issue 内容生成。

描述

MCP mcp-feedback-pattern

Pattern: once an issue has a completed Seer run, analyze_issue_with_seer always returns that run. Callers can't start a fresh analysis through MCP, even when the stored root cause is stale (for example, it points at code that has since been fixed and shipped), and the instruction argument is dropped without notice.

Reports: 1 (user feedback, MCP server 0.42.0, analyze_issue_with_seer, impact: blocked)

Current behavior (packages/mcp-core/src/tools/catalog/analyze-issue-with-seer.ts @ 516cad4)

  • L149: the tool calls startAutofix only when there's no previous run or the previous run's status is error.
  • L209-225: any other terminal run (completed, waiting for input) is returned as-is with Found existing analysis (Run ID: …). params.instruction is only passed to startAutofix (L155), so on this path it is silently ignored.
  • The input schema (L83-92) has no way to ask for a new run, and the description says Results are cached - subsequent calls return instantly (L80).

Sentry API (getsentry/sentry@fe43ef0)

  • POST /issues/{id}/autofix/ starts a new run whenever neither run_id nor sentry_run_id is passed (src/sentry/seer/endpoints/group_ai_autofix.py L286-299). An existing completed run doesn't block it.
  • GET /issues/{id}/autofix/ returns the group's latest run (get_autofix_agent_state → fetch_latest_run_state, src/sentry/seer/autofix/autofix_agent.py L558-575). So the gap is on the MCP side only.

Evidence from the report

  • The sampled analyze_issue_with_seer call made GET …/issues/{id}/ and GET …/issues/{id}/autofix/ and no POST. It returned Found existing analysis (Run ID: …) / ## Analysis Complete with the old root cause. That sampled call had no instruction argument; the reporter says an earlier call did pass one. We sample 30% of traces, so that call may not have been recorded.

Reporter's proposal: a force/refresh parameter on analyze_issue_with_seer.

Related: getsentry/toolkit#1270 adds a runId guard on the same code path that stops the tool from starting a new run. Any change here needs to fit with it. Starting a new run spends Seer credits, which is likely why the tool reuses the existing run today.

via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_603ac936cce8aaa570e9b7eae0aa9519.

--

View Session [Sentry]

主要语言
TypeScript
星标
961
派生
179
平均合并
15 小时 33 分钟
30 天内合并 PR
476

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/toolkit 的其他 Issue

查看 getsentry/toolkit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。