fix: resume-scope-claim レビュー指摘対応 (deny セマンティクス doc・破損 snapshot の警告ログ)

This commit is contained in:
2026-05-03 18:56:21 +09:00
parent 364f936ed1
commit b90291d5a0
4 changed files with 21 additions and 1 deletions
+1
View File
@@ -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"] }
+9 -1
View File
@@ -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()));
}