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

Function gen_workflow_checkpoint

core/tests/test_persisted_schema_roundtrip.rs:623–637  ·  view source on GitHub ↗
(rng: &mut Rng)

Source from the content-addressed store, hash-verified

621}
622
623fn gen_workflow_checkpoint(rng: &mut Rng) -> WorkflowCheckpoint {
624 let n = rng.below(4);
625 WorkflowCheckpoint {
626 // Stay at-or-below the current version (future versions are rejected).
627 schema_version: rng.below(u64::from(WORKFLOW_CHECKPOINT_SCHEMA_VERSION) + 1) as u32,
628 workflow_id: rng.string(),
629 steps: (0..n)
630 .map(|_| WorkflowStepRecord {
631 task_id: rng.string(),
632 outcome: gen_step_outcome(rng),
633 })
634 .collect(),
635 checkpoint_ms: rng.u64_small(),
636 }
637}
638
639#[test]
640fn fuzz_roundtrip_all_persisted_types() {

Calls 4

gen_step_outcomeFunction · 0.85
belowMethod · 0.80
stringMethod · 0.80
u64_smallMethod · 0.80

Tested by

no test coverage detected