MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_full_lifecycle_single_turn

Function test_full_lifecycle_single_turn

atomic-agent/src/turn/phase.rs:1097–1115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1095
1096 #[test]
1097 fn test_full_lifecycle_single_turn() {
1098 let ctx = TransitionContext::default();
1099
1100 // Session starts
1101 let r = transition(Phase::Idle, Event::SessionStart, ctx);
1102 assert_eq!(r.new_phase, Phase::Idle);
1103
1104 // First turn
1105 let r = transition(Phase::Idle, Event::TurnStart, ctx);
1106 assert_eq!(r.new_phase, Phase::Active);
1107
1108 let r = transition(Phase::Active, Event::TurnEnd, ctx);
1109 assert_eq!(r.new_phase, Phase::Idle);
1110 assert!(r.requires_recording());
1111
1112 // Session ends
1113 let r = transition(Phase::Idle, Event::SessionStop, ctx);
1114 assert_eq!(r.new_phase, Phase::Ended);
1115 }
1116
1117 #[test]
1118 fn test_full_lifecycle_multi_turn() {

Callers

nothing calls this directly

Calls 1

transitionFunction · 0.85

Tested by

no test coverage detected