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, theAttestaDenied exception carries the full ApprovalResult:
Python
ChallengeResult
Captures the outcome of a single verification challenge. This isNone in the ApprovalResult when the action was auto-approved.
Import
Fields
Challenge-Specific Details
Thedetails dict contains different keys depending on the challenge type:
Confirm 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.