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

Function test_full_lifecycle_ctrl_c_recovery

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

Source from the content-addressed store, hash-verified

1179
1180 #[test]
1181 fn test_full_lifecycle_ctrl_c_recovery() {
1182 let ctx = TransitionContext::default();
1183
1184 // Turn starts
1185 let r = transition(Phase::Idle, Event::TurnStart, ctx);
1186 assert_eq!(r.new_phase, Phase::Active);
1187
1188 // Agent crashes, user sends another turn start
1189 let r = transition(Phase::Active, Event::TurnStart, ctx);
1190 assert_eq!(r.new_phase, Phase::Active); // Continues
1191
1192 // New turn ends normally
1193 let r = transition(Phase::Active, Event::TurnEnd, ctx);
1194 assert_eq!(r.new_phase, Phase::Idle);
1195 assert!(r.requires_recording());
1196 }
1197
1198 // Exhaustive transition table test
1199

Callers

nothing calls this directly

Calls 1

transitionFunction · 0.85

Tested by

no test coverage detected