fix: default manual_qa to false so stories advance automatically
Bug 283 was implemented with manual_qa defaulting to true, causing all stories to hold in QA for human review. Changed to default false as originally specified — stories advance automatically unless explicitly opted in with manual_qa: true. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -895,7 +895,7 @@ impl AgentPool {
|
|||||||
if item_type == "spike" {
|
if item_type == "spike" {
|
||||||
true // Spikes always need human review.
|
true // Spikes always need human review.
|
||||||
} else {
|
} else {
|
||||||
// Stories/bugs: check the manual_qa front matter field (defaults to true).
|
// Stories/bugs: check the manual_qa front matter field (defaults to false).
|
||||||
let qa_dir = project_root.join(".story_kit/work/3_qa");
|
let qa_dir = project_root.join(".story_kit/work/3_qa");
|
||||||
let story_path = qa_dir.join(format!("{story_id}.md"));
|
let story_path = qa_dir.join(format!("{story_id}.md"));
|
||||||
crate::io::story_metadata::requires_manual_qa(&story_path)
|
crate::io::story_metadata::requires_manual_qa(&story_path)
|
||||||
|
|||||||
@@ -210,15 +210,15 @@ pub fn write_rejection_notes(path: &Path, notes: &str) -> Result<(), String> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check whether a story requires manual QA (defaults to true).
|
/// Check whether a story requires manual QA (defaults to false).
|
||||||
pub fn requires_manual_qa(path: &Path) -> bool {
|
pub fn requires_manual_qa(path: &Path) -> bool {
|
||||||
let contents = match fs::read_to_string(path) {
|
let contents = match fs::read_to_string(path) {
|
||||||
Ok(c) => c,
|
Ok(c) => c,
|
||||||
Err(_) => return true,
|
Err(_) => return false,
|
||||||
};
|
};
|
||||||
match parse_front_matter(&contents) {
|
match parse_front_matter(&contents) {
|
||||||
Ok(meta) => meta.manual_qa.unwrap_or(true),
|
Ok(meta) => meta.manual_qa.unwrap_or(false),
|
||||||
Err(_) => true,
|
Err(_) => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,10 +412,18 @@ workflow: tdd
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn requires_manual_qa_defaults_true() {
|
fn requires_manual_qa_defaults_false() {
|
||||||
let tmp = tempfile::tempdir().unwrap();
|
let tmp = tempfile::tempdir().unwrap();
|
||||||
let path = tmp.path().join("story.md");
|
let path = tmp.path().join("story.md");
|
||||||
std::fs::write(&path, "---\nname: Test\n---\n# Story\n").unwrap();
|
std::fs::write(&path, "---\nname: Test\n---\n# Story\n").unwrap();
|
||||||
|
assert!(!requires_manual_qa(&path));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn requires_manual_qa_true_when_set() {
|
||||||
|
let tmp = tempfile::tempdir().unwrap();
|
||||||
|
let path = tmp.path().join("story.md");
|
||||||
|
std::fs::write(&path, "---\nname: Test\nmanual_qa: true\n---\n# Story\n").unwrap();
|
||||||
assert!(requires_manual_qa(&path));
|
assert!(requires_manual_qa(&path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user