huskies: merge 858

This commit is contained in:
dave
2026-04-29 10:41:32 +00:00
parent be5db846cc
commit 11d111360d
79 changed files with 265 additions and 0 deletions
+6
View File
@@ -3,6 +3,7 @@
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
/// Whether an individual test case passed or failed.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum TestStatus {
@@ -10,6 +11,7 @@ pub enum TestStatus {
Fail,
}
/// The name, status, and optional details for a single test case execution.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TestCaseResult {
pub name: String,
@@ -22,6 +24,7 @@ struct TestRunSummary {
failed: usize,
}
/// The outcome of evaluating whether a story is ready for acceptance.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AcceptanceDecision {
pub can_accept: bool,
@@ -29,12 +32,14 @@ pub struct AcceptanceDecision {
pub warning: Option<String>,
}
/// Collected unit and integration test results recorded for a single story.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct StoryTestResults {
pub unit: Vec<TestCaseResult>,
pub integration: Vec<TestCaseResult>,
}
/// Server-wide in-memory workflow state: test results and coverage reports keyed by story ID.
#[derive(Debug, Clone, Default)]
pub struct WorkflowState {
pub results: HashMap<String, StoryTestResults>,
@@ -42,6 +47,7 @@ pub struct WorkflowState {
}
impl WorkflowState {
/// Record unit and integration test results for a story, rejecting batches with more than one failure.
pub fn record_test_results_validated(
&mut self,
story_id: String,