{"record":{"id":"fdec282650b41552","repo":"GitoxideLabs/gitoxide","slug":"unsupported-rebase-state-field-key","errorCode":null,"errorMessage":"unsupported rebase state field {key:?}","messagePattern":"unsupported rebase state field (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gix-tix/src/edit/todo.rs","lineNumber":754,"sourceCode":"                }\n                let name = gix::refs::FullName::try_from(name.as_ref()).context(\"a captured ref name is invalid\")?;\n                expected_refs.push(rebase::ExpectedRef {\n                    name,\n                    old,\n                    target,\n                    new: old,\n                    follows_tip,\n                    editable,\n                    placement: None,\n                });\n            }\n            \"resolved\" => {\n                if resolved.replace(ObjectId::from_hex(value.as_bytes())?).is_some() {\n                    anyhow::bail!(\"the rebase state repeats its resolved conflict\");\n                }\n            }\n            \"continuation-source\" => continuation_sources.push(ObjectId::from_hex(value.as_bytes())?),\n            _ => anyhow::bail!(\"unsupported rebase state field {key:?}\"),\n        }\n    }\n    let state = State {\n        base: base.context(\"the rebase state has no base\")?,\n        onto: onto.context(\"the rebase state has no onto target\")?,\n        tips,\n        scope,\n        marker_required: marker_required.context(\"the rebase state has no marker requirement\")?,\n        checkout_allowed: checkout_allowed.context(\"the rebase state has no checkout capability\")?,\n        head_ref,\n        edit_refs,\n        expected_refs,\n        resolved,\n        continuation_sources,\n    };\n    validate_state(repo, &state)?;\n    Ok(Some(state))\n}","sourceCodeStart":736,"sourceCodeEnd":772,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gix-tix/src/edit/todo.rs#L736-L772","documentation":"Catch-all for unrecognized keys: `parse_state` matches known rebase-state field names and bails with `unsupported rebase state field {key:?}` for anything else. This rejects state files written by incompatible (newer or foreign) versions of the tool rather than silently ignoring unknown fields.","triggerScenarios":"`parse_state` (gix-tix/src/edit/todo.rs:754) encounters a `key value` line whose key is not one of base/onto/tip/scope/marker-required/checkout-allowed/head-ref/edit-refs/ref/resolved/continuation-source.","commonSituations":"State file written by a newer gix-tix version then read by an older binary; hand-edited lines with typos in key names; foreign tools writing their own state into the file.","solutions":["Check the binary's version against the version that wrote the state file; upgrade gix/gix-tix if the state was written by a newer release.","Remove or correct the misspelled field name in the state file if it was hand-edited.","Abort and regenerate the state file with the current tool version."],"exampleFix":"// before (state file)\nmarker_requird true\n// after\nmarker-required true","handlingStrategy":"try-catch","validationCode":"const KNOWN_KEYS: &[&str] = &[\"base\",\"onto\",\"tip\",\"scope\",\"marker-required\",\"checkout-allowed\",\"head-ref\",\"edit-refs\",\"ref\",\"resolved\",\"continuation-source\"];\nfn keys_are_known(text: &str) -> Vec<&str> {\n    text.lines()\n        .filter_map(|l| l.split_whitespace().next())\n        .filter(|k| !KNOWN_KEYS.contains(k))\n        .collect()\n}","typeGuard":null,"tryCatchPattern":"match todo::parse(state_text) {\n    Ok(state) => apply(state),\n    Err(e) if e.to_string().starts_with(\"unsupported rebase state field\") => {\n        eprintln!(\"state written by an incompatible version; upgrade the binary or regenerate state\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Keep the gix/gix-tix binary version in sync with whatever wrote the state.","Pin tool versions in CI so state files are never produced by a newer release.","Spell state keys exactly as the tool writes them; never invent keys."],"tags":["rebase","state-parsing","unsupported-field","version-compatibility","git"],"backgroundTag":"unsupported-config-value","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}