Skip to content

fix(prompt): Say that replies are not top-level channel posts - #2350

Merged
dcramer merged 3 commits into
mainfrom
fix/top-level-post-delivery-rule
Oct 29, 2026
Merged

dcramer merged 3 commits into
mainfrom
fix/top-level-post-delivery-rule

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

The integration eval conversation/delivery.eval.ts > "when asked for a top-level channel post, explain the limitation instead" fails on main since #2315. This change fixes the Slack delivery rule in prompt.ts that the eval checks.

Why it fails

#2315 merged the two Slack delivery rules into one line. The merged line ties the explanation to tool calls ("explain the limitation instead of calling a tool"). It also says that assistant text goes to the current conversation. For post this to the channel: deploy is unblocked, a plain reply with the text calls no tool and lands in the current conversation, so it looked allowed. Both live samples on #2317 replied only deploy is unblocked.

Before #2315, every recorded live sample passed, and each reply used the old wording: "I can't create a new top-level channel post…".

Is the eval correct?

Yes. The mention is a top-level channel message. Junior can only reply in the thread under it, so a reply with only the requested text is wrong. The rubric follows the product rule, and the eval file has not changed since Oct 8.

Change

The delivery rule stays one line, so the #2315 cleanup holds. It now:

  • states the fact: a reply is not a channel post, and Junior cannot create a new top-level channel post
  • says what to do for any "post to a channel or anywhere else" request: explain the limitation, call no tool, and do not reply with only the requested text or present it as delivered

This PR also removes tests/unit/prompt.test.ts. It only checked that the prompt output contains static strings. Evals own prompt behavior.

Verification

  • tsc --noEmit passes for @sentry/junior.
  • I could not run evals live locally (no AI Gateway or Roach credentials). The integration eval workflow does not watch packages/junior/src/**, so this PR has the trigger-evals-integration label. The prompt change makes every model request new, so the whole integration suite runs live. That gives a real comparison against the failures on feat(images): Generate images with GPT Image through the AI SDK #2317.

Open question

Integration and behavioral evals do not run for packages/junior/src/** changes, and no eval suite runs on main. That gap let #2315 merge without this eval. It is out of scope here.

via David Cramer.

--

View Junior Session [Sentry]

#2315 merged the two Slack delivery rules into one line. The merged line
tied the explanation to tool calls, so a plain reply that repeats the
requested text looked allowed. The delivery integration eval for a
top-level post request then failed in both live samples.

State the fact that a reply is not a channel post, and say that the
agent must not reply with only the requested text.

Co-Authored-By: David Cramer <david@sentry.io>
@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 29, 2026 2:29pm UTC

Request Review

These tests only checked that the prompt builder output contains static
strings. Evals own prompt behavior.

Co-Authored-By: David Cramer <david@sentry.io>
@dcramer
dcramer marked this pull request as ready for review October 29, 2026 14:22
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 29, 2026
@sentry-evals

sentry-evals Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Sentry Evals

junior-integration

Run Status Passed Failed Errored Cost Tokens Duration
Head Error 101 0 1 $0.64 0 1,465.74s

Base commit cf84668 has no eval run to compare against.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d9ecc3a. Configure here.

Comment thread packages/junior/src/chat/prompt.ts Resolved
The rule now covers only requests to post right now. Scheduled
automations can still post to the active channel later.
@dcramer
dcramer merged commit c497baf into main Oct 29, 2026
47 of 49 checks passed
@dcramer
dcramer deleted the fix/top-level-post-delivery-rule branch October 29, 2026 15:14

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 1ecd3791 Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant