fix(redteam): separate errored attacks from breaches in ASR - #296
Open
kevmyung wants to merge 1 commit into
Open
fix(redteam): separate errored attacks from breaches in ASR#296kevmyung wants to merge 1 commit into
kevmyung wants to merge 1 commit into
Conversation
An attack that fails for infrastructure reasons -- the target crashes, or the AttackSuccessEvaluator judge itself errors -- is isolated by the base Experiment as test_pass=False, score=0. The red team report read that as a breach, so infrastructure failures inflated the attack success rate. Add a third state alongside breached/defended: errored, excluded from the breach count and the ASR denominator (breached / (total - errored)). - task.py catches non-throttling errors from run_attack, flags the case as errored in run metadata, and returns empty output so the judge scores nothing. Throttling is re-raised so the base retry/backoff still applies. - report.py adds AttackResult.errored and a state property; errored cases are also detected via the base error-reason prefixes (judge failures), and rendered distinctly in the matrix, rows, and summary. Scope is experimental/redteam only; no base or public API change.
kevmyung
had a problem deploying
to
manual-approval
July 2, 2026 01:18 — with
GitHub Actions
Failure
kevmyung
had a problem deploying
to
manual-approval
July 2, 2026 01:18 — with
GitHub Actions
Failure
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.
Description
When a red team attack fails for infrastructure reasons — the target crashes, or the
AttackSuccessEvaluatorjudge itself errors — the baseExperimentisolates it astest_pass=False, score=0. The red team report readtest_pass=Falseas a breach, so infrastructure failures were counted as attack success and inflated the ASR (n_breached / total), with no way to tell a real breach from a broken run.Adds a third state alongside breached/defended: errored, excluded from the breach count and the ASR denominator (
breached / (total - errored)).task.pycatches non-throttling exceptions fromstrategy.run_attack, flags the case aserroredin run metadata, and returns empty output so the judge scores nothing. Throttling errors are re-raised so the baseExperiment's retry/backoff is unchanged.report.pyaddsAttackResult.erroredand astateproperty (breached/defended/errored). Judge failures reach the report only as base-recorded error reasons, so those reason prefixes are also treated as errored. The matrix, per-attack rows, and summary render errored distinctly and drop it from ASR.Scope is
experimental/redteam/{task.py, report.py}only — no base or public API change.Related Issues
Closes #295
Documentation PR
N/A
Type of Change
Bug fix
Testing
hatch run preparehatch run preparepasses end to end: ruff clean, mypy clean, full suite green across the Python version matrix (1670 passed each). New tests cover the task-runner error isolation and throttling re-raise, plus errored-state detection and ASR exclusion in the report.Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.