codetether-agent 4.7.0-a-002.4

A2A-native AI coding agent for the CodeTether ecosystem
Documentation
mod file;
mod shell;
mod step;
#[cfg(test)]
mod tests;
mod url;

use super::types::UserStory;
use anyhow::{Result, anyhow};
use std::path::Path;

pub async fn run_story_verification(root: &Path, story: &UserStory) -> Result<()> {
    let mut failures = Vec::new();
    let client = reqwest::Client::new();
    for (index, item) in story.verification_steps.iter().enumerate() {
        if let Err(error) = step::run(root, item, &client).await {
            failures.push(format!("step {}: {error}", index + 1));
        }
    }
    if failures.is_empty() {
        Ok(())
    } else {
        Err(anyhow!(failures.join("\n")))
    }
}