MCPcopy Create free account
hub / github.com/AI45Lab/Code / round_trips_and_exposes_completed_map

Function round_trips_and_exposes_completed_map

core/src/orchestration/checkpoint.rs:110–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108
109 #[test]
110 fn round_trips_and_exposes_completed_map() {
111 let mut completed = HashMap::new();
112 completed.insert("t1".to_string(), outcome("t1"));
113 let cp = WorkflowCheckpoint::from_completed("wf", &completed, 123);
114 let back: WorkflowCheckpoint =
115 serde_json::from_str(&serde_json::to_string(&cp).unwrap()).unwrap();
116 assert_eq!(back, cp);
117 assert_eq!(back.schema_version, WORKFLOW_CHECKPOINT_SCHEMA_VERSION);
118 assert_eq!(back.checkpoint_ms, 123);
119 assert_eq!(back.completed().get("t1").unwrap().task_id, "t1");
120 }
121
122 #[test]
123 fn ensure_loadable_rejects_only_future_versions() {

Callers

nothing calls this directly

Calls 2

outcomeFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected