huskies: merge 865
This commit is contained in:
@@ -59,7 +59,7 @@ pub(super) async fn tool_approve_qa(args: &Value, ctx: &AppContext) -> Result<St
|
||||
.join(".huskies/work/3_qa")
|
||||
.join(format!("{story_id}.md"));
|
||||
if qa_path.exists() {
|
||||
let _ = crate::io::story_metadata::clear_front_matter_field(&qa_path, "review_hold");
|
||||
let _ = crate::db::yaml_legacy::clear_front_matter_field(&qa_path, "review_hold");
|
||||
}
|
||||
|
||||
if is_spike(story_id) {
|
||||
@@ -142,7 +142,7 @@ pub(super) async fn tool_reject_qa(args: &Value, ctx: &AppContext) -> Result<Str
|
||||
.join(format!("{story_id}.md"));
|
||||
let agent_name = if story_path.exists() {
|
||||
let contents = std::fs::read_to_string(&story_path).unwrap_or_default();
|
||||
crate::io::story_metadata::parse_front_matter(&contents)
|
||||
crate::db::yaml_legacy::parse_front_matter(&contents)
|
||||
.ok()
|
||||
.and_then(|meta| meta.agent)
|
||||
} else {
|
||||
|
||||
@@ -176,7 +176,7 @@ pub(super) async fn tool_status(args: &Value, ctx: &AppContext) -> Result<String
|
||||
|
||||
// --- Front matter ---
|
||||
let mut front_matter = serde_json::Map::new();
|
||||
if let Ok(meta) = crate::io::story_metadata::parse_front_matter(&contents) {
|
||||
if let Ok(meta) = crate::db::yaml_legacy::parse_front_matter(&contents) {
|
||||
if let Some(name) = &meta.name {
|
||||
front_matter.insert("name".to_string(), json!(name));
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
use crate::agents::{
|
||||
close_bug_to_archive, feature_branch_has_unmerged_changes, move_story_to_done,
|
||||
};
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use crate::http::context::AppContext;
|
||||
use crate::http::workflow::{
|
||||
add_criterion_to_file, check_criterion_in_file, create_bug_file, create_refactor_file,
|
||||
@@ -13,7 +14,7 @@ use crate::http::workflow::{
|
||||
update_story_in_file, validate_story_dirs,
|
||||
};
|
||||
use crate::io::story_metadata::{
|
||||
check_archived_deps, check_archived_deps_from_list, parse_front_matter, parse_unchecked_todos,
|
||||
check_archived_deps, check_archived_deps_from_list, parse_unchecked_todos,
|
||||
};
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
use crate::agents::{
|
||||
close_bug_to_archive, feature_branch_has_unmerged_changes, move_story_to_done,
|
||||
};
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use crate::http::context::AppContext;
|
||||
use crate::http::workflow::{
|
||||
add_criterion_to_file, check_criterion_in_file, create_bug_file, create_refactor_file,
|
||||
@@ -13,7 +14,7 @@ use crate::http::workflow::{
|
||||
update_story_in_file, validate_story_dirs,
|
||||
};
|
||||
use crate::io::story_metadata::{
|
||||
check_archived_deps, check_archived_deps_from_list, parse_front_matter, parse_unchecked_todos,
|
||||
check_archived_deps, check_archived_deps_from_list, parse_unchecked_todos,
|
||||
};
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
//! and refactors. They are not pipeline-driven but provide authoritative context
|
||||
//! injected into agent prompts for all member work items.
|
||||
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use crate::http::context::AppContext;
|
||||
use crate::http::workflow::create_epic_file;
|
||||
use crate::io::story_metadata::parse_front_matter;
|
||||
use serde_json::{Value, json};
|
||||
|
||||
/// Create a new epic and store it in the CRDT items list.
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
use crate::agents::{
|
||||
close_bug_to_archive, feature_branch_has_unmerged_changes, move_story_to_done,
|
||||
};
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use crate::http::context::AppContext;
|
||||
use crate::http::workflow::{
|
||||
add_criterion_to_file, check_criterion_in_file, create_bug_file, create_refactor_file,
|
||||
@@ -13,7 +14,7 @@ use crate::http::workflow::{
|
||||
update_story_in_file, validate_story_dirs,
|
||||
};
|
||||
use crate::io::story_metadata::{
|
||||
check_archived_deps, check_archived_deps_from_list, parse_front_matter, parse_unchecked_todos,
|
||||
check_archived_deps, check_archived_deps_from_list, parse_unchecked_todos,
|
||||
};
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
use crate::agents::{
|
||||
close_bug_to_archive, feature_branch_has_unmerged_changes, move_story_to_done,
|
||||
};
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use crate::http::context::AppContext;
|
||||
use crate::http::workflow::{
|
||||
add_criterion_to_file, check_criterion_in_file, create_bug_file, create_refactor_file,
|
||||
@@ -13,7 +14,7 @@ use crate::http::workflow::{
|
||||
update_story_in_file, validate_story_dirs,
|
||||
};
|
||||
use crate::io::story_metadata::{
|
||||
check_archived_deps, check_archived_deps_from_list, parse_front_matter, parse_unchecked_todos,
|
||||
check_archived_deps, check_archived_deps_from_list, parse_unchecked_todos,
|
||||
};
|
||||
use crate::service::story::parse_test_cases;
|
||||
use crate::slog_warn;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Bug-item creation and listing operations.
|
||||
|
||||
use crate::io::story_metadata::parse_front_matter;
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use std::path::Path;
|
||||
|
||||
use super::super::{next_item_number, slugify_name, write_story_content};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Refactor-item creation and listing operations.
|
||||
|
||||
use crate::io::story_metadata::parse_front_matter;
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use std::path::Path;
|
||||
|
||||
use super::super::{next_item_number, slugify_name, write_story_content};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use super::bug::{create_bug_file, extract_bug_name_from_content, list_bug_files};
|
||||
use super::refactor::{create_refactor_file, list_refactor_files};
|
||||
use super::spike::create_spike_file;
|
||||
use crate::io::story_metadata::parse_front_matter;
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use std::fs;
|
||||
|
||||
fn setup_git_repo(root: &std::path::Path) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//! Pipeline state — types and loading functions for the story pipeline.
|
||||
|
||||
use crate::agents::AgentStatus;
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use crate::http::context::AppContext;
|
||||
use crate::io::story_metadata::parse_front_matter;
|
||||
use serde::Serialize;
|
||||
use std::collections::HashMap;
|
||||
use std::path::Path;
|
||||
|
||||
@@ -80,7 +80,7 @@ pub fn create_story_file(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::io::story_metadata::parse_front_matter;
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use std::fs;
|
||||
|
||||
#[allow(dead_code)]
|
||||
@@ -262,7 +262,7 @@ mod tests {
|
||||
create_story_file(tmp.path(), "Type Test Story", None, None, None, None, false)
|
||||
.unwrap();
|
||||
let content = crate::db::read_content(&story_id).expect("content must exist");
|
||||
let meta = crate::io::story_metadata::parse_front_matter(&content)
|
||||
let meta = crate::db::yaml_legacy::parse_front_matter(&content)
|
||||
.expect("front matter should be valid");
|
||||
assert_eq!(
|
||||
meta.item_type.as_deref(),
|
||||
|
||||
@@ -10,7 +10,7 @@ use super::super::{
|
||||
slugify_name, story_stage, write_story_content,
|
||||
};
|
||||
|
||||
use crate::io::story_metadata::set_front_matter_field;
|
||||
use crate::db::yaml_legacy::set_front_matter_field;
|
||||
|
||||
fn json_value_to_yaml_scalar(value: &Value) -> String {
|
||||
match value {
|
||||
@@ -114,7 +114,7 @@ pub fn update_story_in_file(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::io::story_metadata::parse_front_matter;
|
||||
use crate::db::yaml_legacy::parse_front_matter;
|
||||
use std::fs;
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//! Test result persistence — writes structured test results into story markdown files.
|
||||
use crate::io::story_metadata::set_front_matter_field;
|
||||
use crate::db::yaml_legacy::set_front_matter_field;
|
||||
use crate::workflow::{StoryTestResults, TestCaseResult, TestStatus};
|
||||
use std::path::Path;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user