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
+2 -2
View File
@@ -284,7 +284,7 @@ mod tests {
let bug_id = result.trim_start_matches("Created bug: ").trim();
// Bug content should exist in the CRDT content store.
assert!(
crate::db::read_content(bug_id).is_some(),
crate::db::read_content(crate::db::ContentKey::Story(bug_id)).is_some(),
"expected bug content in CRDT for {bug_id}"
);
}
@@ -482,7 +482,7 @@ mod tests {
let result = tool_close_bug(&json!({"bug_id": "9901_bug_crash"}), &ctx).unwrap();
assert!(result.contains("9901_bug_crash"));
assert!(
crate::db::read_content("9901_bug_crash").is_some(),
crate::db::read_content(crate::db::ContentKey::Story("9901_bug_crash")).is_some(),
"content store should have the bug after close"
);
}
+2 -2
View File
@@ -528,7 +528,7 @@ mod tests {
)
.unwrap();
let contents = crate::db::read_content("9906_story_persist")
let contents = crate::db::read_content(crate::db::ContentKey::Story("9906_story_persist"))
.expect("story content should exist in CRDT");
assert!(
contents.contains("## Test Results"),
@@ -649,7 +649,7 @@ mod tests {
);
// Criterion must still be unchecked in the CRDT.
let contents = crate::db::read_content("9997_empty_branch")
let contents = crate::db::read_content(crate::db::ContentKey::Story("9997_empty_branch"))
.expect("story content should still be in CRDT");
assert!(
contents.contains("- [ ] Implement the feature"),
+1 -1
View File
@@ -105,7 +105,7 @@ pub(crate) fn tool_show_epic(args: &Value, _ctx: &AppContext) -> Result<String,
.and_then(|v| v.as_str())
.ok_or("Missing required argument: epic_id")?;
let content = crate::db::read_content(epic_id)
let content = crate::db::read_content(crate::db::ContentKey::Story(epic_id))
.ok_or_else(|| format!("Epic '{epic_id}' not found in content store"))?;
let epic_view = crate::crdt_state::read_item(epic_id)
+4 -2
View File
@@ -140,7 +140,8 @@ mod tests {
// Extract the actual spike ID from the result message (format: "Created spike: <id>").
let spike_id = result.trim_start_matches("Created spike: ").trim();
// Spike content should exist in the CRDT content store.
let contents = crate::db::read_content(spike_id).expect("expected spike content in CRDT");
let contents = crate::db::read_content(crate::db::ContentKey::Story(spike_id))
.expect("expected spike content in CRDT");
assert!(contents.starts_with("---\ntype: spike\nname: \"Compare Encoders\"\n---"));
assert!(contents.contains("Which encoder is fastest?"));
}
@@ -163,7 +164,8 @@ mod tests {
let spike_id = result.trim_start_matches("Created spike: ").trim();
// Spike content should exist in the CRDT content store.
let contents = crate::db::read_content(spike_id).expect("expected spike content in CRDT");
let contents = crate::db::read_content(crate::db::ContentKey::Story(spike_id))
.expect("expected spike content in CRDT");
assert!(contents.starts_with("---\ntype: spike\nname: \"My Spike\"\n---"));
assert!(contents.contains("## Question\n\n- TBD\n"));
}
@@ -239,7 +239,8 @@ mod tests {
.trim_start_matches("Created story: ")
.trim()
.to_string();
let content = crate::db::read_content(&story_id).expect("story content should exist");
let content = crate::db::read_content(crate::db::ContentKey::Story(&story_id))
.expect("story content should exist");
assert!(
content.contains("## Description"),
"Description section missing from story: {content}"