{"record":{"id":"3d43d6320d13378d","repo":"xai-org/grok-build","slug":"git-serialize-changes-is-unavailable-in-this-build","errorCode":null,"errorMessage":"git serialize_changes is unavailable in this build","messagePattern":"git serialize_changes is unavailable in this build","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-shell/src/extensions/git.rs","lineNumber":312,"sourceCode":"            )\n            .await\n            .unwrap_or(xai_grok_workspace::session::git::VcsKind::Git);\n        if vcs_kind.is_jj()\n            && let Some(result) =\n                super::jj::try_handle(args.method.as_ref(), &git_root, &args.params).await\n        {\n            return result;\n        }\n    }\n    match args.method.as_ref() {\n        \"x.ai/git/git_repo_root\" => {\n            let req: git::GitRepoRequest = parse_params(args)?;\n            let response = git::is_git_repo(&req).await?;\n            super::to_raw_response(&response)\n        }\n        \"x.ai/git/serialize_changes\" => {\n            let _ = (args, ops);\n            to_ext_response::<()>(Err(anyhow::anyhow!(\n                \"git serialize_changes is unavailable in this build\"\n            )))\n        }\n        \"x.ai/git/status\" => {\n            let req = parse_params::<GitStatusRequest>(args)?;\n            let include_untracked = req.include_untracked.unwrap_or(false);\n            let include_stats = req.include_stats.unwrap_or(false);\n            let ignore_submodules = req.ignore_submodules.unwrap_or(true);\n            let include_patches = req.include_patches.unwrap_or(false);\n            let git_root = resolve_git_root(agent, ops, req.git_root, req.session_id.as_ref())\n                .await\n                .ok();\n            let op = GitStatusExtReq {\n                git_root,\n                include_untracked,\n                include_stats,\n                ignore_submodules,\n                include_patches,","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-shell/src/extensions/git.rs#L294-L330","documentation":"The extension dispatcher handles x.ai/git/serialize_changes as a stub: it ignores the request and always returns an error response saying the feature is unavailable in this build. This is a deliberate compile-time/build-time feature gap, not a runtime failure of the caller.","triggerScenarios":"Any client invokes the x.ai/git/serialize_changes extension method on a build compiled without git serialize_changes support.","commonSituations":"Running a slim/minimal build of the shell that excludes full git tooling; a plugin or UI feature that calls serialize_changes unconditionally; stale client expecting an older full-featured binary.","solutions":["Install/switch to a full build of xai-grok-shell that includes git serialize_changes","Have the caller handle this method's error and fall back to computing the diff locally (e.g. git diff + serialization in the client)","Stop calling x.ai/git/serialize_changes when capability discovery indicates it is unavailable"],"exampleFix":"// before\nconst resp = await ext(\"x.ai/git/serialize_changes\", req);\n// after\nif (supportsGitSerialize) {\n  const resp = await ext(\"x.ai/git/serialize_changes\", req);\n} else {\n  const diff = await runGitDiffLocally();\n}","handlingStrategy":"fallback","validationCode":"// check capability support before invoking\nif !supported_methods.contains(\"x.ai/git/serialize_changes\") {\n    return Err(\"serialize_changes unsupported in this build\".into());\n}","typeGuard":null,"tryCatchPattern":"match ext(\"x.ai/git/serialize_changes\", req).await {\n    Ok(resp) => resp,\n    Err(e) if e.to_string().contains(\"unavailable in this build\") => {\n        compute_diff_locally().await?\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Deploy the full build where git tooling is required","Gate UI/plugin features on a capability probe","Document build variants and their supported extension methods"],"tags":["feature-unavailable","build-flag","git"],"backgroundTag":"method-not-implemented","analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}