{"record":{"id":"1f02f87353ce4932","repo":"Hmbown/CodeWhale","slug":"errors-join","errorCode":null,"errorMessage":"errors.join(\"; \")","messagePattern":"errors\\.join\\(\"; \"\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/runtime_threads.rs","lineNumber":9196,"sourceCode":"        if let Some(item_id) = item_id\n            && let Err(err) = self.store.remove_item(item_id)\n        {\n            errors.push(format!(\"remove item: {err}\"));\n        }\n        if let Err(err) = self.store.remove_turn(turn_id) {\n            errors.push(format!(\"remove turn: {err}\"));\n        }\n        if let Some(operation_key_fingerprint) = operation_key_fingerprint\n            && let Err(err) = self\n                .store\n                .remove_turn_operation_binding(operation_key_fingerprint)\n        {\n            errors.push(format!(\"remove turn operation binding: {err}\"));\n        }\n        if errors.is_empty() {\n            Ok(())\n        } else {\n            bail!(errors.join(\"; \"))\n        }\n    }\n\n    async fn emit_claimed_turn_started(\n        &self,\n        turn: &TurnRecord,\n        user_item: Option<&TurnItemRecord>,\n        kind: ClaimedTurnKind,\n    ) {\n        let start_payload = match kind {\n            ClaimedTurnKind::Message => json!({ \"turn\": turn.clone() }),\n            ClaimedTurnKind::Compaction => {\n                json!({ \"turn\": turn.clone(), \"manual_compaction\": true })\n            }\n        };\n        if let Err(err) = self\n            .emit_event(\n                &turn.thread_id,","sourceCodeStart":9178,"sourceCodeEnd":9214,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/runtime_threads.rs#L9178-L9214","documentation":"Rollback/cleanup aggregation during turn-start unwinding: several store removals failed and the individual errors are collected and joined with '; ' so no cleanup failure is swallowed when reporting the aborted turn.","triggerScenarios":"Thrown at crates/tui/src/runtime_threads.rs:9196 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat the joined error list as a diagnostic of which cleanup steps failed; remove the listed thread/turn/item/binding remnants manually if the store is inconsistent.","Retry the operation once the named storage failures are resolved."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}