Skip to main content

resolve_verdict

Function resolve_verdict 

Source
pub fn resolve_verdict(
    kind: &StageKind,
    exit: Verdict,
    reported: Option<Reported>,
) -> (Verdict, VerdictSource, Option<String>)
Expand description

Resolves a stage’s verdict, source, and reason from its exit-code reading and an optional reported verdict.

Policy: a reported verdict is authoritative and overrides the exit code, because agentic stages (e.g. review) exit 0 regardless of their judgment — the CLI ran; that says nothing about the verdict. build is the one exception: its evidence rule (exit 0 and commits > 0) is fixed and not negotiable by the worker, so a reported verdict is ignored entirely when the stage kind is Build.