huskies: merge 961

This commit is contained in:
dave
2026-05-13 11:22:57 +00:00
parent 78b1ecdc3c
commit 8b53e20ca9
38 changed files with 327 additions and 146 deletions
@@ -384,18 +384,18 @@ mod tests {
crate::db::ensure_content_store();
let dep_content = "---\nname: Dep\n---\n";
std::fs::write(done.join("1_story_dep.md"), dep_content).unwrap();
crate::db::write_content("1_story_dep", dep_content);
crate::db::write_content(crate::db::ContentKey::Story("1_story_dep"), dep_content);
// Story B depends on story 1.
let story_b_content = "---\nname: B\ndepends_on: [1]\n---\n";
std::fs::write(backlog.join("2_story_b.md"), story_b_content).unwrap();
crate::db::write_content("2_story_b", story_b_content);
crate::db::write_content(crate::db::ContentKey::Story("2_story_b"), story_b_content);
let pool = AgentPool::new_test(3001);
pool.auto_assign_available_work(root).await;
// The lifecycle function updates the content store (not the filesystem),
// so verify the move via the DB.
let content = crate::db::read_content("2_story_b")
let content = crate::db::read_content(crate::db::ContentKey::Story("2_story_b"))
.expect("story B should be in content store after promotion");
assert!(
content.contains("name: B"),
@@ -458,11 +458,14 @@ mod tests {
crate::db::ensure_content_store();
let dep_content = "---\nname: CRDT Spike\n---\n";
std::fs::write(archived.join("490_spike_crdt.md"), dep_content).unwrap();
crate::db::write_content("490_spike_crdt", dep_content);
crate::db::write_content(crate::db::ContentKey::Story("490_spike_crdt"), dep_content);
// Story 478 depends on 490 (the archived spike).
let story_content = "---\nname: Dependent\ndepends_on: [490]\n---\n";
std::fs::write(backlog.join("478_story_dependent.md"), story_content).unwrap();
crate::db::write_content("478_story_dependent", story_content);
crate::db::write_content(
crate::db::ContentKey::Story("478_story_dependent"),
story_content,
);
let pool = AgentPool::new_test(3001);
pool.auto_assign_available_work(root).await;
@@ -470,7 +473,7 @@ mod tests {
// Story 478 must be promoted even though dep 490 is only in 6_archived
// (not in 5_done), because archived = satisfied. The lifecycle function
// updates the content store, so verify via the DB.
let content = crate::db::read_content("478_story_dependent")
let content = crate::db::read_content(crate::db::ContentKey::Story("478_story_dependent"))
.expect("story 478 should be in content store after promotion");
assert!(
content.contains("name: Dependent"),
@@ -531,7 +534,7 @@ mod tests {
// After master c228ae16, has_content_conflict_failure reads from
// {story_id}:gate_output (not the story description), so seed it there.
crate::db::write_content(
"9860_story_conflict:gate_output",
crate::db::ContentKey::GateOutput("9860_story_conflict"),
"CONFLICT (content): server/src/lib.rs",
);
@@ -690,11 +693,14 @@ mod tests {
// After master c228ae16, has_content_conflict_failure reads from
// {story_id}:gate_output (not the story description), so seed it there.
crate::db::write_content(
"920_story_transient:gate_output",
crate::db::ContentKey::GateOutput("920_story_transient"),
"CONFLICT (content): foo.rs",
);
// Simulate two previous transient exits (below cap of 3) recorded in DB.
crate::db::write_content("920_story_transient:mergemaster_spawn_count", "2");
crate::db::write_content(
crate::db::ContentKey::MergeMasterSpawnCount("920_story_transient"),
"2",
);
// mergemaster_attempted must still be false (transient exits don't set it).
let pool = AgentPool::new_test(3001);