返回 CodeWhale
exec_exit_semantics.rs
根目录 / crates / tui / src / tests / exec_exit_semantics.rs
1 use codewhale_engine::exec_events::exec_error_event_is_fatal;
2
3 #[test]
4 fn recoverable_error_events_do_not_fail_the_run_summary() {
5 // A recoverable warning (e.g. a stream-stall notice mid-turn) must
6 // not force the exec summary into failure; the terminal TurnComplete
7 // carries the authoritative outcome.
8 let warning = codewhale_error_taxonomy::ErrorEnvelope::network(
9 "Stream stalled: no data received for 120s, closing stream",
10 );
11 assert!(
12 !exec_error_event_is_fatal(&warning),
13 "recoverable envelopes must not poison the exec summary"
14 );
15 let fatal = codewhale_error_taxonomy::ErrorEnvelope::fatal("engine exploded");
16 assert!(exec_error_event_is_fatal(&fatal));
17 }
18
18 lines RUST