{"record":{"id":"151788e20cb91d00","repo":"xai-org/grok-build","slug":"linked-grove-source-createworktree-declined-refu","errorCode":null,"errorMessage":"linked Grove source: CreateWorktree declined; refusing copy fallback","messagePattern":"linked Grove source: CreateWorktree declined; refusing copy fallback","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-fast-worktree/src/worktree/execute.rs","lineNumber":358,"sourceCode":"                    // projection (hang / projected state) when CreateWorktree\n                    // declines. Preserve fails; projected+clean may git-checkout.\n                    let linked_view = plan.nfs.as_ref().is_some_and(|opts| {\n                        crate::nfs::source_is_linked_local_view(opts, &plan.source)\n                    });\n                    if crate::nfs::dest_is_projected_mount(&plan.source) {\n                        if matches!(\n                            plan.working_tree,\n                            crate::WorkingTreeMode::PreserveWorkingTree\n                        ) {\n                            anyhow::bail!(\"preserve on a projected Grove source is not supported\");\n                        }\n                        tracing::info!(\n                            source = %plan.source.display(),\n                            \"projected source: skipping copy fallback, using git checkout\"\n                        );\n                        execute_git_checkout_worktree(plan)\n                    } else if linked_view {\n                        anyhow::bail!(\n                            \"linked Grove source: CreateWorktree declined; refusing copy fallback\"\n                        );\n                    } else {\n                        execute_copy_worktree(plan)\n                    }\n                }\n                CreationMode::Standalone => execute_standalone_worktree(plan),\n                _ => unreachable!(),\n            }\n        }\n        CreationMode::GitCheckout => execute_git_checkout_worktree(plan),\n    }\n}\n\n/// Whether the overlay strategy must be skipped, given the mount-namespace\n/// classification.\n///\n/// An overlayfs mount is namespace-local and (unlike a btrfs snapshot) cannot be","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-fast-worktree/src/worktree/execute.rs#L340-L376","documentation":"When the source is a linked Grove view (but not a projected mount) and a CreateWorktree request is declined upstream, the dispatcher refuses to silently fall back to a full copy (execute_copy_worktree). Copying out of a linked Grove source would duplicate gigabytes and break the link semantics, so it bails with this explicit refusal.","triggerScenarios":"execute_create_worktree_dispatch called with linked_view == true (source is a linked Grove view) and the primary creation path declined, reaching the else-branch that would otherwise perform a copy fallback.","commonSituations":"Automation that retries failed worktree creations with a fallback strategy; a Grove link that became stale/unhealthy causing the fast path to decline; misconfigured source pointing at a linked view instead of the real repository.","solutions":["Investigate why the primary CreateWorktree path declined (check earlier log lines / decline reason) and fix that root cause.","Re-create or repair the Grove link (relink the view) so the fast path succeeds.","If a plain copy is truly desired, use a non-linked source directory rather than a Grove linked view.","Skip the automatic fallback retry for linked-Grove sources instead of treating the decline as transient."],"exampleFix":"// before: blind fallback retry loop\nmatch create_worktree(plan) {\n    Err(_) => retry_with_copy_fallback(plan),\n    ...\n}\n// after\nmatch create_worktree(plan) {\n    Err(e) if !is_linked_grove(&plan.source) => retry_with_copy_fallback(plan),\n    Err(e) => return Err(e),\n    ...\n}","handlingStrategy":"fallback","validationCode":"// only attempt plain copy when the source is not a Grove linked view\nif is_linked_grove_view(&source) {\n    return Err(anyhow::anyhow!(\n        \"won't copy-fallback from linked Grove source {source:?}\"\n    ));\n}","typeGuard":null,"tryCatchPattern":"match create_worktree(plan) {\n    Err(e) if e.to_string().contains(\"refusing copy fallback\") => {\n        // don't blindly retry copy; repair the link or surface to the caller\n        repair_grove_link(&plan.source)?;\n        create_worktree(plan).context(\"create failed after link repair\")\n    }\n    other => other,\n}","preventionTips":["Health-check Grove links before creating worktrees from them","Exclude linked views from generic copy-fallback retry policies","Alert on repeated declines — they indicate a stale link, not a transient failure","Keep an explicit allowlist of source types eligible for copy fallback"],"tags":["worktree","grove","fallback-refused"],"backgroundTag":"copy-fallback-refused","analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}