feat(session): expose canonical public snapshots

This commit is contained in:
2026-08-30 00:41:51 +09:00
parent 40ac83e632
commit 88be87e03e
26 changed files with 1512 additions and 413 deletions
+3 -3
View File
@@ -8513,7 +8513,7 @@ async fn scoped_capture_worker_observation_session(
message: "worker protocol closed before the session snapshot".to_string(),
})
})?;
let protocol::Event::Snapshot { entries, .. } = event else {
let protocol::Event::Snapshot { session, .. } = event else {
return Err(ApiError::from(Error::RuntimeOperationFailed {
runtime_id: target.runtime_id.clone(),
code: "worker_observation_missing_snapshot".to_string(),
@@ -8522,7 +8522,7 @@ async fn scoped_capture_worker_observation_session(
};
Ok(Json(serde_json::json!({
"segment_id": format!("runtime:{}:worker:{}", target.runtime_id, target.worker_id),
"entries": entries,
"session": session,
})))
}
@@ -16785,7 +16785,7 @@ mod tests {
)
.await
.unwrap();
assert!(capture["entries"].is_array());
assert!(capture["session"]["entries"].is_array());
let revoked = api
.store