fix: resume-scope-claim レビュー指摘対応 (deny セマンティクス doc・破損 snapshot の警告ログ)
This commit is contained in:
@@ -16,6 +16,7 @@ thiserror = { workspace = true }
|
||||
sha2 = { workspace = true }
|
||||
hex = "0.4.3"
|
||||
protocol = { workspace = true }
|
||||
tracing.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
|
||||
|
||||
@@ -311,7 +311,15 @@ pub fn collect_state(entries: &[HashedEntry]) -> RestoredState {
|
||||
domain, payload, ..
|
||||
} => {
|
||||
if domain == POD_SCOPE_EXTENSION_DOMAIN {
|
||||
state.pod_scope = serde_json::from_value(payload.clone()).ok();
|
||||
match serde_json::from_value::<PodScopeSnapshot>(payload.clone()) {
|
||||
Ok(snapshot) => state.pod_scope = Some(snapshot),
|
||||
Err(err) => {
|
||||
tracing::warn!(
|
||||
error = %err,
|
||||
"discarding malformed pod.scope snapshot from session log"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
state.extensions.push((domain.clone(), payload.clone()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user