MCPcopy Create free account
hub / github.com/base/base / verdict

Method verdict

acceptance/src/cli.rs:362–380  ·  view source on GitHub ↗

Classifies infrastructure ahead of assertions when both occur.

(run: &RunResult)

Source from the content-addressed store, hash-verified

360
361 /// Classifies infrastructure ahead of assertions when both occur.
362 pub fn verdict(run: &RunResult) -> ExitCode {
363 let infrastructure = run.scenarios.iter().any(|scenario| {
364 matches!(scenario.outcome(), Status::Error | Status::Blocked | Status::Cancelled)
365 });
366 if infrastructure {
367 ExitCode::Infrastructure
368 } else if run
369 .scenarios
370 .iter()
371 .flat_map(|scenario| &scenario.checks)
372 .any(|check| check.status == Status::Failed)
373 {
374 ExitCode::Assertion
375 } else if run.passed() {
376 ExitCode::Passed
377 } else {
378 ExitCode::Infrastructure
379 }
380 }
381
382 /// Finds the containing repository root.
383 pub fn resolve_repo(start: Option<&Path>) -> Result<PathBuf> {

Callers

nothing calls this directly

Calls 2

passedMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected