huskies: merge 517_story_remove_filesystem_shadow_fallback_paths_from_lifecycle_rs_finish_the_migration_to_crdt_only

This commit is contained in:
dave
2026-04-10 12:56:16 +00:00
parent fe405e81c6
commit 31388da609
12 changed files with 171 additions and 170 deletions
+9
View File
@@ -15,4 +15,13 @@ pub(crate) fn write_story_file(root: &Path, stage: &str, filename: &str, content
let dir = root.join(".huskies/work").join(stage);
std::fs::create_dir_all(&dir).unwrap();
std::fs::write(dir.join(filename), content).unwrap();
// Seed the in-memory content store so lifecycle functions that read from
// the content store (instead of the filesystem) see this entry. Use
// write_content (not write_item_with_content) to avoid writing to the
// CRDT — tests must not initialise the global CRDT OnceLock because that
// would pollute every subsequent test in the same process.
let story_id = filename.trim_end_matches(".md");
crate::db::ensure_content_store();
crate::db::write_content(story_id, content);
}