{"record":{"id":"31679f05df8c8a9f","repo":"jdx/mise","slug":"operation-still-needs-attention-its-pending-re","errorCode":null,"errorMessage":"operation {} still needs attention; its pending record was preserved","messagePattern":"operation (.+?) still needs attention; its pending record was preserved","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/recover.rs","lineNumber":95,"sourceCode":"            bail!(\"select one operation by its identifier before accepting current files\");\n        }\n        if self.keep_current\n            && !self.yes\n            && !crate::ui::prompt::confirm(\n                \"Keep these live files and discard this operation's temporary recovery copies?\",\n            )?\n            .is_yes()\n        {\n            info!(\"dotfiles: recovery copies preserved\");\n            return Ok(());\n        }\n        for (_, record) in selected {\n            scope::recover_operation(&store, tracked, &record.checkpoint.uuid, self.keep_current)?;\n            if store::list_pending_in(store.state_dir())?\n                .iter()\n                .any(|(_, pending)| pending.checkpoint.uuid == record.checkpoint.uuid)\n            {\n                bail!(\n                    \"operation {} still needs attention; its pending record was preserved\",\n                    record.checkpoint.uuid\n                );\n            }\n            info!(\"dotfiles: recovered operation {}\", record.checkpoint.uuid);\n        }\n        Ok(())\n    }\n}\n\nfn matches_operation(selector: &str, id: u64, uuid: &str) -> bool {\n    selector.parse::<u64>().ok() == Some(id) || uuid.starts_with(selector)\n}\n\n#[cfg(test)]\nmod tests {\n    use super::matches_operation;\n","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/dotfiles/recover.rs#L77-L113","documentation":"This error is thrown by `mise dot recover` after recovering a selected checkpoint when a pending record for the same operation's checkpoint UUID still exists in the state directory. Recovering the operation did not fully resolve it — the pending record must still be handled, so recovery is aborted with the message that the operation remains unresolved.","triggerScenarios":"Running `mise dot recover` and selecting an operation whose checkpoint UUID still matches an entry returned by `store::list_pending_in(store.state_dir())` after `scope::recover_operation` completes.","commonSituations":"A pending operation record was left behind by an interrupted capture/sync and the recovery path does not remove it; recovering an operation that is still queued or half-applied in the history store.","solutions":["Inspect the pending record with `mise dot status` or the state directory listing to see why it is still pending","Resolve or clear the pending operation before recovering (e.g. complete or discard the pending sync/capture)","Re-run `mise dot recover` after the pending record is gone"],"exampleFix":"// before\nmise dot recover <uuid>  // fails: pending record for <uuid> still exists\n// after\nmise dot status            # inspect pending operations\nmise dot sync              # resolve the pending operation\nmise dot recover <uuid>","handlingStrategy":"try-catch","validationCode":"# check whether the checkpoint still has a pending record before recovering\nmise dot status --json | jq '.pending[] | select(.checkpoint.uuid == \"<uuid>\")'","typeGuard":null,"tryCatchPattern":"if ! mise dot recover \"$uuid\"; then\n  echo \"operation $uuid still pending; resolve it with mise dot status/sync first\"\n  exit 1\nfi","preventionTips":["Resolve pending operations (sync/status) before running recover","Inspect the pending list before selecting operations in recover","Automate recovery only after confirming no pending records for the UUID"],"tags":["cli","dotfiles","state-conflict","pending-operation"],"backgroundTag":"invalid-state-transition","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"}