Skip to main content
Version: 0.6.0

Policy Evaluations

A Policy Evaluation records the outcome of Sentinel or OPA policy checks executed during an agent-mode run. Each evaluation contains result counts and links to individual policy set outcomes.

info

Policy evaluations are the agent-mode policy path. For legacy Sentinel checks, see policyChecks on the Run type. Both can exist on the same run — treat them as separate metric families.

Available Queries

QueryDescription
policyEvaluations(taskStageId: ID!, filter: PolicyEvaluationFilter)List evaluations for a task stage

Example

query PolicyResults($taskStageId: ID!) {
policyEvaluations(taskStageId: $taskStageId) {
id
status
policyKind
resultCount {
passed
advisoryFailed
mandatoryFailed
errored
}
statusTimestamps {
queuedAt
runningAt
passedAt
erroredAt
}
policySetOutcomes {
policySetName
overridable
resultCount {
passed
mandatoryFailed
advisoryFailed
errored
}
}
}
}

Fields

FieldTypeDescription
idID!Evaluation identifier
statusString!Overall status (passed, failed, errored)
policyKindString!Policy framework (sentinel or opa)
resultCountPolicyEvaluationResultCount!Aggregate pass/fail counts
statusTimestampsPolicyEvaluationStatusTimestamps!Timestamps for status transitions
createdAtDateTime!When the evaluation started
updatedAtDateTime!When the evaluation last changed
policyAttachableIdIDID of the attachable resource
policySetOutcomes[PolicySetOutcome!]!Per-policy-set breakdown

PolicySetOutcome

FieldTypeDescription
idID!Outcome identifier
policySetNameString!Name of the policy set
policySetDescriptionStringDescription of the policy set
overridableBoolean!Whether failures can be overridden
errorStringError message, if any
resultCountPolicySetOutcomeResultCount!Pass/fail breakdown for this set

Filter Fields

FieldComparison Type
idStringComparisonExp
statusStringComparisonExp
policyKindStringComparisonExp
createdAtDateTimeComparisonExp
updatedAtDateTimeComparisonExp
policyAttachableIdStringComparisonExp
  • Runs — The run that triggered this evaluation
  • Policy Sets — Policy sets that were evaluated