Skip to content

fix(evals): Record automation fixture channels as public - #2449

Merged
dcramer merged 2 commits into
mainfrom
fix/finish-automation-run-eval-result
Oct 30, 2026
Merged

dcramer merged 2 commits into
mainfrom
fix/finish-automation-run-eval-result

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Since #2440 (15ee5c130), an automation run no longer writes its saved visibility to the Destination row. Only a live Slack signal does. A run into a channel with no row stores unknown, and readers treat it as private.

In production, the Slack thread where a person created the Automation records the channel. The eval fixture inserted Automations without that thread, so their channels stayed unknown. The fixture reads results as WEB_VIEWER_EMAIL, who is not a participant. So readConversationAccessFromSql returned canViewPrivateContent: false, and the reporting API hid tool payloads for every scheduled and event automation run. Tool calls came back with no input and no output (result null [4B] on every tool). finishAutomationRun results and tool arguments were empty. This broke these cases on unrelated branches (#2435, #2442, fix/flaky-behavioral-evals, chore/remove-slash-command):

  • Integration: Event automation delivery (no-match silence ×2, blocked automation) and Scheduled Delivery (no message outcome)
  • Behavioral: Scheduled Delivery (post in this channel, provider that Junior does not have) and Sentry Skill Workflows (creator-bound scheduled Sentry work)

There is no product change. Fail-closed unknown is intended (#2440). Automations are created from a live Slack turn in their channel, so production channels have a known visibility.

Fix

packages/junior-evals/src/fixture/insert.ts: insertScheduledAutomation and insertEventAutomation now store the creation thread through the Conversation store with visibility: "public", as the live Slack event would. No assertions, cases, or timeouts change.

Checks

  • pnpm lint, pnpm typecheck, pnpm --filter @sentry/junior-evals test pass.
  • A throwaway harness check (not committed) used the real insert functions. A dispatch-shaped write into a bare slackChannel() was redacted (unknown). Channels from either insert function were readable (public).
  • The 7 affected eval cases did not run locally: the sandbox has no cloudflared for eval egress. CI must confirm them.

via David Cramer.

--

View Session [Sentry]

Since #2440 (15ee5c1), an automation run no longer writes the
visibility saved on its Automation to the Destination row. Only a live
Slack signal does. A run into a channel with no row stores `unknown`,
and readers treat it as private.

In production, the Slack thread where a person created the Automation
records the channel. The eval fixture inserts Automations without that
thread, so their channels stayed `unknown`. The fixture reads results
as a viewer who is not a participant, so the reporting API redacted the
run Conversations. Each tool call came back with no input and no
output. Evals that read `finishAutomationRun` results or tool
arguments of scheduled or event automation runs then failed.

`insertScheduledAutomation` and `insertEventAutomation` now store the
creation thread through the Conversation store with public visibility,
as the live Slack event would.
The Conversation store defaults the activity time, so the helper does
not need a time argument. Describe the shared setup timestamp for both
of its uses.
@vercel

vercel Bot commented Oct 30, 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 30, 2026 6:44pm UTC

Request Review

@sentry-evals

sentry-evals Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Sentry Evals

junior-behavioral

Run Status Passed Failed Errored Cost Tokens Duration
Head Error 79 2 1 $0.76 0 504.78s

Base commit c122def has no eval run to compare against.

junior-integration

Run Status Passed Failed Errored Cost Tokens Duration
Head Passed 103 0 0 $0.62 0 291.02s

Base commit c122def has no eval run to compare against.

@dcramer
dcramer merged commit d34885a into main Oct 30, 2026
46 of 57 checks passed
@dcramer
dcramer deleted the fix/finish-automation-run-eval-result branch October 30, 2026 19:08
dcramer added a commit that referenced this pull request Oct 30, 2026
…r mention (#2435)

An Automation runs later without the conversation that created it. Words
such as "this channel" or "here" mean nothing then. Before this change,
the tools told the agent to rewrite "me" as the creator's Slack mention
in the saved instruction. Now the agent calls the creator "the
Automation creator". The run-time `Created by:` line says who that is
and where to write the mention.

Refs #2362

**Run-time creator line** (`chat/task-input.ts`)

```text
Created by: <@u123>. This person is the Automation creator. "The Automation creator", "me", and "my" in the instructions mean this person. Where the instructions refer to this person, write this mention in the message. If they do not, do not mention this person.
```

- "Me" and "my" stay a normal run-time meaning, because people can save
"remind me" in the dashboard editor.
- The line says where to write the mention. A line that only says who
"me" is (#2052), or "write this mention for them", made the model drop
the mention in live evals.
- The #2052 rule stays: if the instructions do not refer to the creator,
the reply does not mention them.
- The mention still comes from `createdBy.slackUserId`. The create tools
require that it is the creator identity's Slack user in the same
workspace.

**Tool description** (`chat/automations/edit-schema.ts`)

The shared instruction description for the scheduled and event create
and update tools now says:

- The run does not see this conversation, so words like "this channel"
or "here" will mean nothing then. Write the exact target instead, such
as a channel mention or a link.
- Call the person who created the Automation "the Automation creator",
not "me". Each run knows who that is.
- Name every other person with their Slack mention, including a
requester who did not create the Automation.

The full term "the Automation creator" keeps "issue creator" or "PR
creator" from matching. A requester who did not create the Automation is
covered by this guidance and an eval, not by a fixed keyword check.

**Evals** (integration)

- Scheduler creation: "remind me in this channel to submit my timesheet"
saves "Automation creator", without "me", "my", or "this channel".
- Scheduler delivery: "Remind me to do healthchecks." and "Remind the
Automation creator to do healthchecks." both deliver `<@u0test>`.
- Scheduler management: a requester who did not create the reminder asks
to be reminded too. The update saves `<@u0test>`, without "me", "my", or
"Automation creator".

**Live results on c570f89** (integration run 41101189024, merged with
main 15ee5c1)

- All of the cases above pass, and all 6 OAuth cases pass.
- 4 other cases fail: the two event-automation "post nothing" cases,
"block it and tell only its creator", and scheduler "no message
outcome". Each one reads the `finishAutomationRun` result, which was
null in the eval session for dispatch runs. They failed the same way on
other PRs against the same main, and #2449 fixes the fixture. These
failures do not come from this PR.

**Not in this PR**

- `renderCurrentInstruction` (`chat/current-instruction.ts`) XML-escapes
the task text, so the model sees `&lt;@u0test&gt;`. This can also make
the model drop a mention. It applies to every current instruction, so it
needs its own change.
- Moving the creator consumers (credentials, DMs, creator checks,
display) from the `createdBy` copy to `creatorIdentityId` is a separate
hard cutover.

<!-- junior-request-attribution:start -->
via **David Cramer**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A13810b1c5e3e841f9cae2bd2d5d58933 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A13810b1c5e3e841f9cae2bd2d5d58933)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A13810b1c5e3e841f9cae2bd2d5d58933/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: David Cramer <david@sentry.io>

This branch was successfully deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant