Skip to main content
ApprovalResult is the full audit-ready record returned by every gate evaluation. It contains the final verdict, risk assessment, challenge result (if applicable), review timing, and audit metadata. ChallengeResult is a nested dataclass that captures the outcome of a specific verification challenge.

ApprovalResult

Import

Fields

Usage

Accessing via AttestaDenied

When a gated function is denied, the AttestaDenied exception carries the full ApprovalResult:
Python

ChallengeResult

Captures the outcome of a single verification challenge. This is None in the ApprovalResult when the action was auto-approved.

Import

Fields

Challenge-Specific Details

The details dict contains different keys depending on the challenge type: Confirm challenge:
Quiz challenge:
Teach-back challenge:
Multi-party challenge:

Example: Inspecting a Challenge Result

The challenge_result is None when the risk level is LOW and the default challenge map routes to auto_approve. In this case, result.verdict is APPROVED and no human interaction occurred.

AttestaDenied Exception

Raised by the @gate decorator when a gated function call is denied, timed out, or escalated.

Import

Constructor

Properties

Always check e.result is not None before accessing result fields. The result may be None if the exception was raised before the evaluation completed (e.g., during context construction).