{"record":{"id":"ecc1b9a2f886ddff","repo":"nikivdev/code","slug":"review-todo-not-found-among-open-items","errorCode":null,"errorMessage":"Review todo '{}' not found among open items","messagePattern":"Review todo '(.+?)' not found among open items","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/reviews_todo.rs","lineNumber":187,"sourceCode":"    let open_items: Vec<_> = items\n        .iter()\n        .filter(|item| item.status != \"completed\")\n        .collect();\n\n    if open_items.is_empty() {\n        println!(\"No open review todos to fix.\");\n        return Ok(());\n    }\n\n    let to_fix: Vec<_> = if let Some(id) = id {\n        let mut matched = Vec::new();\n        for item in &open_items {\n            if item.id == id || item.id.starts_with(id) {\n                matched.push(*item);\n            }\n        }\n        if matched.is_empty() {\n            bail!(\"Review todo '{}' not found among open items\", id);\n        }\n        if matched.len() > 1 {\n            bail!(\"Review todo id '{}' is ambiguous\", id);\n        }\n        matched\n    } else if all {\n        open_items\n    } else {\n        bail!(\"Specify a todo id or use --all to fix all open review todos\");\n    };\n\n    for item in &to_fix {\n        fix_single_todo(&root, item)?;\n    }\n\n    Ok(())\n}\n","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/reviews_todo.rs#L169-L205","documentation":"fix_review_todos filters OPEN review todos by id (exact or prefix). When the provided id matches no open item, it bails with 'not found among open items' (src/reviews_todo.rs:187). Unlike done_review_todo, matching is restricted to items whose status is not completed.","triggerScenarios":"Calling the fix-todos command with an id that only exists as a completed todo, or matches nothing at all, and no --all flag.","commonSituations":"Trying to fix a todo that was already completed; the todo list was regenerated so ids changed; typo in id; targeting todos from a different repo root.","solutions":["List open (non-completed) review todos to find valid ids","Verify the todo is still open rather than already completed","Use --all to fix every open todo instead of a specific id","Re-run the review if ids have changed"],"exampleFix":"// before\nfix_review_todos(root, Some(\"deadbeef\"), false)  // id not among open items\n// after\nfix_review_todos(root, None, true)  // fix all open todos","handlingStrategy":"validation","validationCode":"let open = open_review_todos(root)?;\nif !open.iter().any(|t| t.id == id || t.id.starts_with(id)) {\n    eprintln!(\"{id} is not an open todo\"); return;\n}","typeGuard":null,"tryCatchPattern":"match fix_review_todos(root, Some(id), false) {\n    Err(e) if e.to_string().contains(\"not found among open items\") => eprintln!(\"check the todo is still open or use --all\"),\n    other => other?,\n}","preventionTips":["Filter your todo listing to OPEN items before choosing an id","Use --all for bulk fixes instead of stale ids","Re-run reviews to refresh ids after changes"],"tags":["cli","lookup","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}