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:
Dave
2026-03-19 00:53:00 +00:00
parent 13c0ee4c08
commit 2346602b30
2 changed files with 14 additions and 6 deletions

View File

@@ -210,15 +210,15 @@ pub fn write_rejection_notes(path: &Path, notes: &str) -> Result<(), String> {
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 {
let contents = match fs::read_to_string(path) {
Ok(c) => c,
Err(_) => return true,
Err(_) => return false,
};
match parse_front_matter(&contents) {
Ok(meta) => meta.manual_qa.unwrap_or(true),
Err(_) => true,
Ok(meta) => meta.manual_qa.unwrap_or(false),
Err(_) => false,
}
}
@@ -412,10 +412,18 @@ workflow: tdd
}
#[test]
fn requires_manual_qa_defaults_true() {
fn requires_manual_qa_defaults_false() {
let tmp = tempfile::tempdir().unwrap();
let path = tmp.path().join("story.md");
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));
}