huskies: merge 945

This commit is contained in:
dave
2026-05-13 06:09:34 +00:00
parent 3a8894ea8f
commit 9ce5a8df0c
53 changed files with 497 additions and 654 deletions
-2
View File
@@ -66,7 +66,6 @@ mod tests {
None,
None,
None,
None,
);
let tmp = tempfile::tempdir().unwrap();
@@ -108,7 +107,6 @@ mod tests {
None,
None,
None,
None,
);
}
-1
View File
@@ -205,7 +205,6 @@ mod tests {
None,
None,
None,
None,
);
// Seed content store.
+8 -4
View File
@@ -28,8 +28,10 @@ pub enum UnfreezeStatus {
/// stage without making any CRDT writes. Returns `Err` if the state transition
/// fails (e.g. the item is not found or is in a terminal stage).
pub fn freeze(story_id: &str) -> Result<FreezeStatus, String> {
let already_frozen = crate::crdt_state::read_item(story_id)
.map(|view| view.frozen())
let already_frozen = crate::pipeline_state::read_typed(story_id)
.ok()
.flatten()
.map(|item| item.is_frozen())
.unwrap_or(false);
if already_frozen {
@@ -46,8 +48,10 @@ pub fn freeze(story_id: &str) -> Result<FreezeStatus, String> {
/// Returns [`UnfreezeStatus::NotFrozen`] if the item is not currently frozen.
/// Returns `Err` if the state transition fails.
pub fn unfreeze(story_id: &str) -> Result<UnfreezeStatus, String> {
let is_frozen = crate::crdt_state::read_item(story_id)
.map(|view| view.frozen())
let is_frozen = crate::pipeline_state::read_typed(story_id)
.ok()
.flatten()
.map(|item| item.is_frozen())
.unwrap_or(false);
if !is_frozen {