Skip to content

Record failing role and structured detail in judgment.failure - #149

Merged
SushantGautam merged 2 commits into
devfrom
feat/failure-role-attribution
Nov 9, 2026
Merged

SushantGautam merged 2 commits into
devfrom
feat/failure-role-attribution

Conversation

@SushantGautam

Copy link
Copy Markdown
Collaborator

Closes #148.

Failed scenarios now carry judgment.failure: role (target, auditor, judge, system) plus optional kind, http_status, exception, endpoint, model, retryable, turn. The role is set where the exception is raised, so consumers no longer infer it. Companion to SimulaMet/SimpleAuditStudio#85.

  • Strictly additive: error, error_phase, retry behaviour and verdict logic are unchanged. failure is a framework-owned key, so a judge cannot forge it.
  • kind comes from the HTTP status or exception type only; message text is not parsed, so a bare provider-unavailable error stays unknown.
  • SingleTurnAuditor and reframing.rejudge set it too; repeated-scenario reps get it via run_scenario.
  • 26 new tests in tests/test_failure_attribution.py; three tests/snapshots/core/*_error.json snapshots only gain the failure key.
  • Studio's 39 failure-role tests pass against this build.

Not verified: no real provider run (synthetic exceptions only). 11 tracing/OTLP tests fail on unmodified dev in the author's environment (aiohttp missing).

Additive: judgment.failure = {role, kind, message, exception, http_status?,
endpoint?, model?, retryable?, turn?}. Role is set at the call site (auditor,
target, judge; system for crashes outside the three). error, error_phase and
retry/verdict behaviour are unchanged.
Copilot AI balanced review requested due to automatic review settings November 9, 2026 10:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

agent-client-protocol 1.0.0 removed acp.helpers, which inspect-ai 0.3.288
imports, so tests/test_inspect_integration.py failed on a fresh install
(12 tests). With agent-client-protocol 0.12.1 all 23 pass.
@SushantGautam
SushantGautam merged commit 4b61d78 into dev Nov 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record which role failed (target, auditor, judge) with structured detail on failed scenarios

2 participants