fix: close early dispatch recovery gaps

This commit is contained in:
2026-09-29 12:37:13 +09:00
parent dcf14ef565
commit 1980da2880
14 changed files with 868 additions and 70 deletions
+4 -1
View File
@@ -415,7 +415,7 @@ impl SessionCapture {
search_text: text,
});
}
Item::Reasoning { .. } => {}
Item::AssistantResponseBoundary { .. } | Item::Reasoning { .. } => {}
}
}
@@ -713,6 +713,9 @@ fn render_item(
),
}
}
Item::AssistantResponseBoundary { .. } => {
format!("[{} Assistant response boundary omitted]", entry.id)
}
Item::Reasoning { .. } => format!("[{} Reasoning omitted]", entry.id),
};
truncate_chars(&text, max_bytes)
+10 -2
View File
@@ -1264,7 +1264,10 @@ fn active_run_checkpoint_entry(
fn is_ai_materialized_item(item: &Item) -> bool {
match item {
Item::Message { role, .. } => *role == Role::Assistant,
Item::ToolCall { .. } | Item::ToolResult { .. } | Item::Reasoning { .. } => true,
Item::AssistantResponseBoundary { .. }
| Item::ToolCall { .. }
| Item::ToolResult { .. }
| Item::Reasoning { .. } => true,
}
}
@@ -1302,7 +1305,11 @@ where
let subject = worker_subject(annotation_writer.state.location().session_id);
let origin = if item.is_tool_result() {
WorkerHistoryProvenance::ToolOutput { worker: subject }
} else if item.is_assistant_message() || item.is_tool_call() || item.is_reasoning() {
} else if item.is_assistant_message()
|| matches!(item, Item::AssistantResponseBoundary { .. })
|| item.is_tool_call()
|| item.is_reasoning()
{
WorkerHistoryProvenance::ModelOutput { worker: subject }
} else {
// Unknown user/system append paths fail closed. Trusted system
@@ -7557,6 +7564,7 @@ fn write_overview_header(items: &[Item], out: &mut String) {
for item in items {
match item {
Item::Message { .. } => messages += 1,
Item::AssistantResponseBoundary { .. } => {}
Item::ToolCall { .. } => tool_calls += 1,
Item::ToolResult { .. } => tool_results += 1,
Item::Reasoning { .. } => reasoning += 1,