huskies: merge 961
This commit is contained in:
@@ -198,8 +198,8 @@ mod tests {
|
||||
"CRDT register should hold [477, 478]: {view:?}"
|
||||
);
|
||||
// Content store YAML must NOT be mutated with depends_on.
|
||||
let contents =
|
||||
crate::db::read_content("9910_story_foo").expect("content store should have story");
|
||||
let contents = crate::db::read_content(crate::db::ContentKey::Story("9910_story_foo"))
|
||||
.expect("content store should have story");
|
||||
assert!(
|
||||
!contents.contains("depends_on"),
|
||||
"content store YAML must not contain depends_on after chat command: {contents}"
|
||||
@@ -230,8 +230,8 @@ mod tests {
|
||||
"CRDT register should be empty after clearing: {view:?}"
|
||||
);
|
||||
// Content store YAML must not be mutated.
|
||||
let contents =
|
||||
crate::db::read_content("9911_story_bar").expect("content store should have story");
|
||||
let contents = crate::db::read_content(crate::db::ContentKey::Story("9911_story_bar"))
|
||||
.expect("content store should have story");
|
||||
assert!(
|
||||
!contents.contains("depends_on"),
|
||||
"content store YAML must not contain depends_on after clear: {contents}"
|
||||
@@ -268,7 +268,8 @@ mod tests {
|
||||
"CRDT must hold [500, 501]: {view:?}"
|
||||
);
|
||||
|
||||
let content = crate::db::read_content("8790_story_chat_dep").unwrap();
|
||||
let content =
|
||||
crate::db::read_content(crate::db::ContentKey::Story("8790_story_chat_dep")).unwrap();
|
||||
assert!(
|
||||
!content.contains("depends_on"),
|
||||
"chat must not write depends_on to YAML: {content}"
|
||||
|
||||
@@ -189,7 +189,8 @@ mod tests {
|
||||
|
||||
// Verify the story is still accessible in the content store after the move.
|
||||
assert!(
|
||||
crate::db::read_content("42_story_some_feature").is_some(),
|
||||
crate::db::read_content(crate::db::ContentKey::Story("42_story_some_feature"))
|
||||
.is_some(),
|
||||
"story should be in the content store after move"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ fn build_triage_dump(
|
||||
item: &crate::pipeline_state::PipelineItem,
|
||||
num_str: &str,
|
||||
) -> String {
|
||||
let contents = match crate::db::read_content(story_id) {
|
||||
let contents = match crate::db::read_content(crate::db::ContentKey::Story(story_id)) {
|
||||
Some(c) => c,
|
||||
None => return format!("Story {num_str}: content not found in content store."),
|
||||
};
|
||||
|
||||
@@ -39,7 +39,8 @@ pub(crate) fn find_story_by_number(
|
||||
.join("work")
|
||||
.join(&stage_dir)
|
||||
.join(format!("{}.md", item.story_id()));
|
||||
let content = crate::db::read_content(item.story_id());
|
||||
let content =
|
||||
crate::db::read_content(crate::db::ContentKey::Story(item.story_id()));
|
||||
return Some((item.story_id().to_string(), stage_dir, path, content));
|
||||
}
|
||||
}
|
||||
@@ -61,7 +62,7 @@ pub(crate) fn find_story_by_number(
|
||||
.join("work")
|
||||
.join(&stage_dir)
|
||||
.join(format!("{id}.md"));
|
||||
let content = crate::db::read_content(&id);
|
||||
let content = crate::db::read_content(crate::db::ContentKey::Story(&id));
|
||||
return Some((id, stage_dir, path, content));
|
||||
}
|
||||
|
||||
|
||||
@@ -303,7 +303,8 @@ mod tests {
|
||||
"unexpected response: {response}"
|
||||
);
|
||||
assert!(
|
||||
crate::db::read_content("9975_story_some_feature").is_none(),
|
||||
crate::db::read_content(crate::db::ContentKey::Story("9975_story_some_feature"))
|
||||
.is_none(),
|
||||
"content store should no longer contain the deleted story"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user