fix(store): verify restored story snapshots

This commit is contained in:
Codex
2026-07-28 13:34:18 +08:00
parent 3e95fb5aab
commit aab289a1e0
2 changed files with 215 additions and 9 deletions
+5 -1
View File
@@ -339,6 +339,9 @@ fn map_store_error(error: StoreError) -> TurnFailure {
StoreError::NodeAlreadyExists(_)
| StoreError::ParentNotFound(_)
| StoreError::StateMismatch(_)
| StoreError::StateHashMismatch { .. }
| StoreError::Sqlite(_)
| StoreError::Serialization(_)
| StoreError::Poisoned => internal_failure("turn could not be committed"),
}
}
@@ -816,7 +819,8 @@ mod persistent_turn_tests {
user_input: String::new(),
beats: Vec::new(),
delta: StateDelta { ops: Vec::new() },
state_hash: format!("hash_{id}"),
state_hash: hash_runtime_state(&state(id, branch))
.expect("serializable test state"),
}
}