Repository navigation
perf(guardian): Drop assistant text, tool results, and repeated messages from evidence - #3331
Draft
sentry-junior[bot] wants to merge 3 commits into
Draft
sentry-junior[bot] wants to merge 3 commits into
sentry-junior[bot] wants to merge 3 commits into
Conversation
…ges from evidence Guardian now reads each earlier tool call with its input and only a marker that its result returned. Assistant text is left out, and user messages that the author-labeled root section shows are not repeated in the evidence. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
11 screenshot changes — 11 changed · 0 added · 0 removed Review screenshots in Frameshift |
sentry-junior
Bot
force-pushed
the
guardian/compact-evidence
branch
from
November 13, 2026 05:06
650cdee to
040c1f0
Compare
Without result bodies, Guardian cannot see that tests passed or what an investigation found. A condition on the outcome of the agent's own work is the agent's to check, as the policy already says for other checks. A Watch run answers an event's question where it was asked, as the runtime tells the agent to. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
guardian/compact-evidence
branch
from
November 13, 2026 05:07
040c1f0 to
baa4a7f
Compare
Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each Guardian review reads the run evidence and the author-labeled thread. The evidence repeated the thread and carried the bulky parts of the run. This cuts it down to what Guardian uses to judge the action.
What Guardian reads now
assistant:linesNot shown.marker that keeps the result's place in the orderRUN_RULESand the evidence line in the policy now say this. Dedupe happens when the prompt is rendered (guardianPrompt), so the evals go through it too. It matches on the message text after line-break normalization. A message that the two sides truncate differently is not deduped. It is sent twice, as it was before.data_exposureandSCRIPT_RULESjudge the data in the proposed input and the earlier calls' inputs and status. Neither needs result bodies. A read of a private source followed by a public write still shows up as two calls in order.Policy changes
withheld_step: a condition on the agent's own work, such as tests that pass, is the agent's to check.Size on the guardian eval fixtures (105 cases)
The fixtures already shorten tool output and assistant messages, so these numbers understate the savings in production.
The eval helper still records a full transcript for each case. It builds the thread section from the transcript, then projects the evidence the way core builds it. No case input or expected decision changed.
Prior art
buildToolActionEvidence.Not changed
RUN_RULESalready come before the random section key. OnlySCRIPT_RULEScomes after it. Keeping the key the same for a whole run would weaken the section, so I left it alone.Open decision
Guardian no longer sees result bodies, so it can't see where some data came from, such as the number of a PR that the agent created. Should we accept that? If not, the fallback is to show a short head of each result.
via @dcramer.
--
View Session [Sentry]