M6: crash-resume hardening

Hardens resume-after-crash: an unfinished assistant message left by a killed process is marked aborted on load rather than replayed, covered in harness-app and a small harness-tui::modal fix.
This commit is contained in:
2026-07-10 16:20:30 +02:00
parent 08b3cd8fb7
commit 4ba2f7af74
3 changed files with 128 additions and 0 deletions
+3
View File
@@ -26,6 +26,9 @@ pub async fn select_session(
session: Session,
) -> Result<(), harness_app::AppError> {
let session_id = session.id.clone();
// Repair a session that crashed mid-run before loading it, so the transcript shows the
// aborted turn rather than a tool call frozen "running".
engine.repair_session(&session_id).await?;
let messages = engine.session_messages(session_id.clone()).await?;
let mut all_parts = Vec::new();
for message in &messages {