huskies: merge 882
This commit is contained in:
@@ -47,6 +47,14 @@ pub struct RuntimeContext {
|
||||
pub struct RuntimeResult {
|
||||
pub session_id: Option<String>,
|
||||
pub token_usage: Option<TokenUsage>,
|
||||
/// `true` when the process exited with a failure AND no session was established.
|
||||
///
|
||||
/// This indicates the Claude Code CLI crashed (e.g. SIGABRT from an assertion
|
||||
/// failure) before it could emit its first "system" event — the classic
|
||||
/// "signal=Aborted, Session: None" case (bug 882). The completion handler
|
||||
/// uses this flag to skip acceptance gates and respawn without consuming a
|
||||
/// retry slot. Always `false` for API-based runtimes (Gemini, OpenAI).
|
||||
pub aborted_signal: bool,
|
||||
}
|
||||
|
||||
/// Runtime status reported by the backend.
|
||||
@@ -138,6 +146,7 @@ mod tests {
|
||||
cache_read_input_tokens: 0,
|
||||
total_cost_usd: 0.01,
|
||||
}),
|
||||
aborted_signal: false,
|
||||
};
|
||||
assert_eq!(result.session_id, Some("sess-123".to_string()));
|
||||
assert!(result.token_usage.is_some());
|
||||
@@ -152,6 +161,7 @@ mod tests {
|
||||
let result = RuntimeResult {
|
||||
session_id: None,
|
||||
token_usage: None,
|
||||
aborted_signal: false,
|
||||
};
|
||||
assert!(result.session_id.is_none());
|
||||
assert!(result.token_usage.is_none());
|
||||
|
||||
Reference in New Issue
Block a user