huskies: merge 888

This commit is contained in:
dave
2026-05-12 15:43:02 +00:00
parent d04facd24f
commit 3891de685c
3 changed files with 147 additions and 6 deletions
+8 -6
View File
@@ -17,12 +17,14 @@ pub(crate) fn write_story_content(
stage: &str,
content: &str,
) {
crate::db::write_item_with_content(
story_id,
stage,
content,
crate::db::ItemMeta::from_yaml(content),
);
let mut meta = crate::db::ItemMeta::from_yaml(content);
// CRDT is the single source of truth for depends_on. Never overwrite the
// register from YAML here — the typed setter (crdt_state::set_depends_on)
// is the only authorised write path. Passing None leaves the existing
// register untouched on update and initialises new items to "" so the
// explicit set_depends_on call in each create function takes effect.
meta.depends_on = None;
crate::db::write_item_with_content(story_id, stage, content, meta);
}
/// Determine what stage a story is in (from CRDT).