huskies: merge 864

This commit is contained in:
dave
2026-04-30 22:23:21 +00:00
parent 3911c24c26
commit 61cf7684de
41 changed files with 540 additions and 71 deletions
+13 -2
View File
@@ -77,7 +77,12 @@ fn stage_metadata_returns_correct_actions() {
#[test]
fn sweep_moves_old_items_to_archived() {
crate::db::ensure_content_store();
crate::db::write_item_with_content("9880_story_sweep_old", "5_done", "---\nname: old\n---\n");
crate::db::write_item_with_content(
"9880_story_sweep_old",
"5_done",
"---\nname: old\n---\n",
crate::db::ItemMeta::from_yaml("---\nname: old\n---\n"),
);
// With ZERO retention, any Done item should be swept.
sweep_done_to_archived(Duration::ZERO);
@@ -96,7 +101,12 @@ fn sweep_moves_old_items_to_archived() {
#[test]
fn sweep_keeps_recent_items_in_done() {
crate::db::ensure_content_store();
crate::db::write_item_with_content("9881_story_sweep_new", "5_done", "---\nname: new\n---\n");
crate::db::write_item_with_content(
"9881_story_sweep_new",
"5_done",
"---\nname: new\n---\n",
crate::db::ItemMeta::from_yaml("---\nname: new\n---\n"),
);
// With a very long retention, the item (merged_at ≈ now) should stay.
sweep_done_to_archived(Duration::from_secs(999_999));
@@ -118,6 +128,7 @@ fn sweep_respects_custom_retention() {
"9882_story_sweep_custom",
"5_done",
"---\nname: custom\n---\n",
crate::db::ItemMeta::from_yaml("---\nname: custom\n---\n"),
);
// With ZERO retention, sweep should promote.