[[NO_REPLY]] marker leaks into Slack replies

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

从 packages/junior/src/chat/no-reply.ts 开始,然后通过 packages/junior/src/chat/services/assistant-reply.ts 和 packages/junior/src/chat/services/turn-result.ts 追踪混合标记的处理。为仅包含标记的回复以及标记与文本混合的回复添加或更新覆盖率,并验证 Slack 接收到的是不含保留标记的文本,同时完全仅由该标记组成的消息仍会被抑制。

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

描述

When a terminal assistant message mixes normal prose with [[NO_REPLY]], Junior posts the full text to Slack, including the reserved marker.

Observed in production: a task turn that intended silence ended with prose plus a trailing [[NO_REPLY]], and Slack received that combined message. Session: https://junior-prod.sentry.dev/conversations/slack%3AC0BSRCZ1F9T%3A1788188446.835629

Verified behavior

  • Prompt/task contract: intentional silence requires the final message to be exactly [[NO_REPLY]].
  • isNoReplyMarker() only matches whole-message equality (packages/junior/src/chat/no-reply.ts).
  • After #1714, decideReply() suppresses only exact marker-only text and delivers any mixed marker+prose unchanged (packages/junior/src/chat/services/assistant-reply.ts).
  • buildTurnResult() logs ai.no_reply_marker.mixed_text for mixed cases but still returns deliverable text that retains the marker (packages/junior/src/chat/services/turn-result.ts).
  • no-reply.ts comments that containsNoReplyMarker exists to detect leaks "before publication strips or rejects them," but delivery does not strip.
  • PR #1714 description said mixed text would strip the marker and post the rest; current code and tests deliver the marker inline.

Evidence

  • Thread example above (assistant reply ended with visible [[NO_REPLY]]).
  • Repeated production warnings: ai.no_reply_marker.mixed_text on project sentry/junior (for example around 2026-08-31T15:03Z–15:08Z, including traces such as ff5484791527491f82bba63e031e6c83).

Related

  • #1714 changed mixed mentions from silence to delivery.
  • #1030 is a different no-reply terminalization bug (timeout resume).

Reported by Matt Quinn.

Requested by Matt Quinn.

--

View Junior Session [Sentry]

主要语言
TypeScript
星标
397
派生
43
平均合并
8 小时 28 分钟
30 天内合并 PR
764

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

getsentry/junior 的其他 Issue

查看 getsentry/junior 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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