{"record":{"id":"c2a56f776db0df7f","repo":"xai-org/grok-build","slug":"profile-name-extends-invalid-base-e","errorCode":null,"errorMessage":"Profile '{name}' extends invalid base: {e}","messagePattern":"Profile '(.+?)' extends invalid base: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-sandbox/src/profiles.rs","lineNumber":481,"sourceCode":"                    restrict_network: true,\n                })\n            }\n\n            Self::Custom(name) => {\n                let profile_config = config.profiles.get(name).ok_or_else(|| {\n                    anyhow::anyhow!(\n                        \"Custom sandbox profile '{name}' not found. \\\n                         Define it in ~/.grok/sandbox.toml or .grok/sandbox.toml:\\n\\n\\\n                         [profiles.{name}]\\n\\\n                         extends = \\\"workspace\\\"\\n\\\n                         read_only = [\\\"/data\\\"]\\n\"\n                    )\n                })?;\n\n                // Start from the base profile if `extends` is set\n                let (base, mut profile) = if let Some(base_name) = &profile_config.extends {\n                    let base: ProfileName = base_name.parse().map_err(|e: String| {\n                        anyhow::anyhow!(\"Profile '{name}' extends invalid base: {e}\")\n                    })?;\n                    if matches!(base, Self::Off) {\n                        anyhow::bail!(\n                            \"Profile '{name}' extends '{base_name}', but 'off'/'none' \\\n                             is not a valid base profile\"\n                        );\n                    }\n                    if matches!(base, Self::Custom(_)) {\n                        anyhow::bail!(\n                            \"Profile '{name}' extends '{base_name}', but custom profiles \\\n                             cannot extend other custom profiles (only built-ins)\"\n                        );\n                    }\n                    let resolved = base.resolve(workspace, config)?;\n                    (base, resolved)\n                } else {\n                    (Self::Workspace, Self::Workspace.resolve(workspace, config)?)\n                };","sourceCodeStart":463,"sourceCodeEnd":499,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-sandbox/src/profiles.rs#L463-L499","documentation":"Profile resolution parses the `extends` field of a profile config into a `ProfileName` via its FromStr impl; when the base name is not a recognized profile name, resolve in crates/codegen/xai-grok-sandbox/src/profiles.rs:481 wraps the parse error with this message. It exists to tell you WHICH profile's `extends` entry is bad, not just that parsing failed. Note a separate check also rejects 'off'/'none' as a base even if it parses.","triggerScenarios":"Calling resolve or resolve_profile_with_runtime_sockets on a profile whose config has `extends: \"<string>\"` that fails ProfileName::from_str — e.g. a typo like \"saftey\", wrong casing like \"Balanced\", or an unknown custom name.","commonSituations":"Hand-edited profile TOML/JSON configs; renamed or removed built-in profiles after a version upgrade leaving stale `extends` references; copy-pasting profile definitions between repos with different profile sets.","solutions":["Open the profile config and correct `extends` to an exact valid profile name (match the ProfileName FromStr spelling, e.g. as defined in profiles.rs).","Check the inner error `{e}` — it lists/indicates the accepted names.","If a profile was renamed in a newer version, update the `extends` reference to the new name.","Do not use 'off'/'none' as a base; it is explicitly rejected even if it parses."],"exampleFix":"// before (profile config)\nextends = \"Balnced\"\n// after\nextends = \"balanced\"","handlingStrategy":"validation","validationCode":"const VALID: &[&str] = &[\"off\", \"balanced\", /* ...accepted names... */];\nfn ensure_valid_base(extends: &str) -> Result<(), String> {\n    if VALID.contains(&extends) { Ok(()) } else { Err(format!(\"unknown base profile: {extends}\")) }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep profile `extends` values in a shared constant list parsed by the same ProfileName FromStr.","Validate profile configs at startup before use.","Never use 'off'/'none' as a base profile."],"tags":["config","profiles","validation"],"backgroundTag":"invalid-profile-base","analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}