Creates a truthful blocked result after fatal setup failure.
(config: &ScenarioConfig, message: String)
| 322 | |
| 323 | /// Creates a truthful blocked result after fatal setup failure. |
| 324 | pub fn fatal(config: &ScenarioConfig, message: String) -> ScenarioResult { |
| 325 | let checks = config |
| 326 | .checks |
| 327 | .iter() |
| 328 | .map(|check| CheckResult { |
| 329 | id: check.id().into(), |
| 330 | kind: check.kind().into(), |
| 331 | status: Status::Blocked, |
| 332 | duration_ms: 0, |
| 333 | expected: json!({}), |
| 334 | observed: json!({}), |
| 335 | message: "fatal setup error prevented evaluation".into(), |
| 336 | next_step: "inspect setup diagnostic".into(), |
| 337 | samples: 0, |
| 338 | rpc_errors: 0, |
| 339 | evidence: Vec::new(), |
| 340 | }) |
| 341 | .collect(); |
| 342 | ScenarioResult { |
| 343 | id: config.id.clone(), |
| 344 | status: Status::Error, |
| 345 | duration_ms: 0, |
| 346 | config: serde_json::to_value(config).unwrap_or_else(|_| json!({})), |
| 347 | stages: vec![StageResult { |
| 348 | id: "setup".into(), |
| 349 | status: Status::Error, |
| 350 | duration_ms: 0, |
| 351 | message, |
| 352 | }], |
| 353 | checks, |
| 354 | samples: Vec::new(), |
| 355 | forks: Vec::new(), |
| 356 | diagnostics: Vec::new(), |
| 357 | reproduction: String::new(), |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | /// Classifies infrastructure ahead of assertions when both occur. |
| 362 | pub fn verdict(run: &RunResult) -> ExitCode { |