{"record":{"id":"15ee976e7a81cfe4","repo":"GitoxideLabs/gitoxide","slug":"label-has-a-pending-rebase","errorCode":null,"errorMessage":"{label} has a pending rebase","messagePattern":"(.+?) has a pending rebase","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/edit/review.rs","lineNumber":128,"sourceCode":") -> Result<Started> {\n    let repo = open_repository(repository_path, bare, false).context(\"could not open repository to start review\")?;\n    let workdir = repo.workdir().context(\"review requires a worktree\")?.to_owned();\n    let head = repo.head().context(\"could not read HEAD before review\")?;\n    let restore = (\n        head.referent_name().map(ToOwned::to_owned),\n        head.id().map(gix::Id::detach),\n    );\n    if tip == base || !graph.is_ancestor(base, tip) {\n        anyhow::bail!(\"the review base must be an ancestor of the reviewed commit\");\n    }\n    for (label, id) in [(\"reviewed commit\", tip), (\"review base\", base)] {\n        let commit = repo\n            .find_commit(id)\n            .with_context(|| format!(\"could not find {label}\"))?\n            .decode()?\n            .into_owned()?;\n        if super::rebase::is_pending(&commit) {\n            anyhow::bail!(\"{label} has a pending rebase\");\n        }\n    }\n    ensure_clean(&workdir)?;\n\n    let departure_pin = match restore.1 {\n        Some(id) => {\n            let target = restore.0.clone().map_or(Target::Object(id), Target::Symbolic);\n            Some((\n                super::time_travel::create_pin(&repo, target, id, \"tix review departure\")?,\n                true,\n            ))\n        }\n        None => None,\n    };\n\n    let name = next_reference(&repo)?;\n    let mut commit = gix::objs::Commit {\n        tree: repo.find_commit(base)?.tree_id()?.detach(),","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/edit/review.rs#L110-L146","documentation":"`review::start` refuses to begin a review when either the reviewed commit (`tip`) or the review `base` is currently part of a pending rebase: `super::rebase::is_pending(&commit)` is checked for both (`\"reviewed commit\"`, `\"review base\"`) and the failing label is interpolated into `{label} has a pending rebase`. Editing commits mid-rebase would produce unstable review content.","triggerScenarios":"Calling `review::start` where decoding `tip` or `base` yields a commit for which `rebase::is_pending` is true — i.e. either endpoint is a provisional commit of an in-progress rebase.","commonSituations":"Starting a review while an interactive rebase is paused; automation triggered on commits that are temporarily rewritten during a rebase; reviewing the base commit that itself is being rebased.","solutions":["Wait for the rebase to complete, then start the review against the finalized commits.","Abort the pending rebase and start the review on stable history.","Choose a different base/tip pair outside the pending rebase range.","Detect pending state up front and defer the review (e.g. re-run the trigger after the rebase finishes)."],"exampleFix":"// before: review during an in-progress rebase\nreview::start(repo, base_id, tip_id)?; // bails: \"{label} has a pending rebase\"\n// after: defer until the commits are settled\nfor id in [base_id, tip_id] {\n    let c = repo.find_commit(id)?.decode()?.into_owned()?;\n    if rebase::is_pending(&c) { return Err(defer_review_until_rebase_done(id)); }\n}\nreview::start(repo, base_id, tip_id)?;","handlingStrategy":"validation","validationCode":"for (label, id) in [(\"reviewed commit\", tip_id), (\"review base\", base_id)] {\n    let c = repo.find_commit(id)?.decode()?.into_owned()?;\n    if gix_tix::edit::rebase::is_pending(&c) {\n        // defer review until the rebase involving {label} completes\n    }\n}\n","typeGuard":"fn reviewable(repo: &gix::Repository, id: ObjectId) -> anyhow::Result<bool> {\n    Ok(!gix_tix::edit::rebase::is_pending(&repo.find_commit(id)?.decode()?.into_owned()?))\n}\n","tryCatchPattern":null,"preventionTips":["Gate review automation on rebase completion hooks","Never start reviews while an interactive rebase is paused","Re-check pending state of both endpoints immediately before review::start"],"tags":["review","rebase","state-validation","git"],"backgroundTag":"invalid-state-transition","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}