{"record":{"id":"e6bbc8bd41a3d4b2","repo":"jdx/mise","slug":"no-pending-operation-uuid","errorCode":null,"errorMessage":"no pending operation {uuid}","messagePattern":"no pending operation (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/scope.rs","lineNumber":767,"sourceCode":"/// with one reserved id.\npub(crate) fn recover_stale(store: &Store, tracked: &TrackedSet) -> Result<()> {\n    recover_records(store, tracked, store::list_pending_in(store.state_dir())?)\n}\n\n/// Retry a single operation under the caller's recovery lock. Accepting live\n/// files is deliberately separate from ordinary automatic recovery.\npub(crate) fn recover_operation(\n    store: &Store,\n    tracked: &TrackedSet,\n    uuid: &str,\n    keep_current: bool,\n) -> Result<()> {\n    let mut pending = store::list_pending_in(store.state_dir())?\n        .into_iter()\n        .filter(|(_, record)| record.checkpoint.uuid == uuid)\n        .collect::<Vec<_>>();\n    if pending.is_empty() {\n        bail!(\"no pending operation {uuid}\");\n    }\n    if keep_current {\n        for (_, record) in &mut pending {\n            record.recovery = store::RecoveryState::Finished;\n            if let Some(operation) = &mut record.checkpoint.operation {\n                operation.status = OperationStatus::Failed;\n                operation.finished_at = Some(store::now_rfc3339());\n                operation.error =\n                    Some(\"current live files explicitly accepted during recovery\".into());\n            }\n            store::write_pending_in(store.state_dir(), record)?;\n        }\n    }\n    recover_records(store, tracked, pending)\n}\n\nfn recover_records(\n    store: &Store,","sourceCodeStart":749,"sourceCodeEnd":785,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/scope.rs#L749-L785","documentation":"recover_operation looks up pending operation records in the store whose checkpoint UUID matches the requested uuid. If none are found, there is nothing to recover and it bails naming the missing uuid.","triggerScenarios":"Calling recover_operation with a uuid not present in store::list_pending_in(state_dir) — the operation already finished/recovered, was pruned, the uuid is mistyped, or the state dir differs from the one holding the record.","commonSituations":"Re-running a recovery after it already completed; copying a uuid from another machine's or another MISE_STATE_DIR's history; typo in the uuid passed to the recovery command.","solutions":["List pending operations to get a valid uuid and re-run recovery with that value","If the operation already recovered, no action is needed — the error is informational in that case","Verify you are operating on the same MISE_STATE_DIR that recorded the pending operation"],"exampleFix":"// before: wrong/finished uuid\nmise history recover 3f2a...\n// after\nmise history pending        # list valid uuids\nmise history recover <uuid-from-pending>","handlingStrategy":"validation","validationCode":"if !history.pending_operations().iter().any(|op| op.uuid == target_uuid) {\n    eprintln!(\"uuid {} is not pending; nothing to recover\", target_uuid);\n    return Ok(());\n}","typeGuard":null,"tryCatchPattern":"match history.recover_operation(uuid, keep_current) {\n    Err(e) if e.to_string().starts_with(\"no pending operation\") => {\n        eprintln!(\"already recovered or unknown uuid; nothing to do\");\n    }\n    other => other?,\n}","preventionTips":["Copy uuids from `history pending` on the same machine/state dir","Track which operations have already been recovered","Don't reuse uuids across different MISE_STATE_DIRs"],"tags":["history","recovery","uuid","not-found"],"backgroundTag":"record-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}